material-sass 4.0.0.beta → 4.0.0.beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/Rakefile +12 -12
  4. data/{app/assets → assets}/javascripts/material-sprockets.js +0 -0
  5. data/{app/assets → assets}/javascripts/material.js +54 -4
  6. data/{app/assets → assets}/javascripts/material.min.js +1 -1
  7. data/{app/assets → assets}/javascripts/material/addons/picker.date.js +0 -0
  8. data/{app/assets → assets}/javascripts/material/addons/picker.js +0 -0
  9. data/{app/assets → assets}/javascripts/material/addons/textarea-autosize.js +0 -0
  10. data/{app/assets → assets}/javascripts/material/addons/waves.js +0 -0
  11. data/assets/javascripts/material/components/expansion-panel.js +50 -0
  12. data/{app/assets → assets}/javascripts/material/components/floating-label.js +1 -1
  13. data/{app/assets → assets}/javascripts/material/components/navdrawer.js +0 -0
  14. data/{app/assets → assets}/javascripts/material/components/selection-control-focus.js +2 -3
  15. data/{app/assets → assets}/javascripts/material/components/tab-switch.js +0 -0
  16. data/{app/assets → assets}/javascripts/material/components/util.js +0 -0
  17. data/{app/assets → assets}/javascripts/material/initializers/picker.js +0 -0
  18. data/{app/assets → assets}/javascripts/material/initializers/textarea-autosize.js +0 -0
  19. data/{app/assets → assets}/javascripts/material/initializers/waves.js +0 -0
  20. data/{app/assets → assets}/stylesheets/material.min.css +0 -0
  21. data/{app/assets → assets}/stylesheets/material.scss +0 -0
  22. data/{app/assets → assets}/stylesheets/material/_colours.scss +7 -11
  23. data/{app/assets → assets}/stylesheets/material/_functions.scss +8 -14
  24. data/{app/assets → assets}/stylesheets/material/_mixins.scss +1 -1
  25. data/{app/assets → assets}/stylesheets/material/_print.scss +4 -4
  26. data/{app/assets → assets}/stylesheets/material/_utilities.scss +0 -2
  27. data/{app/assets → assets}/stylesheets/material/_variables.scss +0 -2
  28. data/{app/assets → assets}/stylesheets/material/base/_base.scss +24 -49
  29. data/{app/assets → assets}/stylesheets/material/base/_grid.scss +1 -5
  30. data/{app/assets → assets}/stylesheets/material/base/_typography.scss +1 -11
  31. data/{app/assets → assets}/stylesheets/material/bootstrap/_alert.scss +14 -16
  32. data/{app/assets → assets}/stylesheets/material/bootstrap/_badge.scss +19 -7
  33. data/{app/assets → assets}/stylesheets/material/bootstrap/_breadcrumb.scss +0 -0
  34. data/{app/assets → assets}/stylesheets/material/bootstrap/_carousel.scss +0 -6
  35. data/{app/assets → assets}/stylesheets/material/bootstrap/_close.scss +0 -4
  36. data/{app/assets → assets}/stylesheets/material/bootstrap/_code.scss +0 -9
  37. data/{app/assets → assets}/stylesheets/material/bootstrap/_custom-form.scss +0 -0
  38. data/{app/assets → assets}/stylesheets/material/bootstrap/_form.scss +4 -16
  39. data/{app/assets → assets}/stylesheets/material/bootstrap/_image.scss +10 -14
  40. data/{app/assets → assets}/stylesheets/material/bootstrap/_jumbotron.scss +0 -0
  41. data/{app/assets → assets}/stylesheets/material/bootstrap/_media.scss +0 -0
  42. data/{app/assets → assets}/stylesheets/material/bootstrap/_nav.scss +4 -10
  43. data/{app/assets → assets}/stylesheets/material/bootstrap/_pagination.scss +0 -1
  44. data/{app/assets → assets}/stylesheets/material/bootstrap/_popover.scss +4 -10
  45. data/{app/assets → assets}/stylesheets/material/bootstrap/_responsive-embed.scss +0 -0
  46. data/{app/assets → assets}/stylesheets/material/bootstrap/_transition.scss +2 -0
  47. data/{app/assets → assets}/stylesheets/material/material.scss +1 -10
  48. data/{app/assets → assets}/stylesheets/material/material/_button-flat.scss +3 -2
  49. data/{app/assets → assets}/stylesheets/material/material/_button-float.scss +4 -4
  50. data/{app/assets → assets}/stylesheets/material/material/_button-group.scss +40 -95
  51. data/{app/assets → assets}/stylesheets/material/material/_button.scss +8 -24
  52. data/{app/assets → assets}/stylesheets/material/material/_card.scss +28 -48
  53. data/{app/assets → assets}/stylesheets/material/material/_chip.scss +3 -7
  54. data/{app/assets → assets}/stylesheets/material/material/_data-table.scss +40 -37
  55. data/{app/assets → assets}/stylesheets/material/material/_dialog.scss +79 -53
  56. data/assets/stylesheets/material/material/_expansion-panel.scss +247 -0
  57. data/{app/assets → assets}/stylesheets/material/material/_menu.scss +99 -96
  58. data/{app/assets → assets}/stylesheets/material/material/_navdrawer.scss +26 -54
  59. data/{app/assets → assets}/stylesheets/material/material/_picker.scss +8 -13
  60. data/{app/assets → assets}/stylesheets/material/material/_progress-circular.scss +0 -1
  61. data/{app/assets → assets}/stylesheets/material/material/_progress.scss +41 -53
  62. data/{app/assets → assets}/stylesheets/material/material/_selection-control.scss +4 -25
  63. data/{app/assets → assets}/stylesheets/material/material/_stepper.scss +1 -9
  64. data/{app/assets → assets}/stylesheets/material/material/_tab.scss +16 -16
  65. data/assets/stylesheets/material/material/_text-field-box.scss +59 -0
  66. data/{app/assets → assets}/stylesheets/material/material/_text-field-floating-label.scss +28 -13
  67. data/{app/assets → assets}/stylesheets/material/material/_text-field-input-group.scss +40 -49
  68. data/assets/stylesheets/material/material/_text-field-textarea.scss +15 -0
  69. data/{app/assets → assets}/stylesheets/material/material/_text-field.scss +23 -42
  70. data/{app/assets → assets}/stylesheets/material/material/_toolbar.scss +50 -37
  71. data/{app/assets → assets}/stylesheets/material/material/_tooltip.scss +6 -12
  72. data/{app/assets → assets}/stylesheets/material/mixins/_background-variant.scss +6 -5
  73. data/{app/assets → assets}/stylesheets/material/mixins/_border-radius.scss +2 -1
  74. data/{app/assets → assets}/stylesheets/material/mixins/_breakpoint.scss +7 -6
  75. data/{app/assets → assets}/stylesheets/material/mixins/_clearfix.scss +0 -0
  76. data/assets/stylesheets/material/mixins/_float.scss +13 -0
  77. data/{app/assets → assets}/stylesheets/material/mixins/_form.scss +37 -5
  78. data/{app/assets → assets}/stylesheets/material/mixins/_grid-framework.scss +30 -24
  79. data/{app/assets → assets}/stylesheets/material/mixins/_grid.scss +8 -8
  80. data/{app/assets → assets}/stylesheets/material/mixins/_hex-to-rgba.scss +0 -0
  81. data/{app/assets → assets}/stylesheets/material/mixins/_hover.scss +19 -19
  82. data/{app/assets → assets}/stylesheets/material/mixins/_image.scss +0 -0
  83. data/{app/assets → assets}/stylesheets/material/mixins/_list.scss +0 -0
  84. data/{app/assets → assets}/stylesheets/material/mixins/_material-icons.scss +4 -2
  85. data/{app/assets → assets}/stylesheets/material/mixins/_nav-divider.scss +0 -0
  86. data/{app/assets → assets}/stylesheets/material/mixins/_reset-text.scss +1 -1
  87. data/{app/assets → assets}/stylesheets/material/mixins/_screenreader.scss +1 -2
  88. data/{app/assets → assets}/stylesheets/material/mixins/_strip-unit.scss +0 -0
  89. data/{app/assets → assets}/stylesheets/material/mixins/_text-alignment.scss +0 -0
  90. data/{app/assets → assets}/stylesheets/material/mixins/_text-emphasis.scss +6 -5
  91. data/{app/assets → assets}/stylesheets/material/mixins/_text-hide.scss +0 -0
  92. data/{app/assets → assets}/stylesheets/material/mixins/_text-truncate.scss +0 -0
  93. data/{app/assets → assets}/stylesheets/material/mixins/_transition.scss +0 -8
  94. data/{app/assets → assets}/stylesheets/material/mixins/_typography.scss +0 -0
  95. data/{app/assets → assets}/stylesheets/material/utilities/_align.scss +2 -0
  96. data/{app/assets → assets}/stylesheets/material/utilities/_background.scss +0 -4
  97. data/{app/assets → assets}/stylesheets/material/utilities/_border.scss +2 -2
  98. data/{app/assets → assets}/stylesheets/material/utilities/_clearfix.scss +0 -0
  99. data/{app/assets → assets}/stylesheets/material/utilities/_display.scss +6 -2
  100. data/{app/assets → assets}/stylesheets/material/utilities/_flex.scss +10 -6
  101. data/{app/assets → assets}/stylesheets/material/utilities/_float.scss +3 -3
  102. data/{app/assets → assets}/stylesheets/material/utilities/_material-icons.scss +0 -0
  103. data/{app/assets → assets}/stylesheets/material/utilities/_position.scss +14 -0
  104. data/{app/assets → assets}/stylesheets/material/utilities/_screenreader.scss +0 -0
  105. data/{app/assets → assets}/stylesheets/material/utilities/_sizing.scss +2 -0
  106. data/{app/assets → assets}/stylesheets/material/utilities/_spacing.scss +32 -31
  107. data/{app/assets → assets}/stylesheets/material/utilities/_text.scss +2 -13
  108. data/{app/assets → assets}/stylesheets/material/utilities/_visibility.scss +2 -0
  109. data/{app/assets → assets}/stylesheets/material/utilities/_waves.scss +3 -3
  110. data/assets/stylesheets/material/variables/_elevation-shadow.scss +69 -0
  111. data/{app/assets → assets}/stylesheets/material/variables/_grid.scss +0 -4
  112. data/assets/stylesheets/material/variables/_palette.scss +66 -0
  113. data/{app/assets → assets}/stylesheets/material/variables/_spacer.scss +6 -11
  114. data/assets/stylesheets/material/variables/_transition.scss +27 -0
  115. data/{app/assets → assets}/stylesheets/material/variables/_typography.scss +21 -27
  116. data/{app/assets → assets}/stylesheets/material/variables/_variable-bootstrap.scss +22 -50
  117. data/{app/assets → assets}/stylesheets/material/variables/_variable-material.scss +108 -141
  118. data/lib/material-sass.rb +52 -4
  119. data/lib/material-sass/engine.rb +8 -8
  120. data/lib/material-sass/version.rb +1 -1
  121. data/material-sass.gemspec +3 -0
  122. metadata +145 -149
  123. data/app/assets/fonts/material-icons/MaterialIcons-Regular.eot +0 -0
  124. data/app/assets/fonts/material-icons/MaterialIcons-Regular.ijmap +0 -1
  125. data/app/assets/fonts/material-icons/MaterialIcons-Regular.svg +0 -2373
  126. data/app/assets/fonts/material-icons/MaterialIcons-Regular.ttf +0 -0
  127. data/app/assets/fonts/material-icons/MaterialIcons-Regular.woff +0 -0
  128. data/app/assets/fonts/material-icons/MaterialIcons-Regular.woff2 +0 -0
  129. data/app/assets/fonts/material-icons/README.md +0 -9
  130. data/app/assets/fonts/material-icons/codepoints +0 -932
  131. data/app/assets/fonts/roboto/Roboto-Bold.eot +0 -0
  132. data/app/assets/fonts/roboto/Roboto-Bold.ttf +0 -0
  133. data/app/assets/fonts/roboto/Roboto-Bold.woff +0 -0
  134. data/app/assets/fonts/roboto/Roboto-Bold.woff2 +0 -0
  135. data/app/assets/fonts/roboto/Roboto-Light.eot +0 -0
  136. data/app/assets/fonts/roboto/Roboto-Light.ttf +0 -0
  137. data/app/assets/fonts/roboto/Roboto-Light.woff +0 -0
  138. data/app/assets/fonts/roboto/Roboto-Light.woff2 +0 -0
  139. data/app/assets/fonts/roboto/Roboto-Medium.eot +0 -0
  140. data/app/assets/fonts/roboto/Roboto-Medium.ttf +0 -0
  141. data/app/assets/fonts/roboto/Roboto-Medium.woff +0 -0
  142. data/app/assets/fonts/roboto/Roboto-Medium.woff2 +0 -0
  143. data/app/assets/fonts/roboto/Roboto-Regular.eot +0 -0
  144. data/app/assets/fonts/roboto/Roboto-Regular.ttf +0 -0
  145. data/app/assets/fonts/roboto/Roboto-Regular.woff +0 -0
  146. data/app/assets/fonts/roboto/Roboto-Regular.woff2 +0 -0
  147. data/app/assets/fonts/roboto/Roboto-Thin.eot +0 -0
  148. data/app/assets/fonts/roboto/Roboto-Thin.ttf +0 -0
  149. data/app/assets/fonts/roboto/Roboto-Thin.woff +0 -0
  150. data/app/assets/fonts/roboto/Roboto-Thin.woff2 +0 -0
  151. data/app/assets/images/bg/amber.jpg +0 -0
  152. data/app/assets/images/bg/brand.jpg +0 -0
  153. data/app/assets/images/bg/green.jpg +0 -0
  154. data/app/assets/images/bg/purple.jpg +0 -0
  155. data/app/assets/images/bg/red.jpg +0 -0
  156. data/app/assets/images/bg/teal.jpg +0 -0
  157. data/app/assets/stylesheets/material/material/_expansion-panel.scss +0 -118
  158. data/app/assets/stylesheets/material/material/_text-field-textarea.scss +0 -18
  159. data/app/assets/stylesheets/material/mixins/_pull.scss +0 -7
  160. data/app/assets/stylesheets/material/variables/_elevation-shadow.scss +0 -91
  161. data/app/assets/stylesheets/material/variables/_palette.scss +0 -45
  162. data/app/assets/stylesheets/material/variables/_transition.scss +0 -29
@@ -4,13 +4,30 @@
4
4
  padding-top: $floating-label-font-size-focus;
5
5
  position: relative;
6
6
 
7
+ &.has-value > label,
8
+ &.is-focused > label {
9
+ line-height: 1;
10
+ top: 0;
11
+ }
12
+
13
+ &.is-focused > label {
14
+ color: $floating-label-color-focus;
15
+ }
16
+
17
+ &:not(.has-value):not(.is-focused) > .form-control {
18
+ &[type='date'],
19
+ &[type='datetime-local'],
20
+ &[type='time'] {
21
+ color: transparent;
22
+ }
23
+ }
24
+
7
25
  > label {
8
26
  @include text-truncate;
9
- @include transition-standard(color, line-height, top, transform);
27
+ @include transition-standard(color, top, transform);
10
28
 
11
29
  color: $floating-label-color;
12
30
  display: block;
13
- font-weight: normal;
14
31
  margin: 0;
15
32
  padding: 0;
16
33
  position: absolute;
@@ -18,19 +35,18 @@
18
35
  transform-origin: 0 0;
19
36
  }
20
37
 
21
- &.has-value > label,
22
- &.is-focused > label {
23
- line-height: 1;
24
- top: 0;
25
- }
26
-
27
- &.is-focused > label {
28
- color: $floating-label-color-focus;
29
- }
30
-
31
38
  > .form-control {
32
39
  position: relative;
33
40
 
41
+ &[type='file']::-webkit-file-upload-button {
42
+ background-color: transparent;
43
+ background-image: none;
44
+ border: 0;
45
+ color: $floating-label-color;
46
+ height: auto;
47
+ padding: 0;
48
+ }
49
+
34
50
  &:focus {
35
51
  &::placeholder {
36
52
  color: $textfield-hint-color;
@@ -47,7 +63,6 @@
47
63
  }
48
64
  }
49
65
 
50
- // Size
51
66
  .floating-label-lg {
52
67
  @include floating-label-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-y-lg);
53
68
 
@@ -10,33 +10,24 @@
10
10
  }
11
11
  }
12
12
 
13
-
14
-
15
13
  // Addon and button
16
14
 
17
- .input-group-addon {
15
+ .input-group .custom-file,
16
+ .input-group .custom-select,
17
+ .input-group .form-control,
18
+ .input-group-addon,
19
+ .input-group-btn {
18
20
  align-items: center;
19
- color: inherit;
20
21
  display: flex;
21
- font-size: $textfield-font-size;
22
- justify-content: center;
23
- line-height: $textfield-line-height;
24
- min-width: $textfield-height;
25
- white-space: nowrap;
22
+ }
26
23
 
27
- + .form-control,
28
- .form-control + & {
29
- margin-left: $input-group-addon-margin-x;
30
- }
24
+ .input-group .custom-file,
25
+ .input-group .custom-select {
26
+ width: 100%;
31
27
  }
32
28
 
29
+ .input-group-addon,
33
30
  .input-group-btn {
34
- @include border-radius($btn-border-radius);
35
-
36
- align-items: center;
37
- background-color: $btn-group-bg;
38
- box-shadow: map-get($btn-elevation-shadow, shadow);
39
- display: flex;
40
31
  justify-content: center;
41
32
  margin-right: $input-group-addon-margin-x;
42
33
  margin-left: $input-group-addon-margin-x;
@@ -49,8 +40,37 @@
49
40
  margin-right: 0;
50
41
  }
51
42
 
43
+ + .input-group-addon,
44
+ + .input-group-btn {
45
+ margin-left: ($input-group-addon-margin-x * -1);
46
+ }
47
+ }
48
+
49
+ .input-group-addon {
50
+ color: inherit;
51
+ font-size: $textfield-font-size;
52
+ line-height: $textfield-line-height;
53
+ min-width: $textfield-height;
54
+ white-space: nowrap;
55
+ }
56
+
57
+ .input-group-btn {
58
+ @include border-radius($btn-border-radius);
59
+
60
+ background-color: $btn-group-bg;
61
+ box-shadow: map-get($btn-elevation-shadow, shadow);
62
+
63
+ @each $color, $values in $theme-colors {
64
+ > .btn-#{$color} {
65
+ &:disabled,
66
+ &.disabled {
67
+ background-color: map-get(theme-color($color), lighter);
68
+ color: color-yiq(map-get(theme-color($color), lighter));
69
+ }
70
+ }
71
+ }
72
+
52
73
  > .btn {
53
- border-left: $btn-group-inner-spacer-x solid transparent;
54
74
  box-shadow: none;
55
75
  flex: 0 1 auto;
56
76
  margin-left: ($btn-group-inner-spacer-x * -1);
@@ -61,36 +81,9 @@
61
81
  box-shadow: none;
62
82
  }
63
83
 
64
- &:disabled,
65
- &.disabled {
66
- + .btn:disabled,
67
- + .btn.disabled {
68
- border-left-color: $btn-group-divider-bg;
69
- }
70
- }
71
-
72
84
  &:first-child {
73
- border-left-width: 0;
74
85
  margin-left: 0;
75
86
  }
76
-
77
- &.active {
78
- + .btn.active {
79
- border-left-color: $btn-group-divider-bg;
80
- }
81
- }
82
- }
83
-
84
- // Colour
85
- @each $color, $values in $theme-colors {
86
- > .btn-#{$color} {
87
- &:disabled,
88
- &.disabled {
89
- @include color-yiq(map-get(theme-color($color), lighter));
90
-
91
- background-color: map-get(theme-color($color), lighter);
92
- }
93
- }
94
87
  }
95
88
 
96
89
  > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
@@ -111,8 +104,6 @@
111
104
  }
112
105
  }
113
106
 
114
-
115
-
116
107
  // Size
117
108
 
118
109
  .input-group-lg {
@@ -0,0 +1,15 @@
1
+ .textarea-autosize {
2
+ height: $textfield-height;
3
+ min-height: $textfield-height;
4
+ resize: none;
5
+
6
+ &.form-control-lg {
7
+ height: $textfield-height-lg;
8
+ min-height: $textfield-height-lg;
9
+ }
10
+
11
+ &.form-control-sm {
12
+ height: $textfield-height-sm;
13
+ min-height: $textfield-height-sm;
14
+ }
15
+ }
@@ -1,7 +1,6 @@
1
1
  .form-control,
2
2
  %form-control {
3
3
  @include form-control-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-x, $textfield-padding-y);
4
- @include transition-standard(border-color, box-shadow);
5
4
 
6
5
  background-clip: padding-box;
7
6
  background-color: transparent;
@@ -58,7 +57,6 @@
58
57
  }
59
58
  }
60
59
 
61
- // Colour
62
60
  @each $color, $values in $theme-colors {
63
61
  .form-control-#{$color} {
64
62
  border-color: map-get(theme-color($color), color);
@@ -70,7 +68,6 @@
70
68
  }
71
69
  }
72
70
 
73
- // Size
74
71
  .form-control-lg,
75
72
  %form-control-lg {
76
73
  @include form-control-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-x-lg, $textfield-padding-y-lg);
@@ -81,42 +78,26 @@
81
78
  @include form-control-size($textfield-font-size-sm, $textfield-height-sm, $textfield-line-height-sm, $textfield-padding-x-sm, $textfield-padding-y-sm);
82
79
  }
83
80
 
84
- // Special treatment for select and textarea
85
- %form-control-select {
81
+ %form-select {
82
+ @include form-select-size($textfield-font-size, $textfield-height, $textfield-padding-x);
83
+
86
84
  appearance: none;
87
85
 
88
86
  @include media-moz-webkit {
89
- $select-bg-size: (($material-icon-size / $textfield-font-size) * $textfield-font-size);
90
-
91
87
  background-image: $caret-bg;
92
- background-position: 100% ($textfield-height / 2 - $select-bg-size / 2);
93
88
  background-repeat: no-repeat;
94
- background-size: $select-bg-size $select-bg-size;
95
- padding-right: $select-bg-size;
96
89
  }
97
90
 
98
91
  &.form-control-lg {
99
- @include media-moz-webkit {
100
- $select-bg-size-lg: (($material-icon-size / $textfield-font-size) * $textfield-font-size-lg);
101
-
102
- background-position: 100% ($textfield-height-lg / 2 - $select-bg-size-lg / 2);
103
- background-size: $select-bg-size-lg $select-bg-size-lg;
104
- padding-right: $select-bg-size-lg;
105
- }
92
+ @include form-select-size($textfield-font-size-lg, $textfield-height-lg, $textfield-padding-x-lg);
106
93
  }
107
94
 
108
95
  &.form-control-sm {
109
- @include media-moz-webkit {
110
- $select-bg-size-sm: (($material-icon-size / $textfield-font-size) * $textfield-font-size-sm);
111
-
112
- background-position: 100% ($textfield-height-sm / 2 - $select-bg-size-sm / 2);
113
- background-size: $select-bg-size-sm $select-bg-size-sm;
114
- padding-right: $select-bg-size-sm;
115
- }
96
+ @include form-select-size($textfield-font-size-sm, $textfield-height-sm, $textfield-padding-x-sm);
116
97
  }
117
98
  }
118
99
 
119
- %textfield-box {
100
+ %form-textarea {
120
101
  border-radius: $textfield-box-border-radius;
121
102
  border-width: $textfield-border-width;
122
103
  height: auto;
@@ -126,10 +107,6 @@
126
107
  box-shadow: inset $textfield-border-width-hover $textfield-border-width-hover 0 ($textfield-border-width * -1) $textfield-border-color-hover, inset ($textfield-border-width-hover * -1) ($textfield-border-width-hover * -1) 0 ($textfield-border-width * -1) $textfield-border-color-hover;
127
108
  }
128
109
 
129
- &:focus {
130
- box-shadow: inset $textfield-border-width-focus $textfield-border-width-focus 0 ($textfield-border-width * -1) $textfield-border-color-focus, inset ($textfield-border-width-focus * -1) ($textfield-border-width-focus * -1) 0 ($textfield-border-width * -1) $textfield-border-color-focus;
131
- }
132
-
133
110
  &.form-control-lg {
134
111
  padding: $textfield-box-padding-y-lg $textfield-box-padding-x-lg;
135
112
  }
@@ -137,28 +114,34 @@
137
114
  &.form-control-sm {
138
115
  padding: $textfield-box-padding-y-sm $textfield-box-padding-x-sm;
139
116
  }
117
+
118
+ &:focus {
119
+ box-shadow: inset $textfield-border-width-focus $textfield-border-width-focus 0 ($textfield-border-width * -1) $textfield-border-color-focus, inset ($textfield-border-width-focus * -1) ($textfield-border-width-focus * -1) 0 ($textfield-border-width * -1) $textfield-border-color-focus;
120
+ }
140
121
  }
141
122
 
123
+ // stylelint-disable selector-no-qualifying-type
142
124
  select {
143
125
  &.form-control {
144
- &:not([multiple]):not([size]) {
145
- @extend %form-control-select;
146
- }
147
-
148
126
  &[multiple],
149
127
  &[size] {
150
- @extend %textfield-box;
128
+ @extend %form-textarea;
129
+ }
130
+
131
+ &:not([multiple]):not([size]) {
132
+ @extend %form-select;
151
133
  }
152
134
  }
153
135
  }
136
+ // stylelint-enable
154
137
 
138
+ // stylelint-disable selector-no-qualifying-type
155
139
  textarea {
156
140
  &.form-control:not(.textarea-autosize) {
157
- @extend %textfield-box;
141
+ @extend %form-textarea;
158
142
  }
159
143
  }
160
-
161
-
144
+ // stylelint-enable
162
145
 
163
146
  // Form control static
164
147
 
@@ -166,6 +149,8 @@ textarea {
166
149
  @include form-control-size($textfield-font-size, $textfield-height, $textfield-line-height, $textfield-padding-x, $textfield-padding-y);
167
150
 
168
151
  border-color: transparent;
152
+ display: block;
153
+ width: 100%;
169
154
 
170
155
  &.form-control-lg {
171
156
  @include form-control-size($textfield-font-size-lg, $textfield-height-lg, $textfield-line-height-lg, $textfield-padding-x-lg, $textfield-padding-y-lg);
@@ -176,20 +161,16 @@ textarea {
176
161
  }
177
162
  }
178
163
 
179
-
180
-
181
164
  // Form validation
182
165
 
183
166
  @include form-control-validation($form-feedback-invalid-color, 'invalid');
184
167
  @include form-control-validation($form-feedback-valid-color, 'valid');
185
168
 
186
-
187
-
188
169
  // Style of Material design `select` should also be applied to `.custom-select`
189
170
 
190
171
  .custom-select {
191
172
  @extend %form-control;
192
- @extend %form-control-select;
173
+ @extend %form-select;
193
174
 
194
175
  display: inline-block;
195
176
  vertical-align: middle;
@@ -8,14 +8,23 @@
8
8
  padding: $toolbar-padding-y $toolbar-padding-x;
9
9
  position: relative;
10
10
 
11
- > .container {
12
- align-items: center;
13
- display: flex;
14
- flex-wrap: wrap;
15
- justify-content: space-between;
11
+ // Horizontally align `.dropdown-menu-right` in `.navbar`
12
+
13
+ .dropdown-menu-right {
14
+ right: 0;
15
+ left: auto;
16
+
17
+ &.menu::before {
18
+ transform-origin: 100% ($menu-link-height / 2 + $menu-padding-y);
19
+ }
20
+
21
+ &::before {
22
+ transform-origin: 100% 0;
23
+ }
16
24
  }
17
25
 
18
- // Vertical align some elements normally placed in `.navbar` or `.toolbar`
26
+ // Vertically align some elements normally placed in `.navbar`
27
+
19
28
  .btn {
20
29
  margin-top: (($btn-height - $toolbar-element-height) / -2);
21
30
  margin-bottom: (($btn-height - $toolbar-element-height) / -2);
@@ -90,9 +99,15 @@
90
99
  padding-bottom: (($toolbar-height - $nav-tab-font-size * $nav-tab-line-height) / 2);
91
100
  }
92
101
  }
102
+
103
+ > .container {
104
+ align-items: center;
105
+ display: flex;
106
+ flex-wrap: wrap;
107
+ justify-content: space-between;
108
+ }
93
109
  }
94
110
 
95
- // Colour
96
111
  .navbar-dark {
97
112
  color: $toolbar-dark-color;
98
113
 
@@ -110,7 +125,6 @@
110
125
  }
111
126
  }
112
127
 
113
- // Variation
114
128
  .navbar-fixed-bottom,
115
129
  .navbar-fixed-top {
116
130
  box-shadow: map-get($toolbar-elevation-shadow, shadow);
@@ -157,8 +171,6 @@
157
171
  }
158
172
  }
159
173
 
160
-
161
-
162
174
  // Misc
163
175
 
164
176
  .navbar-brand {
@@ -217,8 +229,6 @@
217
229
  }
218
230
  }
219
231
 
220
-
221
-
222
232
  // Nav
223
233
 
224
234
  .navbar-nav {
@@ -244,10 +254,6 @@
244
254
  opacity: 1;
245
255
  }
246
256
 
247
- &:focus {
248
- outline: 0;
249
- }
250
-
251
257
  &.active,
252
258
  &.disabled {
253
259
  opacity: 1;
@@ -257,6 +263,10 @@
257
263
  background-color: transparent;
258
264
  color: $toolbar-color-lighter;
259
265
  }
266
+
267
+ &:focus {
268
+ outline: 0;
269
+ }
260
270
  }
261
271
 
262
272
  .active > .nav-link,
@@ -269,13 +279,12 @@
269
279
  }
270
280
  }
271
281
 
272
-
273
-
274
282
  // Toggleable
275
283
 
276
284
  .navbar-collapse {
277
285
  align-items: center;
278
286
  flex-basis: 100%;
287
+ flex-grow: 1;
279
288
  }
280
289
 
281
290
  .navbar-expand {
@@ -285,13 +294,13 @@
285
294
 
286
295
  &#{$infix} {
287
296
  @include media-breakpoint-down($breakpoint) {
288
- > .container,
289
- > .container-fluid {
290
- padding-right: 0;
291
- padding-left: 0;
292
- }
293
-
294
297
  .navbar-collapse {
298
+ .form-inline,
299
+ .navbar-brand,
300
+ .navbar-text {
301
+ margin-left: 0;
302
+ }
303
+
295
304
  > :first-child {
296
305
  margin-top: $toolbar-inner-spacer-y;
297
306
  }
@@ -299,27 +308,22 @@
299
308
  > :not(:last-child) {
300
309
  margin-bottom: $toolbar-inner-spacer-y;
301
310
  }
311
+ }
302
312
 
303
- .form-inline,
304
- .navbar-brand,
305
- .navbar-text {
306
- margin-left: 0;
307
- }
313
+ > .container,
314
+ > .container-fluid {
315
+ padding-right: 0;
316
+ padding-left: 0;
308
317
  }
309
318
  }
310
319
 
311
320
  @include media-breakpoint-up($next) {
312
- flex-direction: row;
313
- flex-wrap: nowrap;
321
+ flex-flow: row nowrap;
314
322
  justify-content: flex-start;
315
323
 
316
- > .container,
317
- > .container-fluid {
318
- flex-wrap: nowrap;
319
- }
320
-
321
324
  .navbar-collapse {
322
- display: flex !important;
325
+ display: flex !important; // stylelint-disable-line declaration-no-important
326
+ flex-basis: auto;
323
327
  }
324
328
 
325
329
  .navbar-nav {
@@ -335,6 +339,11 @@
335
339
  margin-left: 0;
336
340
  }
337
341
  }
342
+
343
+ > .container,
344
+ > .container-fluid {
345
+ flex-wrap: nowrap;
346
+ }
338
347
  }
339
348
  }
340
349
  }
@@ -347,13 +356,17 @@
347
356
  border-radius: 50%;
348
357
  color: inherit;
349
358
  display: inline-flex;
359
+ flex-shrink: 0;
350
360
  height: $toolbar-element-height;
361
+ justify-content: center;
351
362
  line-height: 1;
352
363
  margin-left: $toolbar-inner-spacer-x;
364
+ padding: 0;
353
365
  position: relative;
354
366
  width: $toolbar-element-height;
355
367
 
356
368
  @include active-focus-hover {
369
+ color: inherit;
357
370
  text-decoration: none;
358
371
 
359
372
  &::before {