why Kevin Powell use this in his film ->https://www.youtube.com/watch?v=h3bTwCqX4ns&t=15s
1.Why is the color configured in reset.css and not in styile.css?
2.Is the idea of configuring font as a theory available somewhere to read up on to better understand it?
3. read stuff for utili css class and it is stander or have Kevin Powell engendered for his self?
3 Replies
1. it is all in the "style.css" file. If you look closely, you will see he is adding the colors and fonts in the :root at the top of style.css, which is then followed by the reset he uses
2. not sure on somewhere to read the 'theory', but the general idea is if you set custom properties like Kevin does, and later on decide you want to use a different font, you only have to change it in one location and everything updates (same for sizes and colors etc)
3. utility classes are common, and used widely, although there are different ways to implement them so there is variation.
Kevin's method is extremely effective and efficient, especially for vanilla setups, so don't fear using the same in your projects
1. I tripped myself up. I wanted to put other people's code into Reset.css and got myself confused.
2. plausible
3.I need to get the workflow on it. is there a difference if you do it with scss?
If you use scss, there's a lot of different variations you could use to make utility classes. You could use mixins that apply a base styling and then @include that in components that would want to use that styling. You could also use the placeholder selector "%" and make a base class inside a file that other classes can extend from.
So for example:
You can even use mixins inside of placeholder classes.
Or you can just put your utility classes inside a separate file like you do in css.
There's probably way more you can do too that I'm not aware of. Hopefully that answers your question if it doesn't let me know 🙂