File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed
Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change 11// Styling for the masthead
22header .masthead {
3+ position : relative ; // keep positioning predictable
34 text-align : center ;
45 color : $primary ;
56 background-image : url (" #{$header-image } " );
67 background-repeat : no-repeat ;
78 background-attachment : scroll ;
8- background-position : center center ;
9- background-size : cover ;
9+ background-position : 35 % center ; // left-center focus
10+ background-size : cover ; // default for desktop
1011 .intro-text {
1112 padding-top : 150px ;
1213 padding-bottom : 100px ;
@@ -27,11 +28,31 @@ header.masthead {
2728 }
2829}
2930
31+ /* SMALL SCREENS: make width match viewport, reduce padding so image can scale */
32+ @media (max-width : 767.98px ) {
33+ header .masthead {
34+ background-position : 30% center ; // slightly left on phones
35+ background-size : 100% auto ; // force image width = viewport width, preserve aspect ratio
36+ .intro-text {
37+ padding-top : 80px ; // smaller paddings so header height isn't huge
38+ padding-bottom : 60px ;
39+ .intro-lead-in {
40+ font-size : 18px ;
41+ line-height : 20px ;
42+ }
43+ .intro-heading {
44+ font-size : 32px ;
45+ line-height : 36px ;
46+ }
47+ }
48+ }
49+ }
50+
3051@media (min-width : 768px ) {
3152 header .masthead {
32- background-position : 35% center ;
53+ /* desktop behavior */
54+ background-position : 35% center ;
3355 background-size : cover ;
34-
3556 .intro-text {
3657 padding-top : 300px ;
3758 padding-bottom : 200px ;
You can’t perform that action at this time.
0 commit comments