From fe3e2c1c9336fd10f0ae0c5c9a3d7d01f46b44ec Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 28 Jul 2019 18:31:23 +0200 Subject: [PATCH] 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). --- _sass/_home.scss | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_sass/_home.scss b/_sass/_home.scss index 78d8b11..dcc4ef8 100644 --- a/_sass/_home.scss +++ b/_sass/_home.scss @@ -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;