|
1 | 1 | .header {
|
| 2 | + // scss-docs-start header-css-vars |
| 3 | + --#{$prefix}header-min-height: #{$header-min-height}; |
| 4 | + --#{$prefix}header-padding-x: #{$header-padding-x}; |
| 5 | + --#{$prefix}header-padding-y: #{$header-padding-y}; |
| 6 | + --#{$prefix}header-bg: #{$header-bg}; |
| 7 | + --#{$prefix}header-color: #{$header-color}; |
| 8 | + --#{$prefix}header-border-color: #{$header-border-color}; |
| 9 | + --#{$prefix}header-border: #{$header-border-width} solid var(--#{$prefix}header-border-color); |
| 10 | + --#{$prefix}header-hover-color: #{$header-hover-color}; |
| 11 | + --#{$prefix}header-disabled-color: #{$header-disabled-color}; |
| 12 | + --#{$prefix}header-active-color: #{$header-active-color}; |
| 13 | + --#{$prefix}header-brand-padding-y: #{$header-brand-padding-y}; |
| 14 | + --#{$prefix}header-brand-color: #{$header-brand-color}; |
| 15 | + --#{$prefix}header-brand-hover-color: #{$header-brand-hover-color}; |
| 16 | + --#{$prefix}header-toggler-padding-x: #{$header-toggler-padding-x}; |
| 17 | + --#{$prefix}header-toggler-padding-y: #{$header-toggler-padding-y}; |
| 18 | + --#{$prefix}header-toggler-bg: #{$header-toggler-bg}; |
| 19 | + --#{$prefix}header-toggler-color: #{$header-toggler-color}; |
| 20 | + --#{$prefix}header-toggler-border-radius: #{$header-toggler-border-radius}; |
| 21 | + --#{$prefix}header-toggler-hover-color: #{$header-toggler-hover-color}; |
| 22 | + --#{$prefix}header-toggler-icon-bg: #{escape-svg($header-toggler-icon-bg)}; |
| 23 | + --#{$prefix}header-toggler-hover-icon-bg: #{escape-svg($header-toggler-hover-icon-bg)}; |
| 24 | + --#{$prefix}header-nav-link-padding-x: #{$header-nav-link-padding-x}; |
| 25 | + --#{$prefix}header-nav-link-padding-y: #{$header-nav-link-padding-y}; |
| 26 | + --#{$prefix}header-divider-border-color: #{$header-divider-border-color}; |
| 27 | + --#{$prefix}header-divider-border: #{$header-divider-border-width} solid var(--#{$prefix}header-divider-border-color); |
| 28 | + --#{$prefix}subheader-min-height: #{$subheader-min-height}; |
| 29 | + // scss-docs-end header-css-vars |
| 30 | + |
2 | 31 | position: relative;
|
3 | 32 | display: flex;
|
4 | 33 | flex-wrap: wrap; // allow us to do the line break for collapsing content
|
5 | 34 | align-items: center;
|
6 | 35 | justify-content: space-between; // space out brand from logo
|
7 |
| - min-height: $header-min-height; |
8 |
| - padding: $header-padding-y $header-padding-x; |
9 |
| - background: var(--#{$prefix}header-bg, $header-bg); |
10 |
| - border-bottom: var(--#{$prefix}header-border-width, $header-border-width) solid var(--#{$prefix}header-border-color, $header-border-color); |
| 36 | + min-height: var(--#{$prefix}header-min-height); |
| 37 | + padding: var(--#{$prefix}header-padding-y) var(--#{$prefix}header-padding-x); |
| 38 | + background: var(--#{$prefix}header-bg); |
| 39 | + border-bottom: var(--#{$prefix}header-border); |
11 | 40 |
|
12 | 41 | // Because flex properties aren't inherited, we need to redeclare these first
|
13 | 42 | // few properties so that content nested within behave properly.
|
|
32 | 61 |
|
33 | 62 | .container:first-child,
|
34 | 63 | .container-fluid:first-child {
|
35 |
| - min-height: $header-min-height - (2 * $header-padding-y); |
| 64 | + min-height: calc(var(--#{$prefix}header-min-height) - (2 * var(--#{$prefix}header-padding-y))); // stylelint-disable-line function-disallowed-list |
36 | 65 | }
|
37 | 66 |
|
38 | 67 | .container:nth-child(n+2),
|
39 | 68 | .container-fluid:nth-child(n+2) {
|
40 |
| - min-height: $subheader-min-height - (2 * $header-padding-y); |
| 69 | + min-height: calc(var(--#{$prefix}subheader-min-height) - (2 * var(--#{$prefix}header-padding-y))); // stylelint-disable-line function-disallowed-list |
41 | 70 | }
|
42 | 71 |
|
43 | 72 | &.header-sticky {
|
|
48 | 77 | }
|
49 | 78 |
|
50 | 79 | .header-divider {
|
51 |
| - flex-basis: calc(100% + #{2 * $header-padding-x}); // stylelint-disable-line function-disallowed-list |
| 80 | + flex-basis: calc(100% + (2 * var(--#{$prefix}header-padding-x))); // stylelint-disable-line function-disallowed-list |
52 | 81 | height: 0;
|
53 |
| - margin: $header-padding-y (- $header-padding-x); |
54 |
| - border-top: var(--#{$prefix}header-divider-border-width, $header-divider-border-width) solid var(--#{$prefix}header-divider-border-color, $header-divider-border-color); |
| 82 | + margin: var(--#{$prefix}header-padding-y) calc(var(--#{$prefix}header-padding-x) * -1); // stylelint-disable-line function-disallowed-list |
| 83 | + border-top: var(--#{$prefix}header-divider-border); |
55 | 84 | }
|
56 | 85 |
|
57 | 86 | // Header brand
|
58 | 87 | //
|
59 | 88 | // Used for brand, project, or site names.
|
60 | 89 |
|
61 | 90 | .header-brand {
|
62 |
| - padding-top: $header-brand-padding-y; |
63 |
| - padding-bottom: $header-brand-padding-y; |
| 91 | + padding-top: var(--#{$prefix}header-brand-padding-y); |
| 92 | + padding-bottom: var(--#{$prefix}header-brand-padding-y); |
64 | 93 | @include ltr-rtl("margin-right", $header-brand-margin-end);
|
65 | 94 | @include font-size($header-brand-font-size);
|
66 |
| - color: var(--#{$prefix}header-brand-color, $header-brand-color); |
| 95 | + color: var(--#{$prefix}header-brand-color); |
67 | 96 | text-decoration: if($link-decoration == none, null, none);
|
68 | 97 | white-space: nowrap;
|
69 | 98 |
|
70 | 99 | &:hover,
|
71 | 100 | &:focus {
|
72 |
| - color: var(--#{$prefix}header-brand-hover-color, $header-brand-hover-color); |
| 101 | + color: var(--#{$prefix}header-brand-hover-color); |
73 | 102 | text-decoration: if($link-hover-decoration == underline, none, null);
|
74 | 103 | }
|
75 | 104 | }
|
|
86 | 115 | list-style: none;
|
87 | 116 |
|
88 | 117 | .nav-link {
|
89 |
| - padding-right: $header-nav-link-padding-x; |
90 |
| - padding-left: $header-nav-link-padding-x; |
91 |
| - color: var(--#{$prefix}header-color, $header-color); |
| 118 | + padding: var(--#{$prefix}header-nav-link-padding-y) var(--#{$prefix}header-nav-link-padding-x); |
| 119 | + color: var(--#{$prefix}header-color); |
92 | 120 |
|
93 | 121 | &:hover,
|
94 | 122 | &:focus {
|
95 |
| - color: var(--#{$prefix}header-hover-color, $header-hover-color); |
| 123 | + color: var(--#{$prefix}header-hover-color); |
96 | 124 | }
|
97 | 125 |
|
98 | 126 | &.disabled {
|
99 |
| - color: var(--#{$prefix}header-disabled-color, $header-disabled-color); |
| 127 | + color: var(--#{$prefix}header-disabled-color); |
100 | 128 | }
|
101 | 129 | }
|
102 | 130 |
|
103 | 131 | .show > .nav-link,
|
104 | 132 | .nav-link.active {
|
105 |
| - color: var(--#{$prefix}header-active-color, $header-active-color); |
| 133 | + color: var(--#{$prefix}header-active-color); |
106 | 134 | }
|
107 | 135 |
|
108 | 136 | .dropdown-menu {
|
|
116 | 144 | //
|
117 | 145 |
|
118 | 146 | .header-text {
|
119 |
| - padding-top: $nav-link-padding-y; |
120 |
| - padding-bottom: $nav-link-padding-y; |
121 |
| - color: var(--#{$prefix}header-color, $header-color); |
| 147 | + padding-top: var(--#{$prefix}header-nav-link-padding-y); |
| 148 | + padding-bottom: var(--#{$prefix}header-nav-link-padding-y); |
| 149 | + color: var(--#{$prefix}header-color); |
122 | 150 |
|
123 | 151 | a {
|
124 |
| - color: var(--#{$prefix}header-active-color, $header-active-color); |
| 152 | + color: var(--#{$prefix}header-active-color); |
125 | 153 |
|
126 | 154 | &:hover,
|
127 | 155 | &:focus {
|
128 |
| - color: var(--#{$prefix}header-active-color, $header-active-color); |
| 156 | + color: var(--#{$prefix}header-active-color); |
129 | 157 | }
|
130 | 158 | }
|
131 | 159 | }
|
132 | 160 |
|
133 | 161 | .header-toggler {
|
134 |
| - padding: $header-toggler-padding-y $header-toggler-padding-x; |
| 162 | + padding: var(--#{$prefix}header-toggler-padding-y) var(--#{$prefix}header-toggler-padding-x); |
135 | 163 | @include font-size($header-toggler-font-size);
|
136 |
| - color: var(--#{$prefix}header-color, $header-color); |
137 |
| - background-color: var(--#{$prefix}header-toggler-bg, $header-toggler-bg); |
| 164 | + color: var(--#{$prefix}header-toggler-color); |
| 165 | + background-color: var(--#{$prefix}header-toggler-bg); |
138 | 166 | border: 0; // remove default button style
|
139 |
| - @include border-radius($header-toggler-border-radius); |
| 167 | + @include border-radius(var(--#{$prefix}header-toggler-border-radius)); |
140 | 168 |
|
141 | 169 | &:hover {
|
142 |
| - color: $body-color; |
| 170 | + color: var(--#{$prefix}header-toggler-hover-color); |
143 | 171 | text-decoration: none;
|
144 | 172 | }
|
145 | 173 |
|
|
156 | 184 | .header-toggler-icon {
|
157 | 185 | display: block;
|
158 | 186 | height: $header-toggler-font-size * 1.25;
|
159 |
| - background-image: var(--#{$prefix}header-toggler-icon-bg, escape-svg($header-toggler-icon-bg)); |
| 187 | + background-image: var(--#{$prefix}header-toggler-icon-bg); |
160 | 188 | background-repeat: no-repeat;
|
161 | 189 | background-position: center center;
|
162 | 190 | background-size: 100% 100%;
|
163 | 191 |
|
164 | 192 | &:hover {
|
165 |
| - background-image: var(--#{$prefix}header-toggler-hover-icon-bg, escape-svg($header-toggler-hover-icon-bg)); |
| 193 | + background-image: var(--#{$prefix}header-toggler-hover-icon-bg); |
166 | 194 | }
|
167 | 195 | }
|
0 commit comments