Add a fallback color for the background image

The color is displayed while the image is loading. This way,
text is still readable if the image takes a while to load
(which can be the case on a slow connection).
This commit is contained in:
Hugo Locurcio 2019-07-28 18:31:23 +02:00 committed by sfan5
parent 42a714998d
commit fe3e2c1c93

View File

@ -1,6 +1,9 @@
// Used for the "hero" header on the homepage
.section-home {
background-image: url("/media/background-home.jpg");
// Background color is displayed while the image is loading,
// so that the text is still readable
background-color: hsl(0, 1%, 13%);
font-size: $size-5;
text-align: center;