material-sass 4.0.0.alpha6 → 4.0.0.beta

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/README.md +36 -8
  4. data/Rakefile +16 -3
  5. data/app/assets/javascripts/material-sprockets.js +6 -1
  6. data/app/assets/javascripts/material.js +654 -417
  7. data/app/assets/javascripts/material.min.js +1 -0
  8. data/app/assets/javascripts/material/addons/picker.date.js +234 -0
  9. data/app/assets/javascripts/material/addons/picker.js +172 -0
  10. data/app/assets/javascripts/material/addons/textarea-autosize.js +20 -2
  11. data/app/assets/javascripts/material/addons/waves.js +127 -0
  12. data/app/assets/javascripts/material/components/floating-label.js +92 -0
  13. data/app/assets/javascripts/material/components/navdrawer.js +353 -0
  14. data/app/assets/javascripts/material/components/selection-control-focus.js +47 -0
  15. data/app/assets/javascripts/material/components/tab-switch.js +148 -0
  16. data/app/assets/javascripts/material/components/util.js +133 -0
  17. data/app/assets/javascripts/material/initializers/picker.js +171 -0
  18. data/app/assets/javascripts/material/initializers/textarea-autosize.js +10 -0
  19. data/app/assets/javascripts/material/initializers/waves.js +13 -0
  20. data/app/assets/stylesheets/material/_colours.scss +324 -0
  21. data/app/assets/stylesheets/material/_functions.scss +65 -0
  22. data/app/assets/stylesheets/material/_mixins.scss +23 -23
  23. data/app/assets/stylesheets/material/_print.scss +102 -0
  24. data/app/assets/stylesheets/material/_utilities.scss +21 -17
  25. data/app/assets/stylesheets/material/_variables.scss +13 -42
  26. data/app/assets/stylesheets/material/base/_base.scss +420 -5
  27. data/app/assets/stylesheets/material/base/_grid.scss +34 -33
  28. data/app/assets/stylesheets/material/base/_typography.scss +165 -174
  29. data/app/assets/stylesheets/material/bootstrap/_alert.scss +32 -39
  30. data/app/assets/stylesheets/material/bootstrap/_badge.scss +34 -0
  31. data/app/assets/stylesheets/material/bootstrap/_breadcrumb.scss +18 -18
  32. data/app/assets/stylesheets/material/bootstrap/_carousel.scss +127 -142
  33. data/app/assets/stylesheets/material/bootstrap/_close.scss +18 -19
  34. data/app/assets/stylesheets/material/bootstrap/_code.scss +10 -7
  35. data/app/assets/stylesheets/material/bootstrap/_custom-form.scss +50 -56
  36. data/app/assets/stylesheets/material/bootstrap/_form.scss +159 -129
  37. data/app/assets/stylesheets/material/bootstrap/_image.scss +19 -16
  38. data/app/assets/stylesheets/material/bootstrap/_jumbotron.scss +10 -7
  39. data/app/assets/stylesheets/material/bootstrap/_nav.scss +71 -69
  40. data/app/assets/stylesheets/material/bootstrap/_pagination.scss +34 -26
  41. data/app/assets/stylesheets/material/bootstrap/_popover.scss +26 -59
  42. data/app/assets/stylesheets/material/bootstrap/_responsive-embed.scss +4 -4
  43. data/app/assets/stylesheets/material/bootstrap/_transition.scss +10 -8
  44. data/app/assets/stylesheets/material/material.scss +75 -62
  45. data/app/assets/stylesheets/material/material/_button-flat.scss +26 -39
  46. data/app/assets/stylesheets/material/material/_button-float.scss +10 -14
  47. data/app/assets/stylesheets/material/material/_button-group.scss +268 -0
  48. data/app/assets/stylesheets/material/material/_button.scss +133 -189
  49. data/app/assets/stylesheets/material/material/_card.scss +300 -248
  50. data/app/assets/stylesheets/material/material/_chip.scss +65 -64
  51. data/app/assets/stylesheets/material/material/_data-table.scss +135 -45
  52. data/app/assets/stylesheets/material/material/_dialog.scss +141 -110
  53. data/app/assets/stylesheets/material/material/_expansion-panel.scss +86 -119
  54. data/app/assets/stylesheets/material/material/_menu.scss +308 -228
  55. data/app/assets/stylesheets/material/material/_navdrawer.scss +239 -234
  56. data/app/assets/stylesheets/material/material/_picker.scss +157 -155
  57. data/app/assets/stylesheets/material/material/_progress-circular.scss +80 -80
  58. data/app/assets/stylesheets/material/material/_progress.scss +180 -115
  59. data/app/assets/stylesheets/material/material/_selection-control.scss +132 -139
  60. data/app/assets/stylesheets/material/material/_stepper.scss +94 -93
  61. data/app/assets/stylesheets/material/material/_tab.scss +74 -93
  62. data/app/assets/stylesheets/material/material/_text-field-floating-label.scss +29 -20
  63. data/app/assets/stylesheets/material/material/_text-field-input-group.scss +94 -24
  64. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +13 -26
  65. data/app/assets/stylesheets/material/material/_text-field.scss +127 -118
  66. data/app/assets/stylesheets/material/material/_toolbar.scss +308 -313
  67. data/app/assets/stylesheets/material/material/_tooltip.scss +23 -62
  68. data/app/assets/stylesheets/material/mixins/_background-variant.scss +6 -6
  69. data/app/assets/stylesheets/material/mixins/_border-radius.scss +17 -17
  70. data/app/assets/stylesheets/material/mixins/_breakpoint.scss +32 -2
  71. data/app/assets/stylesheets/material/mixins/_clearfix.scss +1 -1
  72. data/app/assets/stylesheets/material/mixins/_form.scss +62 -25
  73. data/app/assets/stylesheets/material/mixins/_grid-framework.scss +8 -16
  74. data/app/assets/stylesheets/material/mixins/_grid.scss +40 -64
  75. data/app/assets/stylesheets/material/mixins/_material-icons.scss +36 -0
  76. data/app/assets/stylesheets/material/mixins/_nav-divider.scss +1 -1
  77. data/app/assets/stylesheets/material/mixins/_reset-text.scss +2 -21
  78. data/app/assets/stylesheets/material/mixins/_screenreader.scss +14 -12
  79. data/app/assets/stylesheets/material/mixins/_text-alignment.scss +23 -0
  80. data/app/assets/stylesheets/material/mixins/_text-emphasis.scss +6 -6
  81. data/app/assets/stylesheets/material/mixins/_transition.scss +42 -10
  82. data/app/assets/stylesheets/material/utilities/_background.scss +18 -18
  83. data/app/assets/stylesheets/material/utilities/_border.scss +88 -41
  84. data/app/assets/stylesheets/material/utilities/_display.scss +63 -30
  85. data/app/assets/stylesheets/material/utilities/_flex.scss +139 -134
  86. data/app/assets/stylesheets/material/utilities/_material-icons.scss +3 -5
  87. data/app/assets/stylesheets/material/utilities/_position.scss +19 -22
  88. data/app/assets/stylesheets/material/utilities/_sizing.scss +11 -12
  89. data/app/assets/stylesheets/material/utilities/_spacing.scss +51 -56
  90. data/app/assets/stylesheets/material/utilities/_text.scss +80 -75
  91. data/app/assets/stylesheets/material/utilities/_visibility.scss +5 -46
  92. data/app/assets/stylesheets/material/utilities/_waves.scss +11 -18
  93. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +89 -82
  94. data/app/assets/stylesheets/material/variables/_grid.scss +29 -26
  95. data/app/assets/stylesheets/material/variables/_palette.scss +45 -0
  96. data/app/assets/stylesheets/material/variables/_spacer.scss +34 -88
  97. data/app/assets/stylesheets/material/variables/_transition.scss +29 -0
  98. data/app/assets/stylesheets/material/variables/_typography.scss +88 -74
  99. data/app/assets/stylesheets/material/variables/_variable-bootstrap.scss +196 -133
  100. data/app/assets/stylesheets/material/variables/_variable-material.scss +481 -429
  101. data/lib/material-sass/version.rb +1 -1
  102. data/material-sass.gemspec +3 -3
  103. metadata +26 -21
  104. data/app/assets/javascripts/material/addons-materialise/pickadate.js +0 -139
  105. data/app/assets/javascripts/material/addons-materialise/textarea-autosize.js +0 -11
  106. data/app/assets/javascripts/material/addons-materialise/wave.js +0 -15
  107. data/app/assets/javascripts/material/addons/pickadate.js +0 -7
  108. data/app/assets/javascripts/material/addons/wave.js +0 -5
  109. data/app/assets/javascripts/material/src/floating-label.js +0 -91
  110. data/app/assets/javascripts/material/src/navdrawer.js +0 -352
  111. data/app/assets/javascripts/material/src/tab-switch.js +0 -133
  112. data/app/assets/javascripts/material/src/util.js +0 -138
  113. data/app/assets/stylesheets/material/base/_normalize.scss +0 -253
  114. data/app/assets/stylesheets/material/base/_reboot.scss +0 -239
  115. data/app/assets/stylesheets/material/bootstrap/_button-group.scss +0 -134
  116. data/app/assets/stylesheets/material/mixins/_tab-focus.scss +0 -5
  117. data/app/assets/stylesheets/material/mixins/_transform.scss +0 -9
  118. data/app/assets/stylesheets/material/variables/_animation.scss +0 -22
  119. data/app/assets/stylesheets/material/variables/_colour.scss +0 -389
@@ -1,402 +1,397 @@
1
1
  .navbar {
2
2
  align-items: center;
3
- color: $toolbar-color-dark;
3
+ color: $toolbar-color;
4
4
  display: flex;
5
+ flex-wrap: wrap;
6
+ justify-content: space-between;
5
7
  min-height: $toolbar-height;
6
- padding-top: $toolbar-padding-y;
7
- padding-bottom: $toolbar-padding-y;
8
+ padding: $toolbar-padding-y $toolbar-padding-x;
8
9
  position: relative;
9
10
 
10
- & > .container {
11
+ > .container {
11
12
  align-items: center;
12
13
  display: flex;
13
- padding-right: 0;
14
- padding-left: 0;
14
+ flex-wrap: wrap;
15
+ justify-content: space-between;
15
16
  }
16
- }
17
17
 
18
- // colour
19
- .navbar-inverse {
20
- color: $toolbar-color-light;
18
+ // Vertical align some elements normally placed in `.navbar` or `.toolbar`
19
+ .btn {
20
+ margin-top: (($btn-height - $toolbar-element-height) / -2);
21
+ margin-bottom: (($btn-height - $toolbar-element-height) / -2);
21
22
  }
22
23
 
23
- .navbar-light {
24
- color: $toolbar-color-dark;
24
+ .btn-lg {
25
+ margin-top: (($btn-height-lg - $toolbar-element-height) / -2);
26
+ margin-bottom: (($btn-height-lg - $toolbar-element-height) / -2);
25
27
  }
26
28
 
27
- // variation
28
- .navbar-fixed-bottom,
29
- .navbar-fixed-top {
30
- box-shadow: map-get($toolbar-elevation-shadow, shadow);
31
- position: fixed;
32
- right: 0;
33
- left: 0;
34
- z-index: map-get($toolbar-elevation-shadow, elevation);
29
+ .btn-sm {
30
+ margin-top: (($btn-height-sm - $toolbar-element-height) / -2);
31
+ margin-bottom: (($btn-height-sm - $toolbar-element-height) / -2);
35
32
  }
36
33
 
37
- .navbar-fixed-bottom {
38
- // position
39
- bottom: 0;
40
- }
34
+ .form-control {
35
+ @include border-radius($toolbar-element-border-radius);
36
+ @include transition-standard(opacity);
41
37
 
42
- .navbar-fixed-top {
43
- // position
44
- top: 0;
45
- }
38
+ background-color: $toolbar-element-bg;
39
+ border: 0;
40
+ color: inherit;
41
+ height: $toolbar-element-height;
42
+ opacity: $toolbar-element-opacity;
43
+ padding: (($toolbar-element-height - $textfield-font-size * $textfield-line-height) / 2) $toolbar-inner-spacer-x;
46
44
 
47
- .navbar-full {
48
- box-shadow: map-get($toolbar-elevation-shadow, shadow);
49
- z-index: map-get($toolbar-elevation-shadow, elevation);
45
+ @include focus-hover {
46
+ box-shadow: none;
47
+ opacity: 1;
48
+ }
50
49
  }
51
50
 
52
- .navbar-sticky-top {
53
- box-shadow: map-get($toolbar-elevation-shadow, shadow);
54
- position: sticky;
55
- top: 0;
56
- width: 100%;
57
- z-index: map-get($toolbar-elevation-shadow, elevation);
58
- }
51
+ .form-inline {
52
+ margin-left: $toolbar-inner-spacer-x;
59
53
 
60
- .toolbar-waterfall {
61
- position: absolute;
62
- top: 0;
63
- right: 0;
64
- left: 0;
65
- z-index: map-get($toolbar-elevation-shadow, elevation);
66
- @include transition-standard(background-color, box-shadow);
67
-
68
- &.waterfall {
69
- background-color: $toolbar-waterfall-bg;
70
- box-shadow: map-get($toolbar-elevation-shadow, shadow);
71
- position: fixed;
54
+ &:first-child {
55
+ margin-left: 0;
72
56
  }
73
57
  }
74
58
 
75
- //
76
- // misc
77
- //
78
- .navbar-brand {
79
- align-items: center;
80
- color: inherit;
81
- display: inline-flex;
82
- height: $toolbar-link-height;
83
- padding-right: $toolbar-link-padding-x;
84
- padding-left: $toolbar-link-padding-x;
85
- vertical-align: middle;
86
- white-space: nowrap;
87
- @include typography-title;
88
-
89
- // active, focus, hover
90
- @include active-focus-hover {
91
- color: inherit;
92
- text-decoration: none;
93
- }
59
+ .input-group {
60
+ @include border-radius($toolbar-element-border-radius);
61
+ @include transition-standard(opacity);
94
62
 
95
- &:focus {
96
- outline: 0;
97
- }
98
- }
63
+ background-color: $toolbar-element-bg;
64
+ opacity: $toolbar-element-opacity;
99
65
 
100
- .navbar-text {
101
- align-items: center;
102
- color: inherit;
103
- display: inline-flex;
104
- height: $toolbar-link-height;
105
- padding-right: $toolbar-link-padding-x;
106
- padding-left: $toolbar-link-padding-x;
107
- vertical-align: middle;
66
+ @include focus-hover {
67
+ opacity: 1;
68
+ }
69
+
70
+ .form-control {
71
+ @include border-radius(0);
72
+
73
+ background-color: transparent;
74
+ margin-left: 0;
75
+ opacity: 1;
76
+ }
77
+
78
+ .input-group-addon {
79
+ margin-left: 0;
80
+ }
108
81
  }
109
82
 
110
- //
111
- // nav
112
- //
113
- .navbar-nav {
114
- display: flex;
115
- list-style: none;
116
- margin-bottom: 0;
117
- padding-left: 0;
83
+ .nav-tabs {
84
+ margin-top: ($toolbar-padding-y * -1);
85
+ margin-bottom: ($toolbar-padding-y * -1);
118
86
 
119
87
  .nav-link {
120
- align-items: center;
121
- color: inherit;
122
- display: flex;
123
- font-size: $toolbar-link-font-size;
124
- height: $toolbar-link-height;
125
- line-height: 1;
126
- opacity: $toolbar-link-opacity;
127
- padding: 0 $toolbar-link-padding-x;
128
- @include border-radius($border-radius);
129
- @include transition-standard(background-color, opacity);
130
-
131
- // active, focus, hover
132
- @include active-focus-hover {
133
- color: inherit;
134
- opacity: $toolbar-link-opacity-active;
135
- }
88
+ min-height: $toolbar-height;
89
+ padding-top: (($toolbar-height - $nav-tab-font-size * $nav-tab-line-height) / 2);
90
+ padding-bottom: (($toolbar-height - $nav-tab-font-size * $nav-tab-line-height) / 2);
91
+ }
92
+ }
93
+ }
136
94
 
137
- &:focus {
138
- outline: 0;
139
- }
95
+ // Colour
96
+ .navbar-dark {
97
+ color: $toolbar-dark-color;
140
98
 
141
- &.active {
142
- color: inherit;
143
- }
99
+ .form-control,
100
+ .input-group,
101
+ .navbar-brand::before,
102
+ .navbar-nav .show > .nav-link,
103
+ .navbar-toggler::before {
104
+ background-color: $toolbar-dark-element-bg;
105
+ }
144
106
 
145
- // disabled
146
- &.disabled {
147
- opacity: $toolbar-link-opacity;
148
- }
107
+ .form-control::placeholder,
108
+ .navbar-nav .nav-link.disabled {
109
+ color: $toolbar-dark-color-lighter;
110
+ }
111
+ }
149
112
 
150
- // open
151
- &.show {
152
- background-color: $toolbar-element-bg-dark;
153
- }
154
- }
113
+ // Variation
114
+ .navbar-fixed-bottom,
115
+ .navbar-fixed-top {
116
+ box-shadow: map-get($toolbar-elevation-shadow, shadow);
117
+ position: fixed;
118
+ right: 0;
119
+ left: 0;
120
+ z-index: map-get($toolbar-elevation-shadow, elevation);
121
+ }
155
122
 
156
- .active > .nav-link,
157
- .show > .nav-link {
158
- opacity: $toolbar-link-opacity-active;
159
- }
123
+ .navbar-fixed-bottom {
124
+ bottom: 0;
125
+ }
160
126
 
161
- .show > .nav-link {
162
- background-color: $toolbar-element-bg-dark;
163
- }
127
+ .navbar-fixed-top {
128
+ top: 0;
129
+ }
164
130
 
165
- // direction
166
- .dropdown.show > .nav-link {
167
- @include border-bottom-radius(0);
168
- }
131
+ .navbar-full {
132
+ box-shadow: map-get($toolbar-elevation-shadow, shadow);
133
+ z-index: map-get($toolbar-elevation-shadow, elevation);
134
+ }
169
135
 
170
- .dropup.show > .nav-link {
171
- @include border-top-radius(0);
172
- }
136
+ .navbar-sticky-top {
137
+ box-shadow: map-get($toolbar-elevation-shadow, shadow);
138
+ position: sticky;
139
+ top: 0;
140
+ width: 100%;
141
+ z-index: map-get($toolbar-elevation-shadow, elevation);
142
+ }
143
+
144
+ .toolbar-waterfall {
145
+ @include transition-standard(background-color, box-shadow);
146
+
147
+ position: absolute;
148
+ top: 0;
149
+ right: 0;
150
+ left: 0;
151
+ z-index: map-get($toolbar-elevation-shadow, elevation);
152
+
153
+ &.waterfall {
154
+ background-color: $toolbar-waterfall-bg;
155
+ box-shadow: map-get($toolbar-elevation-shadow, shadow);
156
+ position: fixed;
173
157
  }
158
+ }
174
159
 
175
- // colour
176
- .navbar-inverse {
177
- .navbar-nav .nav-link.show,
178
- .navbar-nav .show > .nav-link {
179
- background-color: $toolbar-element-bg-light;
180
- }
181
- }
182
160
 
183
- //
184
- // toggleable
185
- //
186
- .navbar-toggleable {
187
- @each $breakpoint in map-keys($grid-breakpoints) {
188
- $infix: breakpoint-infix($breakpoint);
189
- $next: breakpoint-next($breakpoint);
190
161
 
191
- &#{$infix} {
192
- @include media-breakpoint-down($breakpoint) {
193
- display: block;
162
+ // Misc
194
163
 
195
- > .container {
196
- display: block;
197
- }
164
+ .navbar-brand {
165
+ @include typography-title;
198
166
 
199
- .navbar-collapse {
200
- clear: both;
167
+ align-items: center;
168
+ color: inherit;
169
+ display: inline-flex;
170
+ height: $toolbar-element-height;
171
+ margin-left: $toolbar-inner-spacer-x;
172
+ position: relative;
173
+ white-space: nowrap;
201
174
 
202
- > :first-child {
203
- margin-top: $toolbar-padding-y;
204
- }
205
- }
175
+ @include active-focus-hover {
176
+ color: inherit;
177
+ text-decoration: none;
178
+ }
206
179
 
207
- .navbar-nav {
208
- flex-wrap: wrap;
209
- }
210
- }
180
+ &::before {
181
+ @include transition-standard(opacity);
211
182
 
212
- @include media-breakpoint-up($next) {
213
- > .container {
214
- align-items: center;
215
- display: flex;
216
- }
183
+ background-color: $toolbar-element-bg;
184
+ content: '';
185
+ display: block;
186
+ opacity: 0;
187
+ position: absolute;
188
+ top: 0;
189
+ right: ($toolbar-inner-spacer-x / -2);
190
+ bottom: 0;
191
+ left: ($toolbar-inner-spacer-x / -2);
192
+ }
217
193
 
218
- .navbar-collapse {
219
- display: flex !important;
220
- width: 100%;
221
- }
194
+ &:first-child {
195
+ margin-left: 0;
196
+ }
222
197
 
223
- .navbar-toggler {
224
- display: none;
225
- }
226
- }
227
- }
198
+ &:focus {
199
+ outline: 0;
200
+
201
+ &::before {
202
+ opacity: 1;
228
203
  }
229
204
  }
205
+ }
206
+
207
+ .navbar-text {
208
+ align-items: center;
209
+ color: inherit;
210
+ display: inline-flex;
211
+ flex-wrap: wrap;
212
+ height: $toolbar-element-height;
213
+ margin-left: $toolbar-inner-spacer-x;
214
+
215
+ &:first-child {
216
+ margin-left: 0;
217
+ }
218
+ }
219
+
220
+
221
+
222
+ // Nav
223
+
224
+ .navbar-nav {
225
+ display: flex;
226
+ flex-wrap: wrap;
227
+ list-style: none;
228
+ margin-bottom: 0;
229
+ padding-left: 0;
230
+
231
+ .nav-link {
232
+ @include border-radius($toolbar-element-border-radius);
233
+ @include transition-standard(background-color, opacity);
230
234
 
231
- .navbar-toggler {
232
- align-items: center;
233
- background-color: transparent;
234
- border: 0;
235
- border-radius: 50%;
236
235
  color: inherit;
237
- display: inline-flex;
236
+ font-size: $toolbar-link-font-size;
238
237
  height: $toolbar-link-height;
239
- margin-right: ($toolbar-link-padding-x - (($toolbar-link-height - ($material-icon-size / $font-size-root) * 1rem) / 2));
240
- margin-left: ($toolbar-link-padding-x - (($toolbar-link-height - ($material-icon-size / $font-size-root) * 1rem) / 2));
241
- position: relative;
242
- vertical-align: middle;
243
- width: $toolbar-link-height;
238
+ line-height: $toolbar-link-line-height;
239
+ opacity: $toolbar-element-opacity;
240
+ padding: $toolbar-link-padding-y $toolbar-link-padding-x;
244
241
 
245
- &::before {
246
- background-color: $toolbar-element-bg-dark;
247
- border-radius: 50%;
248
- content: "";
249
- display: block;
250
- height: $toolbar-height;
251
- opacity: 0;
252
- position: absolute;
253
- top: (($toolbar-link-height - $toolbar-height) / 2);
254
- left: (($toolbar-link-height - $toolbar-height) / 2);
255
- width: $toolbar-height;
256
- @include transition-standard(opacity);
242
+ @include active-focus-hover {
243
+ background-color: $toolbar-element-bg;
244
+ opacity: 1;
257
245
  }
258
246
 
259
- // active, focus, hover
260
- @include active-focus-hover {
261
- color: inherit;
262
- text-decoration: none;
247
+ &:focus {
248
+ outline: 0;
249
+ }
263
250
 
264
- &::before {
265
- opacity: 1;
266
- }
267
- }
251
+ &.active,
252
+ &.disabled {
253
+ opacity: 1;
254
+ }
268
255
 
269
- &:focus {
270
- outline: 0;
271
- }
256
+ &.disabled {
257
+ background-color: transparent;
258
+ color: $toolbar-color-lighter;
259
+ }
272
260
  }
273
261
 
274
- .navbar-toggler-icon {
275
- background-image: $toolbar-toggler-bg-dark;
276
- background-repeat: no-repeat;
277
- background-position: 50% 50%;
278
- background-size: $material-icon-size $material-icon-size;
279
- display: block;
280
- height: $material-icon-size;
281
- margin: auto;
282
- width: $material-icon-size;
262
+ .active > .nav-link,
263
+ .show > .nav-link {
264
+ opacity: 1;
283
265
  }
284
266
 
285
- // colour
286
- .navbar-inverse {
287
- .navbar-toggler {
288
- &::before {
289
- background-color: $toolbar-element-bg-light;
290
- }
291
- }
267
+ .show > .nav-link {
268
+ background-color: $toolbar-element-bg;
269
+ }
270
+ }
292
271
 
293
- .navbar-toggler-icon {
294
- background-image: $toolbar-toggler-bg-light;
295
- }
296
- }
297
272
 
298
- //
299
- // vertical align some elements normally placed in `.navbar` or `.toolbar`
300
- //
301
- .navbar {
302
- .btn {
303
- margin-top: (($btn-height - $toolbar-link-height) / -2);
304
- margin-bottom: (($btn-height - $toolbar-link-height) / -2);
305
- }
306
273
 
307
- .btn-lg {
308
- margin-top: (($btn-height-lg - $toolbar-link-height) / -2);
309
- margin-bottom: (($btn-height-lg - $toolbar-link-height) / -2);
310
- }
274
+ // Toggleable
311
275
 
312
- .btn-sm {
313
- margin-top: (($btn-height-sm - $toolbar-link-height) / -2);
314
- margin-bottom: (($btn-height-sm - $toolbar-link-height) / -2);
315
- }
276
+ .navbar-collapse {
277
+ align-items: center;
278
+ flex-basis: 100%;
279
+ }
316
280
 
317
- .form-control {
318
- background-color: $toolbar-element-bg-dark;
319
- border-bottom: 0;
320
- color: inherit;
321
- height: $toolbar-link-height;
322
- line-height: 1;
323
- margin-bottom: 0;
324
- opacity: $toolbar-link-opacity;
325
- padding: (($toolbar-link-height - $textfield-font-size) / 2) $toolbar-link-padding-x;
326
- @include transition-standard(opacity);
327
-
328
- // active, focus, hover
329
- @include focus-hover {
330
- opacity: $toolbar-link-opacity-active;
281
+ .navbar-expand {
282
+ @each $breakpoint in map-keys($grid-breakpoints) {
283
+ $next: breakpoint-next($breakpoint);
284
+ $infix: breakpoint-infix($next);
285
+
286
+ &#{$infix} {
287
+ @include media-breakpoint-down($breakpoint) {
288
+ > .container,
289
+ > .container-fluid {
290
+ padding-right: 0;
291
+ padding-left: 0;
331
292
  }
332
- }
333
293
 
334
- .form-inline {
335
- flex-wrap: nowrap;
336
- margin-right: $toolbar-link-padding-x;
337
- margin-left: $toolbar-link-padding-x;
338
- }
294
+ .navbar-collapse {
295
+ > :first-child {
296
+ margin-top: $toolbar-inner-spacer-y;
297
+ }
339
298
 
340
- .input-group {
341
- margin-bottom: 0;
299
+ > :not(:last-child) {
300
+ margin-bottom: $toolbar-inner-spacer-y;
301
+ }
302
+
303
+ .form-inline,
304
+ .navbar-brand,
305
+ .navbar-text {
306
+ margin-left: 0;
307
+ }
308
+ }
309
+ }
342
310
 
343
- .form-control {
344
- margin-right: 0;
345
- margin-left: 0;
311
+ @include media-breakpoint-up($next) {
312
+ flex-direction: row;
313
+ flex-wrap: nowrap;
314
+ justify-content: flex-start;
346
315
 
347
- &:first-child {
348
- padding-right: ($textfield-height + $textfield-margin-bottom + $toolbar-link-padding-x);
316
+ > .container,
317
+ > .container-fluid {
318
+ flex-wrap: nowrap;
349
319
  }
350
320
 
351
- &:not(:first-child) {
352
- padding-left: ($textfield-height + $textfield-margin-bottom + $toolbar-link-padding-x);
321
+ .navbar-collapse {
322
+ display: flex !important;
353
323
  }
354
- }
355
324
 
356
- .input-group-addon {
357
- align-items: center;
358
- cursor: text;
359
- display: flex;
360
- justify-content: center;
361
- margin-right: 0;
362
- margin-left: 0;
363
- overflow: hidden;
364
- padding-top: 0;
365
- position: absolute;
366
- top: 0;
367
- bottom: 0;
368
- width: ($textfield-height + $textfield-margin-bottom);
369
-
370
- &:first-child {
371
- // position
372
- left: 0;
325
+ .navbar-nav {
326
+ flex-wrap: nowrap;
373
327
  }
374
328
 
375
- &:not(:first-child) {
376
- // position
377
- right: 0;
329
+ .navbar-toggler {
330
+ display: none;
331
+
332
+ + .form-inline,
333
+ + .navbar-brand,
334
+ + .navbar-text {
335
+ margin-left: 0;
336
+ }
378
337
  }
379
338
  }
380
339
  }
340
+ }
341
+ }
381
342
 
382
- .nav-tabs {
383
- margin-top: (($nav-tab-link-height - $toolbar-link-height) / -2);
384
- margin-bottom: (($nav-tab-link-height - $toolbar-link-height) / -2);
343
+ .navbar-toggler {
344
+ align-items: center;
345
+ background-color: transparent;
346
+ border: 0;
347
+ border-radius: 50%;
348
+ color: inherit;
349
+ display: inline-flex;
350
+ height: $toolbar-element-height;
351
+ line-height: 1;
352
+ margin-left: $toolbar-inner-spacer-x;
353
+ position: relative;
354
+ width: $toolbar-element-height;
385
355
 
386
- .nav-link {
387
- height: $toolbar-height;
388
- }
356
+ @include active-focus-hover {
357
+ text-decoration: none;
358
+
359
+ &::before {
360
+ opacity: 1;
389
361
  }
390
362
  }
391
363
 
392
- // colour
393
- .navbar-inverse {
394
- .form-control {
395
- background-color: $toolbar-element-bg-light;
364
+ &::before {
365
+ @include transition-standard(opacity);
396
366
 
397
- &::placeholder {
398
- color: $white-hint;
399
- }
400
- }
401
- }
367
+ background-color: $toolbar-element-bg;
368
+ border-radius: 50%;
369
+ content: '';
370
+ display: block;
371
+ opacity: 0;
372
+ position: absolute;
373
+ top: 0;
374
+ right: 0;
375
+ bottom: 0;
376
+ left: 0;
377
+ }
402
378
 
379
+ &:first-child {
380
+ margin-left: 0;
381
+ }
382
+
383
+ &:focus {
384
+ outline: 0;
385
+ }
386
+ }
387
+
388
+ .navbar-toggler-icon {
389
+ @include set-material-icons;
390
+
391
+ display: block;
392
+ margin: auto;
393
+
394
+ &::before {
395
+ content: $toolbar-toggler-icon;
396
+ }
397
+ }