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

is this a sass bug?

so, i wanted to try to get configurations a lot easier, and skirt around the hideous map-get i though i would try to @use modules so, i wrote something like this:...

Outsourcing for layout solutions

Morning web enthusiasts. I looking to get a source code to this design right here. Thanks in advance!
No description

Responsive screens should to be based in the height also?

hey, I want to understand one think. Creating a responsive design I should to focus in the viewport height also?

Should I future-proof this component or leave as designer intended?

I have this navigation component I made where the search bar and bottom links are lined up nicely (see pic). I did this using grid and set the grid columns to 300px 1fr 300px for both the top container (the container with the logo & search bar) and the bottom container (the other links). This is working OK right now, but if I add another link to the bottom container, it'll break. Is there a more elegant solution than my grid solution that I'm not thinking of, or is this one of those designs that are nice in concept but don't really work in theory? It's connected to a CMS that allows admins to add more links to the nav...
No description

running function in class error

Hey, in the code below, the example function won't run and it gives the error "Uncaught TypeError: this.example is not a function". I'm a little confused as to why this is happening, could someone point me in the right direction? Thanks in advance. ```js class Button { constructor() {} ...

Using a CMS on a vanilla JS website??

I am making vanilla JS websites for clients. How can I provide a way for them to edit site section? I work with github to deploy my sites and netlify to host them. So I was thinking off making my own CMS that pushes changes directly to GitHub. Do any off you know any better alternatives?...

Can't apply custom font (Tailwind CSS)

So I'm trying to add a custom font (not from Google Fonts), however, when I create a new @font-face property in the input.css file, it doesn't apply the font. Here's what I've done so far:...
File structure

Animate SVG

Hi Guys. I am trying to animate an svg on hover/mouseover and reverse the animation on mouseleave. I am not achieving exactly what i want to. The first video show what I am trying to do and the second one is what I have done. Please help out....

How apply this border gradient?

I'm trying to solve it using https://css-tricks.com/gradient-borders-in-css/ and https://theodorusclarence.com/blog/gradient-border-is-hard but I'm not getting to do it. Can anyone help me please? the button background is a background using a linear-gradient that to have opacity...
No description

grid minmax

Hey, so i've noticed that if i define grid-template-columns: repeat(2, minmax(200px, 1fr));, when the viewport shrinks, the element that has the min of 200px on it overflows the container due to the fact it can't shrink below 200px. This can be fixed with grid-template-columns: repeat(2, minmax(min(100%, 200px), 1fr));, but i was wondering if there's a more basic solution, something similar to flexbox maybe where even defining a flex-basis/width allows the item to shrink? Thanks in advance....

santa hat to text how ?

1st image is BIG HAT for desktop mode and tab mode 2nd image is for Mobile mode. how can i give this hat to this text ? i have export it as svg in two files 1 is big and second is smol. ...
No description

Is there anyone wanna start Javascript learning together?

have 0 knowledge in Javascript. but really wanted learn. i am newbie to frontend developing

Horizontal Grid Image Gallery

I want to create such a image gallery basically. This is what I already have but my problem is, that the last columns only shrink when there are more images added but the images should all stay the same size but it should be horizonally scrollable. Any idea? ```html <div className="images">...
No description

Fixing my layout from desktop to phone

Hey, I'm working on figuring out the basic layout for my portfolio website and started building out a block-out of my design I made in Figma. I'm struggling with using the full viewport on phone. My homepage has 3 cards and on desktop they are placed in 2 even-columns. However, on phone I want the first card to fit the whole viewport and then the other 2 cards will also use up a whole viewport when scrolling down. I've got the basic layout working for desktop and tablet sized screens, just not for phone. Seems like it's not using the full viewport size. Here is my code: https://codepen.io/Hidde2205/pen/ExqwJYP...
No description

flex wrap behind the hood

Hey, so i created a post a while ago asking how flex wrap calculated when to wrap items. I was told that items wrap based off of their ideal size (flex-basis or width. If none set then intrinsic size) and that the items wrap when their final size (content size + width given by flex grow) = content size. I recently saw on an article that they begin to wrap when the flex items sum total flex basis is larger than the container width. I'm a little confused now on how this functions. I'd appreciate if anyone could help me clear this up. Thanks in advance...

different ways to write a function in an object

Hey, i've seen a function in an object either being written as a key value pair on simply on it's own e.g. ```js const obj = { exampleFunc: function() { console.log("example function")...

Height of after pseudo-element not matching original height of element acting upon

Hello guys, sorry to disturb you all; can someone explain why the height of my after pseudo-element is not the same as the height of my li block even though height has been set to 100% please, here is my codepen: https://codepen.io/Fakeur/pen/poMWrbz...

Style error, modules, styled components.

Greetings! I am working on a project using electron, react js and typescript, one of the components I am using is a tablem this table was made in styled components, we use css modules on our project, howeer, when the table is used, we have to reload (ctrl + r) so ite shows the styles from the css modules, otherwise, it shows other styles, I believe the ones from the original component, any ideas on how to fix this issue? the blue one is before i reload the project. thanks for the help!
No description

What is the difference between backdrop-filter and filter properties in css

Hello guys, sorry to disturb you all, can someone explain what is the difference between backdrop-filter and filter properties in css please For eg, consider the following code: ```html...

What is the difference between transition and animation property in CSS

Hello guys, can someone explain what is the difference between a transition and an animation in css please, like those 2 seems to be the same in the sense that they add some "effects" to our web page but I don't really know when we should use one over the other, like when to use what and their use cases