polaris_view_helpers 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/lib/polaris_view_helpers/version.rb +1 -1
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3.css +3414 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components.scss +51 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/AccountConnection.scss +9 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ActionList.scss +75 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Avatar.scss +70 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Badge.scss +68 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Banner.scss +140 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Breadcrumbs.scss +45 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Button.scss +228 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ButtonGroup.scss +67 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/CalloutCard.scss +27 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Caption.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Card.scss +43 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Checkbox.scss +78 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Choice.scss +62 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ChoiceList.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Collapsible.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ColorPicker.scss +133 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Connected.scss +67 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DatePicker.scss +147 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DescriptionList.scss +44 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/DisplayText.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/EmptyState.scss +63 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FooterHelp.scss +26 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/FormLayout.scss +35 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Heading.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Icon.scss +226 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/KeyboardKey.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Label.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Labelled.scss +24 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Layout.scss +69 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Link.scss +18 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/List.scss +52 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Page.scss +125 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PageActions.scss +9 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Pagination.scss +139 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Popover.scss +98 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/PositionedOverlay.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/RadioButton.scss +68 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/ResourceList.scss +272 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Scrollable.scss +28 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Select.scss +103 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/SettingAction.scss +22 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Stack.scss +98 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Subheading.scss +4 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tabs.scss +150 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tag.scss +37 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextContainer.scss +12 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextField.scss +219 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/TextStyle.scss +15 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Thumbnail.scss +49 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/Tooltip.scss +70 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/components/VisuallyHidden.scss +3 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation.scss +11 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/border-radius.scss +12 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/borders.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/colors.scss +142 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/duration.scss +24 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/easing.scss +23 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/layout.scss +46 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/shadows.scss +25 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/spacing.scss +25 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/typography.scss +127 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/utilities.scss +90 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/foundation/z-index.scss +19 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/global.scss +55 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/accessibility.scss +16 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/breakpoints.scss +127 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/buttons.scss +87 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/controls.scss +59 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/icons.scss +11 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/layout.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/links.scss +8 -0
- data/vendor/assets/stylesheets/shopify-polaris-1.0.3/styles/shared/typography.scss +128 -0
- metadata +79 -3
@@ -0,0 +1,24 @@
|
|
1
|
+
$unit: 100ms;
|
2
|
+
|
3
|
+
$duration-data: (
|
4
|
+
fast: $unit,
|
5
|
+
base: $unit * 2,
|
6
|
+
slow: $unit * 3,
|
7
|
+
slower: $unit * 4,
|
8
|
+
slowest: $unit * 5,
|
9
|
+
);
|
10
|
+
|
11
|
+
/// Returns the duration value for a given variant.
|
12
|
+
///
|
13
|
+
/// @param {String} $variant - The key for the given variant.
|
14
|
+
/// @return {Number} The spacing for the variant (in miliseconds).
|
15
|
+
|
16
|
+
@function duration($variant: base) {
|
17
|
+
$fetched-value: map-get($duration-data, $variant);
|
18
|
+
|
19
|
+
@if type-of($fetched-value) == number {
|
20
|
+
@return $fetched-value;
|
21
|
+
} @else {
|
22
|
+
@error 'Duration variant `#{$variant}` not found. Available variants: #{available-names($duration-data)}';
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
$easing-data: (
|
2
|
+
base: cubic-bezier(0.64, 0, 0.35, 1),
|
3
|
+
in: cubic-bezier(0.36, 0, 1, 1),
|
4
|
+
out: cubic-bezier(0, 0, 0.42, 1),
|
5
|
+
excite: cubic-bezier(0.18, 0.67, 0.6, 1.22),
|
6
|
+
overshoot: cubic-bezier(0.07, 0.28, 0.32, 1.22),
|
7
|
+
anticipate: cubic-bezier(0.38, -0.4, 0.88, 0.65),
|
8
|
+
);
|
9
|
+
|
10
|
+
/// Returns the timing-function value for a given variant.
|
11
|
+
///
|
12
|
+
/// @param {String} $variant - The key for the given variant.
|
13
|
+
/// @return {String} The cubic-bezier function (string) for the variant.
|
14
|
+
|
15
|
+
@function easing($variant: base) {
|
16
|
+
$fetched-value: map-get($easing-data, $variant);
|
17
|
+
|
18
|
+
@if type-of($fetched-value) == string {
|
19
|
+
@return $fetched-value;
|
20
|
+
} @else {
|
21
|
+
@error 'Easing variant `#{$variant}` not found. Available variants: #{available-names($easing-data)}';
|
22
|
+
}
|
23
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
////
|
2
|
+
/// Layout
|
3
|
+
/// @group foundation/layout
|
4
|
+
////
|
5
|
+
|
6
|
+
$layout-width-data: (
|
7
|
+
primary: (
|
8
|
+
min: rem(480px),
|
9
|
+
max: rem(672px)
|
10
|
+
),
|
11
|
+
secondary: (
|
12
|
+
min: rem(240px),
|
13
|
+
max: rem(344px)
|
14
|
+
),
|
15
|
+
nav: (
|
16
|
+
base: rem(240px)
|
17
|
+
),
|
18
|
+
page-with-nav: (
|
19
|
+
base: rem(700px)
|
20
|
+
),
|
21
|
+
page-content: (
|
22
|
+
not-condensed: rem(680px),
|
23
|
+
partially-condensed: rem(450px)
|
24
|
+
),
|
25
|
+
inner-spacing: (
|
26
|
+
base: spacing(loose)
|
27
|
+
),
|
28
|
+
outer-spacing: (
|
29
|
+
min: spacing(loose),
|
30
|
+
max: spacing(extra-loose)
|
31
|
+
)
|
32
|
+
);
|
33
|
+
|
34
|
+
/// Returns the widths of the specified column.
|
35
|
+
/// @param {String} $name - The column name.
|
36
|
+
/// @return {Number} The width for the column.
|
37
|
+
|
38
|
+
@function layout-width($name, $value: base) {
|
39
|
+
$fetched-value: map-get(map-get($layout-width-data, $name), $value);
|
40
|
+
|
41
|
+
@if type-of($fetched-value) != null {
|
42
|
+
@return $fetched-value;
|
43
|
+
} @else {
|
44
|
+
@error 'Column `#{$name} - #{$value}` not found. Available columns: #{available-names($layout-width-data)}';
|
45
|
+
}
|
46
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
/* Shadows are intentionally very subtle gradiations. */
|
2
|
+
/* stylelint-disable no-indistinguishable-colors */
|
3
|
+
$shadows-data: (
|
4
|
+
faint: (0 1px 0 0 rgba(22, 29, 37, 0.05)),
|
5
|
+
base: (0 0 0 1px rgba(63, 63, 68, 0.05), 0 1px 3px 0 rgba(63, 63, 68, 0.15)),
|
6
|
+
deep: (0 0 0 1px rgba(6, 44, 82, 0.1), 0 2px 16px rgba(33, 43, 54, 0.08)),
|
7
|
+
layer: (0 31px 41px 0 rgba(32, 42, 53, 0.2), 0 2px 16px 0 rgba(32, 42, 54, 0.08)),
|
8
|
+
transparent: 0 0 0 0 transparent
|
9
|
+
);
|
10
|
+
/* stylelint-enable no-indistinguishable-colors */
|
11
|
+
|
12
|
+
|
13
|
+
/// Returns the shadow for the specified depth
|
14
|
+
/// @param {String} $depth [base] - The shadow's depth.
|
15
|
+
/// @return {List} The shadow value.
|
16
|
+
|
17
|
+
@function shadow($depth: base) {
|
18
|
+
$fetched-value: map-get($shadows-data, $depth);
|
19
|
+
|
20
|
+
@if type-of($fetched-value) == list {
|
21
|
+
@return $fetched-value;
|
22
|
+
} @else {
|
23
|
+
@error 'Shadow variant `#{$depth}` not found. Available variants: #{available-names($shadows-data)}';
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
$unit: 4px;
|
2
|
+
|
3
|
+
$spacing-data: (
|
4
|
+
none: 0,
|
5
|
+
extra-tight: rem($unit),
|
6
|
+
tight: rem($unit * 2),
|
7
|
+
base: rem($unit * 4),
|
8
|
+
loose: rem($unit * 5),
|
9
|
+
extra-loose: rem($unit * 8)
|
10
|
+
);
|
11
|
+
|
12
|
+
/// Returns the spacing value for a given variant.
|
13
|
+
///
|
14
|
+
/// @param {String} $variant - The key for the given variant.
|
15
|
+
/// @return {Number} The spacing for the variant.
|
16
|
+
|
17
|
+
@function spacing($variant: base) {
|
18
|
+
$fetched-value: map-get($spacing-data, $variant);
|
19
|
+
|
20
|
+
@if type-of($fetched-value) == number {
|
21
|
+
@return $fetched-value;
|
22
|
+
} @else {
|
23
|
+
@error 'Spacing variant `#{$variant}` not found. Available variants: #{available-names($spacing-data)}';
|
24
|
+
}
|
25
|
+
}
|
@@ -0,0 +1,127 @@
|
|
1
|
+
$typography-condensed: em(640px);
|
2
|
+
|
3
|
+
$font-family-data: (
|
4
|
+
base: #{-apple-system, 'BlinkMacSystemFont', 'San Francisco', 'Roboto', 'Segoe UI', 'Helvetica Neue', sans-serif},
|
5
|
+
monospace: #{Monaco, Consolas, 'Lucida Console', monospace}
|
6
|
+
);
|
7
|
+
|
8
|
+
$line-height-data: (
|
9
|
+
caption: (
|
10
|
+
base: rem(20px),
|
11
|
+
large-screen: rem(16px)
|
12
|
+
),
|
13
|
+
heading: (
|
14
|
+
base: rem(24px)
|
15
|
+
),
|
16
|
+
subheading: (
|
17
|
+
base: rem(16px)
|
18
|
+
),
|
19
|
+
input: (
|
20
|
+
base: rem(24px)
|
21
|
+
),
|
22
|
+
body: (
|
23
|
+
base: rem(20px)
|
24
|
+
),
|
25
|
+
display-x-large: (
|
26
|
+
base: rem(36px),
|
27
|
+
large-screen: rem(44px)
|
28
|
+
),
|
29
|
+
display-large: (
|
30
|
+
base: rem(28px),
|
31
|
+
large-screen: rem(32px)
|
32
|
+
),
|
33
|
+
display-medium: (
|
34
|
+
base: rem(28px),
|
35
|
+
large-screen: rem(32px)
|
36
|
+
),
|
37
|
+
display-small: (
|
38
|
+
base: rem(24px),
|
39
|
+
large-screen: rem(28px)
|
40
|
+
)
|
41
|
+
);
|
42
|
+
|
43
|
+
$font-size-data: (
|
44
|
+
caption: (
|
45
|
+
base: rem(13px),
|
46
|
+
large-screen: rem(12px)
|
47
|
+
),
|
48
|
+
heading: (
|
49
|
+
base: rem(17px),
|
50
|
+
large-screen: rem(16px)
|
51
|
+
),
|
52
|
+
subheading: (
|
53
|
+
base: rem(13px),
|
54
|
+
large-screen: rem(12px)
|
55
|
+
),
|
56
|
+
input: (
|
57
|
+
base: rem(16px),
|
58
|
+
large-screen: rem(14px)
|
59
|
+
),
|
60
|
+
body: (
|
61
|
+
base: rem(15px),
|
62
|
+
large-screen: rem(14px)
|
63
|
+
),
|
64
|
+
display-x-large: (
|
65
|
+
base: rem(27px),
|
66
|
+
large-screen: rem(42px)
|
67
|
+
),
|
68
|
+
display-large: (
|
69
|
+
base: rem(24px),
|
70
|
+
large-screen: rem(28px)
|
71
|
+
),
|
72
|
+
display-medium: (
|
73
|
+
base: rem(21px),
|
74
|
+
large-screen: rem(26px)
|
75
|
+
),
|
76
|
+
display-small: (
|
77
|
+
base: rem(16px),
|
78
|
+
large-screen: rem(20px)
|
79
|
+
)
|
80
|
+
);
|
81
|
+
|
82
|
+
/// Returns the font stack for a given family.
|
83
|
+
///
|
84
|
+
/// @param {String} $family - The key for the given family.
|
85
|
+
/// @return {Number} The font stack for the family.
|
86
|
+
|
87
|
+
@function font-family($family: base) {
|
88
|
+
$fetched-value: map-get($font-family-data, $family);
|
89
|
+
|
90
|
+
@if $fetched-value != null {
|
91
|
+
@return $fetched-value;
|
92
|
+
} @else {
|
93
|
+
@error 'Font family `#{$family}` not found. Available font families: #{available-names($font-family-data)}';
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
/// Returns the line height for a given text style and variant.
|
98
|
+
///
|
99
|
+
/// @param {String} $style - The font style.
|
100
|
+
/// @param {String} $variant [base] - The variant on the font-size.
|
101
|
+
/// @return {Number} The line-height for the text-style.
|
102
|
+
|
103
|
+
@function line-height($style, $variant: base) {
|
104
|
+
$fetched-line-height: map-get(map-get($line-height-data, $style), $variant);
|
105
|
+
|
106
|
+
@if type-of($fetched-line-height) != null {
|
107
|
+
@return $fetched-line-height;
|
108
|
+
} @else {
|
109
|
+
@error 'Line height `#{$style} - #{$variant}` not found. Available line heights: #{available-names($line-height-data)}';
|
110
|
+
}
|
111
|
+
}
|
112
|
+
|
113
|
+
/// Returns the font size for a given text style and variant.
|
114
|
+
///
|
115
|
+
/// @param {String} $style - The font style.
|
116
|
+
/// @param {String} $variant [base] - The variant on the font-size.
|
117
|
+
/// @return {Number} The font-size for the text-style.
|
118
|
+
|
119
|
+
@function font-size($style, $variant: base) {
|
120
|
+
$fetched-font-size: map-get(map-get($font-size-data, $style), $variant);
|
121
|
+
|
122
|
+
@if type-of($fetched-font-size) != null {
|
123
|
+
@return $fetched-font-size;
|
124
|
+
} @else {
|
125
|
+
@error 'Line height `#{$style} - #{$variant}` not found. Available font sizes: #{available-names($line-height-data)}';
|
126
|
+
}
|
127
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
$default-browser-font-size: 16px;
|
2
|
+
$base-font-size: 10px;
|
3
|
+
|
4
|
+
/// Returns the value in rem for a given pixel value.
|
5
|
+
/// @param {Number} $value - The pixel value to be converted.
|
6
|
+
/// @return {Number} The converted value in rem.
|
7
|
+
|
8
|
+
@function rem($value) {
|
9
|
+
$unit: unit($value);
|
10
|
+
|
11
|
+
@if $unit == 'rem' {
|
12
|
+
@return $value;
|
13
|
+
} @else if $unit == 'px' {
|
14
|
+
@return $value / $base-font-size * 1rem;
|
15
|
+
} @else if $unit == 'em' {
|
16
|
+
@return $unit / 1em * 1rem;
|
17
|
+
} @else {
|
18
|
+
@error 'Value must be in px, em, or rem.';
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
/// Returns the value in pixels for a given rem value.
|
23
|
+
/// @param {Number} $value - The rem value to be converted.
|
24
|
+
/// @return {Number} The converted value in pixels.
|
25
|
+
|
26
|
+
@function px($value) {
|
27
|
+
$unit: unit($value);
|
28
|
+
|
29
|
+
@if $unit == 'px' {
|
30
|
+
@return $value;
|
31
|
+
} @else if $unit == 'em' {
|
32
|
+
@return ($value / 1em) * $base-font-size;
|
33
|
+
} @else if $unit == 'rem' {
|
34
|
+
@return ($value / 1rem) * $base-font-size;
|
35
|
+
} @else {
|
36
|
+
@error 'Value must be in rem, em, or px.';
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
/// Returns the value in pixels for a given pixel value. Note that this
|
41
|
+
/// only works for elements that have had no font-size changes.
|
42
|
+
/// @param {Number} $value - The pixel value to be converted.
|
43
|
+
/// @return {Number} The converted value in ems.
|
44
|
+
|
45
|
+
@function em($value) {
|
46
|
+
$unit: unit($value);
|
47
|
+
|
48
|
+
@if $unit == 'em' {
|
49
|
+
@return $value;
|
50
|
+
} @else if $unit == 'rem' {
|
51
|
+
@return $value / 1rem * 1em * ($base-font-size / $default-browser-font-size);
|
52
|
+
} @else if $unit == 'px' {
|
53
|
+
@return $value / $default-browser-font-size * 1em;
|
54
|
+
} @else {
|
55
|
+
@error 'Value must be in px, rem, or em.';
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
/// Returns the list of available names in a given map.
|
60
|
+
/// @param {Map} $map - The map of data to list the names from.
|
61
|
+
/// @param {Number} $map - The level of depth to get names from.
|
62
|
+
/// @return {String} The list of names in the map.
|
63
|
+
|
64
|
+
@function available-names($map, $level: 1) {
|
65
|
+
@if type-of($map) != 'map' {
|
66
|
+
@return null;
|
67
|
+
}
|
68
|
+
|
69
|
+
$output: '';
|
70
|
+
$newline: '\A ';
|
71
|
+
|
72
|
+
@if $level == 1 {
|
73
|
+
@each $key, $value in $map {
|
74
|
+
$output: $output + '#{$newline}- #{$key} #{available-names($value, $level + 1)}';
|
75
|
+
}
|
76
|
+
} @else {
|
77
|
+
$output: '(';
|
78
|
+
$i: 1;
|
79
|
+
|
80
|
+
@each $key, $value in $map {
|
81
|
+
$sep: if($i < length($map), ', ', '');
|
82
|
+
$output: $output + '#{$key}#{$sep}#{available-names($value, $level + 1)}';
|
83
|
+
$i: $i + 1;
|
84
|
+
}
|
85
|
+
|
86
|
+
$output: $output + ')';
|
87
|
+
}
|
88
|
+
|
89
|
+
@return $output;
|
90
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
$global-elements: (
|
2
|
+
content: 100,
|
3
|
+
overlay: 400,
|
4
|
+
);
|
5
|
+
|
6
|
+
/// Returns the z-index of the specified element.
|
7
|
+
/// @param {String} $element - The key for the element.
|
8
|
+
/// @param {Map} $context - The map in which to search for the element.
|
9
|
+
/// @return {Number} The z-index for the element.
|
10
|
+
|
11
|
+
@function z-index($element, $context: $global-elements) {
|
12
|
+
$index: map-get($context, $element);
|
13
|
+
|
14
|
+
@if $index {
|
15
|
+
@return $index;
|
16
|
+
} @else {
|
17
|
+
@error 'z-index `#{$element}` in `#{$context}` not found.';
|
18
|
+
}
|
19
|
+
}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
html,
|
2
|
+
body {
|
3
|
+
@include text-style-body;
|
4
|
+
@include text-emphasis-normal;
|
5
|
+
font-family: font-family();
|
6
|
+
}
|
7
|
+
|
8
|
+
html {
|
9
|
+
position: relative;
|
10
|
+
box-sizing: border-box;
|
11
|
+
font-size: ($base-font-size / $default-browser-font-size) * 100%;
|
12
|
+
-webkit-font-smoothing: antialiased;
|
13
|
+
|
14
|
+
// This needs to come after -webkit-font-smoothing
|
15
|
+
// stylelint-disable-next-line declaration-block-properties-order
|
16
|
+
-moz-osx-font-smoothing: grayscale;
|
17
|
+
|
18
|
+
text-size-adjust: 100%;
|
19
|
+
text-rendering: optimizeLegibility;
|
20
|
+
}
|
21
|
+
|
22
|
+
body {
|
23
|
+
min-height: 100%;
|
24
|
+
margin: 0;
|
25
|
+
padding: 0;
|
26
|
+
background-color: color(sky, light);
|
27
|
+
}
|
28
|
+
|
29
|
+
* {
|
30
|
+
box-sizing: inherit;
|
31
|
+
}
|
32
|
+
|
33
|
+
h1,
|
34
|
+
h2,
|
35
|
+
h3,
|
36
|
+
h4,
|
37
|
+
h5,
|
38
|
+
h6,
|
39
|
+
p {
|
40
|
+
margin: 0;
|
41
|
+
font-size: 1em;
|
42
|
+
font-weight: 400;
|
43
|
+
}
|
44
|
+
|
45
|
+
a:not([data-polaris-unstyled]) {
|
46
|
+
color: color(blue);
|
47
|
+
text-decoration: none;
|
48
|
+
|
49
|
+
&:hover,
|
50
|
+
&:focus,
|
51
|
+
&:active {
|
52
|
+
outline: none;
|
53
|
+
color: color(blue, dark);
|
54
|
+
}
|
55
|
+
}
|