@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.
Files changed (63) hide show
  1. package/README.md +42 -42
  2. package/dist/index.css +1 -1
  3. package/dist/index.css.map +1 -1
  4. package/package.json +57 -57
  5. package/src/atomics/README.md +54 -54
  6. package/src/atomics/border.scss +56 -56
  7. package/src/atomics/colors.scss +166 -166
  8. package/src/atomics/display.scss +33 -33
  9. package/src/atomics/flex.scss +69 -69
  10. package/src/atomics/index.scss +8 -8
  11. package/src/atomics/position.scss +19 -19
  12. package/src/atomics/shadow.scss +19 -19
  13. package/src/atomics/spacing.scss +73 -73
  14. package/src/atomics/typography.scss +105 -105
  15. package/src/components/README.md +41 -41
  16. package/src/components/button-reset.scss +8 -8
  17. package/src/components/button.scss +245 -243
  18. package/src/components/buttons.scss +86 -87
  19. package/src/components/component.md +6 -6
  20. package/src/components/icon.scss +20 -20
  21. package/src/components/index.scss +7 -7
  22. package/src/components/link-button.scss +30 -30
  23. package/src/components/markdown.scss +156 -156
  24. package/src/components/table.scss +67 -67
  25. package/src/core/animations.scss +8 -8
  26. package/src/core/focus.scss +35 -35
  27. package/src/core/font-stack.scss +28 -28
  28. package/src/core/index.scss +6 -6
  29. package/src/core/themes.scss +86 -86
  30. package/src/index.scss +6 -6
  31. package/src/mixins/center.scss +11 -11
  32. package/src/mixins/code-block.scss +43 -43
  33. package/src/mixins/control.scss +44 -44
  34. package/src/mixins/focus.scss +10 -10
  35. package/src/mixins/font-size.scss +35 -35
  36. package/src/mixins/index.scss +9 -9
  37. package/src/mixins/loader.scss +16 -16
  38. package/src/mixins/media-queries.scss +49 -49
  39. package/src/mixins/transparency.scss +14 -14
  40. package/src/mixins/unselectable.scss +13 -13
  41. package/src/patterns/index.scss +1 -1
  42. package/src/tokens/animation.scss +8 -8
  43. package/src/tokens/border.scss +8 -8
  44. package/src/tokens/breakpoints.scss +11 -11
  45. package/src/tokens/colors.scss +215 -215
  46. package/src/tokens/direction.scss +18 -18
  47. package/src/tokens/display.scss +5 -5
  48. package/src/tokens/focus.scss +9 -9
  49. package/src/tokens/font-stack.scss +10 -10
  50. package/src/tokens/index.scss +18 -18
  51. package/src/tokens/layout.scss +8 -8
  52. package/src/tokens/palette.scss +188 -188
  53. package/src/tokens/position.scss +5 -5
  54. package/src/tokens/radius.scss +9 -9
  55. package/src/tokens/schemes.scss +14 -14
  56. package/src/tokens/shadow.scss +11 -11
  57. package/src/tokens/spacing.scss +25 -25
  58. package/src/tokens/themes.scss +291 -291
  59. package/src/tokens/typography.scss +29 -29
  60. package/src/tokens/z-index.scss +20 -20
  61. package/tokens/README.md +34 -34
  62. package/tokens/index.js +246 -246
  63. package/tokens/types.d.ts +35 -35
@@ -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 */
@@ -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';
@@ -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
+ }
@@ -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
@@ -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