pure-css / pure

A set of small, responsive CSS modules that you can use in every web project.
http://purecss.io/
Other
23.57k stars 2.48k forks source link

[hidden] rule breaks hidden=until-found #1246

Open mmoskal opened 8 months ago

mmoskal commented 8 months ago

Describe the bug Recent Chromium supports hidden="until-found" attribute which allows for Ctrl-F search in hidden accordions, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/hidden and https://developer.chrome.com/docs/css-ui/hidden-until-found

purecss adds "display:none !important" to "[hidden]" which breaks it:

https://github.com/pure-css/pure/blob/203b96487dd76486e84ebbe9c15f3c07962b9fcb/src/base/css/base.css#L20

It seems that "display:none" without "!important" also breaks it.

I'm not sure why this rule is there in the first place.

To Reproduce Steps to reproduce the behavior: Use recent Chrome or Edge Head to https://codepen.io/web-dot-dev/pen/JjMxmom Click on white demo area Search for papaya -> works Reload Add on top of HTML Click on white demo area Search for papaya -> doesn't work