Bug 237486 - [css-cascade] revert-layer in lowest @layer ignores user and UA styles
Summary: [css-cascade] revert-layer in lowest @layer ignores user and UA styles
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-03-04 14:51 PST by Oriol Brufau
Modified: 2022-03-05 03:21 PST (History)
6 users (show)

See Also:


Attachments
testcase (185 bytes, text/html)
2022-03-04 14:51 PST, Oriol Brufau
no flags Details
Patch (6.98 KB, patch)
2022-03-04 16:24 PST, Oriol Brufau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2022-03-04 14:51:03 PST
Created attachment 453874 [details]
testcase

<!DOCTYPE html>
<style>
@layer {
  #target {
    display: revert-layer;
  }
}
</style>
<div id="target"></div>
<script>
document.body.append(getComputedStyle(target).display);
</script>

Actual: inline
Expected: block

Chromium and Firefox do it correctly.

Spec: https://drafts.csswg.org/css-cascade-5/#revert-layer
> If there are no lower-priority declarations in the same cascade origin as the revert-layer value, the cascaded value will roll back to the previous origin.
Comment 1 Oriol Brufau 2022-03-04 16:24:07 PST
Created attachment 453879 [details]
Patch
Comment 2 EWS Watchlist 2022-03-04 16:26:20 PST
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment 3 EWS 2022-03-05 03:20:12 PST
Committed r290864 (248095@main): <https://commits.webkit.org/248095@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 453879 [details].
Comment 4 Radar WebKit Bug Importer 2022-03-05 03:21:18 PST
<rdar://problem/89854114>