Hacker News new | past | comments | ask | show | jobs | submit login

Technically, there is a native SGML mechanism called link process declaration (without DSSSL) for assigning style properties to document markup. Looks as follows:

    <!DOCTYPE html [
      <!-- ... declarations
           for HTML elements, 
           attributes ... -->
    ]>
    <!LINKTYPE render
      html #IMPLIED [
       <!ATTLIST a color
         (blue|red) #IMPLIED>
      <!LINK #INITIAL
        a [ color=blue ]>
    ]>
    <html>
    <title>Blue link</title>
    <p>this <a href=x.html>
      link</a> is rendered
      in blue color</p>
    </html>
Beyond this trivial example, style properties (link attributes) can be assigned in a context-dependent way for eg even/odd pages in print, or actually capture the largest part of CSS selectors (sans pseudo-attributes such as :hover though which are "magical" in CSS).

I always wondered why people believed we need a distinct property universe for CSS properties when regular HTML attributes are there for this exact purpose (in link processes, attributes reuse regular content attribute declaration syntax).




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: