Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[css-position] overlay property UA sheet is not enough. #11194

Open
emilio opened this issue Nov 13, 2024 · 4 comments
Open

[css-position] overlay property UA sheet is not enough. #11194

emilio opened this issue Nov 13, 2024 · 4 comments

Comments

@emilio
Copy link
Collaborator

emilio commented Nov 13, 2024

The UA sheet approach in here means that authors can control top layer rendering in pseudo-elements, see:

<!doctype html>
<style>
  div::before {
    content: "";
    overlay: auto;
    position: absolute;
    inset: 0;
    background: red;
  }
</style>
<div></div>
<script>
  alert(getComputedStyle(document.querySelector("div"), "::before").overlay);
</script>

Which alerts auto in Chrome.

I believe this is non-intentional.

cc @tabatkins @flackr @lilles

@lilles
Copy link
Member

lilles commented Nov 14, 2024

Yes, that's not intentional.

@cjpearson
Copy link

Could one approach be to say overlay computes to none for any pseudo-element other than ::backdrop?

@emilio
Copy link
Collaborator Author

emilio commented Nov 14, 2024

Possibly?

@Loirooriol
Copy link
Contributor

Kind of the same problem that I was trying to address in #4565. We resolved to add experimental work from #7346, which would allow

*, * :>> * { overlay: none !important }

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants