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

Style caret

Hello folks, how do I style or mimic a caret to a bigger size? I tried doing a trick where I wrapped an input with a div and had a border-right blinking but I realized when I wanted to edit the text, the border wouldn’t follow like a normal caret would

How to Make a curve at the bottom of an Image like this first image of the background

How to Make a curve at the bottom of an Image like this first image of the background
No description

Variable font-weight shenanigans

This is driving me crazy. I have a variable font-weight that works great except for select and option. I put a font-weight on it, font-variation-settings: 'wght' 400 -- both do nothing. The only thing that works is changing the font-family to something like sans-serif and that applies the correct font-weight...
No description

last sticky item in a list not sticking

https://codepen.io/mrjonoces/pen/NWQbyeW Why doesn't the final item in the list stick? I've been banging my head against a brick wall for a while with this, including reading and watching a lot of content about common sticky issues but none have covered this issue...

Grid-based hierarchy for multi-line elements

I'm wondering if it's possible to achieve a responsive hierarchical layout like this with CSS and/or JS. I have a grid-based layout that has "cards" that belong to the same parent groups. I'd like to style them so they group together and look decent on a responsive screen. I'd imagine there are JS libraries for handling this but I don't know where to start looking. Thank you in advance! (If it's helpful, I'll probably be creating this in Svelte)...
No description

Using container queries along with subgrid

Hey guys! I'm struggling a little bit with this layout: https://codepen.io/Markus-Rappat/pen/MWNGJME I would love to use the container query on the subgrid but it seems like it's breaking the subgrid functionality. Try to uncomment "container-type: inline-size" on the subgrid and see how the layout breaks. Note: This is just a simple markup for demonstrating the issue, nothing more, nothing less. ...
No description

Background Image overflown

code - https://github.com/abhi-zero/profile-card-component preview- https://github.com/abhi-zero/profile-card-component I need some help with the Frontend Mentor project I'm working on, called "Profile Section." The task is to create a card displaying profile details and add two circles in the background—one in the top left (a quad-circle) and another in the bottom right. However, I'm facing an issue with the second circle. Despite using overflow: hidden on both the wrapper and the body, the second circle isn't displaying correctly, and a scrollbar keeps appearing. ...
No description

Positioning text with absolute with responsiveness

Heyo, I got a card-title that I want to be placed at a certain spot on the page and it needs to be responsive. I thought of using position absolute, since it needs to be on top of a masked image. Here's a video how it's acting right now and the necessary code: ```css .project-card { position: relative;...

scss-@forward

Where is the problem? 😫...
No description

How to link to an external CSS style in SVG?

I have a Codepen where I try three different methods of importing an extrenal stylesheet into an SVG. I'm working from the specification which says:
An HTML ‘link’ element in an SVG document (that is, an element in the HTML namespace with local name "link") with its ‘rel’ attribute set to 'stylesheet' must be processed as defined in the HTML specification and cause external style sheets to be loaded and applied to the document.
I tried:...

:focus outline being overlapped.

Hey, so my focus outline on this button is being overlapped by the div as you can see in the image. I can't seem to re-create this problem in codepen so i understand if no one can give any proper advice, i'm more trying to see if anyone has had this happen to them or knows what could cause it. My structure is like so: ```html <div> <div> <button>button</button>...
No description

That one grid-content Video

Do you know that situation, remembering a video but you just can't find it? yep. Hope I was not dreaming... wasn't there a video or stream (maybe pen) where Kevin showed off, perhaps just briefly, a refined grid layout for content? A center line for multi-columns and/or pull-out bits were added. The only thing I found is the one explaining how we can avoid wrapper containers, which isn't it – link for research wanted dead or alive...

Style an element if it has 2 attributes with the same value?

I have a tricky one. In the first screenshot, it shows the Qty numeric inputs with custom "spin up" and "spin down" buttons. One is enabled, and the other disabled. We are using a 3rd party library to do this, and my stylesheet targets showing the disabled (-) and (+) icons by checking to see if the container has an input[readonly] ```...
No description

web extension fetch problem with firefox

Hi all, i just finished a tiny chrome extension, and wanted to post it for firefox too. ...

Starting My Next.js Journey – Any Tips?

Hey everyone! 😊 I'm just starting to learn Next.js, and I’d love any advice, tips, or tricks you might have! Anything from beginner-friendly resources to best practices would be super helpful. Thanks in advance🙏

State

why does the alert does not get the latest value while the 2nd setter function does? ```js import { useState } from 'react'; ...

api is not working on live site

hi guys maybe someone can enlighten me about the api on how do i get a live api for my deployment, because currently i deployed my project in vercel not knowing that i have not yet turn my local host into live?the image is not there but the text is there
No description

random number and tracking them / sending signal via keyframes

hi guys I wanna test a thing with my question (1st is it enough for me to talk alone with no code sometimes i know its harder tho i just wanna know so the first part is without the code and the second part the code exists) I created a program to give me 2 random numbers and put them in keyframes so just imagine a ball that goes from point 1 to point 2 and then 1 and the 2 variables are different + changing all the time each time animation stops by timing them so the ball always change direction and comeback...

theme system

Hey, what would ya'll recommend as a good method to go about creating themes for a site? I had the idea of applying variables to html and having a data attribute toggle along with prefers-color-scheme (or lightdark()) e.g. ```css :root { --bg-light: ...; --bg-dark: ...;...

Help with Navbar Design Alignment and Line Styling

Hi everyone, I’m currently working on a navbar design, and I'm trying to understand how to achieve the perfect alignment and styling for the lines in the navbar. 1. Line Styling: What techniques do you recommend for creating the lines? Should I use CSS ::before and ::after pseudo-elements, SVGs, or images?...
No description