Created
September 19, 2023 03:03
-
-
Save X-oss-byte/e63b2ee696dc6467535c1b140825ca7d to your computer and use it in GitHub Desktop.
HTML containment overflow (1d)
There should be a fixed-position arrow in the top right, and it should stay in the top right, attached to the viewport as you scroll down to see the rainbow. But no browser allows it. I believe that's a bug.
⬇️
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html { | |
container-type: inline-size; | |
} | |
@layer setup { | |
html { | |
font-size: calc(1.5em + 1vw); | |
} | |
.fixed { | |
position: fixed; | |
top: 1em; | |
right: 1em; | |
padding: 1em; | |
background: hsl(0deg 0% 50% / 0.5); | |
border: thick double white; | |
} | |
.spacer { | |
height: 300vh; | |
background: linear-gradient( | |
to bottom, | |
red, | |
orange, | |
yellow, | |
green, | |
blue, | |
indigo, | |
violet | |
); | |
padding: 1em; | |
text-align: center; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment