3 ms·
1) doesn't seem to be a very big issue, the syntax is quite simple and readable. Arguably, INI or XML would have been worse. INI especially would have been a sh
by jraph 9mo ago
1) doesn't seem to be a very big issue, the syntax is quite simple and readable. Arguably, INI or XML would have been worse. INI especially would have been a shame, now that we can nest blocks. XPATH selectors would have been nice, they are more powerful and barely less readable.
2) doesn't seem to be a very big issue, this kind of stuff is very common in many programming languages as well. I don't remember struggling with this even as a beginner, and it's the first time I encounter a complaint about this as well.
3) Fair point, and the inheritance and specificity rules are very complex as well
4) On the other hand, backward compatibility is stellar (and I guess that it's your point in your last paragraph). Your 20 years old CSS file still works today and doesn't even feel really out of place. We could wish the web platform didn't evolve so rapidly, it makes it very difficult to implement.
5) It's very easy to center a div vertically now. Therefore, it can only be a critic of old versions of CSS, not the current one. Do you have another example of basic things that ought to be easy but aren't, or aren't possible?
5) Doesn't seem to be a very big issue. I wish the double colon syntax didn't exist and we'd just use single colons, but as you say, it is what it is
- Izkata 9mo ago> I wish the double colon syntax didn't exist and we'd just use single colons, but as you say, it is what it is Single-colon is a pseudo-class, for targeting elements based on some external state. I learned these as "pseudo-selectors" but it seems that's not the right name. Double-colon is a pseudo-element, for targeting inner parts of an element that themselves aren't actually an element in the document.
- jraph 9mo agoRight! Thanks for this. I've never really looked into this and have been writing whatever worked, with a preference for the single colon. CSS 1 & 2 apparently conflated the two, and CSS 3 allows one column for CSS 1 & 2 pseudo elements. I never noticed it wasn't all of them. Since I learned CSS right before CSS3, my situation kinda makes sense I guess. Single colons everywhere have felt easier and more regular to me, so I've written basically everything with single colons except maybe the odd CSS 3 pseudo element here and there. But it seems the two colons will be mandated going forward. I guess I'll have some edits to do, though I do hope and kinda expect they won't break backward compatibility. https://stackoverflow.com/questions/17684797/should-i-use-single-colons-or-double-colons-for-before-after-first-le#28527928 https://stackoverflow.com/questions/17684797/should-i-use-si...