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

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

How to create a shimmer effect on border

Hey guys. I would like to know how to create this shimmer effect on the border in button like one on the webflow website.
No description

layouts that are visually different to the dom

Hey, if you have a layout that is visually different to the way it’s written in the dom, perhaps some elements have been moved around for a design, how would you go about making that accessible for screen readers so they still recite it in the correct order etc. and if the tab order gets mixed up, is there a way to get around that or should you avoid that design all together? Perhaps any rules of thumb for this type of thing? Thanks in advance.

Trying to make this animation look smoother

I am trying to make the boat look smoother with keyframes animations ```css img { width: 10rem;...

whats the good practice for grid lay out

hi guys i jut want to hear you opinions. If you have multiple components in vue and you use grid layout is it fine to have different grid in each component? or whats the best practice when using grid layout in multiple components?s

Creating responsive navigation bars with a hamburger menu

I've set out to learn more about navigation bars and how to properly create them, i'd like to create the navigation bar as shown in the image and i'm having some issues. 1 - I usually create a navbar in the structure below, add flex to main-header and main-nav. But now i need to add the buttons at the end of the row. I'd usually add a div and put those 2 buttons in it and assign them flex-end but this did not work. How can i get them on the flex-end side whilst keeping it responsive? ```...
No description

is there any way to make my sass files less messy?

As you can see, for every sass file I make, there's the map and the regular css file that comes with it, but it makes my css folder pretty messy, is there any way to hide the unnecessary ones and only keep the sass? would making a sass folder and putting the sass files inside while keeping the other files inside the css folder work?
No description

How to get to differently named array-items when iterating over the whole array?

for(let item of data) {
random = item.capital[0]}`;
}
for(let item of data) {
random = item.capital[0]}`;
}
...
No description

How do I make gradient smoother?

So I have 2 components: Gradient.tsx & Button.tsx. Code for both you cabn see at screenshots 1 & 2 accordingly. They problem, however, is not there. On screenshot no.3 you can see Gradient.scss, which is initialized after the button is pressed. The thing is, when you start animation, you can see a very sharp change in color, escpecially on the right side of the screen. ...
No description

Weird code function

i have a problem with the i < (long code) the problem is it doesn't take the number so for example if a put it to i < 4 it works but the other way doesn't here's the code:...

Converting .png to .svg 'trace-bitmap', coming out bubbled/soft edges, advice

I have a png that I'm trying to convert to vector graphic (svg) and, following a youtube tutorial, I've successfully "trace-bitmap"'d the png. However, comparing the two, the original png, and the 'traced' svg, it seems that no matter how I set my 'single scan' thresholds, etc, the tracing always wants to come out bubbled instead of having sharp lines and corners like the original. BTW I am using Inkscape here to do this. My original issue: ...
No description

Help with FFmpeg

I am a rookie and i need help with setting up ffmpeg
No description

How do I make my components height consistent throughout all pages?

I am currently working on a gym tracking/analytics system to practice working with next.js and tailwind. On the main page of my dashboard, the height is just the way I'd like it to be, the sidebar extends throughout the page and the content too. However, when you get to the second page (dashboard/activity): 1- The sidebar is not taking the full height similar to the main page 2- The table is also not taking full height regardless of me setting the grid rows to 1/-1 If anyone could explain why this behavior is happening and help me understand I'd greatly appreciate it, thank you πŸ™‚...