oddbird / popover-polyfill

Polyfills the HTML popover attribute and showPopover/hidePopover/togglePopover methods onto HTMLElement, as well as the popovertarget and popovertargetaction attributes on <button> elements.
https://popover.oddbird.net
BSD 3-Clause "New" or "Revised" License
269 stars 14 forks source link

prepend popover stylesheet #156

Closed keithamus closed 1 year ago

keithamus commented 1 year ago

Description

This may go some of the way to fixing #147 which is still an issue for users, despite #153 which dropped selector specificity down to 0,0,0. Right now if a selector is used that has a specificity of 0,0,0, the polyfill will still potentially override it as the popover styles get appended to the head/adoptedStyleSheets, and as such will be lower in the cascade.

This change ensures that the popover stylesheet is prepended rather than appended, which means it will appear as high up in the cascade as possible, rather than potentially at the bottom.

Steps to test/reproduce

N/A

Show me

N/A

netlify[bot] commented 1 year ago

Deploy Preview for popover-polyfill ready!

Name Link
Latest commit 7106a798743f2cf42583a2e5940427b3a3dfdc5a
Latest deploy log https://app.netlify.com/sites/popover-polyfill/deploys/6566ffa4e184720008884de8
Deploy Preview https://deploy-preview-156--popover-polyfill.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.