Skip to content

Commit

Permalink
[@container] scroll-state(snapped:none) inverted result
Browse files Browse the repository at this point in the history
Was checking if snapped. Check if not snapped.

Bug: 40279568
Change-Id: Ide3ea646f9e3caf3b8b86d593663318c59a20445
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5870109
Reviewed-by: Anders Hartvoll Ruud <[email protected]>
Commit-Queue: Rune Lillesveen <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1356398}
  • Loading branch information
lilles authored and chromium-wpt-export-bot committed Sep 17, 2024
1 parent 7d8e629 commit 012abf6
Showing 1 changed file with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<title>@container: scroll-state(snapped: none)</title>
<link rel="help" href="https://drafts.csswg.org/css-conditional-5/#snapped">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/css-conditional/container-queries/support/cq-testcommon.js"></script>
<style>
#no-snap { container-type: scroll-state; }
@container scroll-state(snapped: none) {
#target { --snapped-none: true }
}
@container not scroll-state(snapped) {
#target { --snapped-boolean: true }
}
</style>
<div id="no-snap">
<div id="target"></div>
</div>
<script>
setup(() => assert_implements_container_queries());

test(() => {
assert_equals(getComputedStyle(target).getPropertyValue("--snapped-none"), "true");
assert_equals(getComputedStyle(target).getPropertyValue("--snapped-boolean"), "true");
}, "Check scroll-state(snapped:none) and scroll-state(snapped) for non-snapping container");

</script>

0 comments on commit 012abf6

Please sign in to comment.