Zerthz
Zerthz
Explore posts from servers
KPCKevin Powell - Community
Created by Zerthz on 4/10/2024 in #front-end
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.
2 replies
KPCKevin Powell - Community
Created by Zerthz on 4/3/2024 in #front-end
Img or Svg element?
Say you have a Figma where the designer have created icons and such. Do you prefer to export them to svg and use them inside an <img /> element with the src pointing to the file, or do you prefer to extract the path and use the <svg> directly like that? It feels like you get more control with svg tag since you can recolour etc, but it also clutters things to have the paths and all?
10 replies
KPCKevin Powell - Community
Created by Zerthz on 2/27/2024 in #front-end
Is is wrong or bad to add padding to represent hierarchy in tables?
I got data that is a list of items, got a name and category. Each item could have children, with name and categories there too. And I would like to show all of them. I was thinking of adding a left-padding on the children, making them indented. Am I thinking about this wrong? Is there a better way?
11 replies
KPCKevin Powell - Community
Created by Zerthz on 1/24/2024 in #front-end
Overflow-x auto causes button to flicker
No description
4 replies
KPCKevin Powell - Community
Created by Zerthz on 12/19/2023 in #front-end
How do you go about creating things like this CSS or just a svg?
No description
10 replies
KPCKevin Powell - Community
Created by Zerthz on 11/27/2023 in #front-end
Placing your content centred, not as obvious as imagined
The reason why I'm even asking this is because of the last few videos Kevin made about widths and about rethinking wrappers/containers. The webapp I'm working on now is a bingo board that I would like to place centered, which typically I would just give it a width and slap a margin auto on it. Or something like that. These last few videos got me thinking if there's a better, more "correct" way to do it.
4 replies
KPCKevin Powell - Community
Created by Zerthz on 10/19/2023 in #front-end
Best way to create this effect
No description
10 replies