@gettrx/core-styles 1.0.26 → 1.0.28

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/package.json +1 -1
  2. package/dist/assets/core-icons.json +0 -7512
  3. package/dist/assets/fonts/Gettrx-Icon.ttf +0 -0
  4. package/dist/assets/fonts/Gettrx-Icon.woff +0 -0
  5. package/dist/assets/fonts/Gettrx-Icon.woff2 +0 -0
  6. package/dist/assets/fonts/Roboto-Black.ttf +0 -0
  7. package/dist/assets/fonts/Roboto-BlackItalic.ttf +0 -0
  8. package/dist/assets/fonts/Roboto-Bold.ttf +0 -0
  9. package/dist/assets/fonts/Roboto-BoldItalic.ttf +0 -0
  10. package/dist/assets/fonts/Roboto-Italic.ttf +0 -0
  11. package/dist/assets/fonts/Roboto-Light.ttf +0 -0
  12. package/dist/assets/fonts/Roboto-LightItalic.ttf +0 -0
  13. package/dist/assets/fonts/Roboto-Medium.ttf +0 -0
  14. package/dist/assets/fonts/Roboto-MediumItalic.ttf +0 -0
  15. package/dist/assets/fonts/Roboto-Regular.ttf +0 -0
  16. package/dist/assets/fonts/Roboto-Thin.ttf +0 -0
  17. package/dist/assets/fonts/Roboto-ThinItalic.ttf +0 -0
  18. package/dist/assets/fonts/tabler-icons.eot +0 -0
  19. package/dist/assets/fonts/tabler-icons.ttf +0 -0
  20. package/dist/assets/fonts/tabler-icons.woff +0 -0
  21. package/dist/assets/fonts/tabler-icons.woff2 +0 -0
  22. package/dist/core-styles.css +0 -1
  23. package/dist/core-styles.scss +0 -12
  24. package/dist/styles/_font-face.scss +0 -77
  25. package/dist/styles/_functions.scss +0 -180
  26. package/dist/styles/_icons.scss +0 -1535
  27. package/dist/styles/_reboot.scss +0 -610
  28. package/dist/styles/_variables.scss +0 -1125
  29. package/dist/styles/components/_accordion.scss +0 -149
  30. package/dist/styles/components/_alert.scss +0 -68
  31. package/dist/styles/components/_badge.scss +0 -38
  32. package/dist/styles/components/_breadcrumb.scss +0 -40
  33. package/dist/styles/components/_button-group.scss +0 -142
  34. package/dist/styles/components/_buttons.scss +0 -192
  35. package/dist/styles/components/_card.scss +0 -239
  36. package/dist/styles/components/_carousel.scss +0 -209
  37. package/dist/styles/components/_close.scss +0 -56
  38. package/dist/styles/components/_dropdown.scss +0 -232
  39. package/dist/styles/components/_forms.scss +0 -9
  40. package/dist/styles/components/_images.scss +0 -42
  41. package/dist/styles/components/_list-group.scss +0 -197
  42. package/dist/styles/components/_modal.scss +0 -237
  43. package/dist/styles/components/_nav.scss +0 -209
  44. package/dist/styles/components/_navbar.scss +0 -268
  45. package/dist/styles/components/_pagination.scss +0 -109
  46. package/dist/styles/components/_placeholders.scss +0 -51
  47. package/dist/styles/components/_popover.scss +0 -196
  48. package/dist/styles/components/_progress.scss +0 -62
  49. package/dist/styles/components/_spinners.scss +0 -83
  50. package/dist/styles/components/_tables.scss +0 -171
  51. package/dist/styles/components/_toasts.scss +0 -73
  52. package/dist/styles/components/_tooltip.scss +0 -119
  53. package/dist/styles/components/_type.scss +0 -95
  54. package/dist/styles/components/forms/_floating-labels.scss +0 -94
  55. package/dist/styles/components/forms/_form-check.scss +0 -164
  56. package/dist/styles/components/forms/_form-control.scss +0 -216
  57. package/dist/styles/components/forms/_form-range.scss +0 -91
  58. package/dist/styles/components/forms/_form-select.scss +0 -69
  59. package/dist/styles/components/forms/_form-text.scss +0 -11
  60. package/dist/styles/components/forms/_input-group.scss +0 -132
  61. package/dist/styles/components/forms/_labels.scss +0 -36
  62. package/dist/styles/components/forms/_validation.scss +0 -12
  63. package/dist/styles/components/mixins/_alert.scss +0 -14
  64. package/dist/styles/components/mixins/_backdrop.scss +0 -14
  65. package/dist/styles/components/mixins/_banner.scss +0 -7
  66. package/dist/styles/components/mixins/_box-shadow.scss +0 -16
  67. package/dist/styles/components/mixins/_buttons.scss +0 -70
  68. package/dist/styles/components/mixins/_caret.scss +0 -68
  69. package/dist/styles/components/mixins/_clearfix.scss +0 -9
  70. package/dist/styles/components/mixins/_deprecate.scss +0 -10
  71. package/dist/styles/components/mixins/_forms.scss +0 -145
  72. package/dist/styles/components/mixins/_gradients.scss +0 -43
  73. package/dist/styles/components/mixins/_image.scss +0 -16
  74. package/dist/styles/components/mixins/_list-group.scss +0 -26
  75. package/dist/styles/components/mixins/_lists.scss +0 -7
  76. package/dist/styles/components/mixins/_pagination.scss +0 -10
  77. package/dist/styles/components/mixins/_reset-text.scss +0 -17
  78. package/dist/styles/components/mixins/_resize.scss +0 -6
  79. package/dist/styles/components/mixins/_table-variants.scss +0 -24
  80. package/dist/styles/components/mixins/_text-truncate.scss +0 -8
  81. package/dist/styles/components/mixins/_transition.scss +0 -24
  82. package/dist/styles/components/mixins/_visually-hidden.scss +0 -33
  83. package/dist/styles/css/gettrx.css +0 -13552
  84. package/dist/styles/functions/_color.functions.scss +0 -14
  85. package/dist/styles/functions/_grid.functions.scss +0 -41
  86. package/dist/styles/functions/_map.functions.scss +0 -36
  87. package/dist/styles/layout/_containers.scss +0 -43
  88. package/dist/styles/layout/_grid.scss +0 -26
  89. package/dist/styles/layout/_layout.scss +0 -2
  90. package/dist/styles/maps/_border.maps.scss +0 -24
  91. package/dist/styles/maps/_colors.maps.scss +0 -10
  92. package/dist/styles/maps/_fonts.maps.scss +0 -10
  93. package/dist/styles/maps/_layout.maps.scss +0 -33
  94. package/dist/styles/maps/_positions.maps.scss +0 -15
  95. package/dist/styles/maps/_shadow.maps.scss +0 -11
  96. package/dist/styles/maps/_spacing.maps.scss +0 -23
  97. package/dist/styles/mixins/_border-radius.mixins.scss +0 -61
  98. package/dist/styles/mixins/_breakpoints.mixins.scss +0 -129
  99. package/dist/styles/mixins/_container.mixins.scss +0 -13
  100. package/dist/styles/mixins/_grid.mixins.scss +0 -157
  101. package/dist/styles/mixins/_utilities.mixins.scss +0 -84
  102. package/dist/styles/utilities/_api.scss +0 -33
  103. package/dist/styles/utilities/_utilities.scss +0 -695
  104. package/dist/tokens/_tokens.scss +0 -216
  105. package/dist/tokens/tokens.css +0 -218
  106. package/dist/tokens/tokens.js +0 -216
@@ -1,14 +0,0 @@
1
- @function to-rgb($value) {
2
- @return red($value), green($value), blue($value);
3
- }
4
-
5
- @function rgba-css-var($identifier, $target) {
6
- @if $identifier == "body" and $target == "bg" {
7
- @return rgba(var(--gtr-#{$identifier}-bg-rgb), var(--gtr-#{$target}-opacity));
8
- }
9
- @if $identifier == "body" and $target == "text" {
10
- @return rgba(var(--gtr-#{$identifier}-color-rgb), var(--gtr-#{$target}-opacity));
11
- } @else {
12
- @return rgba(var(--gtr-#{$identifier}-rgb), var(--gtr-#{$target}-opacity));
13
- }
14
- }
@@ -1,41 +0,0 @@
1
- @function divide($dividend, $divisor, $precision: 10) {
2
- $sign: if($dividend > 0 and $divisor > 0 or $dividend < 0 and $divisor < 0, 1, -1);
3
- $dividend: abs($dividend);
4
- $divisor: abs($divisor);
5
- @if $dividend == 0 {
6
- @return 0;
7
- }
8
- @if $divisor == 0 {
9
- @error "Cannot divide by 0";
10
- }
11
- $remainder: $dividend;
12
- $result: 0;
13
- $factor: 10;
14
- @while ($remainder > 0 and $precision >= 0) {
15
- $quotient: 0;
16
- @while ($remainder >= $divisor) {
17
- $remainder: $remainder - $divisor;
18
- $quotient: $quotient + 1;
19
- }
20
- $result: $result * 10 + $quotient;
21
- $factor: $factor * .1;
22
- $remainder: $remainder * 10;
23
- $precision: $precision - 1;
24
- @if ($precision < 0 and $remainder >= $divisor * 5) {
25
- $result: $result + 1;
26
- }
27
- }
28
- $result: $result * $factor * $sign;
29
- $dividend-unit: unit($dividend);
30
- $divisor-unit: unit($divisor);
31
- $unit-map: (
32
- "px": 1px,
33
- "rem": 1rem,
34
- "em": 1em,
35
- "%": 1%
36
- );
37
- @if ($dividend-unit != $divisor-unit and map-has-key($unit-map, $dividend-unit)) {
38
- $result: $result * map-get($unit-map, $dividend-unit);
39
- }
40
- @return $result;
41
- }
@@ -1,36 +0,0 @@
1
- @use "color.functions" as *;
2
-
3
- @function map-loop($map, $func, $args...) {
4
- $_map: ();
5
-
6
- @each $key, $value in $map {
7
- // allow to pass the $key and $value of the map as an function argument
8
- $_args: ();
9
- @each $arg in $args {
10
- $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
11
- }
12
-
13
- $_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
14
- }
15
-
16
- @return $_map;
17
- }
18
-
19
- @function map-get-multiple($map, $values) {
20
- $result: ();
21
- @each $key, $value in $map {
22
- @if (index($values, $key) != null) {
23
- $result: map-merge($result, ($key: $value));
24
- }
25
- }
26
- @return $result;
27
- }
28
-
29
- @function map-merge-multiple($maps...) {
30
- $merged-maps: ();
31
-
32
- @each $map in $maps {
33
- $merged-maps: map-merge($merged-maps, $map);
34
- }
35
- @return $merged-maps;
36
- }
@@ -1,43 +0,0 @@
1
- @use "../functions/grid.functions" as grid-functions;
2
- @use "../mixins/container.mixins" as container-mixins;
3
- @use "../mixins/breakpoints.mixins" as breakpoints-mixins;
4
- @use "../maps/layout.maps" as layout-maps;
5
-
6
- // Container widths
7
- //
8
-
9
- // Single container class with breakpoint max-widths
10
- .container,
11
- // 100% wide container at all breakpoints
12
- .container-fluid {
13
- @include container-mixins.make-container();
14
- }
15
-
16
- // Responsive containers that are 100% wide until a breakpoint
17
- @each $breakpoint, $container-max-width in layout-maps.$container-max-widths {
18
- .container-#{$breakpoint} {
19
- @extend .container-fluid;
20
- }
21
-
22
- @include breakpoints-mixins.media-breakpoint-up($breakpoint, layout-maps.$grid-breakpoints) {
23
- %responsive-container-#{$breakpoint} {
24
- max-width: $container-max-width;
25
- }
26
-
27
- // Extend each breakpoint which is smaller or equal to the current breakpoint
28
- $extend-breakpoint: true;
29
-
30
- @each $name, $width in layout-maps.$grid-breakpoints {
31
- @if ($extend-breakpoint) {
32
- .container#{breakpoints-mixins.breakpoint-infix($name, layout-maps.$grid-breakpoints)} {
33
- @extend %responsive-container-#{$breakpoint};
34
- }
35
-
36
- // Once the current breakpoint is reached, stop extending
37
- @if ($breakpoint == $name) {
38
- $extend-breakpoint: false;
39
- }
40
- }
41
- }
42
- }
43
- }
@@ -1,26 +0,0 @@
1
- @use "../maps/layout.maps" as layout-maps;
2
- @use "../mixins/grid.mixins" as grid-mixins;
3
-
4
- // Row
5
- //
6
- // Rows contain your columns.
7
-
8
- :root {
9
- @each $name, $value in layout-maps.$grid-breakpoints {
10
- --gtr-breakpoint-#{$name}: #{$value};
11
- }
12
- }
13
-
14
- .row {
15
- @include grid-mixins.make-row();
16
-
17
- > * {
18
- @include grid-mixins.make-col-ready();
19
- }
20
- }
21
-
22
- // Columns
23
- //
24
- // Common styles for small and large grid columns
25
-
26
- @include grid-mixins.make-grid-columns();
@@ -1,2 +0,0 @@
1
- @forward "grid";
2
- @forward "containers";
@@ -1,24 +0,0 @@
1
- @use '../../tokens/tokens' as *;
2
-
3
- $border-width-map: (
4
- normal: $gtr-size-border-width-normal,
5
- medium: $gtr-size-border-width-medium,
6
- semibold: $gtr-size-border-width-semibold,
7
- bold: $gtr-size-border-width-bold,
8
- bolder: $gtr-size-border-width-bolder
9
- ) !default;
10
-
11
-
12
- // --gtr-size-border-radius: 1rem !default;
13
- $border-radius-map: (
14
- none: $gtr-size-border-radius-none, //0
15
- base: $gtr-size-border-radius-base, //8px
16
- xxs: $gtr-size-border-radius-xxs, //4px
17
- xs: $gtr-size-border-radius-xs, //4px
18
- sm: $gtr-size-border-radius-sm, //12px
19
- lg: $gtr-size-border-radius-lg, //16px
20
- xl: $gtr-size-border-radius-xl, //24px
21
- xxl: $gtr-size-border-radius-xxl, //32px
22
- pill: $gtr-size-border-radius-pill, //round
23
- ) !default;
24
-
@@ -1,10 +0,0 @@
1
- @use "../../tokens/tokens";
2
-
3
- $theme-colors: (
4
- "primary": tokens.$gtr-color-base-primary-base,
5
- "secondary": tokens.$gtr-color-base-secondary-base,
6
- "success": tokens.$gtr-color-base-success-base,
7
- "danger": tokens.$gtr-color-base-danger-base,
8
- "white": tokens.$gtr-color-base-white-base,
9
- "black": tokens.$gtr-color-base-black-base
10
- ) !default;
@@ -1,10 +0,0 @@
1
- @use "../../tokens/tokens";
2
-
3
- $font-size-map: (
4
- 1: tokens.$gtr-size-font-heading-1,
5
- 2: tokens.$gtr-size-font-heading-2,
6
- 3: tokens.$gtr-size-font-heading-3,
7
- 4: tokens.$gtr-size-font-heading-4,
8
- 5: tokens.$gtr-size-font-heading-5,
9
- 6: tokens.$gtr-size-font-heading-6
10
- ) !default;
@@ -1,33 +0,0 @@
1
- @use "../functions/grid.functions" as grid-functions;
2
- @use "../maps/spacing.maps" as spacing-maps;
3
- @use "../../tokens/tokens";
4
-
5
- // Grid breakpoints
6
- //
7
- // Define the minimum dimensions at which your layout will change,
8
- // adapting to different screen sizes, for use in media queries.
9
-
10
- $grid-breakpoints: (
11
- xs: tokens.$gtr-size-layout-breakpoints-xs,
12
- sm: tokens.$gtr-size-layout-breakpoints-sm,
13
- md: tokens.$gtr-size-layout-breakpoints-md,
14
- lg: tokens.$gtr-size-layout-breakpoints-lg,
15
- xl: tokens.$gtr-size-layout-breakpoints-xl,
16
- xxl: tokens.$gtr-size-layout-breakpoints-xxl
17
- ) !default;
18
-
19
-
20
- // Grid containers
21
- //
22
- // Define the maximum width of `.container` for different screen sizes.
23
-
24
- $container-max-widths: (
25
- sm: tokens.$gtr-size-layout-container-max-width-sm,
26
- md: tokens.$gtr-size-layout-container-max-width-md,
27
- lg: tokens.$gtr-size-layout-container-max-width-lg,
28
- xl: tokens.$gtr-size-layout-container-max-width-xl,
29
- xxl: tokens.$gtr-size-layout-container-max-width-xxl
30
- ) !default;
31
-
32
-
33
- $gutters: spacing-maps.$spacers !default;
@@ -1,15 +0,0 @@
1
- @use "../../tokens/tokens";
2
-
3
- $position-value-map: (
4
- 0: tokens.$gtr-component-position-0,
5
- 50: tokens.$gtr-component-position-50,
6
- 100: tokens.$gtr-component-position-100
7
- ) !default;
8
-
9
- $zindex-level-map: (
10
- n1: -1,
11
- 0: 0,
12
- 1: 1,
13
- 2: 2,
14
- 3: 3
15
- ) !default;
@@ -1,11 +0,0 @@
1
- $shadow-map: () !default;
2
- $shadow-map: (
3
- base: $gtr-content-shadow-base,
4
- 20: $gtr-content-shadow-20,
5
- 30: $gtr-content-shadow-30,
6
- 40: $gtr-content-shadow-40,
7
- 50: $gtr-content-shadow-50,
8
- 60: $gtr-content-shadow-60,
9
- 70: $gtr-content-shadow-70,
10
- 80: $gtr-content-shadow-80
11
- );
@@ -1,23 +0,0 @@
1
- @use '../../tokens/tokens';
2
-
3
- // --gtr-size-spacing-base: 1rem
4
- $spacers: (
5
- 0: tokens.$gtr-size-spacing-none,
6
- base: tokens.$gtr-size-spacing-base,
7
- 1: tokens.$gtr-size-spacing-1, // 4px
8
- 2: tokens.$gtr-size-spacing-2, // 8px
9
- 3: tokens.$gtr-size-spacing-3, // 12px
10
- 4: tokens.$gtr-size-spacing-4, // 16px
11
- 5: tokens.$gtr-size-spacing-5, // 24px
12
- 6: tokens.$gtr-size-spacing-6, // 28px
13
- 7: tokens.$gtr-size-spacing-7, // 32px
14
- 8: tokens.$gtr-size-spacing-8, // 40px
15
- 9: tokens.$gtr-size-spacing-9, // 48px
16
- 10: tokens.$gtr-size-spacing-10, // 56px
17
- 11: tokens.$gtr-size-spacing-11, // 64px
18
- 12: tokens.$gtr-size-spacing-12, // 72px
19
- 13: tokens.$gtr-size-spacing-13, // 80px
20
- 14: tokens.$gtr-size-spacing-14, // 88px
21
- 15: tokens.$gtr-size-spacing-15, // 96px
22
- 16: tokens.$gtr-size-spacing-16, // 160px
23
- ) !default;
@@ -1,61 +0,0 @@
1
- // stylelint-disable property-disallowed-list
2
- // Single side border-radius
3
-
4
- // Helper function to replace negative values with 0
5
- @function valid-radius($radius) {
6
- $return: ();
7
- @each $value in $radius {
8
- @if type-of($value) == number {
9
- $return: append($return, max($value, 0));
10
- } @else {
11
- $return: append($return, $value);
12
- }
13
- }
14
- @return $return;
15
- }
16
-
17
- // scss-docs-start border-radius-mixins
18
- @mixin border-radius($radius: $gtr-size-border-radius-base, $fallback-border-radius: false) {
19
- border-radius: valid-radius($radius);
20
- @if $fallback-border-radius != false {
21
- border-radius: $fallback-border-radius;
22
- }
23
- }
24
-
25
- @mixin border-top-radius($radius: $gtr-size-border-radius-base) {
26
- border-top-left-radius: valid-radius($radius);
27
- border-top-right-radius: valid-radius($radius);
28
- }
29
-
30
- @mixin border-end-radius($radius: $gtr-size-border-radius-base) {
31
- border-top-right-radius: valid-radius($radius);
32
- border-bottom-right-radius: valid-radius($radius);
33
- }
34
-
35
- @mixin border-bottom-radius($radius: $gtr-size-border-radius-base) {
36
- border-bottom-right-radius: valid-radius($radius);
37
- border-bottom-left-radius: valid-radius($radius);
38
- }
39
-
40
- @mixin border-start-radius($radius: $gtr-size-border-radius-base) {
41
- border-top-left-radius: valid-radius($radius);
42
- border-bottom-left-radius: valid-radius($radius);
43
- }
44
-
45
- @mixin border-top-start-radius($radius: $gtr-size-border-radius-base) {
46
- border-top-left-radius: valid-radius($radius);
47
- }
48
-
49
- @mixin border-top-end-radius($radius: $gtr-size-border-radius-base) {
50
- border-top-right-radius: valid-radius($radius);
51
- }
52
-
53
- @mixin border-bottom-end-radius($radius: $gtr-size-border-radius-base) {
54
- border-bottom-right-radius: valid-radius($radius);
55
- }
56
-
57
- @mixin border-bottom-start-radius($radius: $gtr-size-border-radius-base) {
58
- border-bottom-left-radius: valid-radius($radius);
59
- }
60
-
61
- // scss-docs-end border-radius-mixins
@@ -1,129 +0,0 @@
1
- @use "../maps/layout.maps" as layout-maps;
2
-
3
- // Breakpoint viewport sizes and media queries.
4
- //
5
- // Breakpoints are defined as a map of (name: minimum width), order from small to large:
6
- //
7
- // (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px)
8
- //
9
- // The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.
10
-
11
- // Name of the next breakpoint, or null for the last breakpoint.
12
- //
13
- // >> breakpoint-next(sm)
14
- // md
15
- // >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
16
- // md
17
- // >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl xxl))
18
- // md
19
- @function breakpoint-next($name, $breakpoints: layout-maps.$grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {
20
- $n: index($breakpoint-names, $name);
21
- @if not $n {
22
- @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
23
- }
24
- @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);
25
- }
26
-
27
- // Minimum breakpoint width. Null for the smallest (first) breakpoint.
28
- //
29
- // >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
30
- // 576px
31
- @function breakpoint-min($name, $breakpoints: layout-maps.$grid-breakpoints) {
32
- $min: map-get($breakpoints, $name);
33
- @return if($min != 0, $min, null);
34
- }
35
-
36
- // Maximum breakpoint width.
37
- // The maximum value is reduced by 0.02px to work around the limitations of
38
- // `min-` and `max-` prefixes and viewports with fractional widths.
39
- // See https://www.w3.org/TR/mediaqueries-4/#mq-min-max
40
- // Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.
41
- // See https://bugs.webkit.org/show_bug.cgi?id=178261
42
- //
43
- // >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
44
- // 767.98px
45
- @function breakpoint-max($name, $breakpoints: layout-maps.$grid-breakpoints) {
46
- $max: map-get($breakpoints, $name);
47
- @return if($max and $max > 0, $max - .02, null);
48
- }
49
-
50
- // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
51
- // Useful for making responsive utilities.
52
- //
53
- // >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
54
- // "" (Returns a blank string)
55
- // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
56
- // "-sm"
57
- @function breakpoint-infix($name, $breakpoints: layout-maps.$grid-breakpoints) {
58
- @return if(breakpoint-min($name, $breakpoints) == null, "", "-#{$name}");
59
- }
60
-
61
- // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.
62
- // Makes the @content apply to the given breakpoint and wider.
63
- @mixin media-breakpoint-up($name, $breakpoints: layout-maps.$grid-breakpoints) {
64
- $min: breakpoint-min($name, $breakpoints);
65
- @if $min {
66
- @media (min-width: $min) {
67
- @content;
68
- }
69
- } @else {
70
- @content;
71
- }
72
- }
73
-
74
- // Media of at most the maximum breakpoint width. No query for the largest breakpoint.
75
- // Makes the @content apply to the given breakpoint and narrower.
76
- @mixin media-breakpoint-down($name, $breakpoints: layout-maps.$grid-breakpoints) {
77
- $max: breakpoint-max($name, $breakpoints);
78
- @if $max {
79
- @media (max-width: $max) {
80
- @content;
81
- }
82
- } @else {
83
- @content;
84
- }
85
- }
86
-
87
- // Media that spans multiple breakpoint widths.
88
- // Makes the @content apply between the min and max breakpoints
89
- @mixin media-breakpoint-between($lower, $upper, $breakpoints: layout-maps.$grid-breakpoints) {
90
- $min: breakpoint-min($lower, $breakpoints);
91
- $max: breakpoint-max($upper, $breakpoints);
92
-
93
- @if $min != null and $max != null {
94
- @media (min-width: $min) and (max-width: $max) {
95
- @content;
96
- }
97
- } @else if $max == null {
98
- @include media-breakpoint-up($lower, $breakpoints) {
99
- @content;
100
- }
101
- } @else if $min == null {
102
- @include media-breakpoint-down($upper, $breakpoints) {
103
- @content;
104
- }
105
- }
106
- }
107
-
108
- // Media between the breakpoint's minimum and maximum widths.
109
- // No minimum for the smallest breakpoint, and no maximum for the largest one.
110
- // Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.
111
- @mixin media-breakpoint-only($name, $breakpoints: layout-maps.$grid-breakpoints) {
112
- $min: breakpoint-min($name, $breakpoints);
113
- $next: breakpoint-next($name, $breakpoints);
114
- $max: breakpoint-max($next, $breakpoints);
115
-
116
- @if $min != null and $max != null {
117
- @media (min-width: $min) and (max-width: $max) {
118
- @content;
119
- }
120
- } @else if $max == null {
121
- @include media-breakpoint-up($name, $breakpoints) {
122
- @content;
123
- }
124
- } @else if $min == null {
125
- @include media-breakpoint-down($next, $breakpoints) {
126
- @content;
127
- }
128
- }
129
- }
@@ -1,13 +0,0 @@
1
- @use "../../tokens/tokens";
2
-
3
- // Container mixins
4
-
5
- @mixin make-container($gutter: tokens.$gtr-content-layout-container-padding-x) {
6
- --gtr-gutter-x: #{$gutter};
7
- --gtr-gutter-y: 0;
8
- width: 100%;
9
- padding-right: calc(var(--gtr-gutter-x) * .5);
10
- padding-left: calc(var(--gtr-gutter-x) * .5);
11
- margin-right: auto;
12
- margin-left: auto;
13
- }
@@ -1,157 +0,0 @@
1
- @use "../functions/grid.functions" as grid-functions;
2
- @use "../mixins/breakpoints.mixins" as breakpoints-mixins;
3
- @use "../maps/layout.maps" as layout-maps;
4
- @use "../../tokens/tokens";
5
-
6
- // Grid system
7
- //
8
- // Generate semantic grid columns with these mixins.
9
-
10
- @mixin make-row($gutter: tokens.$gtr-size-layout-grid-gutter-width) {
11
- --gtr-gutter-x: #{$gutter};
12
- --gtr-gutter-y: 0;
13
- display: flex;
14
- flex-wrap: wrap;
15
- margin-top: calc(-1 * var(--gtr-gutter-y)); // stylelint-disable-line function-disallowed-list
16
- margin-right: calc(-.5 * var(--gtr-gutter-x)); // stylelint-disable-line function-disallowed-list
17
- margin-left: calc(-.5 * var(--gtr-gutter-x)); // stylelint-disable-line function-disallowed-list
18
- }
19
-
20
- @mixin make-col-ready() {
21
- // Add box sizing if only the grid is loaded
22
- box-sizing: if(variable-exists(include-column-box-sizing), border-box, null);
23
- // Prevent columns from becoming too narrow when at smaller grid tiers by
24
- // always setting `width: 100%;`. This works because we set the width
25
- // later on to override this initial width.
26
- flex-shrink: 0;
27
- width: 100%;
28
- max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid
29
- padding-right: calc(var(--gtr-gutter-x) * .5); // stylelint-disable-line function-disallowed-list
30
- padding-left: calc(var(--gtr-gutter-x) * .5); // stylelint-disable-line function-disallowed-list
31
- margin-top: var(--gtr-gutter-y);
32
- }
33
-
34
- @mixin make-col($size: false, $columns: tokens.$gtr-content-layout-grid-columns) {
35
- @if $size {
36
- flex: 0 0 auto;
37
- width: percentage(grid-functions.divide($size, $columns));
38
-
39
- } @else {
40
- flex: 1 1 0;
41
- max-width: 100%;
42
- }
43
- }
44
-
45
- @mixin make-col-auto() {
46
- flex: 0 0 auto;
47
- width: auto;
48
- }
49
-
50
- @mixin make-col-offset($size, $columns: tokens.$gtr-content-layout-grid-columns) {
51
- $num: grid-functions.divide($size, $columns);
52
- margin-left: if($num == 0, 0, percentage($num));
53
- }
54
-
55
- // Row columns
56
- //
57
- // Specify on a parent element(e.g., .row) to force immediate children into NN
58
- // number of columns. Supports wrapping to new lines, but does not do a Masonry
59
- // style grid.
60
- @mixin row-cols($count) {
61
- > * {
62
- flex: 0 0 auto;
63
- width: grid-functions.divide(100%, $count);
64
- }
65
- }
66
-
67
- // Framework grid generation
68
- //
69
- // Used only by Bootstrap to generate the correct number of grid classes given
70
- // any value of `$gtr-content-layout-grid-columns`.
71
-
72
- @mixin make-grid-columns(
73
- $columns: 12,
74
- $gutter: tokens.$gtr-size-layout-grid-gutter-width,
75
- $breakpoints: layout-maps.$grid-breakpoints,
76
- $row-columns: 6) {
77
- @each $breakpoint in map-keys($breakpoints) {
78
- $infix: breakpoints-mixins.breakpoint-infix($breakpoint, $breakpoints);
79
-
80
- @include breakpoints-mixins.media-breakpoint-up($breakpoint, $breakpoints) {
81
- // Provide basic `.col-{bp}` classes for equal-width flexbox columns
82
- .col#{$infix} {
83
- flex: 1 0 0; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4
84
- }
85
-
86
- .row-cols#{$infix}-auto > * {
87
- @include make-col-auto();
88
- }
89
-
90
- @for $i from 1 through $row-columns {
91
- .row-cols#{$infix}-#{$i} {
92
- @include row-cols($i);
93
- }
94
- }
95
-
96
- .col#{$infix}-auto {
97
- @include make-col-auto();
98
- }
99
-
100
- @if $columns > 0 {
101
- @for $i from 1 through $columns {
102
- .col#{$infix}-#{$i} {
103
- @include make-col($i, $columns);
104
- }
105
- }
106
-
107
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
108
- @for $i from 0 through ($columns - 1) {
109
- @if not ($infix == "" and $i == 0) { // Avoid emitting useless .offset-0
110
- .offset#{$infix}-#{$i} {
111
- @include make-col-offset($i, $columns);
112
- }
113
- }
114
- }
115
- }
116
-
117
- // Gutters
118
- //
119
- // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.
120
- @each $key, $value in layout-maps.$gutters {
121
- .g#{$infix}-#{$key},
122
- .gx#{$infix}-#{$key} {
123
- --gtr-gutter-x: #{$value};
124
- }
125
-
126
- .g#{$infix}-#{$key},
127
- .gy#{$infix}-#{$key} {
128
- --gtr-gutter-y: #{$value};
129
- }
130
- }
131
- }
132
- }
133
- }
134
-
135
- @mixin make-cssgrid($columns: tokens.$gtr-content-layout-grid-columns, $breakpoints: layout-maps.$grid-breakpoints) {
136
- @each $breakpoint in map-keys($breakpoints) {
137
- $infix: breakpoints-mixins.breakpoint-infix($breakpoint, $breakpoints);
138
-
139
- @include breakpoints-mixins.media-breakpoint-up($breakpoint, $breakpoints) {
140
- @if $columns > 0 {
141
- @for $i from 1 through $columns {
142
- .g-col#{$infix}-#{$i} {
143
- grid-column: auto / span $i;
144
- }
145
- }
146
-
147
- // Start with `1` because `0` is and invalid value.
148
- // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.
149
- @for $i from 1 through ($columns - 1) {
150
- .g-start#{$infix}-#{$i} {
151
- grid-column-start: $i;
152
- }
153
- }
154
- }
155
- }
156
- }
157
- }