The default bug view has changed. See this FAQ.

Status

()

Core
CSS Parsing and Computation
--
enhancement
2 years ago
25 days ago

People

(Reporter: heycam, Unassigned)

Tracking

({dev-doc-needed})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [parity-safari], URL)

(Reporter)

Description

2 years ago
WebKit just implemented the revert keyword.  It's more useful than unset, when used with the all shorthand, so I think we should implement it too.

We should be able to just have an additional array on nsRuleData that stores the level each nsCSSValue came from.  Then when we encounter revert and have a non-eCSSUnit_Null value on the nsRuleData in a MapRuleInfoInto, we can overwrite the value with eCSSUnit_null if the current mLevel is greater than the level we have in the array.  We'll also need to adjust the RuleDetail that gets returned from CheckSpecifiedProperties when we encounter revert.
Keywords: dev-doc-needed

Comment 1

a year ago
Could someone add [parity-safari] to the Whiteboard?
See https://developer.apple.com/library/prerelease/mac/releasenotes/General/WhatsNewInSafari/Articles/Safari_9_1.html#//apple_ref/doc/uid/TP40014305-CH10-SW14
(Reporter)

Updated

a year ago
Whiteboard: [parity-safari]

Comment 2

a year ago
Update MDN docs: 

https://developer.mozilla.org/en-US/docs/Web/CSS/all
https://developer.mozilla.org/en-US/docs/Web/CSS/revert

Comment 3

a year ago
This feature turns out to be crucial to a nextgen CSS framework I am working on, but I also think it would be useful for the average developer.

Comment 4

5 months ago
FWIW, you can use "revert" today in most browsers by doing ```property:var(--\\revert)``` instead.
No that is not a dirty hack ^_^ You are welcome :-)

Comment 5

25 days ago
(In reply to Fran├žois REMY from comment #4)
> FWIW, you can use "revert" today in most browsers by doing
> ```property:var(--\\revert)``` instead.
> No that is not a dirty hack ^_^ You are welcome :-)

Unfortunately no, an invalid custom property value is equivalent to `unset`, not `revert`.
You need to log in before you can comment on or make changes to this bug.