@microsoft/atlas-css 1.1.0 → 1.2.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 (65) 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/dist/tokens.json +1 -1
  5. package/dist/tokens.ts +4 -0
  6. package/package.json +57 -57
  7. package/src/atomics/README.md +54 -54
  8. package/src/atomics/border.scss +56 -56
  9. package/src/atomics/colors.scss +166 -148
  10. package/src/atomics/display.scss +33 -33
  11. package/src/atomics/flex.scss +69 -69
  12. package/src/atomics/index.scss +8 -8
  13. package/src/atomics/position.scss +19 -19
  14. package/src/atomics/shadow.scss +19 -19
  15. package/src/atomics/spacing.scss +73 -73
  16. package/src/atomics/typography.scss +105 -105
  17. package/src/components/README.md +41 -41
  18. package/src/components/button-reset.scss +8 -8
  19. package/src/components/button.scss +243 -243
  20. package/src/components/buttons.scss +87 -87
  21. package/src/components/component.md +6 -6
  22. package/src/components/icon.scss +20 -20
  23. package/src/components/index.scss +7 -7
  24. package/src/components/link-button.scss +30 -30
  25. package/src/components/markdown.scss +156 -156
  26. package/src/components/table.scss +67 -67
  27. package/src/core/animations.scss +8 -8
  28. package/src/core/focus.scss +35 -35
  29. package/src/core/font-stack.scss +28 -28
  30. package/src/core/index.scss +6 -6
  31. package/src/core/themes.scss +86 -86
  32. package/src/index.scss +6 -6
  33. package/src/mixins/center.scss +11 -11
  34. package/src/mixins/code-block.scss +43 -43
  35. package/src/mixins/control.scss +44 -44
  36. package/src/mixins/focus.scss +10 -10
  37. package/src/mixins/font-size.scss +35 -35
  38. package/src/mixins/index.scss +9 -9
  39. package/src/mixins/loader.scss +16 -16
  40. package/src/mixins/media-queries.scss +49 -49
  41. package/src/mixins/transparency.scss +14 -14
  42. package/src/mixins/unselectable.scss +13 -13
  43. package/src/patterns/index.scss +1 -1
  44. package/src/tokens/animation.scss +8 -8
  45. package/src/tokens/border.scss +8 -8
  46. package/src/tokens/breakpoints.scss +11 -11
  47. package/src/tokens/colors.scss +215 -212
  48. package/src/tokens/direction.scss +18 -18
  49. package/src/tokens/display.scss +5 -5
  50. package/src/tokens/focus.scss +9 -9
  51. package/src/tokens/font-stack.scss +10 -10
  52. package/src/tokens/index.scss +18 -18
  53. package/src/tokens/layout.scss +8 -8
  54. package/src/tokens/palette.scss +188 -188
  55. package/src/tokens/position.scss +5 -5
  56. package/src/tokens/radius.scss +9 -9
  57. package/src/tokens/schemes.scss +14 -14
  58. package/src/tokens/shadow.scss +11 -11
  59. package/src/tokens/spacing.scss +25 -25
  60. package/src/tokens/themes.scss +291 -291
  61. package/src/tokens/typography.scss +29 -29
  62. package/src/tokens/z-index.scss +20 -20
  63. package/tokens/README.md +34 -34
  64. package/tokens/index.js +246 -246
  65. package/tokens/types.d.ts +35 -35
package/src/index.scss CHANGED
@@ -1,6 +1,6 @@
1
- @import './tokens/index.scss';
2
- @import './mixins/index.scss';
3
- @import './core/index.scss';
4
- @import './components/index.scss';
5
- @import './patterns/index.scss';
6
- @import './atomics/index.scss';
1
+ @import './tokens/index.scss';
2
+ @import './mixins/index.scss';
3
+ @import './core/index.scss';
4
+ @import './components/index.scss';
5
+ @import './patterns/index.scss';
6
+ @import './atomics/index.scss';
@@ -1,11 +1,11 @@
1
- @mixin center($width, $height: 0) {
2
- position: absolute;
3
-
4
- @if $height != 0 {
5
- top: calc(50% - (#{$height} / 2));
6
- left: calc(50% - (#{$width} / 2));
7
- } @else {
8
- top: calc(50% - (#{$width} / 2));
9
- left: calc(50% - (#{$width} / 2));
10
- }
11
- }
1
+ @mixin center($width, $height: 0) {
2
+ position: absolute;
3
+
4
+ @if $height != 0 {
5
+ top: calc(50% - (#{$height} / 2));
6
+ left: calc(50% - (#{$width} / 2));
7
+ } @else {
8
+ top: calc(50% - (#{$width} / 2));
9
+ left: calc(50% - (#{$width} / 2));
10
+ }
11
+ }
@@ -1,43 +1,43 @@
1
- $code-font-size: $font-size-8 !default;
2
- $code-block-spacing: 1em !default;
3
- $code-header-body-line-height: 1.3571 !default;
4
-
5
- @mixin code-block {
6
- pre {
7
- box-sizing: border-box;
8
- max-width: 100%;
9
- margin: 0;
10
- padding: $code-block-spacing;
11
- border: 1px solid $border;
12
- background-color: $code-block;
13
- font-size: $code-font-size;
14
- -moz-osx-font-smoothing: auto;
15
- -webkit-font-smoothing: auto;
16
- line-height: 1.3571;
17
- white-space: pre;
18
- word-spacing: normal;
19
- overflow: auto;
20
- word-break: normal;
21
- word-wrap: normal;
22
- tab-size: 4;
23
- hyphens: none;
24
- -webkit-overflow-scrolling: touch;
25
-
26
- > code {
27
- display: block;
28
- position: relative;
29
- padding: 0;
30
- border: 0;
31
- line-height: $code-header-body-line-height;
32
-
33
- mark {
34
- display: inline-block;
35
- min-width: calc(100% + #{$code-block-spacing} + #{$code-block-spacing});
36
- min-height: 18.9px; // Allow for highlighting of blank lines.
37
- margin: 0 $code-block-spacing * -1;
38
- padding: 0 $code-block-spacing;
39
- color: $text;
40
- }
41
- }
42
- }
43
- }
1
+ $code-font-size: $font-size-8 !default;
2
+ $code-block-spacing: 1em !default;
3
+ $code-header-body-line-height: 1.3571 !default;
4
+
5
+ @mixin code-block {
6
+ pre {
7
+ box-sizing: border-box;
8
+ max-width: 100%;
9
+ margin: 0;
10
+ padding: $code-block-spacing;
11
+ border: 1px solid $border;
12
+ background-color: $code-block;
13
+ font-size: $code-font-size;
14
+ -moz-osx-font-smoothing: auto;
15
+ -webkit-font-smoothing: auto;
16
+ line-height: 1.3571;
17
+ white-space: pre;
18
+ word-spacing: normal;
19
+ overflow: auto;
20
+ word-break: normal;
21
+ word-wrap: normal;
22
+ tab-size: 4;
23
+ hyphens: none;
24
+ -webkit-overflow-scrolling: touch;
25
+
26
+ > code {
27
+ display: block;
28
+ position: relative;
29
+ padding: 0;
30
+ border: 0;
31
+ line-height: $code-header-body-line-height;
32
+
33
+ mark {
34
+ display: inline-block;
35
+ min-width: calc(100% + #{$code-block-spacing} + #{$code-block-spacing});
36
+ min-height: 18.9px; // Allow for highlighting of blank lines.
37
+ margin: 0 $code-block-spacing * -1;
38
+ padding: 0 $code-block-spacing;
39
+ color: $text;
40
+ }
41
+ }
42
+ }
43
+ }
@@ -1,44 +1,44 @@
1
- $control-radius: $radius !default;
2
- $control-radius-small: $radius-small !default;
3
-
4
- $control-font-size: $font-size-7 !default;
5
- $control-border-width: 1px !default;
6
-
7
- $control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
8
- $control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default;
9
-
10
- %control {
11
- display: inline-flex;
12
- position: relative;
13
- align-items: center;
14
- justify-content: flex-start;
15
- height: 2.25em;
16
- padding-top: $control-padding-vertical;
17
- padding-right: $control-padding-horizontal;
18
- padding-bottom: $control-padding-vertical;
19
- padding-left: $control-padding-horizontal;
20
- border: $control-border-width solid transparent;
21
- border-radius: $control-radius;
22
- font-size: $control-font-size;
23
- line-height: 1.5;
24
- appearance: none;
25
- box-shadow: none;
26
- vertical-align: top;
27
-
28
- &[disabled] {
29
- cursor: not-allowed;
30
- }
31
- }
32
-
33
- @mixin control {
34
- @extend %control;
35
- }
36
-
37
- @mixin control-small {
38
- border-radius: $control-radius-small;
39
- font-size: $font-size-small;
40
- }
41
-
42
- @mixin control-large {
43
- font-size: $font-size-large;
44
- }
1
+ $control-radius: $radius !default;
2
+ $control-radius-small: $radius-small !default;
3
+
4
+ $control-font-size: $font-size-7 !default;
5
+ $control-border-width: 1px !default;
6
+
7
+ $control-padding-vertical: calc(0.375em - #{$control-border-width}) !default;
8
+ $control-padding-horizontal: calc(0.625em - #{$control-border-width}) !default;
9
+
10
+ %control {
11
+ display: inline-flex;
12
+ position: relative;
13
+ align-items: center;
14
+ justify-content: flex-start;
15
+ height: 2.25em;
16
+ padding-top: $control-padding-vertical;
17
+ padding-right: $control-padding-horizontal;
18
+ padding-bottom: $control-padding-vertical;
19
+ padding-left: $control-padding-horizontal;
20
+ border: $control-border-width solid transparent;
21
+ border-radius: $control-radius;
22
+ font-size: $control-font-size;
23
+ line-height: 1.5;
24
+ appearance: none;
25
+ box-shadow: none;
26
+ vertical-align: top;
27
+
28
+ &[disabled] {
29
+ cursor: not-allowed;
30
+ }
31
+ }
32
+
33
+ @mixin control {
34
+ @extend %control;
35
+ }
36
+
37
+ @mixin control-small {
38
+ border-radius: $control-radius-small;
39
+ font-size: $font-size-small;
40
+ }
41
+
42
+ @mixin control-large {
43
+ font-size: $font-size-large;
44
+ }
@@ -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
+ }