Brecht De Ruyte avatar Brecht De Ruyte

Is the sticky thing stuck? Is the snappy item snapped? A look at state queries in CSS

Screenshot of “Is the sticky thing stuck? Is the snappy item snapped? A look at state queries in CSS”

Is the sticky thing stuck? A lot of us have been there, we have a header navigation that should remain sticky and should only show a shadow from the moment it gets stuck. It always involved some sort of extra scripting to get this working, or we just put the shadow on there by default. But with state queries, all of this is over and we could just use CSS for it.