Re:Relearn CSS layout
by meerita on Monday June 17, 2019 @04:25AM
(#20200955)
Please, elaborate on the first statement. In CSS a class is a class, we're not tied to group things. Original CSS wasn't group purpose, mainly due the lack of properties, you could see more single or a couple of properties per class.
[ Parent
| on HN ]
I'm taking about classes with an enforced 1:1 relationship with a DOM node, via a unique computed className.
Since there is no requirement for a cascade for this, you've effectively made an ID out of a class.
All the reasons styling off IDs isn't ideal in the traditional CSS metaphor still apply, specificity, verbose stylesheets, etc. But now it's defined as a class too.