Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add :host caveats to caveats section #157

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ some caveats which will need accommodations:
`shadowRoot`). You'll need to manually inject the styles yourself with
`injectStyles(myShadow)`.

- As a stylesheet is injected into the main document, if your host element is
a popover, styling with `:host` gets tricky beause `:host` styles always
take lower precedence than the main document styles. This is a limitation
of CSS and there's not a reasonable workaround. The best workaround for
now is to add `!important` to conflicting properties in your `:host` rule.
See [#147](https://github.com/oddbird/popover-polyfill/issues/147) for more.

## Contributing

Visit our [contribution guidelines](https://github.com/oddbird/popover-polyfill/blob/main/CONTRIBUTING.md).