@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
@@ -1,67 +1,67 @@
1
- $table-cell-vertical-padding: $spacer-4 !default;
2
- $table-cell-horizontal-padding: $spacer-5 !default;
3
-
4
- $table-caption-padding: $spacer-6 !default;
5
- $table-caption-size: $font-size-9 !default;
6
- $table-caption-spacing: $letter-spacing-medium !default;
7
-
8
- .table-wrapper {
9
- overflow-x: auto;
10
- overflow-y: hidden;
11
- -webkit-overflow-scrolling: touch;
12
- }
13
-
14
- .table {
15
- width: 100%;
16
- font-size: $font-size-8;
17
- border-collapse: collapse;
18
- table-layout: auto;
19
-
20
- caption {
21
- padding: $table-caption-padding;
22
- font-size: $table-caption-size;
23
- font-weight: $weight-semibold;
24
- letter-spacing: $table-caption-spacing;
25
- text-align: $user-right;
26
- text-transform: uppercase;
27
- }
28
-
29
- th,
30
- td {
31
- display: table-cell;
32
- word-wrap: break-word;
33
- padding: $table-cell-vertical-padding $table-cell-horizontal-padding;
34
- border-top: 1px solid $border;
35
- line-height: 1.5;
36
- vertical-align: top;
37
- }
38
-
39
- thead th {
40
- border-top: 0;
41
- border-bottom: 1px solid $border;
42
- }
43
-
44
- th:not([align]) {
45
- text-align: $user-left;
46
- }
47
-
48
- &.table-stacked-mobile {
49
- @include discouraged-mobile {
50
- thead,
51
- tfoot {
52
- display: none;
53
- }
54
-
55
- td {
56
- display: block;
57
- width: 100%;
58
- padding: $table-cell-vertical-padding 0;
59
- }
60
-
61
- td:not(:nth-child(1)) {
62
- padding-top: 0;
63
- border-width: 0;
64
- }
65
- }
66
- }
67
- }
1
+ $table-cell-vertical-padding: $spacer-4 !default;
2
+ $table-cell-horizontal-padding: $spacer-5 !default;
3
+
4
+ $table-caption-padding: $spacer-6 !default;
5
+ $table-caption-size: $font-size-9 !default;
6
+ $table-caption-spacing: $letter-spacing-medium !default;
7
+
8
+ .table-wrapper {
9
+ overflow-x: auto;
10
+ overflow-y: hidden;
11
+ -webkit-overflow-scrolling: touch;
12
+ }
13
+
14
+ .table {
15
+ width: 100%;
16
+ font-size: $font-size-8;
17
+ border-collapse: collapse;
18
+ table-layout: auto;
19
+
20
+ caption {
21
+ padding: $table-caption-padding;
22
+ font-size: $table-caption-size;
23
+ font-weight: $weight-semibold;
24
+ letter-spacing: $table-caption-spacing;
25
+ text-align: $user-right;
26
+ text-transform: uppercase;
27
+ }
28
+
29
+ th,
30
+ td {
31
+ display: table-cell;
32
+ word-wrap: break-word;
33
+ padding: $table-cell-vertical-padding $table-cell-horizontal-padding;
34
+ border-top: 1px solid $border;
35
+ line-height: 1.5;
36
+ vertical-align: top;
37
+ }
38
+
39
+ thead th {
40
+ border-top: 0;
41
+ border-bottom: 1px solid $border;
42
+ }
43
+
44
+ th:not([align]) {
45
+ text-align: $user-left;
46
+ }
47
+
48
+ &.table-stacked-mobile {
49
+ @include discouraged-mobile {
50
+ thead,
51
+ tfoot {
52
+ display: none;
53
+ }
54
+
55
+ td {
56
+ display: block;
57
+ width: 100%;
58
+ padding: $table-cell-vertical-padding 0;
59
+ }
60
+
61
+ td:not(:nth-child(1)) {
62
+ padding-top: 0;
63
+ border-width: 0;
64
+ }
65
+ }
66
+ }
67
+ }
@@ -1,8 +1,8 @@
1
- @keyframes spinAround {
2
- from {
3
- transform: rotate(0deg);
4
- }
5
- to {
6
- transform: rotate(359deg);
7
- }
8
- }
1
+ @keyframes spinAround {
2
+ from {
3
+ transform: rotate(0deg);
4
+ }
5
+ to {
6
+ transform: rotate(359deg);
7
+ }
8
+ }
@@ -1,35 +1,35 @@
1
- @if ($focus-visible-use-polyfill) {
2
- .js-focus-visible .has-default-focus *:focus:not(.focus-visible),
3
- .js-focus-visible .default-focus *:focus:not(.focus-visible) {
4
- outline: none;
5
- }
6
-
7
- .focus-visible.has-inner-focus,
8
- .focus-visible.inner-focus {
9
- outline-offset: -$focus-outline-offset;
10
- }
11
-
12
- .has-default-focus,
13
- .default-focus {
14
- .is-focused,
15
- .focus-visible {
16
- @extend %focus;
17
-
18
- &.has-inner-focus,
19
- &.inner-focus {
20
- outline-color: currentColor;
21
- }
22
- }
23
- }
24
- } @else {
25
- .has-default-focus *:focus-visible,
26
- .default-focus *:focus-visible {
27
- @extend %focus;
28
-
29
- &.has-inner-focus,
30
- &.inner-focus {
31
- outline-color: currentColor;
32
- outline-offset: -$focus-outline-offset;
33
- }
34
- }
35
- }
1
+ @if ($focus-visible-use-polyfill) {
2
+ .js-focus-visible .has-default-focus *:focus:not(.focus-visible),
3
+ .js-focus-visible .default-focus *:focus:not(.focus-visible) {
4
+ outline: none;
5
+ }
6
+
7
+ .focus-visible.has-inner-focus,
8
+ .focus-visible.inner-focus {
9
+ outline-offset: -$focus-outline-offset;
10
+ }
11
+
12
+ .has-default-focus,
13
+ .default-focus {
14
+ .is-focused,
15
+ .focus-visible {
16
+ @extend %focus;
17
+
18
+ &.has-inner-focus,
19
+ &.inner-focus {
20
+ outline-color: currentColor;
21
+ }
22
+ }
23
+ }
24
+ } @else {
25
+ .has-default-focus *:focus-visible,
26
+ .default-focus *:focus-visible {
27
+ @extend %focus;
28
+
29
+ &.has-inner-focus,
30
+ &.inner-focus {
31
+ outline-color: currentColor;
32
+ outline-offset: -$focus-outline-offset;
33
+ }
34
+ }
35
+ }
@@ -1,28 +1,28 @@
1
- html {
2
- font-size: $document-font-size;
3
- }
4
-
5
- html,
6
- body {
7
- font-family: $normal-font-stack;
8
- -webkit-font-smoothing: antialiased;
9
- font-weight: $weight-normal;
10
- text-rendering: optimizeLegibility;
11
- }
12
-
13
- kbd,
14
- pre,
15
- samp {
16
- font-family: $monospace-font-stack !important;
17
- -moz-osx-font-smoothing: auto;
18
- -webkit-font-smoothing: auto;
19
- }
20
-
21
- code {
22
- direction: ltr;
23
- font-family: $monospace-font-stack;
24
- }
25
-
26
- a > code {
27
- font-family: $normal-font-stack;
28
- }
1
+ html {
2
+ font-size: $document-font-size;
3
+ }
4
+
5
+ html,
6
+ body {
7
+ font-family: $normal-font-stack;
8
+ -webkit-font-smoothing: antialiased;
9
+ font-weight: $weight-normal;
10
+ text-rendering: optimizeLegibility;
11
+ }
12
+
13
+ kbd,
14
+ pre,
15
+ samp {
16
+ font-family: $monospace-font-stack !important;
17
+ -moz-osx-font-smoothing: auto;
18
+ -webkit-font-smoothing: auto;
19
+ }
20
+
21
+ code {
22
+ direction: ltr;
23
+ font-family: $monospace-font-stack;
24
+ }
25
+
26
+ a > code {
27
+ font-family: $normal-font-stack;
28
+ }
@@ -1,6 +1,6 @@
1
- @import 'normalize.css';
2
- @import 'minireset.css';
3
- @import 'themes.scss';
4
- @import 'font-stack.scss';
5
- @import 'animations.scss';
6
- @import 'focus.scss';
1
+ @import 'normalize.css';
2
+ @import 'minireset.css';
3
+ @import 'themes.scss';
4
+ @import 'font-stack.scss';
5
+ @import 'animations.scss';
6
+ @import 'focus.scss';
@@ -1,86 +1,86 @@
1
- @use 'sass:map';
2
-
3
- $root-theme: 'light' !default;
4
- $print-theme: 'light' !default;
5
-
6
- // Ensure that the root theme exists
7
- @if map.has-key($themes, $root-theme) != true {
8
- @error "Cannot build themes because $root-theme (#{$root-theme}) is set to a theme that does not exist in $themes map.";
9
- }
10
-
11
- // Ensure that the print theme exists
12
- @if map.has-key($themes, $print-theme) != true {
13
- @error "Cannot build themes because $print-theme (#{$print-theme}) is set to a theme that does not exist in $themes map.";
14
- }
15
-
16
- $theme-names: map.keys($themes);
17
-
18
- // Validation: ensure that all values in the root theme are in the other themes too
19
- @each $root-color-name, $val in map.get($themes, $root-theme) {
20
- @each $theme-name in $theme-names {
21
- @if $theme-name != $root-theme {
22
- @if map.has-key(map.get($themes, $theme-name), $root-color-name) != true {
23
- @error '#{$root-color-name} from #{$root-theme} does not exist in theme: #{$theme-name}.';
24
- }
25
- }
26
- }
27
- }
28
-
29
- // Validation: ensure all properties in non-root themes exist in root
30
- @each $theme-name in $theme-names {
31
- $theme: map.get($themes, $theme-name);
32
- @if $theme-name != $root-theme {
33
- $root: map.get($themes, $root-theme);
34
- @each $color-name, $val in $theme {
35
- @if map.has-key($root, $color-name) != true {
36
- @error '#{$color-name} from #{$theme-name} does not exist in theme: #{$theme-name}.';
37
- }
38
- }
39
- }
40
- }
41
-
42
- @each $key, $value in $themes {
43
- // Set the default theme
44
- @if $key == $root-theme {
45
- :root {
46
- @each $colorName, $colorVal in map.get($themes, $key) {
47
- --theme-#{$colorName}: #{$colorVal};
48
- }
49
- }
50
- }
51
-
52
- @if $key == $print-theme {
53
- .theme-#{$key} {
54
- @each $colorName, $colorVal in map.get($themes, $key) {
55
- --theme-#{$colorName}: #{$colorVal};
56
- }
57
- }
58
- } @else {
59
- // Set the rest of the themes, exclude them from print styling.
60
- @media not print {
61
- .theme-#{$key} {
62
- @each $colorName, $colorVal in map-get($themes, $key) {
63
- --theme-#{$colorName}: #{$colorVal};
64
- }
65
- }
66
- }
67
- }
68
- }
69
-
70
- %theme-base-styles {
71
- outline-color: $text;
72
- background-color: $body-background;
73
- color: $text;
74
- }
75
-
76
- @each $key, $value in $themes {
77
- .theme-#{$key} {
78
- @extend %theme-base-styles;
79
- }
80
- }
81
-
82
- @each $key, $value in $color-schemes {
83
- .theme-#{$key} {
84
- color-scheme: #{$value};
85
- }
86
- }
1
+ @use 'sass:map';
2
+
3
+ $root-theme: 'light' !default;
4
+ $print-theme: 'light' !default;
5
+
6
+ // Ensure that the root theme exists
7
+ @if map.has-key($themes, $root-theme) != true {
8
+ @error "Cannot build themes because $root-theme (#{$root-theme}) is set to a theme that does not exist in $themes map.";
9
+ }
10
+
11
+ // Ensure that the print theme exists
12
+ @if map.has-key($themes, $print-theme) != true {
13
+ @error "Cannot build themes because $print-theme (#{$print-theme}) is set to a theme that does not exist in $themes map.";
14
+ }
15
+
16
+ $theme-names: map.keys($themes);
17
+
18
+ // Validation: ensure that all values in the root theme are in the other themes too
19
+ @each $root-color-name, $val in map.get($themes, $root-theme) {
20
+ @each $theme-name in $theme-names {
21
+ @if $theme-name != $root-theme {
22
+ @if map.has-key(map.get($themes, $theme-name), $root-color-name) != true {
23
+ @error '#{$root-color-name} from #{$root-theme} does not exist in theme: #{$theme-name}.';
24
+ }
25
+ }
26
+ }
27
+ }
28
+
29
+ // Validation: ensure all properties in non-root themes exist in root
30
+ @each $theme-name in $theme-names {
31
+ $theme: map.get($themes, $theme-name);
32
+ @if $theme-name != $root-theme {
33
+ $root: map.get($themes, $root-theme);
34
+ @each $color-name, $val in $theme {
35
+ @if map.has-key($root, $color-name) != true {
36
+ @error '#{$color-name} from #{$theme-name} does not exist in theme: #{$theme-name}.';
37
+ }
38
+ }
39
+ }
40
+ }
41
+
42
+ @each $key, $value in $themes {
43
+ // Set the default theme
44
+ @if $key == $root-theme {
45
+ :root {
46
+ @each $colorName, $colorVal in map.get($themes, $key) {
47
+ --theme-#{$colorName}: #{$colorVal};
48
+ }
49
+ }
50
+ }
51
+
52
+ @if $key == $print-theme {
53
+ .theme-#{$key} {
54
+ @each $colorName, $colorVal in map.get($themes, $key) {
55
+ --theme-#{$colorName}: #{$colorVal};
56
+ }
57
+ }
58
+ } @else {
59
+ // Set the rest of the themes, exclude them from print styling.
60
+ @media not print {
61
+ .theme-#{$key} {
62
+ @each $colorName, $colorVal in map-get($themes, $key) {
63
+ --theme-#{$colorName}: #{$colorVal};
64
+ }
65
+ }
66
+ }
67
+ }
68
+ }
69
+
70
+ %theme-base-styles {
71
+ outline-color: $text;
72
+ background-color: $body-background;
73
+ color: $text;
74
+ }
75
+
76
+ @each $key, $value in $themes {
77
+ .theme-#{$key} {
78
+ @extend %theme-base-styles;
79
+ }
80
+ }
81
+
82
+ @each $key, $value in $color-schemes {
83
+ .theme-#{$key} {
84
+ color-scheme: #{$value};
85
+ }
86
+ }