Re:Incomplete List of Mistakes in the Design of CSS
by NickHaflinger on Monday October 26, 2015 @08:38PM
(#10455461)
Why do keywords have to end in a colon. couldn't the parser use space " " to detect the end of a word, like in C ..
[ Parent
| on HN ]
Re:Incomplete List of Mistakes in the Design of CSS
by TabAtkins on Sunday November 01, 2015 @02:45PM
(#10487822)
I assume you mean property names, because keywords are all over the place and don't have anything to do with colons.
It's just a separator between the two semantic halves of a declaration. It could just be a space, but it wouldn't be quite as obvious. Compare "display block;" to "display:block;"
It wouldn't save characters, either - you can omit spaces around the colon today and have the same number. That is, "display block" and "display:block" are both 13 chars.
There is indeed nothing requiring a colon vs a space, as the grammar is unambiguous either way.
Re:Incomplete List of Mistakes in the Design of CSS
by TazeTSchnitzel on Monday October 26, 2015 @08:39PM
(#10455467)
C requires explicit = in variable declarations.
CSS presumably uses the colon for clarity.
Re:Incomplete List of Mistakes in the Design of CSS
by gopowerranger on Monday October 26, 2015 @09:09PM
(#10455590)
CSS is text files and there are no line endings.