Kevin Powell - Community

KPC

Kevin Powell - Community

A friendly place for developers to meet other devs, ask questions, get help, and just have a good time 🙂.

Join

front-end

resources

back-end

ui-ux

os-and-tools

help

Dynamically setting the color in TailwindCSS.

I am working with Next.js and Tailwind CSS and using Context API to set the theme of my webpage dynamically. I have a color palette of 8 colors. But hover:${themeColor.bg.base} is not working with hover, otherwise the color is working fine. themeColor.hover.base actually points to bg-themeColor2Base, and themeColor2Base is defined in tailwind.config.css....

Zoom effect keeping dimensions.

Hi, Im trying to make a zoom effect on my img without breaking the card dimensions.. As you can see, https://github.com/leokim92/PreEntrega3-kim, in my index.html I have "galeria-container" class and with transition and hover I managed to create some kind of zoom, but with that zoom the image container is also growing.. I want to make a zoom effect inside the container.. Thanks for your time!...

How to make the element stick at the edge of the screen?

How do I make an element like an image stick to the side of the screen (have another layout where the image needs to stick to the top right of the screen) but not using position absolute because that is messing up with the other viewports
No description

Font converter for Font Face

Do you guys have any recomendation for font coverter. I use Fontsquirl but latley it works when it feels like. I need some other options to convert from TTF to WOFF2 Thanks in advance

Editor X

hey guys i would like to know if someone build a website in editor x?

Grid card with image, text under and transform scale

Hello, I am trying to create a div that will have an image, and under it there is a div with data about that image, the problem is that my grid-template-rows needs to have a max-content/min-content so that 1st row wont get bigger than image, my second row should show text only after my animation is finished (and I would like it to have an actual size of the content (with text it just getting higher as text tries to fit div) ...
No description

White space after image

in my website"https://talhamustafa1.github.io/mv.machine-learning/" you can see there is image and after the image there is white space i have given image height of 100vh and also do display:block to remove extra white space but that did not work.

How Can I Setting Up HTTPS for using a Web API

I'm currently working on a project that involves setting up HTTPS for a web API, and I've run into a few challenges along the way. My project centers around webcam functionality. To ensure that the web API is accessible via HTTPS, I attempted to use tools like browser-sync and http-server to facilitate HTTPS serving during local development. Regrettably, these tools did not function as anticipated. For instance, in the case of browser-sync, I adhered to the provided documentation and followed these steps:...
No description

React-select problem with changing selected option

I'm currently using react-select to style a search bar within my project, and most aspects are functioning as expected. However, I'm encountering an issue with altering the color of selected options within the dropdown menu. As for the setup, I have configured the dropdown to remain open until the user manually closes it by clicking the closing arrow. Additionally, I've enabled the multi-choice option. Here's where I'm seeking assistance: I want the background color of an already selected option to change after it's been chosen. Could someone please guide me on how to achieve this? Your help would be greatly appreciated....

Can this be solved using only CSS?

I have a component that need to adapt its layout depending on the content it receives. In this example the layout changes depending on the amount of images: 1 image (in blue) 2 images (in yellow) 3 images (in green)...
No description

What tags should be used for a large clickable div having a button.

It is preferred to make every clickable thing a button or link so that it is focusable using keyboard. But in this case, these two big boxes are clickable and each of them has an extra button as well. What tags should I use here? Would there be a button inside a button?...
No description

How do you prevent a iframe from scrolling it's parent document ?

So I have a React Application that uses Element.scrollIntoView to scroll to the bottom most "message bubble" in my UI (the application is a sort of chat app UI similar to Messenger, WhatsApp etc). I utilise a ref similar to the first image to do this. We render this "UI" in an iFrame on a separate widget via a HTML <dialog> element which is also owned by us....
No description

Worldpac is hiring front end developers

Worldpac is looking to hire a front end developers. Pay is $45/hour and contractual And we pay weekly Must be able to relocate or work from home Flexible hours so you can work 10-40 hours per week...

Html Class List

how do i remove the class with javascript on html tag

Solve if-else problem

Take the values given below of length and breadth of a rectangle and check if it is square or not. var length=200; var breadth=200;...
No description

Barba js Issue

Do anyone know how to re run the whole script, after barba js page transition? here is a small demo, i have gsap animation to each page, but after page transition the animation don't work, please help............. ...

Vanilla CSS: Make flex-wrap always wrap more than one item?

When the screen is wide enough, I would like all elements inside my flexbox side by side. However, at certain screen sizes, flex-wrap just puts one item on the second line, and I don't like the look of it. Is there a way to force flex-wrap to always keep the two rows roughly the same width? Or can I do this better with grid?

Best way to achieve this design?

What would be the option for this design? It's tempting to go down the absolute route but is that the best? https://i.imgur.com/kFGU71b.png...

Allow button to always remain in viewport

I have a URL: https://kasi-web.vercel.app/users/DKBvDQwQAXvFaIUzKmiM. I want the "Pay With Kasi" button to stay at the bottom always without users needing to scroll, regardless of the device. I've currently set the height to 100vh in my CSS, but I still need to scroll on mobile devices to see the button....