necolas / normalize.css

A modern alternative to CSS resets
http://necolas.github.io/normalize.css/
MIT License
52.28k stars 10.67k forks source link

feature: If `hidden="until-found"`, it's not `display: none`. #879

Open yamanoku opened 2 years ago

yamanoku commented 2 years ago

hidden attribute, which used to have only a boolean value, now also has a new until-found value.

ref: https://github.com/whatwg/html/commit/f5def65bda4d01a6a1e105fcf13fe45201b4f48a

Elements with hidden="until-found" will have content-visibility: hidden applied instead of display: none. If specified with display: none, it may not be found in in-page searches.

ref: HTML の hidden 属性が列挙型に変更され hidden="until-found" が追加

To avoid this problem, the style specification for hidden case has been modified.

sample: https://codepen.io/yamanoku/pen/YzYpoqG