@microsoft/atlas-css 1.2.0 → 1.3.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/README.md +42 -42
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +57 -57
- package/src/atomics/README.md +54 -54
- package/src/atomics/border.scss +56 -56
- package/src/atomics/colors.scss +166 -166
- package/src/atomics/display.scss +33 -33
- package/src/atomics/flex.scss +69 -69
- package/src/atomics/index.scss +8 -8
- package/src/atomics/position.scss +19 -19
- package/src/atomics/shadow.scss +19 -19
- package/src/atomics/spacing.scss +73 -73
- package/src/atomics/typography.scss +105 -105
- package/src/components/README.md +41 -41
- package/src/components/button-reset.scss +8 -8
- package/src/components/button.scss +245 -243
- package/src/components/buttons.scss +86 -87
- package/src/components/component.md +6 -6
- package/src/components/icon.scss +20 -20
- package/src/components/index.scss +7 -7
- package/src/components/link-button.scss +30 -30
- package/src/components/markdown.scss +156 -156
- package/src/components/table.scss +67 -67
- package/src/core/animations.scss +8 -8
- package/src/core/focus.scss +35 -35
- package/src/core/font-stack.scss +28 -28
- package/src/core/index.scss +6 -6
- package/src/core/themes.scss +86 -86
- package/src/index.scss +6 -6
- package/src/mixins/center.scss +11 -11
- package/src/mixins/code-block.scss +43 -43
- package/src/mixins/control.scss +44 -44
- package/src/mixins/focus.scss +10 -10
- package/src/mixins/font-size.scss +35 -35
- package/src/mixins/index.scss +9 -9
- package/src/mixins/loader.scss +16 -16
- package/src/mixins/media-queries.scss +49 -49
- package/src/mixins/transparency.scss +14 -14
- package/src/mixins/unselectable.scss +13 -13
- package/src/patterns/index.scss +1 -1
- package/src/tokens/animation.scss +8 -8
- package/src/tokens/border.scss +8 -8
- package/src/tokens/breakpoints.scss +11 -11
- package/src/tokens/colors.scss +215 -215
- package/src/tokens/direction.scss +18 -18
- package/src/tokens/display.scss +5 -5
- package/src/tokens/focus.scss +9 -9
- package/src/tokens/font-stack.scss +10 -10
- package/src/tokens/index.scss +18 -18
- package/src/tokens/layout.scss +8 -8
- package/src/tokens/palette.scss +188 -188
- package/src/tokens/position.scss +5 -5
- package/src/tokens/radius.scss +9 -9
- package/src/tokens/schemes.scss +14 -14
- package/src/tokens/shadow.scss +11 -11
- package/src/tokens/spacing.scss +25 -25
- package/src/tokens/themes.scss +291 -291
- package/src/tokens/typography.scss +29 -29
- package/src/tokens/z-index.scss +20 -20
- package/tokens/README.md +34 -34
- package/tokens/index.js +246 -246
- package/tokens/types.d.ts +35 -35
package/src/mixins/focus.scss
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
@mixin focus() {
|
|
2
|
-
outline-color: inherit;
|
|
3
|
-
outline-offset: $focus-outline-offset;
|
|
4
|
-
outline-style: $focus-style;
|
|
5
|
-
outline-width: $focus-width;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
%focus {
|
|
9
|
-
@include focus();
|
|
10
|
-
}
|
|
1
|
+
@mixin focus() {
|
|
2
|
+
outline-color: inherit;
|
|
3
|
+
outline-offset: $focus-outline-offset;
|
|
4
|
+
outline-style: $focus-style;
|
|
5
|
+
outline-width: $focus-width;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
%focus {
|
|
9
|
+
@include focus();
|
|
10
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
@use 'sass:math';
|
|
2
|
-
|
|
3
|
-
/* stylelint-disable */
|
|
4
|
-
|
|
5
|
-
$font-size-scaling-factor: 0.75 !default;
|
|
6
|
-
|
|
7
|
-
// Remove the units from a value
|
|
8
|
-
@function strip-units($number) {
|
|
9
|
-
@return math.div($number, ($number * 0 + 1));
|
|
10
|
-
}
|
|
11
|
-
@mixin responsive-font-size(
|
|
12
|
-
// font-size to stop scaling at
|
|
13
|
-
$end-rem,
|
|
14
|
-
// whether to include !important
|
|
15
|
-
$important: false,
|
|
16
|
-
// font-size to start scaling from
|
|
17
|
-
$start-rem: max($end-rem * $font-size-scaling-factor, 1rem),
|
|
18
|
-
// viewport width to stop scaling at
|
|
19
|
-
$end-width: $breakpoint-desktop,
|
|
20
|
-
// viewport width to start scaling from
|
|
21
|
-
$start-width: 480px
|
|
22
|
-
) {
|
|
23
|
-
$m: math.div(
|
|
24
|
-
strip-units($end-rem) - strip-units($start-rem),
|
|
25
|
-
strip-units($end-width) - strip-units($start-width)
|
|
26
|
-
) * strip-units($document-font-size);
|
|
27
|
-
|
|
28
|
-
$y: strip-units($start-rem) * strip-units($document-font-size);
|
|
29
|
-
$x: strip-units($start-width);
|
|
30
|
-
$b: $y - $m * $x;
|
|
31
|
-
$importantValue: if($important, !important, '');
|
|
32
|
-
|
|
33
|
-
font-size: clamp(#{$start-rem}, #{$b}px + #{$m * 100}vw, #{$end-rem}) #{$importantValue};
|
|
34
|
-
}
|
|
35
|
-
/* stylelint-enable */
|
|
1
|
+
@use 'sass:math';
|
|
2
|
+
|
|
3
|
+
/* stylelint-disable */
|
|
4
|
+
|
|
5
|
+
$font-size-scaling-factor: 0.75 !default;
|
|
6
|
+
|
|
7
|
+
// Remove the units from a value
|
|
8
|
+
@function strip-units($number) {
|
|
9
|
+
@return math.div($number, ($number * 0 + 1));
|
|
10
|
+
}
|
|
11
|
+
@mixin responsive-font-size(
|
|
12
|
+
// font-size to stop scaling at
|
|
13
|
+
$end-rem,
|
|
14
|
+
// whether to include !important
|
|
15
|
+
$important: false,
|
|
16
|
+
// font-size to start scaling from
|
|
17
|
+
$start-rem: max($end-rem * $font-size-scaling-factor, 1rem),
|
|
18
|
+
// viewport width to stop scaling at
|
|
19
|
+
$end-width: $breakpoint-desktop,
|
|
20
|
+
// viewport width to start scaling from
|
|
21
|
+
$start-width: 480px
|
|
22
|
+
) {
|
|
23
|
+
$m: math.div(
|
|
24
|
+
strip-units($end-rem) - strip-units($start-rem),
|
|
25
|
+
strip-units($end-width) - strip-units($start-width)
|
|
26
|
+
) * strip-units($document-font-size);
|
|
27
|
+
|
|
28
|
+
$y: strip-units($start-rem) * strip-units($document-font-size);
|
|
29
|
+
$x: strip-units($start-width);
|
|
30
|
+
$b: $y - $m * $x;
|
|
31
|
+
$importantValue: if($important, !important, '');
|
|
32
|
+
|
|
33
|
+
font-size: clamp(#{$start-rem}, #{$b}px + #{$m * 100}vw, #{$end-rem}) #{$importantValue};
|
|
34
|
+
}
|
|
35
|
+
/* stylelint-enable */
|
package/src/mixins/index.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
@import 'code-block.scss';
|
|
2
|
-
@import 'control.scss';
|
|
3
|
-
@import 'center.scss';
|
|
4
|
-
@import 'focus.scss';
|
|
5
|
-
@import 'loader.scss';
|
|
6
|
-
@import 'media-queries.scss';
|
|
7
|
-
@import 'font-size.scss';
|
|
8
|
-
@import 'transparency.scss';
|
|
9
|
-
@import 'unselectable.scss';
|
|
1
|
+
@import './code-block.scss';
|
|
2
|
+
@import './control.scss';
|
|
3
|
+
@import './center.scss';
|
|
4
|
+
@import './focus.scss';
|
|
5
|
+
@import './loader.scss';
|
|
6
|
+
@import './media-queries.scss';
|
|
7
|
+
@import './font-size.scss';
|
|
8
|
+
@import './transparency.scss';
|
|
9
|
+
@import './unselectable.scss';
|
package/src/mixins/loader.scss
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
%loader {
|
|
2
|
-
display: block;
|
|
3
|
-
position: relative;
|
|
4
|
-
width: 1em;
|
|
5
|
-
height: 1em;
|
|
6
|
-
animation: spinAround 500ms infinite linear;
|
|
7
|
-
border: 2px solid $border;
|
|
8
|
-
border-radius: $radius-rounded;
|
|
9
|
-
border-top-color: transparent;
|
|
10
|
-
border-right-color: transparent;
|
|
11
|
-
content: '';
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@mixin loader {
|
|
15
|
-
@extend %loader;
|
|
16
|
-
}
|
|
1
|
+
%loader {
|
|
2
|
+
display: block;
|
|
3
|
+
position: relative;
|
|
4
|
+
width: 1em;
|
|
5
|
+
height: 1em;
|
|
6
|
+
animation: spinAround 500ms infinite linear;
|
|
7
|
+
border: 2px solid $border;
|
|
8
|
+
border-radius: $radius-rounded;
|
|
9
|
+
border-top-color: transparent;
|
|
10
|
+
border-right-color: transparent;
|
|
11
|
+
content: '';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin loader {
|
|
15
|
+
@extend %loader;
|
|
16
|
+
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
// Orientation
|
|
2
|
-
|
|
3
|
-
@mixin orientation-portrait {
|
|
4
|
-
@media screen and (max-aspect-ratio: 1/1),
|
|
5
|
-
screen and (min-resolution: 120dpi) and (max-aspect-ratio: 1/1) {
|
|
6
|
-
@content;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@mixin orientation-landscape {
|
|
11
|
-
@media screen and (min-aspect-ratio: 1/1),
|
|
12
|
-
screen and (min-resolution: 120dpi) and (min-aspect-ratio: 1/1) {
|
|
13
|
-
@content;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
@mixin orientation-square {
|
|
18
|
-
@media screen and (aspect-ratio: 1/1),
|
|
19
|
-
screen and (min-resolution: 120dpi) and (aspect-ratio: 1/1) {
|
|
20
|
-
@content;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Mobile-first screen size media queries
|
|
25
|
-
|
|
26
|
-
@mixin tablet {
|
|
27
|
-
@media screen and (min-width: $breakpoint-tablet), print {
|
|
28
|
-
@content;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
@mixin desktop {
|
|
33
|
-
@media screen and (min-width: $breakpoint-desktop) {
|
|
34
|
-
@content;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@mixin widescreen {
|
|
39
|
-
@media screen and (min-width: $breakpoint-widescreen) {
|
|
40
|
-
@content;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Please avoid using this mixin if possible. It doesn't follow the mobile-first approach to writing CSS.
|
|
45
|
-
@mixin discouraged-mobile {
|
|
46
|
-
@media screen and (max-width: $breakpoint-tablet - 1px) {
|
|
47
|
-
@content;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
// Orientation
|
|
2
|
+
|
|
3
|
+
@mixin orientation-portrait {
|
|
4
|
+
@media screen and (max-aspect-ratio: 1/1),
|
|
5
|
+
screen and (min-resolution: 120dpi) and (max-aspect-ratio: 1/1) {
|
|
6
|
+
@content;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin orientation-landscape {
|
|
11
|
+
@media screen and (min-aspect-ratio: 1/1),
|
|
12
|
+
screen and (min-resolution: 120dpi) and (min-aspect-ratio: 1/1) {
|
|
13
|
+
@content;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
@mixin orientation-square {
|
|
18
|
+
@media screen and (aspect-ratio: 1/1),
|
|
19
|
+
screen and (min-resolution: 120dpi) and (aspect-ratio: 1/1) {
|
|
20
|
+
@content;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Mobile-first screen size media queries
|
|
25
|
+
|
|
26
|
+
@mixin tablet {
|
|
27
|
+
@media screen and (min-width: $breakpoint-tablet), print {
|
|
28
|
+
@content;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin desktop {
|
|
33
|
+
@media screen and (min-width: $breakpoint-desktop) {
|
|
34
|
+
@content;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@mixin widescreen {
|
|
39
|
+
@media screen and (min-width: $breakpoint-widescreen) {
|
|
40
|
+
@content;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Please avoid using this mixin if possible. It doesn't follow the mobile-first approach to writing CSS.
|
|
45
|
+
@mixin discouraged-mobile {
|
|
46
|
+
@media screen and (max-width: $breakpoint-tablet - 1px) {
|
|
47
|
+
@content;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
%transparent-effects {
|
|
2
|
-
outline-color: inherit;
|
|
3
|
-
background-color: transparent;
|
|
4
|
-
appearance: none;
|
|
5
|
-
|
|
6
|
-
&:not(:hover),
|
|
7
|
-
&:not(.focus-visible) {
|
|
8
|
-
background-color: transparent;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
@mixin transparent-effects {
|
|
13
|
-
@extend %transparent-effects;
|
|
14
|
-
}
|
|
1
|
+
%transparent-effects {
|
|
2
|
+
outline-color: inherit;
|
|
3
|
+
background-color: transparent;
|
|
4
|
+
appearance: none;
|
|
5
|
+
|
|
6
|
+
&:not(:hover),
|
|
7
|
+
&:not(.focus-visible) {
|
|
8
|
+
background-color: transparent;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin transparent-effects {
|
|
13
|
+
@extend %transparent-effects;
|
|
14
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
%unselectable {
|
|
2
|
-
/* stylelint-disable */
|
|
3
|
-
-webkit-touch-callout: none;
|
|
4
|
-
-webkit-user-select: none;
|
|
5
|
-
-moz-user-select: none;
|
|
6
|
-
-ms-user-select: none;
|
|
7
|
-
/* stylelint-enable */
|
|
8
|
-
user-select: none;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@mixin unselectable {
|
|
12
|
-
@extend %unselectable;
|
|
13
|
-
}
|
|
1
|
+
%unselectable {
|
|
2
|
+
/* stylelint-disable */
|
|
3
|
+
-webkit-touch-callout: none;
|
|
4
|
+
-webkit-user-select: none;
|
|
5
|
+
-moz-user-select: none;
|
|
6
|
+
-ms-user-select: none;
|
|
7
|
+
/* stylelint-enable */
|
|
8
|
+
user-select: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@mixin unselectable {
|
|
12
|
+
@extend %unselectable;
|
|
13
|
+
}
|
package/src/patterns/index.scss
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
// TBD
|
|
1
|
+
// TBD
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @sass-export-section="animation"
|
|
3
|
-
*/
|
|
4
|
-
// Animation related property values
|
|
5
|
-
$input-timing-function: cubic-bezier(0.4, 0, 0.23, 1) !default;
|
|
6
|
-
$input-transition-duration: 200ms;
|
|
7
|
-
$nav-bar-transition-duration: 86ms !default;
|
|
8
|
-
//@end-sass-export-section
|
|
1
|
+
/**
|
|
2
|
+
* @sass-export-section="animation"
|
|
3
|
+
*/
|
|
4
|
+
// Animation related property values
|
|
5
|
+
$input-timing-function: cubic-bezier(0.4, 0, 0.23, 1) !default;
|
|
6
|
+
$input-transition-duration: 200ms;
|
|
7
|
+
$nav-bar-transition-duration: 86ms !default;
|
|
8
|
+
//@end-sass-export-section
|
package/src/tokens/border.scss
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @sass-export-section="border"
|
|
3
|
-
*/
|
|
4
|
-
$border-width: 1px !default;
|
|
5
|
-
$border-width-large: 0.5rem !default;
|
|
6
|
-
$border-radius: 0.25rem !default;
|
|
7
|
-
$border-radius-large: 0.5rem !default;
|
|
8
|
-
//@end-sass-export-section
|
|
1
|
+
/**
|
|
2
|
+
* @sass-export-section="border"
|
|
3
|
+
*/
|
|
4
|
+
$border-width: 1px !default;
|
|
5
|
+
$border-width-large: 0.5rem !default;
|
|
6
|
+
$border-radius: 0.25rem !default;
|
|
7
|
+
$border-radius-large: 0.5rem !default;
|
|
8
|
+
//@end-sass-export-section
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @sass-export-section="breakpoints"
|
|
3
|
-
*/
|
|
4
|
-
// The horizontal gap tied to containers
|
|
5
|
-
$container-gap: 64px !default;
|
|
6
|
-
|
|
7
|
-
// Breakpoints
|
|
8
|
-
$breakpoint-tablet: 768px !default;
|
|
9
|
-
$breakpoint-desktop: 1088px !default;
|
|
10
|
-
$breakpoint-widescreen: 1472px !default;
|
|
11
|
-
//@end-sass-export-section
|
|
1
|
+
/**
|
|
2
|
+
* @sass-export-section="breakpoints"
|
|
3
|
+
*/
|
|
4
|
+
// The horizontal gap tied to containers
|
|
5
|
+
$container-gap: 64px !default;
|
|
6
|
+
|
|
7
|
+
// Breakpoints
|
|
8
|
+
$breakpoint-tablet: 768px !default;
|
|
9
|
+
$breakpoint-desktop: 1088px !default;
|
|
10
|
+
$breakpoint-widescreen: 1472px !default;
|
|
11
|
+
//@end-sass-export-section
|