2 ms·
FTA > CSS cascades globally by design. Styles defined in one place affect elements everywhere, creating emergent patterns through specificity and inheritance.
by nielsbot 1y ago
FTA
> CSS cascades globally by design. Styles defined in one place affect elements everywhere, creating emergent patterns through specificity and inheritance.
I can’t be the only person who finds that this makes complex sites a nightmare to design? (Raise your hand if you’ve had to use `!important`)
- zelphirkalt 1y agoYou are surely not the only one thinking that, but CSS also provides easy solutions to this problem, namely selectors and CSS classes. Rarely have I had an issue with CSS I wrote accidentally doing things I didn't want. Maybe sometimes here and there I needed to make a selector more specific, but that's not too bad.