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

Filter

Why won't this work? Only the opacity has been changed. Do I need to create separate lines for each aspect of the filter I want to change? Can I not change more than one aspect of the filter on an element? document.querySelector(".main-container").style.filter = "opacity(0.3)", "saturate(100%)", "hue-rotate(0deg)", "brightness(100%)", "contrast(100%)", "blur(5px)";

Error concatenating strings in a for loop

Hello, I'm trying to generate a random string of length 12 ``` let id = ''; ...

Understanding how development works ...

Hi! This post is for me to understand the process of coding. I was in charge of administrating a web site, and to make sure the developers from the firm we used did what we wanted and needed fixed to be done. In the link you'll see the front page and as a hero you see a gliding carousel of different upcoming performances. My questions are:...

Getting the layouts correct with flex for each section.

Having trouble seeing why my sections aren't lining up properly with flex. It seems I can get them to line up close but they dont seem to meet the image below. Am I doing something wrong with my html setup or is it an issue with my flexbox setups? I'm not sure what width to consider for them. https://codepen.io/MD-2016/pen/oNMZRWp...

How do I access JSON arrays within array?

```js fetch("./data.json") .then(function (response) { return response.json(); })...

Can somebody tell me why image background is deformed in mobile view ? how can i fix it ?

background image is deformed only in mobile view can somebody help me

Removing the built-in padding-margin of SVGs

Hi there, I have to create a component where if you hover over a part of the SVG and click it, a certain popup should appear. The issue with this is if I use inspect element from Chrome, it seems like the SVGs have a built-in padding/margin, so there's an overlap that I don't know how to eliminate. Here's a picture of what I mean:

How do I load my main JavaScript AFTER JSON data was loaded?

I have some event listener that are connected to elements that are loaded together with JSON data. How do I load them AFTER JSON data was loaded?

Adding assistive links to Headings

In a general content based website, I, for one, usually, find it handy to have an anchor to the heading tags, and to get a link to it easily. What's the best element structure for this, that's both accessible and handy for an user? Some refernces:...

How do I center an img in an anchor?

I have an icon that I want to put next to a button, but the thing is the icon doesn't want to center verticaly (top-right) I have the anchor then the image then the text and a closing anchor, so the image is inside of the anchor, along with the text...

How to make JS stop failing mocha automated tests. Works fine when tested manually.

Attempting to make a basic JS function that greets the user, asks for their age, and determines birth year based on if they have already had their birthday during the current year or not. This IS for an assignment, so I am not looking for direct answers or any sort of cheating/unethical assistance, but what I am looking for is some direction. I don't know how to proceed to get this js to pass the mocha auto tests. JS Pastebin: https://pastebin.com/Q2Wk1Kcy...

Issues with module resolution

As you can see on the first image, I am getting "Unable to resolve path to module [...]" errors from my eslint-er. The dependencies are installed and the import paths point towards the right path / the files are actually there in the node_modules directory and the exports match the imports as well. I tried to figure this out for a while now, maybe it has to do with the file extension of the astro.config.mjs, but I really don't know. ...

[TypeScript] correct way to tell typescript a property does exist?

I have the following function; ```ts function myfunc<T extends MyInterface>(item: T) { if ("somekey" in item) console.log(item.someKey) // Error property does not exist...

Transform translate(X, Y) differs in Mozilla & Chrome

Hi there, I've been using transform: translate(X,Y) testing it in Chrome and then I noticed that in Mozilla Firefox it's placed differently. I found this page https://bugzilla.mozilla.org/show_bug.cgi?id=1279447 where someone said this: (image). Do you find that as a reliable solution or are there better ways of fixing this issue?

Load the page after lottie file render complete

https://codepen.io/aldrinbright/pen/eYjgPVR I have a similar setup of Lottie animation on my page, I want the page to be visible only after the lottie file is loaded completely...

what's the VS Code extension you are using for autocomplete HTML tags

#When we try to add the extension, for VS Code, how do we know if they are maintaining it and still make code fixes for it in the future, and they are updating? -Is it through (#change log) ?? #html-and-css

How to fetch JSON data into HTML?

```html <div class="chart-container"> <div class="chart-spendings"> <p>$<span class="daily-amount">17.45</span></p> </div>...

What is the difference between these 2 hover elements?

.mainNav li:hover {
background-color: orange;
}
.mainNav li:hover {
background-color: orange;
}
```.mainNav a:hover {...

text weight issue

in figma and adobe xd it shows proper weight of font but when i design it shows little bolder font