ladybird/Tests/LibWeb/Text/input/css/element-reference-pseudo-inline-style-cascade.html
Callum Law 9db3c77c6e LibWeb: Apply "element-reference" pseudo inline styles correctly
Previously we applied them ad-hoc when computing the style for the
referenced element but we now apply it as part of the cascade. This
fixes a couple bugs:
 - Computing the style for the pseudo-element (rather than the
   referenced element itself) as we do in the case we don't have a
   layout node in `get_direct_property` now includes the inline style.
 - Inline style is applied according to the cascade (i.e. it can be
   overriden by non-inline `!important` styles).
 - Properties go through the computation process.
2026-05-21 14:26:22 +01:00

19 lines
507 B
HTML

<!doctype html>
<script src="../include.js"></script>
<style>
details::details-content {
content-visibility: visible !important;
}
</style>
<details id="details">
<summary></summary>
<p></p>
</details>
<script>
test(() => {
getComputedStyle(details, "::details-content").width;
// Should be visible because the !important style should override the inline style
println(getComputedStyle(details, "::details-content").contentVisibility);
});
</script>