mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-30 11:37:16 +02:00
LibWeb: Inherit CSS variables across shadow boundaries
This fixes a bunch of issues on https://wpt.fyi/
This commit is contained in:
committed by
Andreas Kling
parent
cf6929fef3
commit
de2b9eebe6
Notes:
github-actions[bot]
2024-07-25 19:39:22 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/de2b9eebe60 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/835
@@ -0,0 +1,20 @@
|
||||
<style>
|
||||
:root {
|
||||
--foo: green;
|
||||
}
|
||||
</style>
|
||||
<div id="myShadowHost">
|
||||
<template shadowrootmode="open">
|
||||
<style>
|
||||
span { color: var(--foo, red); }
|
||||
</style>
|
||||
<span>green</span>
|
||||
</template>
|
||||
</div>
|
||||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let span = myShadowHost.shadowRoot.firstElementChild.nextElementSibling;
|
||||
println(getComputedStyle(span).color);
|
||||
});
|
||||
</script>
|
||||
Reference in New Issue
Block a user