Skip to content

Files

Latest commit

 

History

History
10 lines (10 loc) · 565 Bytes

73.md

File metadata and controls

10 lines (10 loc) · 565 Bytes
title date submitter number tags discussion
I want to be able to apply styles to a "sticky" element when it’s stuck
2019-09-15 08:22:11 UTC
Kalpesh Singh
73
css

I had a project where I needed to change background color of a "sticky" element when it moves from being in the normal flow to being "stuck" to the top of the viewport. It’s not possible to do that in CSS. It feels like this should be a pseudo-class (much like :invalid, etc. in forms). Perhaps something like :stuck?