-
Notifications
You must be signed in to change notification settings - Fork 956
/
_understrap.scss
226 lines (190 loc) · 4.15 KB
/
_understrap.scss
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
body {
overflow-x: hidden; // Fix for Windows Chrome horizontal scrollbar.
}
// Some basic padding for all wrappers
.wrapper {
padding: $grid-gutter-width 0;
}
// Reset hero wrapper padding to 0
#wrapper-hero {
padding: 0 !important;
}
// Adding basic WordPress classes to pass the WordPress.org tests
.sticky,
.gallery-caption,
.bypostauthor,
.wp-caption,
.wp-caption-text {
font-size: inherit;
}
// Separate sticky wrapper from main content
.wrapper#wrapper-sticky {
border-bottom: 1px solid $gray-300;
}
// Adding some contrast background color to footer full widget
#wrapper-footer-full,
#wrapper-static-hero {
background-color: $gray-200;
}
.screen-reader-text {
@if variable-exists('bootstrap4') {
@include sr-only();
} @else {
@include visually-hidden();
}
}
.alignleft {
display: inline;
float: left;
margin-right: $spacer;
}
.alignright {
display: inline;
float: right;
margin-left: $spacer;
}
.aligncenter {
@extend .mx-auto;
display: block;
}
.widget_categories,
.widget_archive {
select {
@extend .form-control;
}
}
// Post design
.entry-footer span {
padding-right: 10px;
}
figure,
img,
img.wp-post-image,
article img,
#secondary img {
max-width: 100%;
height: auto;
}
// Skip to content link
a.skip-link {
@if variable-exists('bootstrap4') {
@extend .sr-only;
@extend .sr-only-focusable;
} @else {
@extend .visually-hidden-focusable;
}
}
// Dropdown translation
.navbar-dark .navbar-nav .dropdown-menu .nav-link {
display: block;
width: 100%; // For `<button>`s
padding: $dropdown-item-padding-y $dropdown-item-padding-x;
clear: both;
font-weight: $font-weight-normal;
color: $dropdown-link-color !important;
text-align: inherit; // For `<button>`s
white-space: nowrap; // prevent links from randomly breaking onto new lines
background: none; // For `<button>`s
border: 0; // For `<button>`s
&:hover,
&:focus {
color: $dropdown-link-hover-color !important;
text-decoration: none;
background-color: $dropdown-link-hover-bg;
}
&.active,
&:active {
color: $dropdown-link-active-color !important;
text-decoration: none;
background-color: $dropdown-link-active-bg;
}
&.disabled,
&:disabled {
color: $dropdown-link-disabled-color !important;
background-color: transparent;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
}
}
.navbar-light .navbar-brand a {
color: $navbar-light-active-color;
&:hover,
&:focus {
color: $navbar-light-active-color;
}
}
.navbar-dark .navbar-brand a {
color: $navbar-dark-active-color;
&:hover,
&:focus {
color: $navbar-dark-active-color;
}
}
.navbar h1 {
font-weight: $font-weight-normal;
}
// Galleries
.gallery {
margin-bottom: 1.5em;
}
.gallery-item {
display: inline-block;
text-align: center;
vertical-align: top;
width: 100%;
@for $i from 2 through 9 {
.gallery-columns-#{$i} & {
max-width: floor( percentage( 1 / $i ) * 100 ) / 100;
}
}
}
.gallery-caption {
display: block;
}
// New Search Widget in Block Editor
.wp-block-search {
.wp-block-search__label {
@if variable-exists('bootstrap4') {
@include sr-only();
} @else {
@include visually-hidden();
}
}
.wp-block-search__inside-wrapper {
@extend .input-group;
.wp-block-search__input {
@extend .form-control;
}
.wp-block-search__button {
border-radius: $border-radius;
&:not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
margin-left: 0;
}
@if variable-exists('bootstrap4') {
@include button-variant( $primary, $primary );
border-top-left-radius: 0px;
border-bottom-left-radius: 0px;
} @else {
@include button-variant( $primary, $primary );
}
}
}
}
// Fixing Off-canvas close icon is hidden behind admin bar
@include media-breakpoint-down(md) {
body.admin-bar .offcanvas-end {
margin-top: 46px;
}
}
@if variable-exists('bootstrap4') {
// Reset Jumbotron default margin
.jumbotron {
margin-bottom: 0;
}
// Accessibility requirement for content links.
.entry-content p a:not(.btn) {
text-decoration: underline;
}
}