3 ms·
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 tre
by samwillis 5y ago
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.
- no_way 5y agoInline styles defeat very large part of browser optimizations, so it is very unlikely something like this would be added.
- throwaway77384 5y agoEven worse, any modern CSP would forbid this anyway.