The cascade makes perfect sense, just as it always has done, provided that you understand what the true roles of HTML, selectors and CSS declarations are. Unfortunately, because web designers decided that they wanted to create site styles without reference to the semantics of the document content as captured by the HTML markup, they were forced to pervert both the roles of HTML and selectors for their own means. Once those roles are perverted, neither the specificity nor the cascade can work as they were designed to.
what you mean by web designers here? and what is "reference to the semantics of the document content as captured by the html markup"? are you okay man?
By web designers, I mean those people who are generally responsible to the look, feel and wider UX of a web site, as opposed to content authors. HTML is a semantic mark up language. The mark-up is there to indicate the meaning of the content. In particular, ids and classes are part of HTML rather than part of CSS, and therefore their values should be chosen to describe the content's semantics. The true purpose of selectors is to provide the binding between the HTML's semantics and the CSS's styling.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The cascade makes perfect sense, just as it always has done, provided that you understand what the true roles of HTML, selectors and CSS declarations are. Unfortunately, because web designers decided that they wanted to create site styles without reference to the semantics of the document content as captured by the HTML markup, they were forced to pervert both the roles of HTML and selectors for their own means. Once those roles are perverted, neither the specificity nor the cascade can work as they were designed to.
what you mean by web designers here? and what is "reference to the semantics of the document content as captured by the html markup"? are you okay man?
By web designers, I mean those people who are generally responsible to the look, feel and wider UX of a web site, as opposed to content authors. HTML is a semantic mark up language. The mark-up is there to indicate the meaning of the content. In particular, ids and classes are part of HTML rather than part of CSS, and therefore their values should be chosen to describe the content's semantics. The true purpose of selectors is to provide the binding between the HTML's semantics and the CSS's styling.