@gettrx/core-styles 1.0.28 → 1.0.30

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.
Files changed (106) hide show
  1. package/dist/assets/core-icons.json +7512 -0
  2. package/dist/assets/fonts/Gettrx-Icon.ttf +0 -0
  3. package/dist/assets/fonts/Gettrx-Icon.woff +0 -0
  4. package/dist/assets/fonts/Gettrx-Icon.woff2 +0 -0
  5. package/dist/assets/fonts/Roboto-Black.ttf +0 -0
  6. package/dist/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  7. package/dist/assets/fonts/Roboto-Bold.ttf +0 -0
  8. package/dist/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  9. package/dist/assets/fonts/Roboto-Italic.ttf +0 -0
  10. package/dist/assets/fonts/Roboto-Light.ttf +0 -0
  11. package/dist/assets/fonts/Roboto-LightItalic.ttf +0 -0
  12. package/dist/assets/fonts/Roboto-Medium.ttf +0 -0
  13. package/dist/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  14. package/dist/assets/fonts/Roboto-Regular.ttf +0 -0
  15. package/dist/assets/fonts/Roboto-Thin.ttf +0 -0
  16. package/dist/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  17. package/dist/assets/fonts/tabler-icons.eot +0 -0
  18. package/dist/assets/fonts/tabler-icons.ttf +0 -0
  19. package/dist/assets/fonts/tabler-icons.woff +0 -0
  20. package/dist/assets/fonts/tabler-icons.woff2 +0 -0
  21. package/dist/core-styles.css +1 -0
  22. package/dist/core-styles.scss +12 -0
  23. package/dist/styles/_font-face.scss +77 -0
  24. package/dist/styles/_functions.scss +180 -0
  25. package/dist/styles/_icons.scss +1535 -0
  26. package/dist/styles/_reboot.scss +610 -0
  27. package/dist/styles/_variables.scss +1125 -0
  28. package/dist/styles/components/_accordion.scss +149 -0
  29. package/dist/styles/components/_alert.scss +68 -0
  30. package/dist/styles/components/_badge.scss +38 -0
  31. package/dist/styles/components/_breadcrumb.scss +40 -0
  32. package/dist/styles/components/_button-group.scss +142 -0
  33. package/dist/styles/components/_buttons.scss +192 -0
  34. package/dist/styles/components/_card.scss +239 -0
  35. package/dist/styles/components/_carousel.scss +209 -0
  36. package/dist/styles/components/_close.scss +56 -0
  37. package/dist/styles/components/_dropdown.scss +232 -0
  38. package/dist/styles/components/_forms.scss +9 -0
  39. package/dist/styles/components/_images.scss +42 -0
  40. package/dist/styles/components/_list-group.scss +197 -0
  41. package/dist/styles/components/_modal.scss +237 -0
  42. package/dist/styles/components/_nav.scss +209 -0
  43. package/dist/styles/components/_navbar.scss +268 -0
  44. package/dist/styles/components/_pagination.scss +109 -0
  45. package/dist/styles/components/_placeholders.scss +51 -0
  46. package/dist/styles/components/_popover.scss +196 -0
  47. package/dist/styles/components/_progress.scss +62 -0
  48. package/dist/styles/components/_spinners.scss +83 -0
  49. package/dist/styles/components/_tables.scss +171 -0
  50. package/dist/styles/components/_toasts.scss +73 -0
  51. package/dist/styles/components/_tooltip.scss +119 -0
  52. package/dist/styles/components/_type.scss +95 -0
  53. package/dist/styles/components/forms/_floating-labels.scss +94 -0
  54. package/dist/styles/components/forms/_form-check.scss +164 -0
  55. package/dist/styles/components/forms/_form-control.scss +216 -0
  56. package/dist/styles/components/forms/_form-range.scss +91 -0
  57. package/dist/styles/components/forms/_form-select.scss +69 -0
  58. package/dist/styles/components/forms/_form-text.scss +11 -0
  59. package/dist/styles/components/forms/_input-group.scss +132 -0
  60. package/dist/styles/components/forms/_labels.scss +36 -0
  61. package/dist/styles/components/forms/_validation.scss +12 -0
  62. package/dist/styles/components/mixins/_alert.scss +14 -0
  63. package/dist/styles/components/mixins/_backdrop.scss +14 -0
  64. package/dist/styles/components/mixins/_banner.scss +7 -0
  65. package/dist/styles/components/mixins/_box-shadow.scss +16 -0
  66. package/dist/styles/components/mixins/_buttons.scss +70 -0
  67. package/dist/styles/components/mixins/_caret.scss +68 -0
  68. package/dist/styles/components/mixins/_clearfix.scss +9 -0
  69. package/dist/styles/components/mixins/_deprecate.scss +10 -0
  70. package/dist/styles/components/mixins/_forms.scss +145 -0
  71. package/dist/styles/components/mixins/_gradients.scss +43 -0
  72. package/dist/styles/components/mixins/_image.scss +16 -0
  73. package/dist/styles/components/mixins/_list-group.scss +26 -0
  74. package/dist/styles/components/mixins/_lists.scss +7 -0
  75. package/dist/styles/components/mixins/_pagination.scss +10 -0
  76. package/dist/styles/components/mixins/_reset-text.scss +17 -0
  77. package/dist/styles/components/mixins/_resize.scss +6 -0
  78. package/dist/styles/components/mixins/_table-variants.scss +24 -0
  79. package/dist/styles/components/mixins/_text-truncate.scss +8 -0
  80. package/dist/styles/components/mixins/_transition.scss +24 -0
  81. package/dist/styles/components/mixins/_visually-hidden.scss +33 -0
  82. package/dist/styles/css/gettrx.css +13552 -0
  83. package/dist/styles/functions/_color.functions.scss +14 -0
  84. package/dist/styles/functions/_grid.functions.scss +41 -0
  85. package/dist/styles/functions/_map.functions.scss +36 -0
  86. package/dist/styles/layout/_containers.scss +43 -0
  87. package/dist/styles/layout/_grid.scss +26 -0
  88. package/dist/styles/layout/_layout.scss +2 -0
  89. package/dist/styles/maps/_border.maps.scss +24 -0
  90. package/dist/styles/maps/_colors.maps.scss +10 -0
  91. package/dist/styles/maps/_fonts.maps.scss +10 -0
  92. package/dist/styles/maps/_layout.maps.scss +33 -0
  93. package/dist/styles/maps/_positions.maps.scss +15 -0
  94. package/dist/styles/maps/_shadow.maps.scss +11 -0
  95. package/dist/styles/maps/_spacing.maps.scss +23 -0
  96. package/dist/styles/mixins/_border-radius.mixins.scss +61 -0
  97. package/dist/styles/mixins/_breakpoints.mixins.scss +129 -0
  98. package/dist/styles/mixins/_container.mixins.scss +13 -0
  99. package/dist/styles/mixins/_grid.mixins.scss +157 -0
  100. package/dist/styles/mixins/_utilities.mixins.scss +84 -0
  101. package/dist/styles/utilities/_api.scss +33 -0
  102. package/dist/styles/utilities/_utilities.scss +695 -0
  103. package/dist/tokens/_tokens.scss +216 -0
  104. package/dist/tokens/tokens.css +218 -0
  105. package/dist/tokens/tokens.js +216 -0
  106. package/package.json +1 -1
@@ -0,0 +1,70 @@
1
+ // Button variants
2
+ //
3
+ // Easily pump out default styles, as well as :hover, :focus, :active,
4
+ // and disabled options for all buttons
5
+
6
+ // scss-docs-start btn-variant-mixin
7
+ @mixin button-variant(
8
+ $background,
9
+ $border,
10
+ $color: color-contrast($background),
11
+ $hover-background: if($color == $gtr-color-base-white-100, shade-color($background, $btn-hover-bg-shade-amount), tint-color($background, $btn-hover-bg-tint-amount)),
12
+ $hover-border: if($color == $gtr-color-base-white-100, shade-color($border, $btn-hover-border-shade-amount), tint-color($border, $btn-hover-border-tint-amount)),
13
+ $hover-color: color-contrast($hover-background),
14
+ $active-background: if($color == $gtr-color-base-white-100, shade-color($background, $btn-active-bg-shade-amount), tint-color($background, $btn-active-bg-tint-amount)),
15
+ $active-border: if($color == $gtr-color-base-white-100, shade-color($border, $btn-active-border-shade-amount), tint-color($border, $btn-active-border-tint-amount)),
16
+ $active-color: color-contrast($active-background),
17
+ $disabled-background: $background,
18
+ $disabled-border: $border,
19
+ $disabled-color: color-contrast($disabled-background)
20
+ ) {
21
+ --gtr-btn-color: #{$color};
22
+ --gtr-btn-bg: #{$background};
23
+ --gtr-btn-border-color: #{$border};
24
+ --gtr-btn-hover-color: #{$hover-color};
25
+ --gtr-btn-hover-bg: #{$hover-background};
26
+ --gtr-btn-hover-border-color: #{$hover-border};
27
+ --gtr-btn-focus-shadow-rgb: #{to-rgb(mix($color, $border, 15%))};
28
+ --gtr-btn-active-color: #{$active-color};
29
+ --gtr-btn-active-bg: #{$active-background};
30
+ --gtr-btn-active-border-color: #{$active-border};
31
+ --gtr-btn-active-shadow: #{$btn-active-box-shadow};
32
+ --gtr-btn-disabled-color: #{$disabled-color};
33
+ --gtr-btn-disabled-bg: #{$disabled-background};
34
+ --gtr-btn-disabled-border-color: #{$disabled-border};
35
+ }
36
+ // scss-docs-end btn-variant-mixin
37
+
38
+ // scss-docs-start btn-outline-variant-mixin
39
+ @mixin button-outline-variant(
40
+ $color,
41
+ $color-hover: color-contrast($color),
42
+ $active-background: $color,
43
+ $active-border: $color,
44
+ $active-color: color-contrast($active-background)
45
+ ) {
46
+ --gtr-btn-color: #{$color};
47
+ --gtr-btn-border-color: #{$color};
48
+ --gtr-btn-hover-color: #{$color-hover};
49
+ --gtr-btn-hover-bg: #{$active-background};
50
+ --gtr-btn-hover-border-color: #{$active-border};
51
+ --gtr-btn-focus-shadow-rgb: #{to-rgb($color)};
52
+ --gtr-btn-active-color: #{$active-color};
53
+ --gtr-btn-active-bg: #{$active-background};
54
+ --gtr-btn-active-border-color: #{$active-border};
55
+ --gtr-btn-active-shadow: #{$btn-active-box-shadow};
56
+ --gtr-btn-disabled-color: #{$color};
57
+ --gtr-btn-disabled-bg: transparent;
58
+ --gtr-btn-disabled-border-color: #{$color};
59
+ --gtr-gradient: none;
60
+ }
61
+ // scss-docs-end btn-outline-variant-mixin
62
+
63
+ // scss-docs-start btn-size-mixin
64
+ @mixin button-size($padding-y, $padding-x, $font-size, $border-radius) {
65
+ --gtr-btn-padding-y: #{$padding-y};
66
+ --gtr-btn-padding-x: #{$padding-x};
67
+ --gtr-btn-font-size: $font-size;
68
+ --gtr-btn-border-radius: #{$border-radius};
69
+ }
70
+ // scss-docs-end btn-size-mixin
@@ -0,0 +1,68 @@
1
+ // scss-docs-start caret-mixins
2
+ @mixin caret-down($width: $caret-width) {
3
+ border-top: $width solid;
4
+ border-right: $width solid transparent;
5
+ border-bottom: 0;
6
+ border-left: $width solid transparent;
7
+ }
8
+
9
+ @mixin caret-up($width: $caret-width) {
10
+ border-top: 0;
11
+ border-right: $width solid transparent;
12
+ border-bottom: $width solid;
13
+ border-left: $width solid transparent;
14
+ }
15
+
16
+ @mixin caret-end($width: $caret-width) {
17
+ border-top: $width solid transparent;
18
+ border-right: 0;
19
+ border-bottom: $width solid transparent;
20
+ border-left: $width solid;
21
+ }
22
+
23
+ @mixin caret-start($width: $caret-width) {
24
+ border-top: $width solid transparent;
25
+ border-right: $width solid;
26
+ border-bottom: $width solid transparent;
27
+ }
28
+
29
+ @mixin caret(
30
+ $direction: down,
31
+ $width: $caret-width,
32
+ $spacing: $caret-spacing,
33
+ $vertical-align: $caret-vertical-align
34
+ ) {
35
+ &::after {
36
+ display: inline-block;
37
+ margin-left: $spacing;
38
+ vertical-align: $vertical-align;
39
+ content: "";
40
+ @if $direction == down {
41
+ @include caret-down($width);
42
+ } @else if $direction == up {
43
+ @include caret-up($width);
44
+ } @else if $direction == end {
45
+ @include caret-end($width);
46
+ }
47
+ }
48
+
49
+ @if $direction == start {
50
+ &::after {
51
+ display: none;
52
+ }
53
+
54
+ &::before {
55
+ display: inline-block;
56
+ margin-right: $spacing;
57
+ vertical-align: $vertical-align;
58
+ content: "";
59
+ @include caret-start($width);
60
+ }
61
+ }
62
+
63
+ &:empty::after {
64
+ margin-left: 0;
65
+ }
66
+ }
67
+
68
+ // scss-docs-end caret-mixins
@@ -0,0 +1,9 @@
1
+ // scss-docs-start clearfix
2
+ @mixin clearfix() {
3
+ &::after {
4
+ display: block;
5
+ clear: both;
6
+ content: "";
7
+ }
8
+ }
9
+ // scss-docs-end clearfix
@@ -0,0 +1,10 @@
1
+ // Deprecate mixin
2
+ //
3
+ // This mixin can be used to deprecate mixins or functions.
4
+ // `$enable-deprecation-messages` is a global variable, `$ignore-warning` is a variable that can be passed to
5
+ // some deprecated mixins to suppress the warning (for example if the mixin is still be used in the current version of Bootstrap)
6
+ @mixin deprecate($name, $deprecate-version, $remove-version, $ignore-warning: false) {
7
+ @if ($enable-deprecation-messages != false and $ignore-warning != true) {
8
+ @warn "#{$name} has been deprecated as of #{$deprecate-version}. It will be removed entirely in #{$remove-version}.";
9
+ }
10
+ }
@@ -0,0 +1,145 @@
1
+ // This mixin uses an `if()` technique to be compatible with Dart Sass
2
+ // See https://github.com/sass/sass/issues/1873#issuecomment-152293725 for more details
3
+
4
+ // scss-docs-start form-validation-mixins
5
+ @mixin form-validation-state-selector($state) {
6
+ @if ($state == "valid" or $state == "invalid") {
7
+ .was-validated #{if(&, "&", "")}:#{$state},
8
+ #{if(&, "&", "")}.is-#{$state} {
9
+ @content;
10
+ }
11
+ } @else {
12
+ #{if(&, "&", "")}.is-#{$state} {
13
+ @content;
14
+ }
15
+ }
16
+ }
17
+
18
+ @mixin form-validation-state(
19
+ $state,
20
+ $color,
21
+ $icon,
22
+ $tooltip-color: color-contrast($color),
23
+ $tooltip-bg-color: rgba($color, $form-feedback-tooltip-opacity),
24
+ $focus-box-shadow: 0 0 $input-btn-focus-blur $input-focus-width rgba($color, $input-btn-focus-color-opacity),
25
+ $border-color: $color
26
+ ) {
27
+ .#{$state}-feedback {
28
+ display: none;
29
+ width: 100%;
30
+ margin-top: $form-feedback-margin-top;
31
+ font-size: $form-feedback-font-size;
32
+ font-style: $form-feedback-font-style;
33
+ color: $color;
34
+ }
35
+
36
+ .#{$state}-tooltip {
37
+ position: absolute;
38
+ top: 100%;
39
+ z-index: 5;
40
+ display: none;
41
+ max-width: 100%; // Contain to parent when possible
42
+ padding: $form-feedback-tooltip-padding-y $form-feedback-tooltip-padding-x;
43
+ margin-top: .1rem;
44
+ font-size: $form-feedback-tooltip-font-size;
45
+ line-height: $form-feedback-tooltip-line-height;
46
+ color: $tooltip-color;
47
+ background-color: $tooltip-bg-color;
48
+ @include border-radius($form-feedback-tooltip-border-radius);
49
+ }
50
+
51
+ @include form-validation-state-selector($state) {
52
+ ~ .#{$state}-feedback,
53
+ ~ .#{$state}-tooltip {
54
+ display: block;
55
+ }
56
+ }
57
+
58
+ .form-control {
59
+ @include form-validation-state-selector($state) {
60
+ border-color: $border-color;
61
+
62
+ padding-right: $input-height-inner;
63
+ background-image: escape-svg($icon);
64
+ background-repeat: no-repeat;
65
+ background-position: right $input-height-inner-quarter center;
66
+ background-size: $input-height-inner-half $input-height-inner-half;
67
+
68
+ &:focus {
69
+ border-color: $border-color;
70
+ box-shadow: $focus-box-shadow;
71
+ }
72
+ }
73
+ }
74
+
75
+ // stylelint-disable-next-line selector-no-qualifying-type
76
+ textarea.form-control {
77
+ @include form-validation-state-selector($state) {
78
+ padding-right: $input-height-inner;
79
+ background-position: top $input-height-inner-quarter right $input-height-inner-quarter;
80
+ }
81
+ }
82
+
83
+ .form-select {
84
+ @include form-validation-state-selector($state) {
85
+ border-color: $border-color;
86
+
87
+ &:not([multiple]):not([size]),
88
+ &:not([multiple])[size="1"] {
89
+ --gtr-form-select-bg-icon: #{escape-svg($icon)};
90
+ padding-right: $form-select-feedback-icon-padding-end;
91
+ background-position: $form-select-bg-position, $form-select-feedback-icon-position;
92
+ background-size: $form-select-bg-size, $form-select-feedback-icon-size;
93
+ }
94
+
95
+ &:focus {
96
+ border-color: $border-color;
97
+ box-shadow: $focus-box-shadow;
98
+ }
99
+ }
100
+ }
101
+
102
+ .form-control-color {
103
+ @include form-validation-state-selector($state) {
104
+ width: add($form-color-width, $input-height-inner);
105
+ }
106
+ }
107
+
108
+ .form-check-input {
109
+ @include form-validation-state-selector($state) {
110
+ border-color: $border-color;
111
+
112
+ &:checked {
113
+ background-color: $color;
114
+ }
115
+
116
+ &:focus {
117
+ box-shadow: $focus-box-shadow;
118
+ }
119
+
120
+ ~ .form-check-label {
121
+ color: $color;
122
+ }
123
+ }
124
+ }
125
+ .form-check-inline .form-check-input {
126
+ ~ .#{$state}-feedback {
127
+ margin-left: .5em;
128
+ }
129
+ }
130
+
131
+ .input-group {
132
+ > .form-control:not(:focus),
133
+ > .form-select:not(:focus),
134
+ > .form-floating:not(:focus-within) {
135
+ @include form-validation-state-selector($state) {
136
+ @if $state == "valid" {
137
+ z-index: 3;
138
+ } @else if $state == "invalid" {
139
+ z-index: 4;
140
+ }
141
+ }
142
+ }
143
+ }
144
+ }
145
+ // scss-docs-end form-validation-mixins
@@ -0,0 +1,43 @@
1
+ // Gradients
2
+
3
+ // scss-docs-start gradient-bg-mixin
4
+ @mixin gradient-bg($color: null) {
5
+ background-color: $color;
6
+ }
7
+ // scss-docs-end gradient-bg-mixin
8
+
9
+ // scss-docs-start gradient-mixins
10
+ // Horizontal gradient, from left to right
11
+ //
12
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
13
+ @mixin gradient-x($start-color: $gray-700, $end-color: $gray-800, $start-percent: 0%, $end-percent: 100%) {
14
+ background-image: linear-gradient(to right, $start-color $start-percent, $end-color $end-percent);
15
+ }
16
+
17
+ // Vertical gradient, from top to bottom
18
+ //
19
+ // Creates two color stops, start and end, by specifying a color and position for each color stop.
20
+ @mixin gradient-y($start-color: $gray-700, $end-color: $gray-800, $start-percent: null, $end-percent: null) {
21
+ background-image: linear-gradient(to bottom, $start-color $start-percent, $end-color $end-percent);
22
+ }
23
+
24
+ @mixin gradient-directional($start-color: $gray-700, $end-color: $gray-800, $deg: 45deg) {
25
+ background-image: linear-gradient($deg, $start-color, $end-color);
26
+ }
27
+
28
+ @mixin gradient-x-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
29
+ background-image: linear-gradient(to right, $start-color, $mid-color $color-stop, $end-color);
30
+ }
31
+
32
+ @mixin gradient-y-three-colors($start-color: $blue, $mid-color: $purple, $color-stop: 50%, $end-color: $red) {
33
+ background-image: linear-gradient($start-color, $mid-color $color-stop, $end-color);
34
+ }
35
+
36
+ @mixin gradient-radial($inner-color: $gray-700, $outer-color: $gray-800) {
37
+ background-image: radial-gradient(circle, $inner-color, $outer-color);
38
+ }
39
+
40
+ @mixin gradient-striped($color: rgba($white, .15), $angle: 45deg) {
41
+ background-image: linear-gradient($angle, $color 25%, transparent 25%, transparent 50%, $color 50%, $color 75%, transparent 75%, transparent);
42
+ }
43
+ // scss-docs-end gradient-mixins
@@ -0,0 +1,16 @@
1
+ // Image Mixins
2
+ // - Responsive image
3
+ // - Retina image
4
+
5
+
6
+ // Responsive image
7
+ //
8
+ // Keep images from scaling beyond the width of their parents.
9
+
10
+ @mixin img-fluid {
11
+ // Part 1: Set a maximum relative to the parent
12
+ max-width: 100%;
13
+ // Part 2: Override the height to auto, otherwise images will be stretched
14
+ // when setting a width and height attribute on the img element.
15
+ height: auto;
16
+ }
@@ -0,0 +1,26 @@
1
+ @include deprecate("`list-group-item-variant()`", "v5.3.0", "v6.0.0");
2
+
3
+ // List Groups
4
+
5
+ // scss-docs-start list-group-mixin
6
+ @mixin list-group-item-variant($state, $background, $color) {
7
+ .list-group-item-#{$state} {
8
+ color: $color;
9
+ background-color: $background;
10
+
11
+ &.list-group-item-action {
12
+ &:hover,
13
+ &:focus {
14
+ color: $color;
15
+ background-color: shade-color($background, 10%);
16
+ }
17
+
18
+ &.active {
19
+ color: $white;
20
+ background-color: $color;
21
+ border-color: $color;
22
+ }
23
+ }
24
+ }
25
+ }
26
+ // scss-docs-end list-group-mixin
@@ -0,0 +1,7 @@
1
+ // Lists
2
+
3
+ // Unstyled keeps list items block level, just removes default browser padding and list-style
4
+ @mixin list-unstyled {
5
+ padding-left: 0;
6
+ list-style: none;
7
+ }
@@ -0,0 +1,10 @@
1
+ // Pagination
2
+
3
+ // scss-docs-start pagination-mixin
4
+ @mixin pagination-size($padding-y, $padding-x, $font-size, $border-radius) {
5
+ --gtr-pagination-padding-x: #{$padding-x};
6
+ --gtr-pagination-padding-y: #{$padding-y};
7
+ --gtr-pagination-font-size: $font-size;
8
+ --gtr-pagination-border-radius: #{$border-radius};
9
+ }
10
+ // scss-docs-end pagination-mixin
@@ -0,0 +1,17 @@
1
+ @mixin reset-text {
2
+ font-family: $gtr-component-font-family-base;
3
+ // We deliberately do NOT reset font-size or overflow-wrap / word-wrap.
4
+ font-style: normal;
5
+ font-weight: $gtr-size-font-weight-normal;
6
+ line-height: $gtr-component-font-line-height-base;
7
+ text-align: left; // Fallback for where `start` is not supported
8
+ text-align: start;
9
+ text-decoration: none;
10
+ text-shadow: none;
11
+ text-transform: none;
12
+ letter-spacing: normal;
13
+ word-break: normal;
14
+ white-space: normal;
15
+ word-spacing: normal;
16
+ line-break: auto;
17
+ }
@@ -0,0 +1,6 @@
1
+ // Resize anything
2
+
3
+ @mixin resizable($direction) {
4
+ overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible`
5
+ resize: $direction; // Options: horizontal, vertical, both
6
+ }
@@ -0,0 +1,24 @@
1
+ // scss-docs-start table-variant
2
+ @mixin table-variant($state, $background) {
3
+ .table-#{$state} {
4
+ $color: color-contrast(opaque($body-bg, $background));
5
+ $hover-bg: mix($color, $background, percentage($table-hover-bg-factor));
6
+ $striped-bg: mix($color, $background, percentage($table-striped-bg-factor));
7
+ $active-bg: mix($color, $background, percentage($table-active-bg-factor));
8
+ $table-border-color: mix($color, $background, percentage($table-border-factor));
9
+
10
+ --gtr-table-color: #{$color};
11
+ --gtr-table-bg: #{$background};
12
+ --gtr-table-border-color: #{$table-border-color};
13
+ --gtr-table-striped-bg: #{$striped-bg};
14
+ --gtr-table-striped-color: #{color-contrast($striped-bg)};
15
+ --gtr-table-active-bg: #{$active-bg};
16
+ --gtr-table-active-color: #{color-contrast($active-bg)};
17
+ --gtr-table-hover-bg: #{$hover-bg};
18
+ --gtr-table-hover-color: #{color-contrast($hover-bg)};
19
+
20
+ color: var(--gtr-table-color);
21
+ border-color: var(--gtr-table-border-color);
22
+ }
23
+ }
24
+ // scss-docs-end table-variant
@@ -0,0 +1,8 @@
1
+ // Text truncate
2
+ // Requires inline-block or block for proper styling
3
+
4
+ @mixin text-truncate() {
5
+ overflow: hidden;
6
+ text-overflow: ellipsis;
7
+ white-space: nowrap;
8
+ }
@@ -0,0 +1,24 @@
1
+ // stylelint-disable property-disallowed-list
2
+ @mixin transition($transition...) {
3
+ @if length($transition) == 0 {
4
+ $transition: $transition-base;
5
+ }
6
+
7
+ @if length($transition) > 1 {
8
+ @each $value in $transition {
9
+ @if $value == null or $value == none {
10
+ @warn "The keyword 'none' or 'null' must be used as a single argument.";
11
+ }
12
+ }
13
+ }
14
+
15
+ @if nth($transition, 1) != null {
16
+ transition: $transition;
17
+ }
18
+
19
+ @if nth($transition, 1) != null and nth($transition, 1) != none {
20
+ @media (prefers-reduced-motion: reduce) {
21
+ transition: none;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,33 @@
1
+ // stylelint-disable declaration-no-important
2
+
3
+ // Hide content visually while keeping it accessible to assistive technologies
4
+ //
5
+ // See: https://www.a11yproject.com/posts/2013-01-11-how-to-hide-content/
6
+ // See: https://kittygiraudel.com/2016/10/13/css-hide-and-seek/
7
+
8
+ @mixin visually-hidden() {
9
+ width: 1px !important;
10
+ height: 1px !important;
11
+ padding: 0 !important;
12
+ margin: -1px !important; // Fix for https://github.com/twbs/bootstrap/issues/25686
13
+ overflow: hidden !important;
14
+ clip: rect(0, 0, 0, 0) !important;
15
+ white-space: nowrap !important;
16
+ border: 0 !important;
17
+
18
+ // Fix for positioned table caption that could become anonymous cells
19
+ &:not(caption) {
20
+ position: absolute !important;
21
+ }
22
+ }
23
+
24
+ // Use to only display content when it's focused, or one of its child elements is focused
25
+ // (i.e. when focus is within the element/container that the class was applied to)
26
+ //
27
+ // Useful for "Skip to main content" links; see https://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
28
+
29
+ @mixin visually-hidden-focusable() {
30
+ &:not(:focus):not(:focus-within) {
31
+ @include visually-hidden();
32
+ }
33
+ }