You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The anchor-name property doesn't respect the CSS cascade. For example:
.anchor {
anchor-name: --name;
}
.anchor {
anchor-name: --other-name;
}
.positioned {
position: absolute;
top: anchor(--name, bottom); // this should not anchor to `.anchor`, but currently does.
}
Expected behavior
The anchor function should only match the anchor-name that is actually applied by the cascade
Additional context
This can be solved by shifting anchor-name into a custom property, but the custom property inherits by default, so we would either have to disable that with @property (potentially unacceptable due to browser support?) or just be careful to verify we're not reading inherited values. This is how I handled a similar issue for anchor-scope: 32f04d8 (#217)
The text was updated successfully, but these errors were encountered:
Describe the bug
The
anchor-name
property doesn't respect the CSS cascade. For example:To Reproduce
I created a test demonstrating the issue here: main...mmalerba:css-anchor-positioning:cascade
Expected behavior
The
anchor
function should only match theanchor-name
that is actually applied by the cascadeAdditional context
This can be solved by shifting
anchor-name
into a custom property, but the custom property inherits by default, so we would either have to disable that with@property
(potentially unacceptable due to browser support?) or just be careful to verify we're not reading inherited values. This is how I handled a similar issue foranchor-scope
:32f04d8
(#217)The text was updated successfully, but these errors were encountered: