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

Help Recreating this mountain clip path effect

Hi all, if you check this codepen you will see that 2nd image down the page has cool mountain clip-path CSS set to the top and bottom of the image. I was trying to recreate this but was unsuccesful. Main issue is that my clip path (or custom SVG) stretched when resizing viewport, while in the codepen you can see that mountains retain their aspect ratio, never stretching or squishing regardless of viewport size. What I missing here, how can I recreate this effect? When applying identical CSS to my markup the mountains always squish down πŸ™ ...

What's the current best practice for linked card markup?

Goal: an accessible card containing an image, heading, description, CTA, etc. "Clicking" anywhere on the card takes the visitor to the target link. Here's a Pen demonstrating some common card component patterns, but all are problematic to some degree, either for the visitor, the developer, or both....

What Browser should I care about when it comes to features supported? Should I go for a fallback?

I'm fairly new to CSS and recently started looking into lch() since it seems like a much better alternative to hsl() and especially to hex colors. However, when checking browser support on https://caniuse.com/css-lch-lab, it looks like all major browsers (Safari, Chrome, Firefox, Edge, Opera, etc.) support it, but some still don’t. like QQ Browser, Baidu, KaiOS (I assume those are Chinese browsers?), Opera Mini, and Internet Explorer. So my questions are: * When it comes to something as fundamental as color, should I wait until every single browser supports the feature? * Or should I go ahead and use it while providing a fallback (e.g., declaring lch() first and then an hsl() value below)?...

positioning a form - html/css only

Hey guys , im trying to position a form like in this picture this is my code so far : https://codepen.io/MightyFriesByte/pen/KwdoLOj ...
No description

[JS] Null or undefined in prototype chain

Hey I read that if we search beyond the prototypes linked together i.e. the chain ends and we are still searching we get null. Also, if the function or property is not found, we get undefined. Now, how is it possible to get undefined, if I will end up searching beyond the chain, wouldn't I always get null? The reason, I will end up searching beyond the chain is coz that function or property doesn't exist, so we wont give up and keep on searching. Which means it is impossible to get undefined?...

Hi, anyone complete the OWASP Juice shop challenges? (Specifically in Github?)

I'm starting to struggle with the 2 star+ challenges, was wondering if anyone had any resources for tutorials or hints because the ones provided don't help me much.... Thanks in advance!

Kevin Powell's

Hello there! I have started the series where Kevin builds a responsive website from Frontend Mentor. LINK TO MY QUESTION: https://youtu.be/h3bTwCqX4ns?si=F6VYp3teAxOJOd8_&t=298...
No description

Is grid container the containing block of absolutely positioned child, without non static position

I am having some confusion between whether a grid container is naturally the containing block of its absolutely positioned grid children, even when the grid container is positioned statically, or whether you explicitly need to declare position on the grid as relative, to make it the containing block of its absolutely positioned grid children? I checked with the example from this article: https://dev.to/nicm42/using-position-absolute-in-a-grid-1apg , HTML-...

typescript - property is missing in type ... but property exists

in js, you can do the following: ```js let x = 'b'; let y = {...

How do we work on someone else code, like to implement a new feature

Hello, quick question, I'm currently doing an internship. Last year also I did an internship where I needed to build something, it was pretty interesting. But this year, what happens is that I was put directly in a team to work on leftover works in their backlog (very boring tasks). Even though it was boring, what I noticed is that the codes have been written by many devs and it rarely happen that we work on something from scratch. So my question is, say I need to understand the code of what developers did, how do I do that? I mean for example, I started to debug things, I understood what's happening on a high level but there are still things that I feel without knowing what was done initially, from scratch, it's a bit to add/implement something. So I wanted some ideas on how you guys do when you need to implement some codes in a software that wasn't written by yourself, it's kind of annoying, right? But I do realise that this is what's going to happen when I will work on full time job, just wanted some advice on how to tackle/exit out of this scenarios....

align-content: stretch;

Why align-content: stretch; doesn't work when align-items is set to any other value other than stretch?

SQL multiple table same unique id

Hello, How can I create same unique id in multiple tables. ```CREATE TABLE IF NOT EXISTS users ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username TEXT NOT NULL,...

Span Image over cards

I want the image in the second row to somehow span across the three cards. Does anyone have tips or ideas? The image should represent the finished design. https://codepen.io/Redcaus12345/pen/raOJZPb
No description

Search in submenu not clickable

When I open the menu in mobile, there is a search input it works in the first menu but when I open submenu "Hombres" I can't click on it to search, here is a preview link
No description

styling a select element

I need to style a select element according to the screenshot attached below. https://play.tailwindcss.com/GYsrHP9Cvq here's code until now. I have been having a couple problems. like the arrow of select element doesn't get affected by padding. I can use border-right transparent but feels hacky. ...
No description

The standard, the minimum

Hi everyone. So i was wondering, i'm about to create a website for my buddy, who is starting his own business. What would you guys consider the standard or the bare minimum of a website?...

Auto and min content property for grid-template-rows

Hey, suppose if I have 3 rows, the moment I use auto or min-content for all three rows as:
grid-template-rows: repeat(3, min-content);
grid-template-rows: repeat(3, min-content);
...
No description

React Parent state update wiping child state

My InventoryCard (parent) component has an 'isHovered' state being set by an onMouseEnter/Leave event listener. Its child, ImgSlider receives isHovered as a prop. So when isHovered changes, both InventoryCard & ImgSlider will be re-rendered, reflecting its new value. ImgSlider has its own state, 'visualIndex', which is updated by interacting with it (clicking arrows) which happens while the parent is still being hovered & isHovered is still true. After I've reset the child's visualIndex state, I then un-hover the parent InventoryCard, causing isHovered to go back to false and a re-render of the parent (and child) occurs again....
No description

C++ Or Java

Im just strating my 1st year in college to be precise in next month so I have doubt what language should pick to master it can anyone help ?

How are push notification sent?

I have one question when we need to send a push notification what is the process? I mean, we intereact directly with the database? ...
Next