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

Inline staggered animation doesn't working

I want to make a staggered animation with css. And my count of element is not exact. So i should write dynamic css code. But it doesn't work. Here is my code: ```css...

How do I force fonts to always have the same width?

I will dynamically be rendering content into these two grids. As you can see there always might be some space left on the sides of each grid item. I wanna force the element inside to always take up the full given space. What can I do? Container structure: last picture. Iโ€™ve already tried text-transform: full-width. It does what I want as you can see in my third picture but it changes my font dramatically. I donโ€™t want that. ...
No description

Locomotive JS is not working with rest of JS

I Want to Make My Website Smoother on Scroll for that I have been using Locomotive JS to achieve a smoother scrolling effect on my website. However, I have encountered some issues with the rest of my JavaScript code not being applied correctly. For example, I created a navigation bar that is supposed to move up by -100% when scrolling down, and return to its original position when scrolling up. Unfortunately, this functionality, along with some other features, is not working as expected when usi...

CSS Grid

This is the css code for the learn-more section element ```css .learn-more { padding: 160px 10% 120px 10%; display: grid;...
No description

type scale & space scale

Hey, for this example i'm going to reference https://utopia.fyi/. There are two generators, one for a type scale and one for a space scale. The type generator accepts a min and max viewport width, a min and max font size, and a min and max scale that you'd like to increase by each step up. The space generator accepts the same values minus the scale. if you input the same values in both scales, upon generation the numbers in the clamp function from the type scale and space scale don't correlate in any way. from my understanding the aim of a scale is to create a set of values that are harmonious with each other. However if space tends to be relative to the text size and the clamp values differ, how does implementing both custom property blocks in a project allow the space sizes and text sizes to slot in with one another? Thanks in advance....

Having trouble with div inside td to get 100% of td height.

How can I ensure consistent heights for cards within table cells (<td>) in my HTML table, maintaining their heights proportional to the content rather than filling up remaining space? I've encountered an issue where applying height: 100% to the table results in unwanted behavior when there are few data entries. CodePen example for reference: https://codepen.io/umanga/pen/WNWawWj...

CSS alignment problem + not responsive at all.

https://sensational-biscotti-7e017a.netlify.app what did i do wrong ? i gave margins to adjust the position of text and input box but turns out it is not what i shoud have done. plus it doesn't adjust when it's windowed it has to go full screen. i'm beginner in HTML CSS so do tell me what else i did wrong. thank you so much i appriciate your help. ...

Follow up from yesterday: subgrid with different tags browser incompatibility.

I vented yesterday rather than asking a question, but today I have a question. I haven't got codepen so code attached as a self-contained HTML, hope this is ok. Situation is I am trying to use subgrid with labelled columns across browsers. caniuse says that everything I want to use supports it... but... Firefox works perfectly and everything else does not. (See screenshot, Firefox is the bottom one.) Or... rather... Subgrid works perfectly on all browsers unless I use fieldset. Anybody any insight as to why fieldset would behave differently to div and why caniuse doesn't distinguish this? Can I / should I report this to canIuse ?...
No description

How do i achieve this? i experimented with has() property and im facing difficulties

https://codepen.io/avinash-tallapaneni/pen/QWPVRzg im unable to target previous siblings, is there a way to code this without using 3rd party library?...
No description

v-bind modifiers

I know this is not code related problem but i want to know, how to use or when to use the v-bind modifiers .camel, .prop, .attr. I am still confuse about it Can y'all provide example code of it...

How are inline-block vertically aligned?

Given the html ```html <section> <div class="a"></div> <div class="b">b</div> <div class="c"></div>...

Menu overlay 'onClick()' & retain scrolling for content underneath (pointer-events?)

I've attached the component, as well as my app.js, to show that it's being invoked outside of the <Routes/> element, so it appears on top of all other components/pages/routes. This is where the problem comes in however, since, in the appNav component itself, I'm applying, conditionally, an overlay which, when active, encompasses the entire width and height of the container. The overlay has an 'onClick()' which triggers the state change in 'isMenuOpen', as a secondary way to close the menu, by clicking the overlay background essentially....

Grrr. @supports is wrong or subgrid is wrong. :(

So I had an idea for two column form layout using grid with fieldset using subgrid. It works perfectly in Firefox... but not in Edge or Chrome or... So I checked "canIuse" and it said support was everywhere. But then I check in F12 developer tools in Edge and it says "not supported in ... [long list of browsers]". So I decide to go for "@supports"... and it is still broken. So......

Seeking Guidance: Achieving Desired Border Effect in Design Section

Hello, could someone assist with designing this section? I've attempted to create a border effect within it but encountered difficulty. Perhaps my approach is not optimal. Additionally, it doesn't resemble the provided image. Can anyone provide guidance on achieving the desired effect? Here is the code pen link-: https://codepen.io/Amit-Soni-the-vuer/pen/mdgGwRW...
No description

Moving Element with Javascript

I want ginger cat image to move 50px in the direction of the button click https://codepen.io/JimKi8/pen/YzMOQVp...

state not updating properly

```js import React, { useState } from "react"; import "../styles/App.css"; const App = () => { const [shapes, setShapes] = useState([]);...

CSS selectors

I have this piece of html right here ```html <section class="how-help"> <div>How can we help?</div> <div>...

SVG filter to "flip" the image?

essentially, small tweak that displaces the image to go the opposite way. kind of scaleX(-1) my research so far: it should be possible, by creating linear gradient and using it as a displacement for the source graphic, it should be able to flip it. ...
No description