-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path_hero.scss
More file actions
159 lines (135 loc) · 3.56 KB
/
_hero.scss
File metadata and controls
159 lines (135 loc) · 3.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/**
* Hero Component
*
* Notes:
* - If using together with a breadcrumb in a masthead, add the --breaded
* modifier to reduce top padding.
* - There are two images included – one is shown on mobile (hero__inline-image),
* and the other on tablet and above. Both are optional.
*
* Example Usage:
*
* <div class="hero hero--breaded">
* <div class="hero__content">
* <div class="hero__body">
* <h1 class="hero__title">Duis aute irure dolor in reprehenderit</h1>
* <div class="hero__inline-image">
* <img src="//placehold.it/646x492/005ea5/ffffff?text=A+supporting+image" alt="" role="presentation">
* </div>
* <p class="hero__description">
* Lorem ipsum dolor sit amet, consectetur adipisicing elit
* </p>
* <a href="#" role="button" class="hero-button">
* Do this thing
* </a>
* <span class="hero-alternative-action">
* or <a href="#">do another thing</a> because reasons
* </span>
* <p>Pellentesque commodo arcu in sollicitudin lacinia. Vivamus lacus nibh, maximus nec laoreet eget, condimentum vel mi.</p>
* </div>
* <div class="hero__aside-image">
* <img src="//placehold.it/646x492/005ea5/ffffff?text=A+supporting+image" alt="" role="presentation">
* </div>
* </div>
* </div>
*/
.hero {
@extend .govuk-width-container;
margin-top: -10px;
margin-bottom: 0;
color: govuk-colour('white');
padding: govuk-spacing(5) 0;
&--breaded {
padding-top: 0;
}
a:link,
a:visited {
color: govuk-colour('white');
}
a:hover,
a:active {
color: govuk-colour('white');
}
a:focus {
@include govuk-focused-text;
}
&__title {
@include govuk-font($size: 48, $weight: bold);
}
&__description {
@include govuk-font($size: 24);
}
&__title,
&__description {
margin-top: govuk-spacing(3);
margin-bottom: govuk-spacing(3);
@include govuk-media-query(tablet) {
margin-bottom: govuk-spacing(6);
}
}
&__inline-image {
// Not in original product-page-example
// Added because we relocated the image
// to be immediately above the button
// and the extra margin is necessary to
// give the button space to breathe
margin-bottom: govuk-spacing(3);
text-align: center;
@include govuk-media-query(tablet) {
display: none;
visibility: hidden;
}
img {
width: 100%;
max-width: 320px;
}
}
&__aside-image {
display: none;
visibility: hidden;
@include govuk-media-query(tablet) {
display: block;
visibility: visible;
}
img {
max-width: 100%;
margin-top: govuk-spacing(3);
}
}
&__content {
@extend .govuk-grid-row;
}
&__body,
&__aside-image {
float: left;
width: govuk-grid-width(full);
box-sizing: border-box;
padding: 0 govuk-spacing(3);
a:link,
a:visited {
font-weight: bold;
}
}
@include govuk-media-query($from: tablet) {
&__body {
width: govuk-grid-width(two-thirds);
}
&__aside-image {
width: govuk-grid-width(one-third);
}
}
.button--start_white:link,
.button--start_white:visited {
background-color: govuk-colour('white');
color: $govuk-brand-colour;
background-size: 20px;
background-position: 96% 50%;
box-shadow: 0 2px 0 #004172;
@include govuk-device-pixel-ratio($ratio: 2) {
background-image: file-url('/pay-product-page/images/hero-button/arrow@2x.png');
}
}
.button--start_white:hover {
color: govuk-colour('light-blue');
}
}