Strong opinions, weakly held

Understanding the success of CSS selectors

After years of complaints about Cascading Style Sheets, many stemming from their deliberately declarative nature, it’s time to recognize their power. For developers coming from imperative programming styles, it might seem hard to lose the ability to specify more complex logical flow. That loss, though, is discipline leading toward the ability to create vastly more flexible systems, a first step toward the pattern matching model common to functional programming.

O’Reilly editor Simon St. Laurent talks about the power of CSS. CSS selectors have won in the marketplace of ideas for good reasons.


  1. Part of it is CSS being the first mover implemented in both IE and Netscape.

    JSSS were only available in Netscape 4, not IE.

    XML Stylesheets and XSLT are impractical for many reasons, but I don’t think XPath syntax itself is bad. It’s arguably a bit more complicated than CSS syntax, but it’s also declarative so it shares many of the same advantages.

  2. I agree, XPath is pretty great as far as XML goes.

Leave a Reply

Your email address will not be published.


© 2019 rc3.org

Theme by Anders NorenUp ↑