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

weird space on top with svg in label

https://play.tailwindcss.com/OZEAWyNk9X in the linked code there seems to be some space on top when i add the svg inside the label. it goes away if i put display flex on outermost div but I can't figure out what is happening here...
No description

flex basis, weird behavior when set to auto and 0

Context: I have 4 flex items inside a flex container, each flex item is allowed to grow and shrink, the flex item 2 has a flex basis of 800px, Now I have 2 questions... First: why the other flex items are growing and not shrinking despite of the fact that the flex item 2 isn't 800px width like it should be, I mean there will be a space for it to grow if the other flex items tried to shrink or at least not to grow Second: when I set the flex basis for the other flex items to 0 the flex item 2 takes a little bit more space than if I set the flex basis for the other flex items to auto see the photos...
No description

how do i set the focus method on a button after a page is closed

i got into one issue which becomes difficult to solve for me. i was working on the create new note page to make it accessible by moving the focus to the create new note button after the user closes the create new note page by clicking either go back or cancel button. no matter i tried i couldn't make the button focussable. The steps which i followed was. i created a focus context and declare a ref variable for the create new note button and i created setFocus method which focuses the button and i pass those ref variable to the createnewnotepagebuttoncontext (a component where i pass the ref to the create new note button), (second i pass the setFocus method to all notes page to call it inside the useEffect. i also pass the state using navigate method from the create new note page using a state object to all notes page so we can check the value inside that state object to call the setFocus method inside allnotes page but all of these things doesn't work for me. could you see it guys? ...

How does push notification and VAPID keys work?

Hello, was reading a bit about push notification on PWA. From what I've understood, our browser never sends push notification directly to our app. The idea is, our browser sends it to a push service and then the push service delivers it to a server that will then delivers it back to us? Can someone confirm if the flow I gave is correct please. I also read that during the exchange between browser to push service and push service to web server, we have the signing of keys, public and private VAPID keys....
No description

Is it possible to integrate an AI recommendation build in python in JS?

Hello, I know python is used for AI/ML stuff since there are libraries readily available for that. My question is, say if someone has build a website in HTM/CSS/JS and another person build another website using python frameworks/libraries. Is it possible to combine both? Because the thing is, say we need to build a recommendation system, we decided to use python because the libraries available reduce the overhead of certain things. Now, is it possible to merge both the JS and python scripts or it's better to write everything in JS?...

react roadmap

Hello πŸ‘‹ i want to learn react so i use it for my frontend i currntly only use alpine js for handelomg frontend i use tall stack i want use react with interia.js but not sure where i should start πŸ€”πŸ§...

The main axis in flex box

flex-grow and flex-shrink and flex-basis all work on the main axis, meaning that if you have 2 flex items and the flex-direction: row; then the main axis is the horizontal one so the items are allowed to grow and shrink in that axis and if you set flex-basis of the flex items then it's equal to setting the width of them, but if your flex-direction: column; then the growing and shrinking are happening in the vertical axis and setting the flex-basis is equal to setting the height, and *maybe this why we don't have justify-content: stretch; because if you want the items to stretch across the main axis you can just set the flex-grow: 1; --- Is this take right or am I missing something?...

How to make all list item categories have the same width while keeping bullets and aligning wrapped

I have a <ul> with bullet points. Each <li> contains a category (e.g., β€œCategory 1:”) and then a list of items. I want to: 1. Keep the default round bullet points (<li> markers). 2. Give all categories the same minimum width so they line up nicely....
No description

List marker issue, please help

I have an ordered list, where the list markers are not following the formatting of the content i.e. bold, italics etc. Anyone with an idea how to resolve this please advice.

please help me review my code if it is responsive enough

please help me review my code if they are changes i can make and if it is close to the sample and responsive enough code below: CRL CHALLENGE 03 https://codepen.io/Collins-Cypher/pen/bNVojyL...

Creating and animation graphics in CSS

Hello, I want to learn how to make shapes/designs in css (as shown in the image, PS: I obtained the image from another thread), like custom made design without using images etc. In one thread, I noticed people were talking about SVGs, anyone has a resource to recommend where I can learn all this stuff and canvas stuff please. There are a bunch of animations that I saw on the web that require the knowledge of canvas/svg and a bunch of mathematical stuff, like when we move our cursor, we have small animations related to the motion. I wanted to add this knowledge of drawing things under my css belt :c....
No description

Unable to keep the gridlines behind grid items, they're overlapping! how to prevent this?

So I've got 9 tiles and its a grid layout. I want to add 4 gridlines for each tile, top/bot/left/right . But i want the gridlines to be behind the tiles, I even tried negative z-index for each gridline and z-100 for the tile but it doesnt work https://play.tailwindcss.com/fKF7sIPjzR...
No description

2026 want list (Interop 2026)

The Interop 2026 draft doc says proposals are going to be open through most of Sept. nothing final of course until announced but the time to start thinking more seriously about this is now https://github.com/web-platform-tests/interop/blob/main/2026/selection-process.md

Vertical rhythm after a picture

Do you have any insights into how to deal with pictures, in order to have the text after the picture align with text in another column?

(javascript/bootstrap) How to prevent the link from triggering the collapse element?

How can I prevent the link from collapsing/expanding the collapse element? I tried attaching a click event listener to the link in order to stop propagation, or even adding a class to the link element and check which target was clicked. https://jsfiddle.net/gq824eoz/1/ I found a workaround by removing the data-bs-toggle and data-bs-target attributes: https://stackblitz.com/edit/tg6ob8rt?file=index.html However I still want to understand how to make it work without removing them. Thanks a lot in advance. ...

How do I hide my (old) JavaScript from "View Page Source"?

I am passing info from PHP to local storage via one page, by basically writing JavaScript in PHP
echo '
<script>
localStorage.clear();
localStorage.setItem("userPhotos", JSON.stringify(' . $photos . '));
</script>';
echo '
<script>
localStorage.clear();
localStorage.setItem("userPhotos", JSON.stringify(' . $photos . '));
</script>';
...

Need help in bezier curve

So, given four points how can i visualize how will the animation look like? like 0.5, 0, 1, 0.5, here i know 0.5 represents time and 0 as acceleration, then 1 as time and 0.5 as acceleration, so without going to a website or using dev tools how can i imagine yeah this goes decelerating first then stable then acceleration or somewhere it just springs, OR, lets say i have given four points i have to make it little bit fast at starting how can i play with points to make that happen? @Kevin please...

WEB SCRAPPING

"Lately, I’ve been doing some web scraping projects and spending time learning more about it, but I keep wondering if I’m wasting my time. Is web scraping actually useful for companies? Can I get a job with web scraping skills? And what’s the best language for it β€” Python or Node.js? These questions are always on my mind. I wonder if anyone else has gone through the same thing.

WORDPRESS MIGRATIONS

I need to migrate a huge Database Mysql in wordpress for other wordpress like "dev.website" to actual website, but the DB is largee anyone knowss how to do it ?