From 3cc84ceb00282c6061083153e5241177824c7aa0 Mon Sep 17 00:00:00 2001 From: mco9734 Date: Mon, 5 May 2025 18:58:34 -0400 Subject: [PATCH] improve title centering --- _sass/_splash.scss | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/_sass/_splash.scss b/_sass/_splash.scss index 50930963..8955f809 100644 --- a/_sass/_splash.scss +++ b/_sass/_splash.scss @@ -1,26 +1,29 @@ $size: 350px; .splash { - height: $size; - text-align: center; - & h1 { - width: 100%; - height: 100%; - background: url('#{$CSHPUBSITE_ASSETS_URL}/hallway_blurred.jpg') 30% 30% no-repeat; - background-size: cover; - line-height: calc(#{$size} + 50px); - text-align: center; - color: white; - font-size: 3em; - vertical-align: bottom; - } + height: $size; + display: flex; + align-items: center; + justify-content: center; + text-align: center; + background: url('#{$CSHPUBSITE_ASSETS_URL}/hallway_blurred.jpg') 30% 30% no-repeat; + background-size: cover; + + h1 { + color: white; + font-size: 3em; + margin: 0; + padding: 0 1rem; + max-width: 100%; + word-wrap: break-word; + } + + @media (max-width: 992px) { + height: 400px; - @media(max-width: 992px) { - height: 400px; - & h1 { - font-size: 2em; - line-height: 1.2; - padding-top: 50%; - } + h1 { + font-size: 2em; + padding: 0 1rem; } + } }