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

Pre Set Select Option

i want to pre-select this input when page loads but when I add the a value it goes blank ``` const input1 = document.querySelector('.publicationsList #type');...
No description

Infinite, scrollable, animated link Cloud

How can I create a component like the one Perplexity has? I have the animation working but if I let the user scroll, the animation gets all messed up. The component needs to have “infinite” items (the one that disappears from the left appears from the right and vice versa), scrollable, and animated.

Next JS MDX

Plugins in mdx do not work. I have configured everything in next-config.mjs and created mdx-components.tsx in the root folder, but plugins refuse to work (all of them). Environment Information ``` npx --no-install next info...

how to code images that will pop up when i hover over the center image?

im still a newbie at css and html. just like in the image, there should be four images that will pop up if i hover over the circle in the middle. i also want these images to be clickable so that they will go to a different page in my website. is there a way i can code this using css animations?...
No description

How do I make the inside of clip-path rounded?

I have this https://codepen.io/Lko3001/pen/ExJNEKw And as you can see the outside is rounded but the inside of the clip-path is not, how do I fix it?...

Astro : How to import local images in framework components that will work in the build

For normal astro components, I can use import(...) in my <Image/> component ; however, in my use case, I am dynamically rendering content through JSON, and my file paths start from /src/assets/.... I am passing them as they are to my React components. They work just fine in development, but show an "image not found" error in the production build. ``` export interface Props { title: string;...

@supports with animation-timeline

Hiya, I’m using chrome on a version which supports animation-timeline functions like scroll() and view(), yet @supports does not function properly with them. Is it possible for @supports to check such compatibility?

Working calendar

Hello , My question is that how can I create a working calendar ? like make it clickable and when someone hovers to a date for example it can change the color of the date and stuff , Can someone help me?

react why is setCategories is not defined error

Hello, For wordpress im busy with making a component who reads all categories. So far I have this : ...

How can I add truncate like ... if there is overflow in the <g></g> element

I'm using <g></g> ```typescript <g clip-path="url(#card_clip)" > ${card_body()} ${card_image()}...
No description

Vertical scrolling without using absolute height

So, for simplicity's sake, let's say I have two components: Component1 and Component2. I also have a main footer that comes from layout.tsx. I want the entire page to always be h-[100dvh]. I want Component2 to take up all the available space between Component1 and Main footer (which means I cannot give Component2 an absolute height), and if there is an overflow, then Component 2 should be scrollable. How do I do this? I am using Tailwind, if that matters.
No description

overflow-x scroll without scrollbar

I have a container with overflow-x: scroll. On mobile there's no scrollbar but I can grab and drag left/right to scroll. I don't want a scrollbar on desktop but still want to be able to do this? Is the solution? scrollbar-width: none;...

filter: blur() and contrast() together doesnt work

How do I make the same effect of the image? I tried using the bit of code provided but it just blurs it
No description

Frontend dev project for a star rating system

I'm wondering if there if an easier way to go about this, specifically when using css to highlight all previous items in the list and if there's anything I can do to improve my javascript. However it does alll work. I'm not sure about the psuedo elements, i want feedback if i'm using the most efficent code. https://codepen.io/Ziphour/pen/wvZovga...

the easiest way to make a transition on display css ?

Hi there, (i just found this cool (experimental) solution to creat transition between display block/none : https://codepen.io/VictorUx/pen/xxeRKqg But this rule only available mainly on chrome. And it doesn't work well with className, when you remove the .active) ...

Performance

Should we use next-gen image format for poster attribute? or do they have any fallback?

styling <ul> and <li>, what can prevent this?

I’m trying to style it on here but it doesn’t seem to accept it. I’ve looked through the code and I didn’t see anything that I thought would be preventing this? https://codepen.io/Laing91/pen/RwOGJBe On my phone so apologies for the lack of code, but I had been attempting the below.....

Make just an child-element sticky

I want just to have the time on the left side sticky, not the whole element (like in the second video). Is there an easy solution without "doubling" the list and make the left / right element hidden? the list elements are currently written in flex like ...

Get target scroll position of a smooth scroll element.

Question: Is there any way to get the target scroll position/point and not the current scroll position. I am able to get element.scrollLeft but thats current scroll position, I want the position where browser will stop the smooth scroll or stop the scroll "animation". What I am trying to do:...
No description

Help a bro center his CV

https://codepen.io/Laing91/pen/RwOGJBe I can't figure out how to do it, I thought if I just gave the wrapper a grid/flex display then I could center it, but it doesn't like it, and I know it's probably an easy fix, I just can't quite figure it out......