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

Let vs var vs const

Can any one help me understand how these three different ways to create a variable really works within a function? From what i already learn var is functions scoped let and const is block scope. Whats confusing to me is does this mean that if I create a variable using var I can use that variable anywhere inside the function and let/const can only be used within a specific block for example a if/switch statement? Also how do you even know when its the right time to use a specific type of variable?...

How fix error throw new ERR_MODULE_NOT_FOUND(

I use node js server/server.ts ```ts import express, {Response } from 'express';...

TAILWIND How To Ignore Tags

So I have ```html <li class="relative hover:opacity-50"> <button>Some button</button> ...

Images are broken

I uploaded the whole files to my github repository and redownloaded it to see if its working. when I open the .html, almost all images are looks broken even tho images are in the file. I've checked the path destiny and it is true. But when I host it as a live server from VSCODE it got fixed, I can see all of the images pretty good. What is the problem?...
No description

having problem with margins

i applied margin on the card then why is it effecting its parent element i dint understand can someone explain i think i forgot how margin works ```html <div class="container"> <div class="leftContainer"> <div class="cardFront">...
No description

media query applies to desktop screens

hello so im coding some media query and i did some for 360px width the problem is its interfring with my desktop screens that are 1920x1080 and 1440x900 i want the query to affect the screen of 360px max width please help `@media only screen and (max-width: 360px){ .first-four{ display: inline-table;...

z-index doesn't work

This is the website: https://panocea.vercel.app/text-editor As you can see, if you open the menu on top, the text of the editor will be on top. I tried fixing it by giving it a z-index: 1 and the popup a z-index: 999 but didn't work. The only that worked was giving the text a z-index of -1 but after doing that I can't focus on the text anymore. Does it work for you? Why isn't it working?...
No description

text in border

i do not want to have weired background color for my text in border .but if i do not add it the boder shows how can i solve this problem"https://play.tailwindcss.com/3P85V7NKhw?file=css

How do I use this library?

I want to try material 3 (https://github.com/material-components/material-web), which is not released yet, so there's not a guide that I can follow to use it (or I just can't find one). Can someone teach me how can I set it up?

floats

Hey, I was wondering if using float is useful in modern day css, I see mixed opinions on it showing that you shouldn’t use it or it’s right to use it for certain things, if that’s the case what sort of things should you use it for? Thank you in advance for any insight!

Position sticky

Website: https://www.myndi.dev/blog/post-1 I want make what is highlighted in the image sticky, but I can't. I feel like my brain is fried, or I'm doing something wrong that I can't see. ...
No description

tailwind CSS not responding in the browser despite correct installation and import

I'm encountering an issue with Tailwind CSS where it's not being applied in the browser, despite following the installation instructions correctly. I've also attempted to use regular CSS to import it, but it's still not showing up on my website. Can someone please explain to me what’s the issue. Thanks...
No description

Hover settimeout

Is it possible to make a component scrollable(overflow:hidden to scroll) after 2seconds of hovering ? transition really doesnt work

Absolute overlap

Does anyone know how to stop the github button from overlapping on the download cv button ? I need the download button to be in the center and the github button to be on the left of it, but respecting the borders of it...
No description

Curious about double font-size in gov.uk typography styles

Hey everybody, I was at a meeting with my team (UX) and a colleague presented some work based in gov.uk. Cheking with the inspector we found that in most cases for the typography styles they use font-size twice. First in pixels and then in rem. Like this (some selectors omitted for the sake of the question): ```...

Why does Firefox default justify-items: first (last) baseline to start and end?

Hello friends. I was recently helping someone understand what the first and last baseline do within a grid but noticed that Firefox would default to start and end—creating a different result from Chrome and Edge. For the life of me, I cannot find anything on Google that answers my question. This was the example HTML and CSS I was provided. ```...
No description

I want to overflow the tooltip instead of overflowing it in datatables like jquery ui tooltip

I don't know how to overflow a datatooltip like jquery ui tooltip. jquery tooltip doesnt take width as far from I know I want to replicate the idea of jquery UI tooltip but the design I want is like from the picture I posted. Can you help me guys? Thank you.. Btw the table that I did use there is DATATABLES ``` .tooltip-wrapper1+.tooltip-wrapper1 {...
No description

Dark mode / dark theme implementation in SASS

Hi, i'm trying to upgrade my portfolio step by step and right now, i'd like to implement a dark mode. I'm using a custom SASS framework which defines color variables, and uses them through the website. So, as SASS is generated once at build time, how is it possible to have a "simple" solution to implement a toggle which would allow to change color rendering on my website when dark/light mode is checked ? The JS part is ok, but i can't quite figure out the SASS/CSS part....

Page loader

Is it possible to display actual page loading progress like from 0% to 100%?

Code Refactoring JavaScript

Hello, I was practicing dom and trying to use functions to reduce amount of code, this is what i did first: