@gitlab/ui 32.24.1 → 32.28.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/CHANGELOG.md +28 -0
- package/dist/components/base/banner/banner.js +10 -1
- package/dist/components/base/breadcrumb/breadcrumb.js +10 -2
- package/dist/index.css +2 -2
- package/dist/index.css.map +1 -1
- package/dist/utility_classes.css +1 -1
- package/dist/utility_classes.css.map +1 -1
- package/package.json +4 -4
- package/scss_to_js/scss_variables.js +5 -4
- package/scss_to_js/scss_variables.json +40 -8
- package/src/components/base/banner/banner.stories.js +8 -0
- package/src/components/base/banner/banner.vue +9 -1
- package/src/components/base/breadcrumb/breadcrumb.scss +18 -2
- package/src/components/base/breadcrumb/breadcrumb.stories.js +1 -4
- package/src/components/base/breadcrumb/breadcrumb.vue +22 -11
- package/src/components/base/dropdown/dropdown.scss +2 -0
- package/src/components/base/form/form_select/form_select.scss +1 -0
- package/src/components/base/label/label.scss +4 -0
- package/src/components/base/pagination/pagination.scss +1 -1
- package/src/components/base/search_box_by_click/search_box_by_click.scss +1 -0
- package/src/components/base/segmented_control/segmented_control.scss +1 -0
- package/src/components/base/table/table.scss +1 -0
- package/src/components/base/toast/toast.scss +1 -0
- package/src/components/base/tooltip/tooltip.scss +1 -0
- package/src/scss/mixins.scss +49 -1
- package/src/scss/mixins.spec.scss +103 -0
- package/src/scss/utilities.scss +176 -168
- package/src/scss/utility-mixins/border.scss +1 -1
- package/src/scss/utility-mixins/color.scss +1 -1
- package/src/scss/utility-mixins/display.scss +17 -17
- package/src/scss/utility-mixins/flex.scss +26 -26
- package/src/scss/utility-mixins/position.scss +4 -0
- package/src/scss/utility-mixins/sizing.scss +5 -5
- package/src/scss/utility-mixins/spacing.scss +33 -33
- package/src/scss/utility-mixins/typography.scss +1 -1
- package/src/scss/variables.scss +13 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitlab/ui",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.28.0",
|
|
4
4
|
"description": "GitLab UI Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@babel/core": "^7.10.2",
|
|
84
84
|
"@babel/preset-env": "^7.10.2",
|
|
85
85
|
"@gitlab/eslint-plugin": "9.4.0",
|
|
86
|
-
"@gitlab/stylelint-config": "2.
|
|
86
|
+
"@gitlab/stylelint-config": "2.6.0",
|
|
87
87
|
"@gitlab/svgs": "1.218.0",
|
|
88
88
|
"@rollup/plugin-commonjs": "^11.1.0",
|
|
89
89
|
"@rollup/plugin-node-resolve": "^7.1.3",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"sass-true": "^5.0.0",
|
|
143
143
|
"start-server-and-test": "^1.10.6",
|
|
144
144
|
"storybook-readme": "5.0.9",
|
|
145
|
-
"stylelint-config-prettier": "
|
|
146
|
-
"stylelint-prettier": "1.
|
|
145
|
+
"stylelint-config-prettier": "9.0.3",
|
|
146
|
+
"stylelint-prettier": "1.2.0",
|
|
147
147
|
"vue": "^2.6.11",
|
|
148
148
|
"vue-jest": "4.0.0-rc.0",
|
|
149
149
|
"vue-loader": "^15.8.3",
|
|
@@ -15,10 +15,11 @@ export const glSpacingScale12 = '5rem'
|
|
|
15
15
|
export const glSpacingScale13 = '6rem'
|
|
16
16
|
export const glSpacingScale15 = '7.5rem'
|
|
17
17
|
export const glSpacingScale20 = '10rem'
|
|
18
|
-
export const breakpointSm = '
|
|
19
|
-
export const breakpointMd = '
|
|
20
|
-
export const breakpointLg = '
|
|
21
|
-
export const breakpointXl = '
|
|
18
|
+
export const breakpointSm = '576px'
|
|
19
|
+
export const breakpointMd = '768px'
|
|
20
|
+
export const breakpointLg = '992px'
|
|
21
|
+
export const breakpointXl = '1200px'
|
|
22
|
+
export const breakpoints = '(xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)'
|
|
22
23
|
export const limitedLayoutWidth = '990px'
|
|
23
24
|
export const black = '#000'
|
|
24
25
|
export const blackNormal = '#333'
|
|
@@ -87,23 +87,55 @@
|
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
"name": "$breakpoint-sm",
|
|
90
|
-
"value": "
|
|
91
|
-
"compiledValue": "
|
|
90
|
+
"value": "576px",
|
|
91
|
+
"compiledValue": "576px"
|
|
92
92
|
},
|
|
93
93
|
{
|
|
94
94
|
"name": "$breakpoint-md",
|
|
95
|
-
"value": "
|
|
96
|
-
"compiledValue": "
|
|
95
|
+
"value": "768px",
|
|
96
|
+
"compiledValue": "768px"
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
"name": "$breakpoint-lg",
|
|
100
|
-
"value": "
|
|
101
|
-
"compiledValue": "
|
|
100
|
+
"value": "992px",
|
|
101
|
+
"compiledValue": "992px"
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
104
|
"name": "$breakpoint-xl",
|
|
105
|
-
"value": "
|
|
106
|
-
"compiledValue": "
|
|
105
|
+
"value": "1200px",
|
|
106
|
+
"compiledValue": "1200px"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "$breakpoints",
|
|
110
|
+
"value": "( xs: 0, sm: $breakpoint-sm, md: $breakpoint-md, lg: $breakpoint-lg, xl: $breakpoint-xl, )",
|
|
111
|
+
"mapValue": [
|
|
112
|
+
{
|
|
113
|
+
"name": "xs",
|
|
114
|
+
"value": "0",
|
|
115
|
+
"compiledValue": "0"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"name": "sm",
|
|
119
|
+
"value": "$breakpoint-sm",
|
|
120
|
+
"compiledValue": "576px"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"name": "md",
|
|
124
|
+
"value": "$breakpoint-md",
|
|
125
|
+
"compiledValue": "768px"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"name": "lg",
|
|
129
|
+
"value": "$breakpoint-lg",
|
|
130
|
+
"compiledValue": "992px"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "xl",
|
|
134
|
+
"value": "$breakpoint-xl",
|
|
135
|
+
"compiledValue": "1200px"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"compiledValue": "(xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)"
|
|
107
139
|
},
|
|
108
140
|
{
|
|
109
141
|
"name": "$limited-layout-width",
|
|
@@ -11,6 +11,7 @@ const template = `
|
|
|
11
11
|
:button-link="buttonLink"
|
|
12
12
|
:svg-path="svgPath"
|
|
13
13
|
:variant="variant"
|
|
14
|
+
:embedded="embedded"
|
|
14
15
|
>
|
|
15
16
|
<p>GitLab Service Desk is a simple way to allow people to create issues in your GitLab instance without needing their own user account. It provides a unique email address for end users to create issues in a project, and replies can be sent either though the GitLab interface or by email. End users will only see the thread though email.</p>
|
|
16
17
|
</gl-banner>
|
|
@@ -22,12 +23,14 @@ const generateProps = ({
|
|
|
22
23
|
buttonLink = 'https://gitlab.com',
|
|
23
24
|
svgPath = serviceDeskCalloutSvg,
|
|
24
25
|
variant = GlBanner.props.variant.default,
|
|
26
|
+
embedded = false,
|
|
25
27
|
} = {}) => ({
|
|
26
28
|
title,
|
|
27
29
|
buttonText,
|
|
28
30
|
buttonLink,
|
|
29
31
|
svgPath,
|
|
30
32
|
variant,
|
|
33
|
+
embedded,
|
|
31
34
|
});
|
|
32
35
|
|
|
33
36
|
const Template = (args, { argTypes }) => ({
|
|
@@ -51,6 +54,11 @@ Introduction.args = generateProps({
|
|
|
51
54
|
variant: bannerVariants[1],
|
|
52
55
|
});
|
|
53
56
|
|
|
57
|
+
export const Embedded = Template.bind({});
|
|
58
|
+
Embedded.args = generateProps({
|
|
59
|
+
embedded: true,
|
|
60
|
+
});
|
|
61
|
+
|
|
54
62
|
export const WithActions = (args, { argTypes }) => ({
|
|
55
63
|
components: {
|
|
56
64
|
GlBanner,
|
|
@@ -51,6 +51,14 @@ export default {
|
|
|
51
51
|
return bannerVariants.includes(value);
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
|
+
/**
|
|
55
|
+
* Removes the border for banners embedded in content.
|
|
56
|
+
*/
|
|
57
|
+
embedded: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: null,
|
|
61
|
+
},
|
|
54
62
|
},
|
|
55
63
|
computed: {
|
|
56
64
|
isIntroducing() {
|
|
@@ -83,7 +91,7 @@ export default {
|
|
|
83
91
|
<template>
|
|
84
92
|
<gl-card
|
|
85
93
|
class="gl-px-8 gl-py-6 gl-line-height-20"
|
|
86
|
-
:class="{ 'gl-banner-introduction': isIntroducing }"
|
|
94
|
+
:class="{ 'gl-banner-introduction': isIntroducing, 'gl-border-none!': embedded }"
|
|
87
95
|
body-class="gl-display-flex gl-p-0!"
|
|
88
96
|
>
|
|
89
97
|
<div v-if="svgPath" class="gl-banner-illustration">
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
$breadcrumb-max-width: $grid-size * 16;
|
|
3
3
|
|
|
4
4
|
.gl-breadcrumbs {
|
|
5
|
+
@include gl-display-flex;
|
|
5
6
|
@include gl-border-0;
|
|
6
7
|
@include gl-inset-border-b-1-gray-200;
|
|
7
8
|
@include gl-py-5;
|
|
@@ -20,10 +21,12 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
20
21
|
|
|
21
22
|
.gl-breadcrumb-separator {
|
|
22
23
|
@include gl-display-inline-flex;
|
|
24
|
+
@include gl-absolute;
|
|
25
|
+
right: 0;
|
|
23
26
|
|
|
24
27
|
> svg {
|
|
25
28
|
@include gl-my-auto;
|
|
26
|
-
@include gl-mx-
|
|
29
|
+
@include gl-mx-2;
|
|
27
30
|
@include gl-w-3;
|
|
28
31
|
@include gl-text-gray-500;
|
|
29
32
|
@include gl-fill-current-color;
|
|
@@ -31,7 +34,7 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
.gl-breadcrumb-avatar-tile {
|
|
34
|
-
@include gl-mr-
|
|
37
|
+
@include gl-mr-3;
|
|
35
38
|
@include gl-border-1;
|
|
36
39
|
@include gl-border-solid;
|
|
37
40
|
@include gl-border-gray-200;
|
|
@@ -42,8 +45,21 @@ $breadcrumb-max-width: $grid-size * 16;
|
|
|
42
45
|
.gl-breadcrumb-item {
|
|
43
46
|
@include gl-font-sm;
|
|
44
47
|
@include gl-line-height-normal;
|
|
48
|
+
@include gl-relative;
|
|
49
|
+
@include gl-pr-6;
|
|
50
|
+
|
|
51
|
+
+ .gl-breadcrumb-item {
|
|
52
|
+
@include gl-pl-0;
|
|
53
|
+
|
|
54
|
+
&::before {
|
|
55
|
+
content: '';
|
|
56
|
+
@include gl-display-none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
45
59
|
|
|
46
60
|
> a {
|
|
61
|
+
@include gl-display-flex;
|
|
62
|
+
@include gl-align-items-center;
|
|
47
63
|
@include gl-text-gray-500;
|
|
48
64
|
@include media-breakpoint-down(xs) {
|
|
49
65
|
@include str-truncated($breadcrumb-max-width);
|
|
@@ -6,10 +6,7 @@ const template = `
|
|
|
6
6
|
:items="items"
|
|
7
7
|
>
|
|
8
8
|
<template #avatar>
|
|
9
|
-
<img class="gl-breadcrumb-avatar-tile" src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=
|
|
10
|
-
</template>
|
|
11
|
-
<template #separator>
|
|
12
|
-
<gl-icon name="angle-right" />
|
|
9
|
+
<img class="gl-breadcrumb-avatar-tile" src="https://assets.gitlab-static.net/uploads/-/system/group/avatar/9970/logo-extra-whitespace.png?width=16" width="16" height="16" />
|
|
13
10
|
</template>
|
|
14
11
|
</gl-breadcrumb>
|
|
15
12
|
`;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import { BBreadcrumb, BBreadcrumbItem } from 'bootstrap-vue';
|
|
3
|
+
import GlIcon from '../icon/icon.vue';
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
components: {
|
|
6
7
|
BBreadcrumb,
|
|
7
8
|
BBreadcrumbItem,
|
|
9
|
+
GlIcon,
|
|
8
10
|
},
|
|
9
11
|
inheritAttrs: false,
|
|
10
12
|
props: {
|
|
@@ -23,13 +25,18 @@ export default {
|
|
|
23
25
|
},
|
|
24
26
|
},
|
|
25
27
|
},
|
|
28
|
+
methods: {
|
|
29
|
+
isLastItem(items, index) {
|
|
30
|
+
return index === items.length - 1;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
26
33
|
};
|
|
27
34
|
</script>
|
|
28
35
|
<template>
|
|
29
36
|
<div class="gl-breadcrumbs">
|
|
37
|
+
<!-- @slot The avatar to display. -->
|
|
38
|
+
<slot name="avatar"></slot>
|
|
30
39
|
<b-breadcrumb class="gl-breadcrumb-list" v-bind="$attrs" v-on="$listeners">
|
|
31
|
-
<!-- @slot The avatar to display. -->
|
|
32
|
-
<slot name="avatar"></slot>
|
|
33
40
|
<template v-for="(item, index) in items">
|
|
34
41
|
<b-breadcrumb-item
|
|
35
42
|
:key="index"
|
|
@@ -37,16 +44,20 @@ export default {
|
|
|
37
44
|
:text="item.text"
|
|
38
45
|
:href="item.href"
|
|
39
46
|
:to="item.to"
|
|
40
|
-
/>
|
|
41
|
-
<span
|
|
42
|
-
v-if="index != items.length - 1"
|
|
43
|
-
:key="`index ${item.text}`"
|
|
44
|
-
class="gl-breadcrumb-separator"
|
|
45
|
-
data-testid="separator"
|
|
46
47
|
>
|
|
47
|
-
|
|
48
|
-
<
|
|
49
|
-
|
|
48
|
+
<span>{{ item.text }}</span>
|
|
49
|
+
<span
|
|
50
|
+
v-if="!isLastItem(items, index)"
|
|
51
|
+
:key="`${index} ${item.text}`"
|
|
52
|
+
class="gl-breadcrumb-separator"
|
|
53
|
+
data-testid="separator"
|
|
54
|
+
>
|
|
55
|
+
<!-- @slot The separator to display. -->
|
|
56
|
+
<slot name="separator">
|
|
57
|
+
<gl-icon name="chevron-right" />
|
|
58
|
+
</slot>
|
|
59
|
+
</span>
|
|
60
|
+
</b-breadcrumb-item>
|
|
50
61
|
</template>
|
|
51
62
|
</b-breadcrumb>
|
|
52
63
|
</div>
|
|
@@ -33,6 +33,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
33
33
|
&:hover {
|
|
34
34
|
@include gl-reset-color;
|
|
35
35
|
@include gl-shadow-none;
|
|
36
|
+
|
|
36
37
|
.gl-label-text-scoped {
|
|
37
38
|
@include gl-text-decoration-underline;
|
|
38
39
|
}
|
|
@@ -62,6 +63,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
62
63
|
@include gl-opacity-5;
|
|
63
64
|
@include gl-reset-bg;
|
|
64
65
|
@include gl-shadow-none;
|
|
66
|
+
|
|
65
67
|
.gl-icon {
|
|
66
68
|
@include gl-fill-current-color;
|
|
67
69
|
}
|
|
@@ -92,6 +94,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
92
94
|
&:focus,
|
|
93
95
|
&:hover {
|
|
94
96
|
@include gl-bg-black;
|
|
97
|
+
|
|
95
98
|
.gl-icon {
|
|
96
99
|
color: var(--label-background-color);
|
|
97
100
|
}
|
|
@@ -113,6 +116,7 @@ $label-close-button: '.gl-label-close.gl-button';
|
|
|
113
116
|
&:focus,
|
|
114
117
|
&:hover {
|
|
115
118
|
@include gl-bg-white;
|
|
119
|
+
|
|
116
120
|
.gl-icon {
|
|
117
121
|
color: var(--label-background-color);
|
|
118
122
|
}
|
package/src/scss/mixins.scss
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
$breakpoint-min: $breakpoint-md,
|
|
34
34
|
$breakpoint-max: $breakpoint-xl
|
|
35
35
|
) {
|
|
36
|
-
$breakpoint-range: ($breakpoint-max - $breakpoint-min) / 1rem;
|
|
37
36
|
$property-range: ($property-max - $property-min) / 1rem;
|
|
37
|
+
$breakpoint-range: px-to-rem($breakpoint-max - $breakpoint-min) / 1rem;
|
|
38
38
|
|
|
39
39
|
@media (min-width: $breakpoint-min) {
|
|
40
40
|
#{$property}: calc(
|
|
@@ -68,3 +68,51 @@
|
|
|
68
68
|
@mixin gl-bg-gradient-blur($direction, $color) {
|
|
69
69
|
background-image: linear-gradient(to $direction, $transparent-rgba, $color 33%);
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Helper function for @media of at least the minimum
|
|
74
|
+
* breakpoint width.
|
|
75
|
+
*
|
|
76
|
+
* @param $name Breakpoint name, such as `sm` or `md`.
|
|
77
|
+
*/
|
|
78
|
+
@mixin gl-media-breakpoint-up($name) {
|
|
79
|
+
$min: map-get($breakpoints, $name);
|
|
80
|
+
@if $min == null {
|
|
81
|
+
@error;
|
|
82
|
+
}
|
|
83
|
+
@if $min != 0 {
|
|
84
|
+
@media (min-width: $min) {
|
|
85
|
+
@content;
|
|
86
|
+
}
|
|
87
|
+
} @else {
|
|
88
|
+
@content;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Helper function for @media of at most the maximum
|
|
94
|
+
* breakpoint width.
|
|
95
|
+
*
|
|
96
|
+
* Note: Before using, consider using a mobile-first
|
|
97
|
+
* approach, and define @media for larger breakpoints
|
|
98
|
+
* using `gl-media-breakpoint-up` while using this rule as
|
|
99
|
+
* the starting point instead.
|
|
100
|
+
*
|
|
101
|
+
* @param $name Breakpoint, such as `sm` or `md`. `xs` is not valid
|
|
102
|
+
*/
|
|
103
|
+
@mixin gl-media-breakpoint-down($name) {
|
|
104
|
+
$max: map-get($breakpoints, $name);
|
|
105
|
+
@if ($max == null or $max == 0) {
|
|
106
|
+
@error;
|
|
107
|
+
}
|
|
108
|
+
// The maximum value is reduced by 0.02px to work around the limitations of
|
|
109
|
+
// `min-` and `max-` prefixes and with fractional viewport sizes.
|
|
110
|
+
// See: https://www.w3.org/TR/mediaqueries-4/#mq-min-max
|
|
111
|
+
// Use 0.02px rather than 0.01px to work around a current rounding bug in Safari.
|
|
112
|
+
// See https://bugs.webkit.org/show_bug.cgi?id=178261
|
|
113
|
+
$breakpoint-max-range-precision: 0.02px;
|
|
114
|
+
|
|
115
|
+
@media (max-width: $max - $breakpoint-max-range-precision) {
|
|
116
|
+
@content;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@import './mixins';
|
|
2
|
+
@import './variables';
|
|
3
|
+
@import 'true';
|
|
4
|
+
|
|
5
|
+
@include describe('gl-fluid-font-size') {
|
|
6
|
+
@include it('returns fluid font-size') {
|
|
7
|
+
@include assert {
|
|
8
|
+
@include output {
|
|
9
|
+
@include gl-fluid-font-size(2rem, 3.5rem);
|
|
10
|
+
}
|
|
11
|
+
@include expect {
|
|
12
|
+
@media (min-width: 768px) {
|
|
13
|
+
// prettier-ignore
|
|
14
|
+
font-size: calc( 2rem + 1.5 * ((100vw - 768px) / 27));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@media (min-width: 1200px) {
|
|
18
|
+
font-size: 3.5rem;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@include describe('gl-fluid-line-height') {
|
|
26
|
+
@include it('returns fluid line-height') {
|
|
27
|
+
@include assert {
|
|
28
|
+
@include output {
|
|
29
|
+
@include gl-fluid-line-height(2rem, 3.5rem);
|
|
30
|
+
}
|
|
31
|
+
@include expect {
|
|
32
|
+
@media (min-width: 768px) {
|
|
33
|
+
// prettier-ignore
|
|
34
|
+
line-height: calc( 2rem + 1.5 * ((100vw - 768px) / 27));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (min-width: 1200px) {
|
|
38
|
+
line-height: 3.5rem;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@include describe('gl-media-breakpoint-up') {
|
|
46
|
+
@include it('returns no media query for xs') {
|
|
47
|
+
@include assert {
|
|
48
|
+
@include output {
|
|
49
|
+
@include gl-media-breakpoint-up(xs) {
|
|
50
|
+
color: $green-100;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
@include expect {
|
|
54
|
+
color: $green-100;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
@include it('returns min-width media query for sm') {
|
|
59
|
+
@include assert {
|
|
60
|
+
@include output {
|
|
61
|
+
@include gl-media-breakpoint-up(sm) {
|
|
62
|
+
color: $blue-100;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
@include expect {
|
|
66
|
+
@media (min-width: '576px') {
|
|
67
|
+
color: $blue-100;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@include describe('gl-media-breakpoint-down') {
|
|
75
|
+
@include it('returns max-width media query for lg') {
|
|
76
|
+
@include assert {
|
|
77
|
+
@include output {
|
|
78
|
+
@include gl-media-breakpoint-down(lg) {
|
|
79
|
+
color: $red-100;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
@include expect {
|
|
83
|
+
@media (max-width: '991.98px') {
|
|
84
|
+
color: $red-100;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
@include it('returns max-width media query for md') {
|
|
90
|
+
@include assert {
|
|
91
|
+
@include output {
|
|
92
|
+
@include gl-media-breakpoint-down(md) {
|
|
93
|
+
color: $orange-100;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
@include expect {
|
|
97
|
+
@media (max-width: '767.98px') {
|
|
98
|
+
color: $orange-100;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|