Page 1 of 1

CSS revert directive support

Posted: 2022-11-28, 21:33
by UCyborg
https://developer.mozilla.org/en-US/docs/Web/CSS/revert

Just a quick question whether this can be supported in the underlying browser engine.

I don't know if there's a good reason for this, but forums based on Discourse platform use it to undo previously set overflow-y property, only an issue on JavaScriptless version where scroller disappears on Pale Moon.

Example URL: https://boards.straightdope.com/t/how-a ... rse/926428

Found this on Discourse's GitHub page: https://github.com/discourse/discourse/ ... l.erb#L240

Re: CSS revert directive support

Posted: 2022-11-28, 22:19
by Moonchild
Filed Issue #2045 (UXP).
Feel free to have a crack at it if comfortable working with our CSS engine. Aside from the actual implementation, adding a new keyword isn't too terribly difficult. Considering this just clears/resets applied styles, I doubt it'd touch much of the actual layout engine beyond the parser/style system.

Re: CSS revert directive support

Posted: 2022-11-30, 22:26
by UCyborg
Sorry, I guess this belongs in the platform development subforum. Just wanted to point out one thing I found that's missing, it's good for it to be on the list of things to tackle in the future.

Re: CSS revert directive support

Posted: 2022-11-30, 22:35
by Moonchild
UCyborg wrote:
2022-11-30, 22:26
Sorry, I guess this belongs in the platform development subforum.
yeah I'll move it.