Automatic update from web-platform-tests [css-mixins] Split tests into subdirectories for functions and mixins No changes to the test files other than updating relative paths. WEB_FEATURES.yml files were updated to match all files in respective subdirectories. Bug: 406935599 Change-Id: I864e1ad0bb36a5945fd9945365933b3697d3f764 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8061706 Reviewed-by: Alison Maher <almaher@microsoft.com> Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com> Cr-Commit-Position: refs/heads/main@{#1659001} -- wpt-commits: 5f6046734ece0649fa6f3ad2915ea23ba4d3674a wpt-pr: 61166
122 lines
2.9 KiB
HTML
122 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
|
<title>Custom Functions: Container Queries + ShadowDOM</title>
|
|
<link rel="help" href="https://drafts.csswg.org/css-mixins-1/#using-custom-functions">
|
|
<link rel="help" href="https://drafts.csswg.org/css-shadow-1/#css-tree-scoped-reference">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="../resources/utils.js"></script>
|
|
|
|
<div data-name="Can query named container in shadow">
|
|
<template shadowrootmode=open>
|
|
<style>
|
|
@function --b() {
|
|
@container --cont (width = 10px) {
|
|
result: 10px;
|
|
}
|
|
}
|
|
::part(target) {
|
|
--actual: --b();
|
|
--expected: 10px;
|
|
}
|
|
.container {
|
|
container: --cont / size;
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
</style>
|
|
<div id=target part=target></div>
|
|
</template>
|
|
</div>
|
|
|
|
<div data-name="::part() can see inner named containers">
|
|
<template shadowrootmode=open>
|
|
<style>
|
|
@function --b() {
|
|
@container --cont (width = 5px) {
|
|
result: 5px;
|
|
}
|
|
@container --cont (width = 10px) {
|
|
result: 10px;
|
|
}
|
|
}
|
|
::part(target) {
|
|
--actual: --b();
|
|
--expected: 5px;
|
|
}
|
|
.container {
|
|
container: --cont / size;
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
</style>
|
|
<div class=container>
|
|
<template shadowrootmode=open>
|
|
<style>
|
|
@function --b() {
|
|
result: FAIL;
|
|
}
|
|
.container {
|
|
container: --cont / size;
|
|
width: 5px;
|
|
height: 5px;
|
|
}
|
|
</style>
|
|
<div class=container>
|
|
<div id=target part=target></div>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<div data-name="::slotted() can see inner named containers">
|
|
<template shadowrootmode=open>
|
|
<style>
|
|
@function --b() {
|
|
@container --cont (width = 5px) {
|
|
result: 5px;
|
|
}
|
|
@container --cont (width = 10px) {
|
|
result: 10px;
|
|
}
|
|
}
|
|
.container {
|
|
container: --cont / size;
|
|
width: 10px;
|
|
height: 10px;
|
|
}
|
|
</style>
|
|
<div class=container>
|
|
<template shadowrootmode=open>
|
|
<style>
|
|
@function --c() {
|
|
@container --cont (width = 5px) {
|
|
result: 5px;
|
|
}
|
|
@container --cont (width = 10px) {
|
|
result: 10px;
|
|
}
|
|
}
|
|
.container {
|
|
container: --cont / size;
|
|
width: 5px;
|
|
height: 5px;
|
|
}
|
|
::slotted(#target) {
|
|
--actual: --b() --c();
|
|
--expected: 5px 5px;
|
|
}
|
|
</style>
|
|
<div class=container>
|
|
<slot></slot>
|
|
</div>
|
|
</template>
|
|
<div id=target></div>
|
|
</div>
|
|
</template>
|
|
</div>
|
|
|
|
<script>
|
|
test_all_shadows();
|
|
</script>
|