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

Odd question about real life problems and Front-end

Currently going through Front-End Mentor projects and doing just the free stuff. They give you usually font size 16, and some colors. I notice a lot of times colors are missing, and obviously one font size is not true. This leads to the images of the layout incredibly hard to match up and not knowing if it is how its suppose to be. Is this common for real life front end developers working for a company? I'm guessing for freelancer more so yes, since more than likely you are also the designer?...

Vertically aligning a floated element to the bottom of its container

I have the <img/> element floated right, and the text is wrapping as I want. But now the image wants to remain at the top. I want the image to always be aligned vertically to the bottom of the container (.main_1_aboutUs) Is there any possible way to also get the img to also align to the bottom of the container in addition to being floated? Position absolute w/ 'bottom: 0' ruins the float, as would making the container display:flex or grid....
No description

clip-path Why does it work? 🤔

Hi everybody. I'm very happy to reah the community. I have a question about the clip-path property. I have succeeded in managing what I want but I don't understand why it works! Find below the codepen link:...

b1, can't use animate inside an each block?

🤣 ```js <ul> {#each todos as todo, index}...

Website looks different in responsive mode than in real device

Hi, as a title says the website looks perfectly fine when you launch it on PC and look at the responsive mode, but on my phone there is a little gap, like 10-15px in the hero section between <div class= 'container'> and <section class='contact__section'>. Also, when you click the hamburger menu the button with text "KONTAKT" has some padding, on the real device there's 0 padding from bottom. Why does that happen? How should I solve this and how to make websites for the future? Thanks for help. Github: https://github.com/Jakub-Gryczka/pomoc_drogowa live-page: https://jakub-gryczka.github.io/pomoc_drogowa/...
No description

Scrollbar Effect!

Hello guys, I have a question searched for it and unfortunately could not find the answer! Here i have the page scrollbar, how i can get the content behind the scrollbar (the scroll bar is transparent) as example the green thing is part of background image, i want the scrollbar to be on the background image as well as shows part of it through its transparency . Thanks in advance!...
No description

Masking divs to a background image of its container?

Hi everyone! I have been racking my brain trying to figure out a way to implement this. I know of masking but I am not sure at all how to even begin something like this. I tried playing around with code pens that I have found using keywords but I have had no luck trying to achieve what I am looking to do. This is just a concept idea, but I figure a visual would help. I attached two images to this that capture exactly what I am trying to do. I wish I had code already but I have no idea. I threw this together in photoshop with the initial blue boxes representing the four child elements. The second image just shows that only the background shows for the children elements, and it is ideally fixed to that background so they aren't all taking on that background. My thought is the child elements are transparent background, so they show the parent element's background, but the parent background only displays where those elements are in the viewport, similar to how text masking is, but for divs....
No description

Feedback on responsiviness and javascript use

Hello, I almost finisch a FEM challenge and I wonder how I can improve the responiviness and my javascript. And of course semantic html it is about a form that needs to be validated....

Can you provide guidance on setting up a container that uses an SVG in a different shape?

Hi , i was figuring this out how i can make this container with different shaped svg on left corner can anyone help me how i can do need some kind of reference or any articles which can demonstrate this kind of structure ?...
No description

How to setup the initial layout on a page - where do I put containers?

If you were building a layout from scratch, how would you do it, and where would you put containers? THAT is my biggest hurdle with CSS, can never seem to get it right. ```js <main> <div class="main-wrapper">...

how to fix background breaking

this is my portfolio. i made a absolute background in a self closing div inside a section set to relative, and the background is banding and new lines are forming ever since . can someone help me fix this?
No description

Where do I put the font face?

I was just trying @font-face {} with a CSS file, I was just wondering where this is usually kept at. (I mean the file with the fonts, like a .tff)
No description

Problem positioning content with subgrid

Guys, I'm having a problem positioning the content of my first line. As you can see, I positioned the content of my cards with subgrid, basically I have a layout of 6 columns repeat(2, 2.5rem 1fr 2.5rem). The content is positioned correctly on mobile, but when I switched to the desktop I don't know why I can't get the content in the first line to extend from column line 2 to -2. I think it's a specificity problem, some statement I made on mobile that I'm not overriding when I move to desktop. Could anyone look at my code and help me find where this problem is? Live site: https://sircarloschaves.github.io/single-price-grid-component/ ...
No description

Does anyone know why Kevin used _index.scss instead of index.scss when setting up @use and @forward?

https://www.youtube.com/watch?v=CR-a8upNjJ0&t=242s - this is the exact place where he talks about this. I'm just curious if it should be _index.scss or index.scss and why it should be the case. Thanks!

CSS Custom Properties for every Component

I'm working on a project in Astro and using Svelte to handle all UI components. This project is getting very complex. I have styling for a child component that is specific to a parent component. Is it a bad idea / bad practice to create custom properties in a child with a child's name on the variable? Or, would it be better to have parent specific styling in child? ...

Align cards items in defined grid

Hey, another day is here and I have another challenge for you: Imagine I have a grid defined, and inside that grid are cards (flexboxes) 🃏. I need to align the title, the icon, and the list of text - and the way I always have the title and the first line of the list aligned. And I don't know the height of the box, it's dynamic, based on the number of rows in the list. Space between is probably not usable, because I can have a sheet with different number of items, and they should always be at the title....
No description

CSS Grid question - moving children to appear in 1st row

Hi all, just a vanilla grid question, I would like to move 1st and 3rd child to render at the top (1st row) instead of rendering in the bottom (2nd row). So everything should stay the same but the top row's gap should be used by left and right child instead of spilling onto the new rows, if that makes sense? I can't provide codepen because the code is not readable (Magento2 Hyva + Tailwind stack), the children are actually nested in separate PHTML files and grid is just wrapping over them, if that makes sense. I have applied a bunch of Tailwind breakpoint specific classes to get it to current state. I somehow believe that I'm missing a simple trick to just tell 1st and 3rd child to use the available space in 1st row above them....
No description