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

`<br>` vs. `white-space`

If I'm aiming for accessibility for specifically multi-line quote/speech, which among the two would be more preferrable? For the first option, I do have a processor to prefix every newline with a <br> , but the CSS way seems clean on paper. https://codepen.io/Suggon/pen/yLWdMXj?editors=1100 Suggestion for a more semantic tag is also welcome, but please note that I have a limited number of usable tags....

How would you structure this dynamically (In HTML and css)?

Everything is okay, just thinking about the line that goes through all of the icons. It should work with 2 to 4 sub icons-with-text as the section is dynamic. And ideally the icon and it's text are under the same parent No mobile was provided, was thinking on just removing the line on mobile/ when they start wrapping, any other ideas?...
No description

logical properties

Hey, how do you decide where the use of a logical property would be warranted other than gaps between icons and text e.g. a inside a button etc. Should you cater your whole site to look good if it was flipped to a vertical writing mode like in the example image below, therefore replacing all of your properties such as max-width with their logical counterparts? I'd appreciate any insight, thanks in advance.
No description

what are the ways that i can follow to mange the height in card created using bootstrap

Hello i have a card containers that have 3 cards on ii don't have any problem in managing its width but i have problems in height as below , the third one is now have height greater than the others ,consider this datacomes from daabase how can i mange the height, i want them all to be on the same heigh, included a screenshot ```html <div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-2"> <div class="col-md-12"> <div class="card text-bg-primary">...
No description

image not behaving as intended unless wrapped in a div

Hey, why does this image not respect the fact it's in a flex container and cause the text to overflow unless it's wrapped in a div? This is something i haven't understood for a while haha, thanks in advance. https://codepen.io/deerCabin/pen/Baeewbg...

npm deprecated and vulnerable dependencies

When running pnpm run develop on latest Gatsby version I get the following pop up a bunch of times:
(node:2069896) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. (Use node --trace-deprecation ... to show where the warning was created)
I also have one high and one moderate vulnerabilities that introduce breaking changes 💀 Anyone sorted this type of thing before and willing to dumb it down for me?...

What are some of the best extensions for Web developers on Vscode?

i would love to have the best set up for my web dev journey

How to access the last value?

So, basically this is my code: ```js function getAverage(scores) { let value = 0; for (let x in scores){...

grid-template-columns, Chrome v. Firefox, Firefox stretching col width, Chrome keeping to content

.photos_div_right is mapping divs which contain <img/> elements: ``` <div className="photos_div_right"> {vehiclePhotos.map((photo, index) =>...
No description

Problem with horizontal scroll

Hello. I'm working on Instagram-like clone and I'm having issue with making stories on home page scroll horizontally on overflow. I've been trying to fix it for quite some time now with no sign of success... So I copy pasted relevant code from my site to tailwind playground (and cleaned code for a bit) to replicate the issue. So this code is code before I started doing anything. If someone could make it work I'd really appreciate it. So what I need is for stories on top to have overflow-x: auto, but to actually work lol. And they shouldn't go behind right sidebar like they do. Also you might need to zoom out a bit to see right sidebar....

Const objects can be modified

can anyone pls make me understand what is happening under the hood?

Stop focus to the embedded form

My client's site has an embedded Formstack form using iframe. The problem is during the page/iframe loading, the browser autofocus to the first field (i.e. First Name textbox). This results unwanted scrolling down. How to fix this?

CSS animation not triggering

I have this animation and upon calling open() with another Svelte component, I can see the toggled-ring class getting added in devtools but it does not cause the animation to play. When I staticly add this class in code, it does play the animation correctly. How can I toggle this animation with JS?

What HTML elements should I use here and what markup order?

Here's what I have so far but really not sure what to go with: ```html <article> <hgroup> <p>...
No description

How to display value or data in HTML with Javascript

I'm currently struggling with displaying values in HTML. I'm recreating the tip calculator as seen in the image linked below, i've marked the parts to show which labels/inputs im talking about. For now im not using the tip buttons since im mostly focussed on learning how to use the DOM and displaying/working with values that way. This also means the totalAmount is empty since its the same as the bill as there are no tips calculated. 1 The input label called "Bill" 2 The input label called "amountOfPeople" 3 the div was which has <div> 0, 00 </div> in it, which is called "totalPerPerson"...
No description

eval()

Why eval js inbuilt function is not recommended to use ??

I can't write javascript or do programming all together

I learned the properties and syntax by watching courses and even built things alongside, but the thing is I can't do it on my own, My head is just getting empty when I open a .js file, just to build the damn thing I can watch others' code or ask a.i a little bit, but it doesn't seem like I am learning anything, nor I am developing any logic on my mind as a developer should, for example, to create an accordion the simple logic is if you click it it's going to open, Click again it's going to close...

How does the CSS priority work with a new React + Vite project?

Hey, I'm trying to learn React, but I wanna implement my scss files and preferably have my own css folders, but for some reason, the main React bundle comes with an index.css, and an app.css (which I swapped into an .scss bundle) but I don't understand a couple things: 1. What's the point of App.css if index.css has a higher priority (so what is inside index.css will overwrite what is inside App.css) 2. Why can't I put my css files inside a css folder/where is the section where I can modify the path towards the css files......
No description

Grid col 1fr behaviour vs percentages?

Hi all. Just struggling with positioning in a grid. My grid has 3 columns, with widths of 20%, 1fr and 20% respectively. The first 3 images above show what happens in a grid when I place the slider in each column. The columns that have widths defined as a percentage seem to behave as if overflow:hidden is applied. But column 2, which is 1fr, doesn't. To replicate this, change line 21 from col-start-1 to 2....
No description

Best use cases for the "lh" unit

Hey, i was wondering what the best use cases for the lh unit are, i see a lot of people use it for spacing and for icon sizes like in this example (https://codepen.io/piccalilli/pen/OJdYxRv), i'd appreciate any insight, thanks in advance.