@siemens/element-theme 47.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +28 -0
- package/src/styles/_accessibility.scss +9 -0
- package/src/styles/_all-variables.scss +7 -0
- package/src/styles/_bootstrap.scss +26 -0
- package/src/styles/_themes.scss +35 -0
- package/src/styles/_variables.scss +10 -0
- package/src/styles/bootstrap/_alert.scss +60 -0
- package/src/styles/bootstrap/_badges.scss +115 -0
- package/src/styles/bootstrap/_breadcrumb.scss +32 -0
- package/src/styles/bootstrap/_button-group.scss +101 -0
- package/src/styles/bootstrap/_buttons.scss +244 -0
- package/src/styles/bootstrap/_card.scss +208 -0
- package/src/styles/bootstrap/_containers.scss +44 -0
- package/src/styles/bootstrap/_dropdowns.scss +216 -0
- package/src/styles/bootstrap/_forms.scss +10 -0
- package/src/styles/bootstrap/_functions.scss +188 -0
- package/src/styles/bootstrap/_grid.scss +33 -0
- package/src/styles/bootstrap/_helpers.scss +6 -0
- package/src/styles/bootstrap/_images.scss +45 -0
- package/src/styles/bootstrap/_list-group.scss +197 -0
- package/src/styles/bootstrap/_mixins.scss +30 -0
- package/src/styles/bootstrap/_modals.scss +234 -0
- package/src/styles/bootstrap/_nav.scss +155 -0
- package/src/styles/bootstrap/_pagination.scss +58 -0
- package/src/styles/bootstrap/_popovers.scss +188 -0
- package/src/styles/bootstrap/_progress.scss +42 -0
- package/src/styles/bootstrap/_reboot.scss +618 -0
- package/src/styles/bootstrap/_root.scss +22 -0
- package/src/styles/bootstrap/_tables.scss +186 -0
- package/src/styles/bootstrap/_tooltip.scss +145 -0
- package/src/styles/bootstrap/_transitions.scss +28 -0
- package/src/styles/bootstrap/_type.scss +235 -0
- package/src/styles/bootstrap/_utilities.scss +105 -0
- package/src/styles/bootstrap/_variables.scss +654 -0
- package/src/styles/bootstrap/forms/_form-check.scss +249 -0
- package/src/styles/bootstrap/forms/_form-control.scss +151 -0
- package/src/styles/bootstrap/forms/_form-file.scss +29 -0
- package/src/styles/bootstrap/forms/_form-label.scss +39 -0
- package/src/styles/bootstrap/forms/_form-range.scss +68 -0
- package/src/styles/bootstrap/forms/_input-group.scss +103 -0
- package/src/styles/bootstrap/forms/_validation.scss +95 -0
- package/src/styles/bootstrap/helpers/_clearfix.scss +5 -0
- package/src/styles/bootstrap/helpers/_position.scss +34 -0
- package/src/styles/bootstrap/helpers/_stacks.scss +13 -0
- package/src/styles/bootstrap/helpers/_stretched-link.scss +14 -0
- package/src/styles/bootstrap/helpers/_text-truncation.scss +9 -0
- package/src/styles/bootstrap/helpers/_visually-hidden.scss +10 -0
- package/src/styles/bootstrap/mixins/_backdrop.scss +19 -0
- package/src/styles/bootstrap/mixins/_breakpoints.scss +136 -0
- package/src/styles/bootstrap/mixins/_clearfix.scss +7 -0
- package/src/styles/bootstrap/mixins/_container.scss +7 -0
- package/src/styles/bootstrap/mixins/_deprecate.scss +12 -0
- package/src/styles/bootstrap/mixins/_gradients.scss +14 -0
- package/src/styles/bootstrap/mixins/_grid.scss +171 -0
- package/src/styles/bootstrap/mixins/_image.scss +15 -0
- package/src/styles/bootstrap/mixins/_lists.scss +5 -0
- package/src/styles/bootstrap/mixins/_reset-text.scss +18 -0
- package/src/styles/bootstrap/mixins/_table-row.scss +31 -0
- package/src/styles/bootstrap/mixins/_text-truncate.scss +7 -0
- package/src/styles/bootstrap/mixins/_transition.scss +28 -0
- package/src/styles/bootstrap/mixins/_utilities.scss +86 -0
- package/src/styles/bootstrap/mixins/_visually-hidden.scss +29 -0
- package/src/styles/components/_application-header.scss +244 -0
- package/src/styles/components/_container-grid.scss +99 -0
- package/src/styles/components/_datatable.scss +328 -0
- package/src/styles/components/_drag_drop.scss +105 -0
- package/src/styles/components/_electron-titlebar.scss +5 -0
- package/src/styles/components/_elevation.scss +21 -0
- package/src/styles/components/_focus.scss +21 -0
- package/src/styles/components/_icons.scss +25 -0
- package/src/styles/components/_layout.scss +105 -0
- package/src/styles/components/_links.scss +34 -0
- package/src/styles/components/_pills.scss +45 -0
- package/src/styles/components/_scrollbar.scss +10 -0
- package/src/styles/components/_skeleton.scss +42 -0
- package/src/styles/components/_switch.scss +77 -0
- package/src/styles/components/_system-banner.scss +5 -0
- package/src/styles/components/_widgets.scss +58 -0
- package/src/styles/variables/_animations.scss +7 -0
- package/src/styles/variables/_elevation.scss +25 -0
- package/src/styles/variables/_focus.scss +55 -0
- package/src/styles/variables/_layout.scss +6 -0
- package/src/styles/variables/_semantic-tokens.scss +178 -0
- package/src/styles/variables/_si-vars.scss +19 -0
- package/src/styles/variables/_spacers.scss +28 -0
- package/src/styles/variables/_typography.scss +66 -0
- package/src/styles/variables/_utilities.scss +599 -0
- package/src/styles/variables/_zindex.scss +20 -0
- package/src/theme/_base-colors.scss +79 -0
- package/src/theme/_data-colors.scss +105 -0
- package/src/theme/_theme-element.scss +339 -0
- package/src/theme.scss +49 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
@use '../../variables/spacers';
|
|
2
|
+
@use '../../variables/typography';
|
|
3
|
+
@use '../variables';
|
|
4
|
+
|
|
5
|
+
@use 'sass:map';
|
|
6
|
+
|
|
7
|
+
// Override/enhance the form validation state mixin to also account for class
|
|
8
|
+
// names provided by Angular´s validation.
|
|
9
|
+
//
|
|
10
|
+
// Note: the '.was-validated' selector used by Bootstrap is supposed to live
|
|
11
|
+
// on the wrapping '<form>' element, so decide if this should be changed to
|
|
12
|
+
// an appropriate Angular class that may get applied to a form after save.
|
|
13
|
+
@mixin form-validation-state-selector($state) {
|
|
14
|
+
@if ($state == 'invalid') {
|
|
15
|
+
.was-validated &:#{$state},
|
|
16
|
+
&.ng-touched.ng-#{$state},
|
|
17
|
+
&.is-#{$state} {
|
|
18
|
+
@content;
|
|
19
|
+
}
|
|
20
|
+
} @else {
|
|
21
|
+
&.is-#{$state} {
|
|
22
|
+
@content;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
%state-feedback {
|
|
28
|
+
font-size: variables.$form-feedback-font-size;
|
|
29
|
+
display: none;
|
|
30
|
+
inline-size: 100%;
|
|
31
|
+
line-height: typography.$si-line-height-caption-1;
|
|
32
|
+
margin-block: map.get(spacers.$spacers, 1);
|
|
33
|
+
margin-inline: map.get(spacers.$spacers, 1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@mixin form-validation-state-enh($state, $color, $icon, $text-color) {
|
|
37
|
+
.#{$state}-feedback {
|
|
38
|
+
@extend %state-feedback;
|
|
39
|
+
color: $text-color;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:is(.form-control, .form-select, .form-control-wrapper) {
|
|
43
|
+
@include form-validation-state-selector($state) {
|
|
44
|
+
@if ($state and $icon) {
|
|
45
|
+
--si-feedback-icon: #{$icon};
|
|
46
|
+
--si-feedback-icon-offset: 1.5rem;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@if $color {
|
|
50
|
+
&:not(.no-validation):not(:hover),
|
|
51
|
+
&:not(.no-validation):focus {
|
|
52
|
+
--border-color: #{$color};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
~ .#{$state}-feedback {
|
|
57
|
+
display: flex !important; // stylelint-disable-line declaration-no-important
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.form-control-file {
|
|
64
|
+
@include form-validation-state-selector($state) {
|
|
65
|
+
~ .#{$state}-feedback {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.form-check-input {
|
|
72
|
+
@include form-validation-state-selector($state) {
|
|
73
|
+
~ .#{$state}-feedback {
|
|
74
|
+
display: block;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.form-custom-control {
|
|
80
|
+
@include form-validation-state-selector($state) {
|
|
81
|
+
~ .#{$state}-feedback {
|
|
82
|
+
display: block;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@each $state, $data in variables.$form-validation-states {
|
|
89
|
+
@include form-validation-state-enh(
|
|
90
|
+
$state,
|
|
91
|
+
map.get($data, color),
|
|
92
|
+
map.get($data, icon),
|
|
93
|
+
map.get($data, text-color)
|
|
94
|
+
);
|
|
95
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
|
|
3
|
+
@use '../../variables/zindex';
|
|
4
|
+
@use '../mixins/breakpoints';
|
|
5
|
+
@use '../variables';
|
|
6
|
+
|
|
7
|
+
// Shorthand
|
|
8
|
+
|
|
9
|
+
.fixed-top {
|
|
10
|
+
position: fixed;
|
|
11
|
+
inset-inline: 0;
|
|
12
|
+
inset-block-start: 0;
|
|
13
|
+
z-index: zindex.$zindex-fixed;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.fixed-bottom {
|
|
17
|
+
position: fixed;
|
|
18
|
+
inset-inline: 0;
|
|
19
|
+
inset-block-end: 0;
|
|
20
|
+
z-index: zindex.$zindex-fixed;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Responsive sticky top
|
|
24
|
+
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
|
|
25
|
+
@include breakpoints.media-breakpoint-up($breakpoint) {
|
|
26
|
+
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
|
|
27
|
+
|
|
28
|
+
.sticky#{$infix}-top {
|
|
29
|
+
position: sticky;
|
|
30
|
+
inset-block-start: 0;
|
|
31
|
+
z-index: zindex.$zindex-sticky;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Shared between modals and offcanvases
|
|
2
|
+
@mixin overlay-backdrop($zindex, $backdrop-bg, $backdrop-opacity) {
|
|
3
|
+
position: fixed;
|
|
4
|
+
inset-block-start: 0;
|
|
5
|
+
inset-inline-start: 0;
|
|
6
|
+
z-index: $zindex;
|
|
7
|
+
inline-size: 100vw;
|
|
8
|
+
block-size: 100vh;
|
|
9
|
+
background-color: $backdrop-bg;
|
|
10
|
+
|
|
11
|
+
// Fade for backdrop
|
|
12
|
+
&.fade {
|
|
13
|
+
opacity: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.show {
|
|
17
|
+
opacity: $backdrop-opacity;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@use 'sass:list';
|
|
4
|
+
@use 'sass:map';
|
|
5
|
+
|
|
6
|
+
// Breakpoint viewport sizes and media queries.
|
|
7
|
+
//
|
|
8
|
+
// Breakpoints are defined as a map of (name: minimum width), order from small to large:
|
|
9
|
+
//
|
|
10
|
+
// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)
|
|
11
|
+
//
|
|
12
|
+
// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
|
|
13
|
+
|
|
14
|
+
// Name of the next breakpoint, or null for the last breakpoint.
|
|
15
|
+
//
|
|
16
|
+
// >> breakpoint-next(sm)
|
|
17
|
+
// md
|
|
18
|
+
// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
19
|
+
// md
|
|
20
|
+
// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))
|
|
21
|
+
// md
|
|
22
|
+
@function breakpoint-next(
|
|
23
|
+
$name,
|
|
24
|
+
$breakpoints: variables.$grid-breakpoints,
|
|
25
|
+
$breakpoint-names: map.keys($breakpoints)
|
|
26
|
+
) {
|
|
27
|
+
$n: list.index($breakpoint-names, $name);
|
|
28
|
+
@if not $n {
|
|
29
|
+
@error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
|
|
30
|
+
}
|
|
31
|
+
@return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Minimum breakpoint width. Null for the smallest (first) breakpoint.
|
|
35
|
+
//
|
|
36
|
+
// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
37
|
+
// 576px
|
|
38
|
+
@function breakpoint-min($name, $breakpoints: variables.$grid-breakpoints) {
|
|
39
|
+
$min: map.get($breakpoints, $name);
|
|
40
|
+
@return if($min != 0, $min, null);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Maximum breakpoint width.
|
|
44
|
+
// The maximum value is reduced by 0.02px to work around the limitations of
|
|
45
|
+
// `min-` and `max-` prefixes and viewports with fractional widths.
|
|
46
|
+
// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
|
47
|
+
// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
|
48
|
+
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
|
49
|
+
//
|
|
50
|
+
// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
51
|
+
// 767.98px
|
|
52
|
+
@function breakpoint-max($name, $breakpoints: variables.$grid-breakpoints) {
|
|
53
|
+
$max: map.get($breakpoints, $name);
|
|
54
|
+
@return if($max and $max > 0, $max - 0.02, null);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
|
58
|
+
// Useful for making responsive utilities.
|
|
59
|
+
//
|
|
60
|
+
// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
61
|
+
// "" (Returns a blank string)
|
|
62
|
+
// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))
|
|
63
|
+
// "-sm"
|
|
64
|
+
@function breakpoint-infix($name, $breakpoints: variables.$grid-breakpoints) {
|
|
65
|
+
@return if(breakpoint-min($name, $breakpoints) == null, '', '-#{$name}');
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
|
|
69
|
+
// Makes the @content apply to the given breakpoint and wider.
|
|
70
|
+
@mixin media-breakpoint-up($name, $breakpoints: variables.$grid-breakpoints) {
|
|
71
|
+
$min: breakpoint-min($name, $breakpoints);
|
|
72
|
+
@if $min {
|
|
73
|
+
@media (min-width: $min) {
|
|
74
|
+
@content;
|
|
75
|
+
}
|
|
76
|
+
} @else {
|
|
77
|
+
@content;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Media of at most the maximum breakpoint width. No query for the largest breakpoint.
|
|
82
|
+
// Makes the @content apply to the given breakpoint and narrower.
|
|
83
|
+
@mixin media-breakpoint-down($name, $breakpoints: variables.$grid-breakpoints) {
|
|
84
|
+
$max: breakpoint-max($name, $breakpoints);
|
|
85
|
+
@if $max {
|
|
86
|
+
@media (max-width: $max) {
|
|
87
|
+
@content;
|
|
88
|
+
}
|
|
89
|
+
} @else {
|
|
90
|
+
@content;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Media that spans multiple breakpoint widths.
|
|
95
|
+
// Makes the @content apply between the min and max breakpoints
|
|
96
|
+
@mixin media-breakpoint-between($lower, $upper, $breakpoints: variables.$grid-breakpoints) {
|
|
97
|
+
$min: breakpoint-min($lower, $breakpoints);
|
|
98
|
+
$max: breakpoint-max($upper, $breakpoints);
|
|
99
|
+
|
|
100
|
+
@if $min != null and $max != null {
|
|
101
|
+
@media (min-width: $min) and (max-width: $max) {
|
|
102
|
+
@content;
|
|
103
|
+
}
|
|
104
|
+
} @else if $max == null {
|
|
105
|
+
@include media-breakpoint-up($lower, $breakpoints) {
|
|
106
|
+
@content;
|
|
107
|
+
}
|
|
108
|
+
} @else if $min == null {
|
|
109
|
+
@include media-breakpoint-down($upper, $breakpoints) {
|
|
110
|
+
@content;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// Media between the breakpoint's minimum and maximum widths.
|
|
116
|
+
// No minimum for the smallest breakpoint, and no maximum for the largest one.
|
|
117
|
+
// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
|
|
118
|
+
@mixin media-breakpoint-only($name, $breakpoints: variables.$grid-breakpoints) {
|
|
119
|
+
$min: breakpoint-min($name, $breakpoints);
|
|
120
|
+
$next: breakpoint-next($name, $breakpoints);
|
|
121
|
+
$max: breakpoint-max($next);
|
|
122
|
+
|
|
123
|
+
@if $min != null and $max != null {
|
|
124
|
+
@media (min-width: $min) and (max-width: $max) {
|
|
125
|
+
@content;
|
|
126
|
+
}
|
|
127
|
+
} @else if $max == null {
|
|
128
|
+
@include media-breakpoint-up($name, $breakpoints) {
|
|
129
|
+
@content;
|
|
130
|
+
}
|
|
131
|
+
} @else if $min == null {
|
|
132
|
+
@include media-breakpoint-down($next, $breakpoints) {
|
|
133
|
+
@content;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
// Deprecate mixin
|
|
4
|
+
//
|
|
5
|
+
// This mixin can be used to deprecate mixins or functions.
|
|
6
|
+
// `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
|
|
7
|
+
// some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
|
|
8
|
+
@mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
|
|
9
|
+
@if (variables.$enable-deprecation-messages != false and $ignore-warning != true) {
|
|
10
|
+
@warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@mixin gradient-striped($color: rgba(#fff, 0.15), $angle: 45deg) {
|
|
4
|
+
background-image: linear-gradient(
|
|
5
|
+
$angle,
|
|
6
|
+
$color 25%,
|
|
7
|
+
transparent 25%,
|
|
8
|
+
transparent 50%,
|
|
9
|
+
$color 50%,
|
|
10
|
+
$color 75%,
|
|
11
|
+
transparent 75%,
|
|
12
|
+
transparent
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
@use '../functions';
|
|
2
|
+
@use '../variables';
|
|
3
|
+
@use 'breakpoints';
|
|
4
|
+
|
|
5
|
+
@use 'sass:math';
|
|
6
|
+
@use 'sass:map';
|
|
7
|
+
@use 'sass:meta';
|
|
8
|
+
|
|
9
|
+
// Grid system
|
|
10
|
+
//
|
|
11
|
+
// Generate semantic grid columns with these mixins.
|
|
12
|
+
|
|
13
|
+
@mixin make-row($gutter: variables.$grid-gutter-width) {
|
|
14
|
+
--#{variables.$variable-prefix}gutter-x: #{$gutter};
|
|
15
|
+
--#{variables.$variable-prefix}gutter-y: 0;
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
// TODO: Revisit calc order after https://github.com/react-bootstrap/react-bootstrap/issues/6039 is fixed
|
|
19
|
+
margin-block-start: calc(
|
|
20
|
+
-1 * var(--#{variables.$variable-prefix}gutter-y)
|
|
21
|
+
); // stylelint-disable-line function-disallowed-list
|
|
22
|
+
margin-inline: calc(
|
|
23
|
+
-0.5 * var(--#{variables.$variable-prefix}gutter-x)
|
|
24
|
+
); // stylelint-disable-line function-disallowed-list
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@mixin make-col-ready($gutter: variables.$grid-gutter-width) {
|
|
28
|
+
// Add box sizing if only the grid is loaded
|
|
29
|
+
box-sizing: if(
|
|
30
|
+
meta.variable-exists(include-column-box-sizing) and $include-column-box-sizing,
|
|
31
|
+
border-box,
|
|
32
|
+
null
|
|
33
|
+
);
|
|
34
|
+
// Prevent columns from becoming too narrow when at smaller grid tiers by
|
|
35
|
+
// always setting `width: 100%;`. This works because we set the width
|
|
36
|
+
// later on to override this initial width.
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
inline-size: 100%;
|
|
39
|
+
max-inline-size: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
|
|
40
|
+
padding-inline: calc(
|
|
41
|
+
var(--#{variables.$variable-prefix}gutter-x) * 0.5
|
|
42
|
+
); // stylelint-disable-line function-disallowed-list
|
|
43
|
+
margin-block-start: var(--#{variables.$variable-prefix}gutter-y);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin make-col($size: false, $columns: variables.$grid-columns) {
|
|
47
|
+
@if $size {
|
|
48
|
+
flex: 0 0 auto;
|
|
49
|
+
inline-size: math.percentage(functions.divide($size, $columns));
|
|
50
|
+
} @else {
|
|
51
|
+
flex: 1 1 0;
|
|
52
|
+
max-inline-size: 100%;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin make-col-auto() {
|
|
57
|
+
flex: 0 0 auto;
|
|
58
|
+
inline-size: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin make-col-offset($size, $columns: variables.$grid-columns) {
|
|
62
|
+
$num: functions.divide($size, $columns);
|
|
63
|
+
margin-inline-start: if($num == 0, 0, math.percentage($num));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Row columns
|
|
67
|
+
//
|
|
68
|
+
// Specify on a parent element(e.g., .row) to force immediate children into NN
|
|
69
|
+
// numberof columns. Supports wrapping to new lines, but does not do a Masonry
|
|
70
|
+
// style grid.
|
|
71
|
+
@mixin row-cols($count) {
|
|
72
|
+
> * {
|
|
73
|
+
flex: 0 0 auto;
|
|
74
|
+
inline-size: functions.divide(100%, $count);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Framework grid generation
|
|
79
|
+
//
|
|
80
|
+
// Used only by Bootstrap to generate the correct number of grid classes given
|
|
81
|
+
// any value of `$grid-columns`.
|
|
82
|
+
|
|
83
|
+
@mixin make-grid-columns(
|
|
84
|
+
$columns: variables.$grid-columns,
|
|
85
|
+
$gutter: variables.$grid-gutter-width,
|
|
86
|
+
$breakpoints: variables.$grid-breakpoints
|
|
87
|
+
) {
|
|
88
|
+
@each $breakpoint in map.keys($breakpoints) {
|
|
89
|
+
$infix: breakpoints.breakpoint-infix($breakpoint, $breakpoints);
|
|
90
|
+
|
|
91
|
+
@include breakpoints.media-breakpoint-up($breakpoint, $breakpoints) {
|
|
92
|
+
// Provide basic `.col-{bp}` classes for equal-width flexbox columns
|
|
93
|
+
.col#{$infix} {
|
|
94
|
+
flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.row-cols#{$infix}-auto > * {
|
|
98
|
+
@include make-col-auto();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@if variables.$grid-row-columns > 0 {
|
|
102
|
+
@for $i from 1 through variables.$grid-row-columns {
|
|
103
|
+
.row-cols#{$infix}-#{$i} {
|
|
104
|
+
@include row-cols($i);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.col#{$infix}-auto {
|
|
110
|
+
@include make-col-auto();
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@if $columns > 0 {
|
|
114
|
+
@for $i from 1 through $columns {
|
|
115
|
+
.col#{$infix}-#{$i} {
|
|
116
|
+
@include make-col($i, $columns);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// `$columns - 1` because offsetting by the width of an entire row isn't possible
|
|
121
|
+
@for $i from 0 through ($columns - 1) {
|
|
122
|
+
@if not($infix == '' and $i == 0) {
|
|
123
|
+
// Avoid emitting useless .offset-0
|
|
124
|
+
.offset#{$infix}-#{$i} {
|
|
125
|
+
@include make-col-offset($i, $columns);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Gutters
|
|
132
|
+
//
|
|
133
|
+
// Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
|
|
134
|
+
@each $key, $value in variables.$gutters {
|
|
135
|
+
.g#{$infix}-#{$key},
|
|
136
|
+
.gx#{$infix}-#{$key} {
|
|
137
|
+
--#{variables.$variable-prefix}gutter-x: #{$value};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.g#{$infix}-#{$key},
|
|
141
|
+
.gy#{$infix}-#{$key} {
|
|
142
|
+
--#{variables.$variable-prefix}gutter-y: #{$value};
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@mixin make-cssgrid($columns: variables.$grid-columns, $breakpoints: variables.$grid-breakpoints) {
|
|
150
|
+
@each $breakpoint in map.keys($breakpoints) {
|
|
151
|
+
$infix: breakpoints.breakpoint-infix($breakpoint, $breakpoints);
|
|
152
|
+
|
|
153
|
+
@include breakpoints.media-breakpoint-up($breakpoint, $breakpoints) {
|
|
154
|
+
@if $columns > 0 {
|
|
155
|
+
@for $i from 1 through $columns {
|
|
156
|
+
.g-col#{$infix}-#{$i} {
|
|
157
|
+
grid-column: auto / span $i;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// Start with `1` because `0` is and invalid value.
|
|
162
|
+
// Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
|
|
163
|
+
@for $i from 1 through ($columns - 1) {
|
|
164
|
+
.g-start#{$infix}-#{$i} {
|
|
165
|
+
grid-column-start: $i;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Image Mixins
|
|
2
|
+
// - Responsive image
|
|
3
|
+
// - Retina image
|
|
4
|
+
|
|
5
|
+
// Responsive image
|
|
6
|
+
//
|
|
7
|
+
// Keep images from scaling beyond the width of their parents.
|
|
8
|
+
|
|
9
|
+
@mixin img-fluid {
|
|
10
|
+
// Part 1: Set a maximum relative to the parent
|
|
11
|
+
max-inline-size: 100%;
|
|
12
|
+
// Part 2: Override the height to auto, otherwise images will be stretched
|
|
13
|
+
// when setting a width and height attribute on the img element.
|
|
14
|
+
block-size: auto;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@mixin reset-text {
|
|
4
|
+
font-family: variables.$font-family-base;
|
|
5
|
+
// We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
|
|
6
|
+
font-style: normal;
|
|
7
|
+
font-weight: variables.$font-weight-normal;
|
|
8
|
+
line-height: variables.$line-height-base;
|
|
9
|
+
text-align: start;
|
|
10
|
+
text-decoration: none;
|
|
11
|
+
text-shadow: none;
|
|
12
|
+
text-transform: none;
|
|
13
|
+
letter-spacing: normal;
|
|
14
|
+
word-break: normal;
|
|
15
|
+
word-spacing: normal;
|
|
16
|
+
white-space: normal;
|
|
17
|
+
line-break: auto;
|
|
18
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@mixin table-variant($state, $background) {
|
|
4
|
+
// Exact selectors below required to override `.table-striped` and prevent
|
|
5
|
+
// inheritance to nested tables.
|
|
6
|
+
.table-#{$state} {
|
|
7
|
+
&:last-child {
|
|
8
|
+
border-end-start-radius: variables.$border-radius;
|
|
9
|
+
border-end-end-radius: variables.$border-radius;
|
|
10
|
+
|
|
11
|
+
> *:first-child {
|
|
12
|
+
border-end-start-radius: inherit;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
> *:last-child {
|
|
16
|
+
border-end-end-radius: inherit;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&,
|
|
21
|
+
> :is(th, td) {
|
|
22
|
+
background-color: $background;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Hover states for `.table-hover`
|
|
27
|
+
// Note: this is not available for cells or rows within `thead` or `tfoot`.
|
|
28
|
+
.table-hover {
|
|
29
|
+
$hover-background: $background; // FIXME
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@use '../variables';
|
|
2
|
+
|
|
3
|
+
@use 'sass:list';
|
|
4
|
+
|
|
5
|
+
// stylelint-disable property-disallowed-list
|
|
6
|
+
@mixin transition($transition...) {
|
|
7
|
+
@if list.length($transition) == 0 {
|
|
8
|
+
$transition: variables.$transition-base;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@if list.length($transition) > 1 {
|
|
12
|
+
@each $value in $transition {
|
|
13
|
+
@if $value == null or $value == none {
|
|
14
|
+
@warn "The keyword 'none' or 'null' must be used as a single argument.";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@if list.nth($transition, 1) != null {
|
|
20
|
+
transition: $transition;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@if list.nth($transition, 1) != null and list.nth($transition, 1) != none {
|
|
24
|
+
@media (prefers-reduced-motion: reduce) {
|
|
25
|
+
transition: none;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|