@gettrx/core-styles 1.0.28 → 1.0.29
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/dist/assets/core-icons.json +7512 -0
- package/dist/assets/fonts/Gettrx-Icon.ttf +0 -0
- package/dist/assets/fonts/Gettrx-Icon.woff +0 -0
- package/dist/assets/fonts/Gettrx-Icon.woff2 +0 -0
- package/dist/assets/fonts/Roboto-Black.ttf +0 -0
- package/dist/assets/fonts/Roboto-BlackItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Bold.ttf +0 -0
- package/dist/assets/fonts/Roboto-BoldItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Italic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Light.ttf +0 -0
- package/dist/assets/fonts/Roboto-LightItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Medium.ttf +0 -0
- package/dist/assets/fonts/Roboto-MediumItalic.ttf +0 -0
- package/dist/assets/fonts/Roboto-Regular.ttf +0 -0
- package/dist/assets/fonts/Roboto-Thin.ttf +0 -0
- package/dist/assets/fonts/Roboto-ThinItalic.ttf +0 -0
- package/dist/assets/fonts/tabler-icons.eot +0 -0
- package/dist/assets/fonts/tabler-icons.ttf +0 -0
- package/dist/assets/fonts/tabler-icons.woff +0 -0
- package/dist/assets/fonts/tabler-icons.woff2 +0 -0
- package/dist/core-styles.css +1 -0
- package/dist/core-styles.scss +12 -0
- package/dist/styles/_font-face.scss +77 -0
- package/dist/styles/_functions.scss +180 -0
- package/dist/styles/_icons.scss +1535 -0
- package/dist/styles/_reboot.scss +610 -0
- package/dist/styles/_variables.scss +1125 -0
- package/dist/styles/components/_accordion.scss +149 -0
- package/dist/styles/components/_alert.scss +68 -0
- package/dist/styles/components/_badge.scss +38 -0
- package/dist/styles/components/_breadcrumb.scss +40 -0
- package/dist/styles/components/_button-group.scss +142 -0
- package/dist/styles/components/_buttons.scss +192 -0
- package/dist/styles/components/_card.scss +239 -0
- package/dist/styles/components/_carousel.scss +209 -0
- package/dist/styles/components/_close.scss +56 -0
- package/dist/styles/components/_dropdown.scss +232 -0
- package/dist/styles/components/_forms.scss +9 -0
- package/dist/styles/components/_images.scss +42 -0
- package/dist/styles/components/_list-group.scss +197 -0
- package/dist/styles/components/_modal.scss +237 -0
- package/dist/styles/components/_nav.scss +209 -0
- package/dist/styles/components/_navbar.scss +268 -0
- package/dist/styles/components/_pagination.scss +109 -0
- package/dist/styles/components/_placeholders.scss +51 -0
- package/dist/styles/components/_popover.scss +196 -0
- package/dist/styles/components/_progress.scss +62 -0
- package/dist/styles/components/_spinners.scss +83 -0
- package/dist/styles/components/_tables.scss +171 -0
- package/dist/styles/components/_toasts.scss +73 -0
- package/dist/styles/components/_tooltip.scss +119 -0
- package/dist/styles/components/_type.scss +95 -0
- package/dist/styles/components/forms/_floating-labels.scss +94 -0
- package/dist/styles/components/forms/_form-check.scss +164 -0
- package/dist/styles/components/forms/_form-control.scss +216 -0
- package/dist/styles/components/forms/_form-range.scss +91 -0
- package/dist/styles/components/forms/_form-select.scss +69 -0
- package/dist/styles/components/forms/_form-text.scss +11 -0
- package/dist/styles/components/forms/_input-group.scss +132 -0
- package/dist/styles/components/forms/_labels.scss +36 -0
- package/dist/styles/components/forms/_validation.scss +12 -0
- package/dist/styles/components/mixins/_alert.scss +14 -0
- package/dist/styles/components/mixins/_backdrop.scss +14 -0
- package/dist/styles/components/mixins/_banner.scss +7 -0
- package/dist/styles/components/mixins/_box-shadow.scss +16 -0
- package/dist/styles/components/mixins/_buttons.scss +70 -0
- package/dist/styles/components/mixins/_caret.scss +68 -0
- package/dist/styles/components/mixins/_clearfix.scss +9 -0
- package/dist/styles/components/mixins/_deprecate.scss +10 -0
- package/dist/styles/components/mixins/_forms.scss +145 -0
- package/dist/styles/components/mixins/_gradients.scss +43 -0
- package/dist/styles/components/mixins/_image.scss +16 -0
- package/dist/styles/components/mixins/_list-group.scss +26 -0
- package/dist/styles/components/mixins/_lists.scss +7 -0
- package/dist/styles/components/mixins/_pagination.scss +10 -0
- package/dist/styles/components/mixins/_reset-text.scss +17 -0
- package/dist/styles/components/mixins/_resize.scss +6 -0
- package/dist/styles/components/mixins/_table-variants.scss +24 -0
- package/dist/styles/components/mixins/_text-truncate.scss +8 -0
- package/dist/styles/components/mixins/_transition.scss +24 -0
- package/dist/styles/components/mixins/_visually-hidden.scss +33 -0
- package/dist/styles/css/gettrx.css +13552 -0
- package/dist/styles/functions/_color.functions.scss +14 -0
- package/dist/styles/functions/_grid.functions.scss +41 -0
- package/dist/styles/functions/_map.functions.scss +36 -0
- package/dist/styles/layout/_containers.scss +43 -0
- package/dist/styles/layout/_grid.scss +26 -0
- package/dist/styles/layout/_layout.scss +2 -0
- package/dist/styles/maps/_border.maps.scss +24 -0
- package/dist/styles/maps/_colors.maps.scss +10 -0
- package/dist/styles/maps/_fonts.maps.scss +10 -0
- package/dist/styles/maps/_layout.maps.scss +33 -0
- package/dist/styles/maps/_positions.maps.scss +15 -0
- package/dist/styles/maps/_shadow.maps.scss +11 -0
- package/dist/styles/maps/_spacing.maps.scss +23 -0
- package/dist/styles/mixins/_border-radius.mixins.scss +61 -0
- package/dist/styles/mixins/_breakpoints.mixins.scss +129 -0
- package/dist/styles/mixins/_container.mixins.scss +13 -0
- package/dist/styles/mixins/_grid.mixins.scss +157 -0
- package/dist/styles/mixins/_utilities.mixins.scss +84 -0
- package/dist/styles/utilities/_api.scss +33 -0
- package/dist/styles/utilities/_utilities.scss +695 -0
- package/dist/tokens/_tokens.scss +216 -0
- package/dist/tokens/tokens.css +218 -0
- package/dist/tokens/tokens.js +216 -0
- package/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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();
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,33 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
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;
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
|
@@ -0,0 +1,129 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
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
|
+
}
|