Re: [csswg-drafts] [css-values] Allow `unset` to use `revert` for non-inherited properties, instead of `initial` (#12341)

Thanks for bringing this up! I have actually run into this exact problem when working with third-party widgets and isolated DOM sections where all: unset is used to reset styles.

It's funny how something meant to solve style conflicts can sometimes create new issues. When non-inherited properties fall back to initial, you suddenly get block elements like divs or sections behaving like inline elements (display: inline), which completely breaks layouts. I've lost hours debugging this exact behavior!

The proposal for an unset(revert) function or unset-revert keyword really resonates with me. It feels like we are missing a middle ground between complete style wiping and preserving cascade logic, especially with modern approaches like layered styling and component frameworks. This could be a game-changer for embedded UIs and shadow DOM work.

A couple things I am curious about:

- How this would play with the all shorthand (which I use constantly for style isolation)

- Browser engine consistency, we know revert already has some implementation quirks

If this moves forward, I would love to help review proposals or test implementations. This feels like one of those quality-of-life improvements that would save countless developer headaches.

Really appreciate you starting this conversation, it's exactly the kind of CSS pain point that deserves more attention!

-- 
GitHub Notification of comment by Shrinivassab
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12341#issuecomment-2977430080 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 16 June 2025 17:21:53 UTC