JakeQZ
JakeQZ
Yes, that would make sense. It would also mean reusable code can be refactored in the new `CssInliner` class for sharing with `HtmlMinifier` etc. without waiting until 4.0.0. I guess...
The evaluation of CSS variables is based on the DOM tree. The value is taken from self-or-closest-ancestor where the variable is effectively a property defined according to normal CSS precedence...
There will be caveats if we do this. E.g. ```css :root { --font-size: 16px; } @media (max-width: 640px) { :root { --font-size: 14px; } } body { font-size: var(--font-size); }...
> If we copy through the actual value of the `--font-size` variable to the inline style, the `@media` rule will not be able to override it. I think (in the...
> An initial Emogrification pass to determine the variables specifically assigned at each element node, and some way of storing the results so they can be looked up by element...
> Support for `:root` I'm hoping this already works in the Symfony CssSelector component, and that all we need to do is confirm this (by adding a test - if...
> I don't think a separate Emogrification pass to determine the variable assignments is actually needed, since in the main pass, all ancestor elements will have already been processed. We...
> Options might include whether to retain a declaration using the variable (`color: blue; color: var(--text-color);`) I tested this in both Firefox and Chrome (using the inspector/style-editor). An undefined variable...
> An undefined variable (custom property) seems to result in the property not being applied at all, even if specified by some other CSS. [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties#invalid_custom_properties) confirms this: > When the...
The method was introduced in https://github.com/MyIntervals/PHP-CSS-Parser/commit/9ed24ad97b6586029fa23af7daaebbbe3eaf6251.