Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I would love to see this implemented within the style attribute in html, it would create a nice middle ground between totally separate css files and the new trend of designing with phudo-css class names with tools like Tailwind. It keeps your css close to the semantic html without drowning it in style and class attributes. So you could do something like this (clearly pointless) example:

  <div style="
    > h1 {
      font-weight: bold;
    }
  ">
    <h1>title</h1>
  </div>
Just add a way to inherit from a css class within the style attribute and you have a sort of inline sass.


Inline styles defeat very large part of browser optimizations, so it is very unlikely something like this would be added.


Even worse, any modern CSP would forbid this anyway.




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

Search: