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

Difficulty with Autocompletion for SCSS Variables in Visual Studio Code

I'm facing challenges with getting proper autocompletion for SCSS variables in Visual Studio Code. I have a separate SCSS file where I store all my variables (_variables.scss), and I'm importing them into another file (style.scss). However, despite using @use access these variables, the autocomplete doesn't seem to work efficiently. Is there a recommended extension or configuration to enable accurate autocompletion for SCSS variables across files in Visual Studio Code? Currently, I'm manually referencing variables like variables.$variableName, which becomes cumbersome with a growing number of variables. Any guidance or suggestions to streamline the autocompletion process for SCSS variables would be greatly appreciated!...

Skewed Section Seperator - Align with Image

Hi Community 🙂 I would like to use a skewed section seperator in my Hero section. Unfortunately i cannot get it to work, that the flex-item (image) in the flexbox container, inside of the section, is honored with the skewed section seperators. I have created the following codepen to illustrate the issue: https://codepen.io/h1ghrise/pen/ZEPzmEP What i want to achive is:...

overflowing div inside grid

Hi, does anybody know why its all responsive and shrinks until a certain point the red box stops shrinking, tho there's no fixed size nor any content inside? playground...

Why does the content in the div change the vertical position of the div?

I want to make a grid divided into 4 squares each of which can have different content. (I'm not using grid or flexbox as an experiment.) When the boxes in a row have the same content, it displays fine (the 1st image). When the boxes have different content (for example, one has a heading and one has a paragraph) they become vertically misaligned (the 2nd image). I've attached the css and html....
No description

How do I solve this background conundrum , I'm lost. Thank you for any help

I have a grid section that is 100vh 2 grid items inside, an H1 and a P. I need these centered both vertically and horizontally inside, as they are currently (using place-items: center center;)...

How to select an element that doesn't have a child or contains a particular element

how can i select an element in css if it doesn't have or contain a particular element for example ```html <style> /* ...

GSAP ScrollTrigger pinning jumps to the end of the container

Hi! I'm having a bit of trouble with pinning in GSAP I'm using Nextjs 14 and I'm trying to pin an element and it jumps right to the end of the trigger and then it finally pins, not sure what I'm doing wrong, I've been searching and reading docs and I've tried other things, nothing is working 😢 Here's a simplified example on sandbox: https://codesandbox.io/p/sandbox/serene-williamson-j86cy6...

When do you use <details> and <summary> for menus?

Someone was mentioning these HTML-tags and said they are used for hierarchical menus. Is that true? I never heard about these tags. Do you use them really for website menus? I would have guessed these tags are only used for spoiler stuff and to organize text in e.g. patchnotes, roadmaps and stuff like that. What is your opinion?

Need help in positioning button elements.

This is my simple html here: ```html <body> <button> <span></span>...

Astro sass implementation

Hey there. I am trying to recreate by myself this project: https://www.youtube.com/watch?v=IGVWLd3P8ig but I have problem with sass implementation. What have I done:...

It is better to use FlexBox or Position for this layout?

I am trying to figure out what is the "right" mthod to use to create a certain layout. I attached a picture of what the desktop look for the layout would be. Basicly a sticky header, two columns but the right column has a footer under it. When it converts the mobile version the sticky header stays, the side bar gets hidden until a hambergure menu icon is clicked then it will slide out, the main content and footer will take up the whole width as normal. Obviously the sticky header needs to be position call but would it be better to use a flexbox for the reset of the segmenting or should I do position calls? Thanks!...
No description

SASS Issue in Create React App

I have a react template made with create react app. It has bootstrap and SASS setup in it. I want to change the $primary color. Changing color in .css files does not work. I know that changing anything in SCSS file needs to compile it. I have tried to compile it but it gives a lot of errors related to scss functions deprecations. What should I do?...

Nuxt3/Content V2 static site - unable to query data in component?

I've been attempting to fetch some basic content into a navigation component (TheHeader.vue) - using the following const { data: navigation } = useFetch("navigation", () => queryContent("/website/navigation").findOne( Works fine if SSR is true, but I want to generate a static site, and when using nuxt generate with SSR set to false the content doesn't pull correctly into the component? I'm not sure exactly what I'm doing wrong, and the documentation doesn't seem to cover this (Either the nuxt 3 docs, or the content v2 docs)...

Sliding animation not working

the animation not working as intended it is clipping sometimes the element(background) are img elements . the problem seems to happen on this block of js. all the variables are declared (including background.value ones) ```js async function MovePreviousBackground(Left) { const transitionPromise = () => {...

How do you go about creating things like this CSS or just a svg?

These display sort of a process flow, where each arrow is a step of the process. Also what are the things called? surely there is a name, we name everything else haha
No description

Implementing an animated progress bar for tracking article read progress.

I'm trying to animated a bar using css, the default continuous bar works fine, but I have a list of divs (say 10 divs) that are little squares in a row, and I want to paint x number of squares based on how much the css bar is animated. say 50% of the bar is animated so i'm at keyframe 5/10, I want to translate that progress to the number 5 and then render 5 filled blocks in my div list I'm using react and plain css. Here is my css, I took it from https://scroll-driven-animations.style/demos/progress-bar/css/ as you see on the screen, there is a red bar at the top which shows the scroll percentage (how far we have scrolled from the top of the article. and the green blocks that are filled are showing the same progress but in discrete units. (it's currently not working propertly the filled in ones are just a random number) in my latest approach I tried making a new css @property (--scrolled) and inside the keyframes interpolated between 0 and x (say 20 blocks) in my animation keyframes, but I'm not able to access the updated --scrolled property with js, I'm not even seeing it be updated on dev console. ...
No description

Getting previous route in Nuxt 3

Hey guys, how do I get information about the previous route I navigate from in Nuxt 3?

space between pushing content under the scroll bar

i had it working before, but i wanted the header to be sticky. The sticky property didnt work so i made it fixed. That worked, but now it had a new problem of taking up just enough space it needed to fit everything, and now ive put width 100% and it pushes the items behind the scroll bar. How do i fix this or make the sticky work with what i had originally?
No description

What are some good Javascript tutorials for someone who has experience in c++,java,python?

Hi, I recently graduated with a comp sci degree in may and for personal interest and to help get my first entry level position I've been learning as much as I can about front end development since October. Starting in October I did the FreeCodeCamps front end certification process using react. After struggling through the course I felt that I still didn't know enough so I then spent the next two weeks straight watching FCC's 12 hour bootstrap tutorial and then spent the next week finishing t...