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

Anyone knows how this is done?

came across this. Anyone know how this done? btw the image is expanding on scroll. i figured it has to something with scale. idont understand like how this one starts scaling when it enters viewport https://gyazo.com/3cac8d10493822338f3b1992a83df98b

Bacground blur problem

I noticed that one element with a blur background overlaps the other one ignoring the z-index, how can I solve this problem?

Css layout help

Hey guys, I'm trying to make a relatively simple layout but cannot get my content to stay within the viewport. I don't want my page to scroll. I have this codepen: https://codepen.io/vince1444/pen/wvEbvdm Maybe I'm just blanking, but I cannot for the life of me get it to stay without scrolling. Maybe I'm making this way harder than it has to be?...

how to make carousel

I have react app with vertical swiper I use swiper js to have swiper with cover flow and rotation But i see is not fluid on touch scroll like is slow Not like normal scroll on ant container Who have same issue...

animation infinite cpu!!!

Why css animation infinite take all cpu 100% When remove it the cpu will be free just asking to know and what best practices to use css animation...

React Routing

How can I solve this react-routing problem . So I have 3 pages /signup , /login and /todos . Now if a user is already sign in I want it to redirect to /todos and if its a new user I want it to direct to /signup . BUT I don't want the user to access /todos without sign up like changing url to /todos should give the default 404 . One way is to remove the /todos route and conditionally render the component but then how can I redirect user to /todos when user successfully signup/login . ...

For loop in JavaScript

Hello there, I am creating a simple webpage for a Caesar Cipher. I wrote the Cipher in Object-Oriented. ...

Function for calculating time between when comment was posted and now? (elapsed time)

Hello! I have a task in my current project where I need to calculate time between when comment was posted and now. So If comment was posted 2 days ago, it will say "2 days ago" etc. Now, my question is, is there a built in function or whatever that shows elapsed time between in whatever format you want? So, seconds, minutes, hours, days, week, months years etc. Or do I need to write that code myself? Since it looks like something basic that should be built in....

How to use the return output to display it inside an element in the HTML

Hello there, I am creating a simple webpage for a Caesar Cipher. I wrote a Cipher class and I am trying to map a specific method to the button in the HTML. ...

SCSS function

I have inherited some code which includes a function that looks like it should work to me. ```// rem units @function rem($px, $base: $base) { @return math.div($px, $base) * 1rem;...

If statement is NOT working

I am making a Rock, paper, scissor game. But the If statement of the code is not working. What can I do?

Scroll snap not working

Hey, I wanna get each section to snap on scroll but its not working. https://codepen.io/RS_2009/pen/VwGRNjG?editors=1100...

transition property not applying after changing it via js

im changing width via js to simulate the scale. when i do that the transition property is not applying and the change happens sudden but when i reload the data saved in local storage is retrieved and the transition is applied.

Frontend Mentor Question & Feedback

https://www.frontendmentor.io/challenges/article-preview-component-dYBN_pYFT Attached are the desktop and mobile versions. My question is: I feel like the way I set up the layout is too hardcoded. I relied a lot on max-widths/heights instead of letting the content be dynamic. I'd appreciate some feedback; this was a lot harder than it should have been for me especially since I'm not exactly new to html/css, so I guess I'm not as good as I thought I was 😂 https://codepen.io/vince1444/pen/YzOgYeM...

After applying position sticky, button not working

I created a sidebar with buttons to locate throughout the document, but after applying position sticky, buttons are not working at all not even hover effect is working

Why is my JS not working?

(JS Fiddle for context: https://jsfiddle.net/qLry5cwx/2/) The js is supposed to display a modal but it appears to not even try to execute. The code still works in another project of mine, from which I ripped all of the code, but not on my new site. I cannot figure out for the life of me why it isn't working. Can someone help me? Cheers...

How to stop browser from applying system default theme to my site?

Some browsers like via browser are applying system default theme to my site, how can I prevent this.

Manifest v3 extension refuses to load styles in Chrome, no issue in FireFox

I am at a loss. FireFox will happily load the CSS files I've listed, whereas Chrome will not. I've made sure to re-run my bundler, reload my extension, and update my browsers. ...