administrate-bootstrap-theme 0.1.0 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -11
  3. data/Rakefile +10 -14
  4. data/app/assets/config/administrate-bootstrap-theme_manifest.js +1 -0
  5. data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +2 -0
  6. data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +17 -1
  7. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +17 -3
  8. data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +52 -16
  9. data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +12 -0
  10. data/lib/administrate-bootstrap-theme/engine.rb +2 -0
  11. data/lib/administrate-bootstrap-theme/version.rb +1 -1
  12. data/node_modules/bootstrap/js/src/alert.js +141 -0
  13. data/node_modules/bootstrap/js/src/base-component.js +46 -0
  14. data/node_modules/bootstrap/js/src/button.js +95 -0
  15. data/node_modules/bootstrap/js/src/carousel.js +624 -0
  16. data/node_modules/bootstrap/js/src/collapse.js +410 -0
  17. data/node_modules/bootstrap/js/src/dom/data.js +57 -0
  18. data/node_modules/bootstrap/js/src/dom/event-handler.js +331 -0
  19. data/node_modules/bootstrap/js/src/dom/manipulator.js +80 -0
  20. data/node_modules/bootstrap/js/src/dom/selector-engine.js +75 -0
  21. data/node_modules/bootstrap/js/src/dropdown.js +543 -0
  22. data/node_modules/bootstrap/js/src/modal.js +582 -0
  23. data/node_modules/bootstrap/js/src/offcanvas.js +279 -0
  24. data/node_modules/bootstrap/js/src/popover.js +171 -0
  25. data/node_modules/bootstrap/js/src/scrollspy.js +319 -0
  26. data/node_modules/bootstrap/js/src/tab.js +220 -0
  27. data/node_modules/bootstrap/js/src/toast.js +219 -0
  28. data/node_modules/bootstrap/js/src/tooltip.js +802 -0
  29. data/node_modules/bootstrap/js/src/util/index.js +253 -0
  30. data/node_modules/bootstrap/js/src/util/sanitizer.js +127 -0
  31. data/node_modules/bootstrap/js/src/util/scrollbar.js +70 -0
  32. data/node_modules/bootstrap/scss/_accordion.scss +116 -0
  33. data/node_modules/bootstrap/scss/_alert.scss +57 -0
  34. data/node_modules/bootstrap/scss/_badge.scss +29 -0
  35. data/node_modules/bootstrap/scss/_breadcrumb.scss +28 -0
  36. data/node_modules/bootstrap/scss/_button-group.scss +139 -0
  37. data/node_modules/bootstrap/scss/_buttons.scss +111 -0
  38. data/node_modules/bootstrap/scss/_card.scss +215 -0
  39. data/node_modules/bootstrap/scss/_carousel.scss +229 -0
  40. data/node_modules/bootstrap/scss/_close.scss +40 -0
  41. data/node_modules/bootstrap/scss/_containers.scss +41 -0
  42. data/node_modules/bootstrap/scss/_dropdown.scss +246 -0
  43. data/node_modules/bootstrap/scss/_forms.scss +9 -0
  44. data/node_modules/bootstrap/scss/_functions.scss +205 -0
  45. data/node_modules/bootstrap/scss/_grid.scss +22 -0
  46. data/node_modules/bootstrap/scss/_helpers.scss +7 -0
  47. data/node_modules/bootstrap/scss/_images.scss +42 -0
  48. data/node_modules/bootstrap/scss/_list-group.scss +174 -0
  49. data/node_modules/bootstrap/scss/_mixins.scss +41 -0
  50. data/node_modules/bootstrap/scss/_modal.scss +237 -0
  51. data/node_modules/bootstrap/scss/_nav.scss +139 -0
  52. data/node_modules/bootstrap/scss/_navbar.scss +306 -0
  53. data/node_modules/bootstrap/scss/_offcanvas.scss +77 -0
  54. data/node_modules/bootstrap/scss/_pagination.scss +64 -0
  55. data/node_modules/bootstrap/scss/_popover.scss +158 -0
  56. data/node_modules/bootstrap/scss/_progress.scss +48 -0
  57. data/node_modules/bootstrap/scss/_reboot.scss +621 -0
  58. data/node_modules/bootstrap/scss/_root.scss +16 -0
  59. data/node_modules/bootstrap/scss/_spinners.scss +69 -0
  60. data/node_modules/bootstrap/scss/_tables.scss +150 -0
  61. data/node_modules/bootstrap/scss/_toasts.scss +51 -0
  62. data/node_modules/bootstrap/scss/_tooltip.scss +115 -0
  63. data/node_modules/bootstrap/scss/_transitions.scss +21 -0
  64. data/node_modules/bootstrap/scss/_type.scss +104 -0
  65. data/node_modules/bootstrap/scss/_utilities.scss +594 -0
  66. data/node_modules/bootstrap/scss/_variables.scss +1464 -0
  67. data/node_modules/bootstrap/scss/bootstrap-grid.scss +65 -0
  68. data/node_modules/bootstrap/scss/bootstrap-reboot.scss +15 -0
  69. data/node_modules/bootstrap/scss/bootstrap-utilities.scss +18 -0
  70. data/node_modules/bootstrap/scss/bootstrap.scss +52 -0
  71. data/node_modules/bootstrap/scss/forms/_floating-labels.scss +61 -0
  72. data/node_modules/bootstrap/scss/forms/_form-check.scss +152 -0
  73. data/node_modules/bootstrap/scss/forms/_form-control.scss +219 -0
  74. data/node_modules/bootstrap/scss/forms/_form-range.scss +91 -0
  75. data/node_modules/bootstrap/scss/forms/_form-select.scss +67 -0
  76. data/node_modules/bootstrap/scss/forms/_form-text.scss +11 -0
  77. data/node_modules/bootstrap/scss/forms/_input-group.scss +121 -0
  78. data/node_modules/bootstrap/scss/forms/_labels.scss +36 -0
  79. data/node_modules/bootstrap/scss/forms/_validation.scss +12 -0
  80. data/node_modules/bootstrap/scss/helpers/_clearfix.scss +3 -0
  81. data/node_modules/bootstrap/scss/helpers/_colored-links.scss +12 -0
  82. data/node_modules/bootstrap/scss/helpers/_position.scss +30 -0
  83. data/node_modules/bootstrap/scss/helpers/_ratio.scss +26 -0
  84. data/node_modules/bootstrap/scss/helpers/_stretched-link.scss +15 -0
  85. data/node_modules/bootstrap/scss/helpers/_text-truncation.scss +7 -0
  86. data/node_modules/bootstrap/scss/helpers/_visually-hidden.scss +8 -0
  87. data/node_modules/bootstrap/scss/mixins/_alert.scss +11 -0
  88. data/node_modules/bootstrap/scss/mixins/_border-radius.scss +78 -0
  89. data/node_modules/bootstrap/scss/mixins/_box-shadow.scss +18 -0
  90. data/node_modules/bootstrap/scss/mixins/_breakpoints.scss +127 -0
  91. data/node_modules/bootstrap/scss/mixins/_buttons.scss +133 -0
  92. data/node_modules/bootstrap/scss/mixins/_caret.scss +64 -0
  93. data/node_modules/bootstrap/scss/mixins/_clearfix.scss +9 -0
  94. data/node_modules/bootstrap/scss/mixins/_container.scss +9 -0
  95. data/node_modules/bootstrap/scss/mixins/_deprecate.scss +10 -0
  96. data/node_modules/bootstrap/scss/mixins/_forms.scss +134 -0
  97. data/node_modules/bootstrap/scss/mixins/_gradients.scss +47 -0
  98. data/node_modules/bootstrap/scss/mixins/_grid.scss +120 -0
  99. data/node_modules/bootstrap/scss/mixins/_image.scss +16 -0
  100. data/node_modules/bootstrap/scss/mixins/_list-group.scss +24 -0
  101. data/node_modules/bootstrap/scss/mixins/_lists.scss +7 -0
  102. data/node_modules/bootstrap/scss/mixins/_pagination.scss +31 -0
  103. data/node_modules/bootstrap/scss/mixins/_reset-text.scss +17 -0
  104. data/node_modules/bootstrap/scss/mixins/_resize.scss +6 -0
  105. data/node_modules/bootstrap/scss/mixins/_table-variants.scss +21 -0
  106. data/node_modules/bootstrap/scss/mixins/_text-truncate.scss +8 -0
  107. data/node_modules/bootstrap/scss/mixins/_transition.scss +26 -0
  108. data/node_modules/bootstrap/scss/mixins/_utilities.scss +68 -0
  109. data/node_modules/bootstrap/scss/mixins/_visually-hidden.scss +29 -0
  110. data/node_modules/bootstrap/scss/utilities/_api.scss +47 -0
  111. data/node_modules/bootstrap/scss/vendor/_rfs.scss +312 -0
  112. metadata +106 -19
@@ -0,0 +1,64 @@
1
+ .pagination {
2
+ display: flex;
3
+ @include list-unstyled();
4
+ }
5
+
6
+ .page-link {
7
+ position: relative;
8
+ display: block;
9
+ color: $pagination-color;
10
+ text-decoration: if($link-decoration == none, null, none);
11
+ background-color: $pagination-bg;
12
+ border: $pagination-border-width solid $pagination-border-color;
13
+ @include transition($pagination-transition);
14
+
15
+ &:hover {
16
+ z-index: 2;
17
+ color: $pagination-hover-color;
18
+ text-decoration: if($link-hover-decoration == underline, none, null);
19
+ background-color: $pagination-hover-bg;
20
+ border-color: $pagination-hover-border-color;
21
+ }
22
+
23
+ &:focus {
24
+ z-index: 3;
25
+ color: $pagination-focus-color;
26
+ background-color: $pagination-focus-bg;
27
+ outline: $pagination-focus-outline;
28
+ box-shadow: $pagination-focus-box-shadow;
29
+ }
30
+ }
31
+
32
+ .page-item {
33
+ &:not(:first-child) .page-link {
34
+ margin-left: $pagination-margin-start;
35
+ }
36
+
37
+ &.active .page-link {
38
+ z-index: 3;
39
+ color: $pagination-active-color;
40
+ @include gradient-bg($pagination-active-bg);
41
+ border-color: $pagination-active-border-color;
42
+ }
43
+
44
+ &.disabled .page-link {
45
+ color: $pagination-disabled-color;
46
+ pointer-events: none;
47
+ background-color: $pagination-disabled-bg;
48
+ border-color: $pagination-disabled-border-color;
49
+ }
50
+ }
51
+
52
+
53
+ //
54
+ // Sizing
55
+ //
56
+ @include pagination-size($pagination-padding-y, $pagination-padding-x, null, $pagination-border-radius);
57
+
58
+ .pagination-lg {
59
+ @include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
60
+ }
61
+
62
+ .pagination-sm {
63
+ @include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
64
+ }
@@ -0,0 +1,158 @@
1
+ .popover {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0 #{"/* rtl:ignore */"};
5
+ z-index: $zindex-popover;
6
+ display: block;
7
+ max-width: $popover-max-width;
8
+ // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
9
+ // So reset our font and text properties to avoid inheriting weird values.
10
+ @include reset-text();
11
+ @include font-size($popover-font-size);
12
+ // Allow breaking very long words so they don't overflow the popover's bounds
13
+ word-wrap: break-word;
14
+ background-color: $popover-bg;
15
+ background-clip: padding-box;
16
+ border: $popover-border-width solid $popover-border-color;
17
+ @include border-radius($popover-border-radius);
18
+ @include box-shadow($popover-box-shadow);
19
+
20
+ .popover-arrow {
21
+ position: absolute;
22
+ display: block;
23
+ width: $popover-arrow-width;
24
+ height: $popover-arrow-height;
25
+
26
+ &::before,
27
+ &::after {
28
+ position: absolute;
29
+ display: block;
30
+ content: "";
31
+ border-color: transparent;
32
+ border-style: solid;
33
+ }
34
+ }
35
+ }
36
+
37
+ .bs-popover-top {
38
+ > .popover-arrow {
39
+ bottom: subtract(-$popover-arrow-height, $popover-border-width);
40
+
41
+ &::before {
42
+ bottom: 0;
43
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
44
+ border-top-color: $popover-arrow-outer-color;
45
+ }
46
+
47
+ &::after {
48
+ bottom: $popover-border-width;
49
+ border-width: $popover-arrow-height ($popover-arrow-width / 2) 0;
50
+ border-top-color: $popover-arrow-color;
51
+ }
52
+ }
53
+ }
54
+
55
+ .bs-popover-end {
56
+ > .popover-arrow {
57
+ left: subtract(-$popover-arrow-height, $popover-border-width);
58
+ width: $popover-arrow-height;
59
+ height: $popover-arrow-width;
60
+
61
+ &::before {
62
+ left: 0;
63
+ border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
64
+ border-right-color: $popover-arrow-outer-color;
65
+ }
66
+
67
+ &::after {
68
+ left: $popover-border-width;
69
+ border-width: ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2) 0;
70
+ border-right-color: $popover-arrow-color;
71
+ }
72
+ }
73
+ }
74
+
75
+ .bs-popover-bottom {
76
+ > .popover-arrow {
77
+ top: subtract(-$popover-arrow-height, $popover-border-width);
78
+
79
+ &::before {
80
+ top: 0;
81
+ border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
82
+ border-bottom-color: $popover-arrow-outer-color;
83
+ }
84
+
85
+ &::after {
86
+ top: $popover-border-width;
87
+ border-width: 0 ($popover-arrow-width / 2) $popover-arrow-height ($popover-arrow-width / 2);
88
+ border-bottom-color: $popover-arrow-color;
89
+ }
90
+ }
91
+
92
+ // This will remove the popover-header's border just below the arrow
93
+ .popover-header::before {
94
+ position: absolute;
95
+ top: 0;
96
+ left: 50%;
97
+ display: block;
98
+ width: $popover-arrow-width;
99
+ margin-left: -$popover-arrow-width / 2;
100
+ content: "";
101
+ border-bottom: $popover-border-width solid $popover-header-bg;
102
+ }
103
+ }
104
+
105
+ .bs-popover-start {
106
+ > .popover-arrow {
107
+ right: subtract(-$popover-arrow-height, $popover-border-width);
108
+ width: $popover-arrow-height;
109
+ height: $popover-arrow-width;
110
+
111
+ &::before {
112
+ right: 0;
113
+ border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
114
+ border-left-color: $popover-arrow-outer-color;
115
+ }
116
+
117
+ &::after {
118
+ right: $popover-border-width;
119
+ border-width: ($popover-arrow-width / 2) 0 ($popover-arrow-width / 2) $popover-arrow-height;
120
+ border-left-color: $popover-arrow-color;
121
+ }
122
+ }
123
+ }
124
+
125
+ .bs-popover-auto {
126
+ &[data-popper-placement^="top"] {
127
+ @extend .bs-popover-top;
128
+ }
129
+ &[data-popper-placement^="right"] {
130
+ @extend .bs-popover-end;
131
+ }
132
+ &[data-popper-placement^="bottom"] {
133
+ @extend .bs-popover-bottom;
134
+ }
135
+ &[data-popper-placement^="left"] {
136
+ @extend .bs-popover-start;
137
+ }
138
+ }
139
+
140
+ // Offset the popover to account for the popover arrow
141
+ .popover-header {
142
+ padding: $popover-header-padding-y $popover-header-padding-x;
143
+ margin-bottom: 0; // Reset the default from Reboot
144
+ @include font-size($font-size-base);
145
+ color: $popover-header-color;
146
+ background-color: $popover-header-bg;
147
+ border-bottom: $popover-border-width solid shade-color($popover-header-bg, 10%);
148
+ @include border-top-radius($popover-inner-border-radius);
149
+
150
+ &:empty {
151
+ display: none;
152
+ }
153
+ }
154
+
155
+ .popover-body {
156
+ padding: $popover-body-padding-y $popover-body-padding-x;
157
+ color: $popover-body-color;
158
+ }
@@ -0,0 +1,48 @@
1
+ // Disable animation if transitions are disabled
2
+
3
+ // scss-docs-start progress-keyframes
4
+ @if $enable-transitions {
5
+ @keyframes progress-bar-stripes {
6
+ 0% { background-position-x: $progress-height; }
7
+ }
8
+ }
9
+ // scss-docs-end progress-keyframes
10
+
11
+ .progress {
12
+ display: flex;
13
+ height: $progress-height;
14
+ overflow: hidden; // force rounded corners by cropping it
15
+ @include font-size($progress-font-size);
16
+ background-color: $progress-bg;
17
+ @include border-radius($progress-border-radius);
18
+ @include box-shadow($progress-box-shadow);
19
+ }
20
+
21
+ .progress-bar {
22
+ display: flex;
23
+ flex-direction: column;
24
+ justify-content: center;
25
+ overflow: hidden;
26
+ color: $progress-bar-color;
27
+ text-align: center;
28
+ white-space: nowrap;
29
+ background-color: $progress-bar-bg;
30
+ @include transition($progress-bar-transition);
31
+ }
32
+
33
+ .progress-bar-striped {
34
+ @include gradient-striped();
35
+ background-size: $progress-height $progress-height;
36
+ }
37
+
38
+ @if $enable-transitions {
39
+ .progress-bar-animated {
40
+ animation: $progress-bar-animation-timing progress-bar-stripes;
41
+
42
+ @if $enable-reduced-motion {
43
+ @media (prefers-reduced-motion: reduce) {
44
+ animation: none;
45
+ }
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,621 @@
1
+ // stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
2
+
3
+
4
+ // Reboot
5
+ //
6
+ // Normalization of HTML elements, manually forked from Normalize.css to remove
7
+ // styles targeting irrelevant browsers while applying new styles.
8
+ //
9
+ // Normalize is licensed MIT. https://github.com/necolas/normalize.css
10
+
11
+
12
+ // Document
13
+ //
14
+ // Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.
15
+
16
+ *,
17
+ *::before,
18
+ *::after {
19
+ box-sizing: border-box;
20
+ }
21
+
22
+
23
+ // Root
24
+ //
25
+ // Ability to the value of the root font sizes, affecting the value of `rem`.
26
+ // null by default, thus nothing is generated.
27
+
28
+ :root {
29
+ font-size: $font-size-root;
30
+
31
+ @if $enable-smooth-scroll {
32
+ @media (prefers-reduced-motion: no-preference) {
33
+ scroll-behavior: smooth;
34
+ }
35
+ }
36
+ }
37
+
38
+
39
+ // Body
40
+ //
41
+ // 1. Remove the margin in all browsers.
42
+ // 2. As a best practice, apply a default `background-color`.
43
+ // 3. Prevent adjustments of font size after orientation changes in iOS.
44
+ // 4. Change the default tap highlight to be completely transparent in iOS.
45
+
46
+ body {
47
+ margin: 0; // 1
48
+ font-family: $font-family-base;
49
+ @include font-size($font-size-base);
50
+ font-weight: $font-weight-base;
51
+ line-height: $line-height-base;
52
+ color: $body-color;
53
+ text-align: $body-text-align;
54
+ background-color: $body-bg; // 2
55
+ -webkit-text-size-adjust: 100%; // 3
56
+ -webkit-tap-highlight-color: rgba($black, 0); // 4
57
+ }
58
+
59
+
60
+ // Content grouping
61
+ //
62
+ // 1. Reset Firefox's gray color
63
+ // 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field
64
+
65
+ hr {
66
+ margin: $hr-margin-y 0;
67
+ color: $hr-color; // 1
68
+ background-color: currentColor;
69
+ border: 0;
70
+ opacity: $hr-opacity;
71
+ }
72
+
73
+ hr:not([size]) {
74
+ height: $hr-height; // 2
75
+ }
76
+
77
+
78
+ // Typography
79
+ //
80
+ // 1. Remove top margins from headings
81
+ // By default, `<h1>`-`<h6>` all receive top and bottom margins. We nuke the top
82
+ // margin for easier control within type scales as it avoids margin collapsing.
83
+
84
+ %heading {
85
+ margin-top: 0; // 1
86
+ margin-bottom: $headings-margin-bottom;
87
+ font-family: $headings-font-family;
88
+ font-style: $headings-font-style;
89
+ font-weight: $headings-font-weight;
90
+ line-height: $headings-line-height;
91
+ color: $headings-color;
92
+ }
93
+
94
+ h1 {
95
+ @extend %heading;
96
+ @include font-size($h1-font-size);
97
+ }
98
+
99
+ h2 {
100
+ @extend %heading;
101
+ @include font-size($h2-font-size);
102
+ }
103
+
104
+ h3 {
105
+ @extend %heading;
106
+ @include font-size($h3-font-size);
107
+ }
108
+
109
+ h4 {
110
+ @extend %heading;
111
+ @include font-size($h4-font-size);
112
+ }
113
+
114
+ h5 {
115
+ @extend %heading;
116
+ @include font-size($h5-font-size);
117
+ }
118
+
119
+ h6 {
120
+ @extend %heading;
121
+ @include font-size($h6-font-size);
122
+ }
123
+
124
+
125
+ // Reset margins on paragraphs
126
+ //
127
+ // Similarly, the top margin on `<p>`s get reset. However, we also reset the
128
+ // bottom margin to use `rem` units instead of `em`.
129
+
130
+ p {
131
+ margin-top: 0;
132
+ margin-bottom: $paragraph-margin-bottom;
133
+ }
134
+
135
+
136
+ // Abbreviations
137
+ //
138
+ // 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin
139
+ // 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.
140
+ // 3. Add explicit cursor to indicate changed behavior.
141
+ // 4. Prevent the text-decoration to be skipped.
142
+
143
+ abbr[title],
144
+ abbr[data-bs-original-title] { // 1
145
+ text-decoration: underline dotted; // 2
146
+ cursor: help; // 3
147
+ text-decoration-skip-ink: none; // 4
148
+ }
149
+
150
+
151
+ // Address
152
+
153
+ address {
154
+ margin-bottom: 1rem;
155
+ font-style: normal;
156
+ line-height: inherit;
157
+ }
158
+
159
+
160
+ // Lists
161
+
162
+ ol,
163
+ ul {
164
+ padding-left: 2rem;
165
+ }
166
+
167
+ ol,
168
+ ul,
169
+ dl {
170
+ margin-top: 0;
171
+ margin-bottom: 1rem;
172
+ }
173
+
174
+ ol ol,
175
+ ul ul,
176
+ ol ul,
177
+ ul ol {
178
+ margin-bottom: 0;
179
+ }
180
+
181
+ dt {
182
+ font-weight: $dt-font-weight;
183
+ }
184
+
185
+ // 1. Undo browser default
186
+
187
+ dd {
188
+ margin-bottom: .5rem;
189
+ margin-left: 0; // 1
190
+ }
191
+
192
+
193
+ // Blockquote
194
+
195
+ blockquote {
196
+ margin: 0 0 1rem;
197
+ }
198
+
199
+
200
+ // Strong
201
+ //
202
+ // Add the correct font weight in Chrome, Edge, and Safari
203
+
204
+ b,
205
+ strong {
206
+ font-weight: $font-weight-bolder;
207
+ }
208
+
209
+
210
+ // Small
211
+ //
212
+ // Add the correct font size in all browsers
213
+
214
+ small {
215
+ @include font-size($small-font-size);
216
+ }
217
+
218
+
219
+ // Mark
220
+
221
+ mark {
222
+ padding: $mark-padding;
223
+ background-color: $mark-bg;
224
+ }
225
+
226
+
227
+ // Sub and Sup
228
+ //
229
+ // Prevent `sub` and `sup` elements from affecting the line height in
230
+ // all browsers.
231
+
232
+ sub,
233
+ sup {
234
+ position: relative;
235
+ @include font-size($sub-sup-font-size);
236
+ line-height: 0;
237
+ vertical-align: baseline;
238
+ }
239
+
240
+ sub { bottom: -.25em; }
241
+ sup { top: -.5em; }
242
+
243
+
244
+ // Links
245
+
246
+ a {
247
+ color: $link-color;
248
+ text-decoration: $link-decoration;
249
+
250
+ &:hover {
251
+ color: $link-hover-color;
252
+ text-decoration: $link-hover-decoration;
253
+ }
254
+ }
255
+
256
+ // And undo these styles for placeholder links/named anchors (without href).
257
+ // It would be more straightforward to just use a[href] in previous block, but that
258
+ // causes specificity issues in many other styles that are too complex to fix.
259
+ // See https://github.com/twbs/bootstrap/issues/19402
260
+
261
+ a:not([href]):not([class]) {
262
+ &,
263
+ &:hover {
264
+ color: inherit;
265
+ text-decoration: none;
266
+ }
267
+ }
268
+
269
+
270
+ // Code
271
+
272
+ pre,
273
+ code,
274
+ kbd,
275
+ samp {
276
+ font-family: $font-family-code;
277
+ @include font-size(1em); // Correct the odd `em` font sizing in all browsers.
278
+ direction: ltr #{"/* rtl:ignore */"};
279
+ unicode-bidi: bidi-override;
280
+ }
281
+
282
+ // 1. Remove browser default top margin
283
+ // 2. Reset browser default of `1em` to use `rem`s
284
+ // 3. Don't allow content to break outside
285
+
286
+ pre {
287
+ display: block;
288
+ margin-top: 0; // 1
289
+ margin-bottom: 1rem; // 2
290
+ overflow: auto; // 3
291
+ @include font-size($code-font-size);
292
+ color: $pre-color;
293
+
294
+ // Account for some code outputs that place code tags in pre tags
295
+ code {
296
+ @include font-size(inherit);
297
+ color: inherit;
298
+ word-break: normal;
299
+ }
300
+ }
301
+
302
+ code {
303
+ @include font-size($code-font-size);
304
+ color: $code-color;
305
+ word-wrap: break-word;
306
+
307
+ // Streamline the style when inside anchors to avoid broken underline and more
308
+ a > & {
309
+ color: inherit;
310
+ }
311
+ }
312
+
313
+ kbd {
314
+ padding: $kbd-padding-y $kbd-padding-x;
315
+ @include font-size($kbd-font-size);
316
+ color: $kbd-color;
317
+ background-color: $kbd-bg;
318
+ @include border-radius($border-radius-sm);
319
+
320
+ kbd {
321
+ padding: 0;
322
+ @include font-size(1em);
323
+ font-weight: $nested-kbd-font-weight;
324
+ }
325
+ }
326
+
327
+
328
+ // Figures
329
+ //
330
+ // Apply a consistent margin strategy (matches our type styles).
331
+
332
+ figure {
333
+ margin: 0 0 1rem;
334
+ }
335
+
336
+
337
+ // Images and content
338
+
339
+ img,
340
+ svg {
341
+ vertical-align: middle;
342
+ }
343
+
344
+
345
+ // Tables
346
+ //
347
+ // Prevent double borders
348
+
349
+ table {
350
+ caption-side: bottom;
351
+ border-collapse: collapse;
352
+ }
353
+
354
+ caption {
355
+ padding-top: $table-cell-padding-y;
356
+ padding-bottom: $table-cell-padding-y;
357
+ color: $table-caption-color;
358
+ text-align: left;
359
+ }
360
+
361
+ // 1. Removes font-weight bold by inheriting
362
+ // 2. Matches default `<td>` alignment by inheriting `text-align`.
363
+ // 3. Fix alignment for Safari
364
+
365
+ th {
366
+ font-weight: $table-th-font-weight; // 1
367
+ text-align: inherit; // 2
368
+ text-align: -webkit-match-parent; // 3
369
+ }
370
+
371
+ thead,
372
+ tbody,
373
+ tfoot,
374
+ tr,
375
+ td,
376
+ th {
377
+ border-color: inherit;
378
+ border-style: solid;
379
+ border-width: 0;
380
+ }
381
+
382
+
383
+ // Forms
384
+ //
385
+ // 1. Allow labels to use `margin` for spacing.
386
+
387
+ label {
388
+ display: inline-block; // 1
389
+ }
390
+
391
+ // Remove the default `border-radius` that macOS Chrome adds.
392
+ // See https://github.com/twbs/bootstrap/issues/24093
393
+
394
+ button {
395
+ // stylelint-disable-next-line property-disallowed-list
396
+ border-radius: 0;
397
+ }
398
+
399
+ // Explicitly remove focus outline in Chromium when it shouldn't be
400
+ // visible (e.g. as result of mouse click or touch tap). It already
401
+ // should be doing this automatically, but seems to currently be
402
+ // confused and applies its very visible two-tone outline anyway.
403
+
404
+ button:focus:not(:focus-visible) {
405
+ outline: 0;
406
+ }
407
+
408
+ // 1. Remove the margin in Firefox and Safari
409
+
410
+ input,
411
+ button,
412
+ select,
413
+ optgroup,
414
+ textarea {
415
+ margin: 0; // 1
416
+ font-family: inherit;
417
+ @include font-size(inherit);
418
+ line-height: inherit;
419
+ }
420
+
421
+ // Remove the inheritance of text transform in Firefox
422
+ button,
423
+ select {
424
+ text-transform: none;
425
+ }
426
+ // Set the cursor for non-`<button>` buttons
427
+ //
428
+ // Details at https://github.com/twbs/bootstrap/pull/30562
429
+ [role="button"] {
430
+ cursor: pointer;
431
+ }
432
+
433
+ select {
434
+ // Remove the inheritance of word-wrap in Safari.
435
+ // See https://github.com/twbs/bootstrap/issues/24990
436
+ word-wrap: normal;
437
+
438
+ // Undo the opacity change from Chrome
439
+ &:disabled {
440
+ opacity: 1;
441
+ }
442
+ }
443
+
444
+ // Remove the dropdown arrow in Chrome from inputs built with datalists.
445
+ // See https://stackoverflow.com/a/54997118
446
+
447
+ [list]::-webkit-calendar-picker-indicator {
448
+ display: none;
449
+ }
450
+
451
+ // 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`
452
+ // controls in Android 4.
453
+ // 2. Correct the inability to style clickable types in iOS and Safari.
454
+ // 3. Opinionated: add "hand" cursor to non-disabled button elements.
455
+
456
+ button,
457
+ [type="button"], // 1
458
+ [type="reset"],
459
+ [type="submit"] {
460
+ -webkit-appearance: button; // 2
461
+
462
+ @if $enable-button-pointers {
463
+ &:not(:disabled) {
464
+ cursor: pointer; // 3
465
+ }
466
+ }
467
+ }
468
+
469
+ // Remove inner border and padding from Firefox, but don't restore the outline like Normalize.
470
+
471
+ ::-moz-focus-inner {
472
+ padding: 0;
473
+ border-style: none;
474
+ }
475
+
476
+ // 1. Textareas should really only resize vertically so they don't break their (horizontal) containers.
477
+
478
+ textarea {
479
+ resize: vertical; // 1
480
+ }
481
+
482
+ // 1. Browsers set a default `min-width: min-content;` on fieldsets,
483
+ // unlike e.g. `<div>`s, which have `min-width: 0;` by default.
484
+ // So we reset that to ensure fieldsets behave more like a standard block element.
485
+ // See https://github.com/twbs/bootstrap/issues/12359
486
+ // and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
487
+ // 2. Reset the default outline behavior of fieldsets so they don't affect page layout.
488
+
489
+ fieldset {
490
+ min-width: 0; // 1
491
+ padding: 0; // 2
492
+ margin: 0; // 2
493
+ border: 0; // 2
494
+ }
495
+
496
+ // 1. By using `float: left`, the legend will behave like a block element.
497
+ // This way the border of a fieldset wraps around the legend if present.
498
+ // 2. Fix wrapping bug.
499
+ // See https://github.com/twbs/bootstrap/issues/29712
500
+
501
+ legend {
502
+ float: left; // 1
503
+ width: 100%;
504
+ padding: 0;
505
+ margin-bottom: $legend-margin-bottom;
506
+ @include font-size($legend-font-size);
507
+ font-weight: $legend-font-weight;
508
+ line-height: inherit;
509
+
510
+ + * {
511
+ clear: left; // 2
512
+ }
513
+ }
514
+
515
+ // Fix height of inputs with a type of datetime-local, date, month, week, or time
516
+ // See https://github.com/twbs/bootstrap/issues/18842
517
+
518
+ ::-webkit-datetime-edit-fields-wrapper,
519
+ ::-webkit-datetime-edit-text,
520
+ ::-webkit-datetime-edit-minute,
521
+ ::-webkit-datetime-edit-hour-field,
522
+ ::-webkit-datetime-edit-day-field,
523
+ ::-webkit-datetime-edit-month-field,
524
+ ::-webkit-datetime-edit-year-field {
525
+ padding: 0;
526
+ }
527
+
528
+ ::-webkit-inner-spin-button {
529
+ height: auto;
530
+ }
531
+
532
+ // 1. Correct the outline style in Safari.
533
+ // 2. This overrides the extra rounded corners on search inputs in iOS so that our
534
+ // `.form-control` class can properly style them. Note that this cannot simply
535
+ // be added to `.form-control` as it's not specific enough. For details, see
536
+ // https://github.com/twbs/bootstrap/issues/11586.
537
+
538
+ [type="search"] {
539
+ outline-offset: -2px; // 1
540
+ -webkit-appearance: textfield; // 2
541
+ }
542
+
543
+ // 1. A few input types should stay LTR
544
+ // See https://rtlstyling.com/posts/rtl-styling#form-inputs
545
+ // 2. RTL only output
546
+ // See https://rtlcss.com/learn/usage-guide/control-directives/#raw
547
+
548
+ /* rtl:raw:
549
+ [type="tel"],
550
+ [type="url"],
551
+ [type="email"],
552
+ [type="number"] {
553
+ direction: ltr;
554
+ }
555
+ */
556
+
557
+ // Remove the inner padding in Chrome and Safari on macOS.
558
+
559
+ ::-webkit-search-decoration {
560
+ -webkit-appearance: none;
561
+ }
562
+
563
+ // Remove padding around color pickers in webkit browsers
564
+
565
+ ::-webkit-color-swatch-wrapper {
566
+ padding: 0;
567
+ }
568
+
569
+
570
+ // Inherit font family and line height for file input buttons
571
+
572
+ ::file-selector-button {
573
+ font: inherit;
574
+ }
575
+
576
+ // 1. Change font properties to `inherit`
577
+ // 2. Correct the inability to style clickable types in iOS and Safari.
578
+
579
+ ::-webkit-file-upload-button {
580
+ font: inherit; // 1
581
+ -webkit-appearance: button; // 2
582
+ }
583
+
584
+ // Correct element displays
585
+
586
+ output {
587
+ display: inline-block;
588
+ }
589
+
590
+ // Remove border from iframe
591
+
592
+ iframe {
593
+ border: 0;
594
+ }
595
+
596
+ // Summary
597
+ //
598
+ // 1. Add the correct display in all browsers
599
+
600
+ summary {
601
+ display: list-item; // 1
602
+ cursor: pointer;
603
+ }
604
+
605
+
606
+ // Progress
607
+ //
608
+ // Add the correct vertical alignment in Chrome, Firefox, and Opera.
609
+
610
+ progress {
611
+ vertical-align: baseline;
612
+ }
613
+
614
+
615
+ // Hidden attribute
616
+ //
617
+ // Always hide an element with the `hidden` HTML attribute.
618
+
619
+ [hidden] {
620
+ display: none !important;
621
+ }