Child and Pseudo-Element
A fixed element at the top or the bottom edge often has more than one color in it: its own background, plus a child or a ::before on top. Which one does Safari use for the status bar and the toolbar?
Colors: blue page, red fixed element, yellow child or ::before. Pick a case and compare the bars with the status bar and the toolbar.
Rules
- Safari uses the color of the fixed element.
- A child supplies the color only when the element has no color, the child covers the center of the edge, and it is at least 90% as wide as the screen. A narrower child has no effect.
- A
::beforeor::aftercounts as part of its element. Safari sees its color only by sampling pixels, and only when the bar is fully on screen and at least 6px tall. A narrow bar is partly off screen, so a::beforeon it has no effect.