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

Can I make the bottom come to more of a point?

I'm trying to replicate the shape of the attached badge, but I'm struggling to get the bottom radius' to form a point, instead of a fully rounded border. Is this possible with a single shape, or am I going to have to look at creating multiple shapes? 🤔
No description

A "continuous" box shadow on an element

I'm creating a pill shaped button from a design that has a box shadow like effect, however two key features of the shadow complicate matters, the shadow must visually connect to the element in a straight line, and the drop shadow also has a repeating background of it's own. The first attached image shows the design, and the second shows where I'm up to with the implementation. My current approach is simply creating an inset: 0 element underneath the pill button, applying the appropriate border, and applying a repeating-linear-gradient to achieve the striped background effect. I've no doubt this is an issue that has been solved before, but I've struggled to find the answer....
No description

NVDA reading modal items multiple times

Hey everyone. I have been working a modal mobile menu and trying to use NVDA to make sure it's accessible for screen readers but whenever I go to open the modal I get some really strange behaviour where it reads everything within the modal multiple times (see the log below). I have tried assigning custom aria-labels to things but nothing really seems to be working. Anyone else run into these issues? It also happens on both Chrome and Firefox here is a link to the repo if anyone wants to try it : https://github.com/Chris-Wagg-Frontend-Mentor-Projects/news-homepage ```...

~~Solutions to fix sections moving on mobile view

😀 Hi y all , some time ago I ve seen on my YT feed a video posted by Kevin 🔴 where he fixed the moving of sections on the body while scrolling in mobile 🔺 , does somebody know the link for that ? or the solutin either one of thouse could really help 📗

truncate style does not work

Hi guys, I apply truncate to p tag but it does not work. Cany anyone help me explain why?
No description

VueJS Navbar

I know space-between would work, but I only want the links spaced sliiiighltly apart, like 20px or so..? ```<script setup> import { RouterLink, RouterView } from 'vue-router'...
No description

Tailwind CSS - Parent style when child is hovered

So, I need to have a parent styled (background to blue) only when a child element is hovered. I've done this with Javascript, toggling class .hovered on parent upon hovering the child. Is there a better way to do this on tailwind css? Or another question is, with my solution, how do I implement tailwind? Right now Im using @apply to style children with .hovered on parent....

What are the dangers of allowing a user to specify a stylesheet?

I've got a NFT site & I'm considering allowing users to specify custom page styles as an element of the NFT's metadata. The style will be an emotionesque CSS-in-JS encoding like: ```js const color = 'blue'...

Looking for New Animation Ideas!

I recently created an animation, which you can check out here : https://github.com/Ibrahim-AbuFarha/animation-test/blob/main/README.md If you have any interesting idea that you think would make a great animation, please share them....

revealed content not starting at desired point

Hey, i have 6 paragraphs, 3 of which are hidden that become revealed when pressing a button. When scrolling through with a screen reader and pressing the button, you have to scroll up to read out the newly revealed items as scrolling down just moves on. In terms of this example, would there be a way to put the focus on paragraph 4 after pressing the button (or at the start of the revealed content) so everything can be read out smoothly and in order. Is this a common practice to do with things like this? I'm new to js so any recommendations are most certainly welcome for that too haha (i notice the hidden content flickers when reloading so maybe that's something that could be improved perhaps), thanks in advance. https://codepen.io/deerCabin/pen/KKLOQbY...

When switching from one div to another the elements are jumpy why?

is this the behaviour of div elements by default, when converted to button doesn't seem to have similiar issue why? and how to solve this jumpy issue when using div and would like to know why it might occuring be this way?

How to make this number "1234567890" into "1,234,567,890"?

So a whole number to separate by commas, so I can format it to look like that? Important thing is for it go from last digit, so in this case "0", and every 3 digt to plant a comma.

i have a container that contains 6 items and i want 3 items of the exact same size in each row

i have a container that contains 6 items and i want 3 items of the exact same size in each rows ( i have 2 rows ). how should i do it?

Slick slider inside a flex box

I have a slick-slider inside a two-column flexbox, but the slider is not respecting the parent container width, and I have to set its width to a certain value. Which is not good. I want it to be just 100% width of the parent. here is my markup, I'm using tailwind css: ```...

Any ideas on how to create a double border chamfer with transparent background?

I remember that Kevin has a good video on creating borders with cut corners here: https://www.youtube.com/watch?v=aW6qEAQSctY Is there a way to create something similar but has transparent background with just CSS without resorting to SVG?...
No description

Suggestions on how to correctly handle 2 scrollable items on mobile

I have a main webpage that scrolls like any other website would but on one of my pages I have a full screen interactive map. On desktop this you must click and drag to get around the map. As soon as you scroll you just scroll up or down like normal and kep going down the website. However on mobile the same gesture is used to scroll the website and interact with the site. As soon as the scrollbar for the main website goes away, you can scroll around on the map but then you're kinda stuck unless you press one of the navigation buttons on the bottom. On desktop as you scroll on the map I move the map around and highlight some locations (same on mobile) but if lets say you scroll to the first place and stop, you wont have any way to get to the other locations. ...

Preserve image aspect ratio with Gatsby image component within Flexbox

``` export default function Header() { return ( <header> <StaticImage...
No description

Object Conversions

Can anyone pls explain in brief what are the important and necessary object to primitive conversions in brief. or object conversions with egs

How to make slope box in css.

I have one card. in that card, i have one slope. i tried using clippath for creating that slope. but it doesn't worked me out. please help me. i have attached both images. first one was design. second one was i trying to make that design.just need that slopy curve, code: ``` import Image from 'next/image';...
No description

Tailwindcss flex-col issue

Hi guys, I am trying to build a login page and currently I am using tailwind css to build it. I am putting flex-col as a property but its changes are not reflecting. I am not sure what I am doing wrong, can someone help? I can clearly see flex property is getting set on right side of dev tools but not the flex-col property...
No description