marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

can not use display:none in v1.2.2, but it works fine in v1.2.1 #285

Closed grtan closed 4 years ago

grtan commented 4 years ago

I find the code to cause problems.

if (!lastAnimationFrame) {
     lastAnimationFrame = requestAnimationFrame(function () {
                lastAnimationFrame = 0

                reset()
              })
            }

...

// Fix for custom Elements
// this code cause the value of lastAnimationFrame is not 0
lastAnimationFrame = requestAnimationFrame(reset)
marcj commented 4 years ago

Fixed in v1.2.3