-
Notifications
You must be signed in to change notification settings - Fork 171
/
Copy path_base_hr.scss
48 lines (39 loc) · 1.05 KB
/
_base_hr.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
@import 'settings';
%fixed-width-hr {
@mixin adjusted-width($size) {
$gutters-sizes: 2 * map-get($grid-margin-widths, $size);
max-width: calc($grid-max-width - $gutters-sizes);
width: calc(100% - $gutters-sizes);
}
margin-left: auto;
margin-right: auto;
@include adjusted-width(small);
@media (min-width: $threshold-4-6-col) {
@include adjusted-width(default);
}
.row &,
.grid-row &,
.u-fixed-width & {
width: 100%;
}
}
// Horizontal rule
@mixin vf-b-hr {
// stylelint-disable selector-max-type -- base styles can use type selectors
hr {
@extend %hr;
// DEPRECATED: use `.p-rule--muted` instead
&.is-muted {
background-color: $colors--theme--border-low-contrast;
}
&.u-no-margin--bottom {
// compensate for hr thickness, to make sure it doesn't drift from baseline grid
@extend %u-no-margin--bottom--hr;
}
// DEPRECATED: use rule component inside of the grid instead
&.is-fixed-width {
@extend %fixed-width-hr;
}
}
// stylelint-enable selector-max-type
}