What do you find the most difficult with CSS?
Andy Bell
10 replies
I’m writing a new book (https://www.producthunt.com/upcoming/css-from-scratch) that teaches you how to write CSS from scratch and I’m curious about what people find the most difficult with CSS.
I’m also due to write some more posts on my blog (https://andy-bell.design/), so it’ll be great to get some ideas!
Replies
Anurag@ak_8085
Till date animation continues to be a difficult thing for me. I always forget those properties.
Share
WhatsAdd
To learn good practices and go for a more advanced level I would like to highlight, if it helps:
* Avoid styling inline (in HTML) and the priority facts: Why inline HTML CSS is more “urgent” than the properties from css file. Or also in cases when you set “!important” or element is nested.
* The use of preprocessors SASS/LESS: having separate files and compress in one single output is a good dev practice. Plus you can define mixins and variables for a more clean and scalable project.
@david_m3 I certainly agree with point one, but I think getting the basics nailed in pure CSS is good to do before getting into preprocessors. It’s good for beginners to know where the native language stops and the preprocessor starts.
I’d say the same for frameworks too, in both CSS and JavaScript.
Knowing all the things CSS is capable of
One thing I wish I'd understood earlier is the danger of being over specific with selectors – specifically chaining selectors.
Something that might be a more advanced topic in this area is how to deal with other people's CSS when they chain selectors without doing it yourself.
@ben_furfie I think I'll do an entire chapter on the cascade and specificity—especially on how to calculate how specific your selector will be.
For me it would be the cascade, especially with lists. The other thing is child, sibling, I don't even know what they are called, selectors? Like * > + and how the effect the CSS. I recently discovered p + p to select all p tags exept first.
I must admit I am self tought and loved CSS when I first used it in 1999 doing my first site. Most of my work has been for me or friends, never really my income profession so I drop in & out of Front-end work. I do love what you are doing, thanks! It helps me a lot. & Grid LOL love Grid.
@frg_randy Ah they are called "combinators" and yep, they will be covered in the book because they are _incredibly_ useful!
The Hardest Part of CSS Is Specificity, read this article to know more about CSS specificity.
https://www.scaler.com/topics/cs...
Also, if you want to learn more about CSS then check this out
https://www.scaler.com/topics/css