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

How to efficiently validate multiple properties

This could go in backend just aswell I realize. I will try to be a bit generic because I think the issue is not tightly coupled to my specific issue but more of a pattern that one can do. I have an object, It has a bunch of properties. I want to check if certain properties have a truthy value. What I do now is I just have a bunch of if statements that go through all the properites I want to check. And add a message to an array. I feel like there should be a better way to do it, some kind of pattern matching, or something. That's not as gross as what I am doing and is more maintainable. But not sure how to even start searching for it so I ask you guys if you have tips....

Directional card highlight, need help fixing 2 behaviours.

Following the video about directional navigation menu. I decided to try my hand at directional cards. Problems: 1. Card does not move to second or third card when first hovered. Only afterwards it will correctly slide. 2. Card does not slide back to first position when mouse leaves cards. https://www.youtube.com/watch?v=G_h2pGZcOzc...
No description

Vue / JavaScript in general: prevent blur / focusout if you clicked something special

So I'm doing an autocomplete search. Which goes by a input type=text and an absolute positioned div which shows the suggestions below it. The search string there is highlighted and looks for several parts (name of a person you search for or his company). The suggestions are parted: They highlight the name and the company. And if you click on either the name or the company the search string will be filled up with it. Or on pressing "enter" the search submits your current term....

open an div with an animation

i was trying to make a portfĂłlio and my problem is that i want to make a subcontent div that is related to the buttons ESCOLA, LINGUAGENS and EXPERIENCIAS, when these buttons are clicked the div will go from the top of the right frame to the bottom covering the buttons and showing the related content (i tried with JS but the "animation doens't work correclty, it needs to be clicked two times to work "), the third picture is actually the JS animation working, another problem is that when the back...
No description

Divs with skewed backgrounds

Got a design I have to code that includes quite a lot of divs with some kind of skewed edge (see pics for examples). Would just like some input on how to best tackle this. I'm thinking either background images or using :before and :after pseudo elements with css skew. If you've ever done a lyout like this please chime in. Thanks in advance!
No description

Carousel nivagation

Hello everyone, I am making a carousel in React and CSS for navigation with modals. When I click on the next button, I want to show the next modal by making the previous one goes out of the screen and the new one to come (I used transform: 'translateX...' property for that). I am using MUI component Modal to have the background blurred and to be able go back by just clicking outside of the modal. Then I am using MUI MobileStepper for progression bullets. I am struggling with making it all work together. Do you know how could I fix that? Thank you!...
No description

How do I remove the text-decoration from the label::before

https://codepen.io/ananthuk7/pen/mdgXzRp How do I remove the text-decoration from the label::before when I check the checkbox? I need to add X for my custom check box when it is checked. Also, I can't change the elements. Is there any better solution?...

Stacking Context Q- Backdrop Filter

How do i fix it so the ::before element is behind the card again while still applying the blur filter? https://codepen.io/Miss-Fox/pen/BaExrPe...

fixed width and height responsive

help i want to add fixed with and height with my css grid lay out but the responsiveness is gone.

blocked third-party cookie

I keep getting a warning in the console that says “blocked third-party cookie. Learn more in the issues tab” it’s a warning on line 1 of my html code which is the <!DOCTYPE html>. This warning is happening in google chrome. It doesn’t happen in safari browser. I haven’t checked other browsers. I googled it and the only solution I found was to clear the cookies in browser settings but that only worked temporarily, and now it’s not working at all. Does anyone have a solution for this?

View Transitions API

Hello my fellow Front End Devs... I'm trying to get my head around the new View Transitions API and I'm nearly there, I have the slide in efffect but on back navigation I want the other slide out animation to work.... but I feel I'm missing something. I'm attaching a very basic html file and css...

Customize input type number

Good morning. I would like to know if it is possible to customize the increment and decrement signals in an input of type number only using the ::after and ::before pseudo elements. I have tried several versions that I have found on the internet but although the styles are present in the elements, these elements are not visible.

Hi all

I have this site i am working on using the breakout grid-template-columns named lines from Kevin's example vid. On this page: https://dembetheatre.org/hire I would like the image on the right to be 50% of the width of the viewport but I just can't seem to get it. I have tried making the whole container full-width and indenting the left column by the clamp for content padding to the left but the gap and the size of the right image are never right... Any ideas? getting a little frustrated with what should be a simple 50/50......

Help needed with CSS layout of 3 boxes where 1 box sits next another and then wraps under it.

Hello, I am trying to do a layout design I am not even sure if is possible to do. The basic idea is to have 3 boxes. The first contains an image and sit on the top left, the second is a table and sits on the right. The 3rd contains text and sits under the image, to the left of the table, but will wrap under the table if it goes that long. I have attached a porly drawn image of what I am talking about. I know with a Grid I can make the 3 boxes and align them up, I just don't know how to make that...
No description

Fixed header within card, when card itself can scroll out of view

Got a simplified dashboard setup in the codepen. The div page_main_content is scrollable with a fixed page_main_content_header of variable (thus unknown) height and a body page_main_content_body. The body contains a card (of dynamic height) and pagination. The card itself has a header card_header that is fixed height and should stay in place when scrolling the page_main_content. Issue is I can't use position:fixed on the card_header as the card width is dynamic....

how to create position aware button hover effect

I was working to create this type of effect but I field can any one help me recreate:

How to put two elements next too eachother

Im working what for the moment is just a twitter clone but got stuck when trying to put a picture next to my highlighted reply. reply highlight html: ...
No description

Achieving Design with Clip-Path: Seeking Guidance and Troubleshooting Gradient Borders

Could someone offer guidance on achieving the design I'm aiming for? I'm encountering an issue with clip-path where border-radius doesn't seem to work properly, particularly with gradient borders and backgrounds. Here's the link to the CodePen for reference: https://codepen.io/Amit-Soni-the-vuer/pen/dyLmQdj
No description