@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,87 +1,87 @@
1
- /* stylelint-disable selector-max-specificity, max-nesting-depth */
2
-
3
- .buttons {
4
- display: flex;
5
- flex-wrap: wrap;
6
- align-items: center;
7
- justify-content: flex-start;
8
-
9
- &.is-centered {
10
- justify-content: center;
11
- }
12
-
13
- &.is-right {
14
- justify-content: flex-end;
15
- }
16
-
17
- .button {
18
- margin-bottom: 0.5rem;
19
- margin-#{$user-right}: 0.5rem;
20
-
21
- &:only-child,
22
- &.is-fullwidth,
23
- &.is-full-width {
24
- margin-#{$user-right}: 0;
25
- }
26
-
27
- &.is-full-width-mobile,
28
- &.is-fullwidth-mobile {
29
- margin-#{$user-right}: 0;
30
-
31
- @include tablet {
32
- margin-#{$user-right}: 0.5rem;
33
- }
34
- }
35
- }
36
-
37
- &:last-child {
38
- margin-bottom: -0.5rem;
39
- }
40
-
41
- &:not(:last-child) {
42
- margin-bottom: 1rem;
43
- }
44
-
45
- &.has-addons,
46
- &.addons {
47
- .button {
48
- &:not(:first-child) {
49
- border-bottom-#{$user-left}-radius: 0;
50
- border-top-#{$user-left}-radius: 0;
51
- }
52
-
53
- &:not(:last-child) {
54
- border-bottom-#{$user-right}-radius: 0;
55
- border-top-#{$user-right}-radius: 0;
56
- margin-#{$user-right}: -1px;
57
- }
58
-
59
- &:last-child {
60
- margin-#{$user-right}: 0;
61
- }
62
-
63
- &:hover,
64
- &.is-hovered {
65
- z-index: $zindex-hover;
66
- }
67
-
68
- &.focus-visible,
69
- &.is-focused,
70
- &:active,
71
- &.is-active,
72
- &.is-selected {
73
- z-index: $zindex-focus;
74
-
75
- &:hover {
76
- z-index: $zindex-multi;
77
- }
78
- }
79
-
80
- &.is-expanded {
81
- flex-grow: 1;
82
- }
83
- }
84
- }
85
- }
86
-
87
- /* stylelint-enable selector-max-specificity, max-nesting-depth */
1
+ /* stylelint-disable selector-max-specificity, max-nesting-depth */
2
+
3
+ .buttons {
4
+ display: flex;
5
+ flex-wrap: wrap;
6
+ align-items: center;
7
+ justify-content: flex-start;
8
+
9
+ &.is-centered {
10
+ justify-content: center;
11
+ }
12
+
13
+ &.is-right {
14
+ justify-content: flex-end;
15
+ }
16
+
17
+ .button {
18
+ margin-bottom: 0.5rem;
19
+ margin-#{$user-right}: 0.5rem;
20
+
21
+ &:only-child,
22
+ &.is-fullwidth,
23
+ &.is-full-width {
24
+ margin-#{$user-right}: 0;
25
+ }
26
+
27
+ &.is-full-width-mobile,
28
+ &.is-fullwidth-mobile {
29
+ margin-#{$user-right}: 0;
30
+
31
+ @include tablet {
32
+ margin-#{$user-right}: 0.5rem;
33
+ }
34
+ }
35
+ }
36
+
37
+ &:last-child {
38
+ margin-bottom: -0.5rem;
39
+ }
40
+
41
+ &:not(:last-child) {
42
+ margin-bottom: 1rem;
43
+ }
44
+
45
+ &.has-addons,
46
+ &.addons {
47
+ .button {
48
+ &:not(:first-child) {
49
+ border-bottom-#{$user-left}-radius: 0;
50
+ border-top-#{$user-left}-radius: 0;
51
+ }
52
+
53
+ &:not(:last-child) {
54
+ border-bottom-#{$user-right}-radius: 0;
55
+ border-top-#{$user-right}-radius: 0;
56
+ margin-#{$user-right}: -1px;
57
+ }
58
+
59
+ &:last-child {
60
+ margin-#{$user-right}: 0;
61
+ }
62
+
63
+ &:hover,
64
+ &.is-hovered {
65
+ z-index: $zindex-hover;
66
+ }
67
+
68
+ &.focus-visible,
69
+ &.is-focused,
70
+ &:active,
71
+ &.is-active,
72
+ &.is-selected {
73
+ z-index: $zindex-focus;
74
+
75
+ &:hover {
76
+ z-index: $zindex-multi;
77
+ }
78
+ }
79
+
80
+ &.is-expanded {
81
+ flex-grow: 1;
82
+ }
83
+ }
84
+ }
85
+ }
86
+
87
+ /* stylelint-enable selector-max-specificity, max-nesting-depth */
@@ -1,6 +1,6 @@
1
- ### Components
2
-
3
- Create new component when you have a complex layout that requires many helper classes to recreate. Keep the following in mind while creating a new component .
4
-
5
- - File name should match the class of the component.
6
- - There should only be one top level class per file.
1
+ ### Components
2
+
3
+ Create new component when you have a complex layout that requires many helper classes to recreate. Keep the following in mind while creating a new component .
4
+
5
+ - File name should match the class of the component.
6
+ - There should only be one top level class per file.
@@ -1,20 +1,20 @@
1
- $features-icon: true !default;
2
- $icon-dimensions: 1em !default;
3
-
4
- .icon {
5
- display: inline-flex;
6
- align-items: center;
7
- justify-content: center;
8
-
9
- &,
10
- svg,
11
- img {
12
- width: $icon-dimensions;
13
- height: $icon-dimensions;
14
- }
15
-
16
- &.icon-rounded {
17
- padding: 0.6rem; // ensures icon is not cut off by rounded border
18
- border-radius: 50%;
19
- }
20
- }
1
+ $features-icon: true !default;
2
+ $icon-dimensions: 1em !default;
3
+
4
+ .icon {
5
+ display: inline-flex;
6
+ align-items: center;
7
+ justify-content: center;
8
+
9
+ &,
10
+ svg,
11
+ img {
12
+ width: $icon-dimensions;
13
+ height: $icon-dimensions;
14
+ }
15
+
16
+ &.icon-rounded {
17
+ padding: 0.6rem; // ensures icon is not cut off by rounded border
18
+ border-radius: 50%;
19
+ }
20
+ }
@@ -1,7 +1,7 @@
1
- @import './button.scss';
2
- @import './buttons.scss';
3
- @import './button-reset.scss';
4
- @import './link-button.scss';
5
- @import './markdown.scss'; // must be ordered after code-block
6
- @import './icon.scss';
7
- @import './table.scss';
1
+ @import './button.scss';
2
+ @import './buttons.scss';
3
+ @import './button-reset.scss';
4
+ @import './link-button.scss';
5
+ @import './markdown.scss'; // must be ordered after code-block
6
+ @import './icon.scss';
7
+ @import './table.scss';
@@ -1,30 +1,30 @@
1
- /*
2
- * For use on <button> elements to emulate the appearance of standard <a> tags.
3
- */
4
-
5
- .link-button {
6
- @include transparent-effects;
7
-
8
- display: inline-block;
9
- padding: 0;
10
- border: none;
11
- color: $hyperlink;
12
- cursor: pointer;
13
-
14
- &:active,
15
- &.is-active {
16
- text-decoration: underline !important;
17
- }
18
-
19
- &.focus-visible,
20
- &.is-focused,
21
- &:hover,
22
- &.is-hovered {
23
- color: $primary-hover;
24
- text-decoration: underline !important;
25
- }
26
-
27
- &:visited {
28
- color: $visited;
29
- }
30
- }
1
+ /*
2
+ * For use on <button> elements to emulate the appearance of standard <a> tags.
3
+ */
4
+
5
+ .link-button {
6
+ @include transparent-effects;
7
+
8
+ display: inline-block;
9
+ padding: 0;
10
+ border: none;
11
+ color: $hyperlink;
12
+ cursor: pointer;
13
+
14
+ &:active,
15
+ &.is-active {
16
+ text-decoration: underline !important;
17
+ }
18
+
19
+ &.focus-visible,
20
+ &.is-focused,
21
+ &:hover,
22
+ &.is-hovered {
23
+ color: $primary-hover;
24
+ text-decoration: underline !important;
25
+ }
26
+
27
+ &:visited {
28
+ color: $visited;
29
+ }
30
+ }
@@ -1,156 +1,156 @@
1
- /* stylelint-disable selector-max-compound-selectors */
2
-
3
- $markdown-paragraph-size: 1rem !default;
4
- $include-bare-code-styles: true !default;
5
- $list-top-spacing: 1rem !default;
6
-
7
- @if $include-bare-code-styles == true {
8
- /*
9
- * Within projects that desire bare-code styling, you may set the above variable to true and <pre><code>
10
- * Elements within .markdown will be styled.
11
- */
12
- .markdown {
13
- @include code-block;
14
- }
15
- }
16
-
17
- .markdown {
18
- // @include responsive-font-size($markdown-paragraph-size, 0.875rem); // experiment only
19
- font-size: $markdown-paragraph-size;
20
- line-height: 1.6;
21
-
22
- // Inline code
23
- :not(a):not(pre) > code {
24
- padding: 0.1em 0.2em;
25
- border-radius: 3px;
26
- background-color: $inline-code;
27
- word-wrap: break-word;
28
- font-smooth: auto;
29
- font-size: 0.85em;
30
- }
31
-
32
- img,
33
- video {
34
- max-width: 100%;
35
- height: auto;
36
- border: 0;
37
- }
38
-
39
- svg:not(:root) {
40
- overflow: hidden;
41
- }
42
-
43
- li {
44
- margin-top: 0.5em;
45
- }
46
-
47
- ul,
48
- ol {
49
- margin-#{$user-left}: 2.375rem;
50
- }
51
-
52
- ul {
53
- list-style-type: disc;
54
-
55
- ul {
56
- list-style-type: circle;
57
- margin: 0;
58
- margin-#{$user-left}: 1.25rem;
59
-
60
- ul {
61
- list-style-type: square;
62
- }
63
- }
64
-
65
- &:not(:first-child) {
66
- margin: 1rem 0;
67
- }
68
- }
69
-
70
- ol {
71
- list-style-type: decimal;
72
-
73
- ol {
74
- list-style-type: lower-alpha;
75
- margin: 0;
76
- margin-#{$user-left}: 1.25rem;
77
-
78
- ol {
79
- list-style-type: lower-roman;
80
- }
81
- }
82
-
83
- &:not(:first-child) {
84
- margin: 1rem 0;
85
- }
86
- }
87
-
88
- h1 {
89
- @include responsive-font-size($font-size-1);
90
-
91
- margin-top: none;
92
- margin-bottom: 0.75rem;
93
- word-wrap: break-word; // browser support fallback, because FF and IE
94
- word-break: break-word;
95
-
96
- &:first-of-type {
97
- margin-top: -0.625rem;
98
- margin-bottom: none;
99
- }
100
- }
101
-
102
- h2 {
103
- @include responsive-font-size($font-size-2);
104
-
105
- margin-top: 2rem;
106
- }
107
-
108
- h3 {
109
- @include responsive-font-size($font-size-3);
110
-
111
- margin-top: 1.875rem;
112
- margin-bottom: 1.125rem;
113
- }
114
-
115
- h4 {
116
- @include responsive-font-size($font-size-4);
117
-
118
- margin-top: 2.25rem;
119
- margin-bottom: 0.375rem;
120
- }
121
-
122
- h5 {
123
- @include responsive-font-size($font-size-5, false, 1.1rem);
124
-
125
- margin-top: 2.25rem;
126
- margin-bottom: 0.375rem;
127
- letter-spacing: 1px;
128
- }
129
-
130
- h6 {
131
- @include responsive-font-size($font-size-6, false, 1.05rem);
132
-
133
- margin-top: 2.25rem;
134
- margin-bottom: 0.375rem;
135
- letter-spacing: 1px;
136
- }
137
-
138
- p {
139
- margin-top: $markdown-paragraph-size;
140
- margin-bottom: none;
141
- word-wrap: break-word;
142
- }
143
-
144
- blockquote {
145
- margin: 1.2em 0 2em;
146
- padding: 0 0.8em;
147
- border-width: 0 0 0 3px;
148
- border-style: solid;
149
- border-color: $border;
150
-
151
- footer {
152
- color: $text-subtle;
153
- font-size: $font-size-8;
154
- }
155
- }
156
- }
1
+ /* stylelint-disable selector-max-compound-selectors */
2
+
3
+ $markdown-paragraph-size: 1rem !default;
4
+ $include-bare-code-styles: true !default;
5
+ $list-top-spacing: 1rem !default;
6
+
7
+ @if $include-bare-code-styles == true {
8
+ /*
9
+ * Within projects that desire bare-code styling, you may set the above variable to true and <pre><code>
10
+ * Elements within .markdown will be styled.
11
+ */
12
+ .markdown {
13
+ @include code-block;
14
+ }
15
+ }
16
+
17
+ .markdown {
18
+ // @include responsive-font-size($markdown-paragraph-size, 0.875rem); // experiment only
19
+ font-size: $markdown-paragraph-size;
20
+ line-height: 1.6;
21
+
22
+ // Inline code
23
+ :not(a):not(pre) > code {
24
+ padding: 0.1em 0.2em;
25
+ border-radius: 3px;
26
+ background-color: $inline-code;
27
+ word-wrap: break-word;
28
+ font-smooth: auto;
29
+ font-size: 0.85em;
30
+ }
31
+
32
+ img,
33
+ video {
34
+ max-width: 100%;
35
+ height: auto;
36
+ border: 0;
37
+ }
38
+
39
+ svg:not(:root) {
40
+ overflow: hidden;
41
+ }
42
+
43
+ li {
44
+ margin-top: 0.5em;
45
+ }
46
+
47
+ ul,
48
+ ol {
49
+ margin-#{$user-left}: 2.375rem;
50
+ }
51
+
52
+ ul {
53
+ list-style-type: disc;
54
+
55
+ ul {
56
+ list-style-type: circle;
57
+ margin: 0;
58
+ margin-#{$user-left}: 1.25rem;
59
+
60
+ ul {
61
+ list-style-type: square;
62
+ }
63
+ }
64
+
65
+ &:not(:first-child) {
66
+ margin: 1rem 0;
67
+ }
68
+ }
69
+
70
+ ol {
71
+ list-style-type: decimal;
72
+
73
+ ol {
74
+ list-style-type: lower-alpha;
75
+ margin: 0;
76
+ margin-#{$user-left}: 1.25rem;
77
+
78
+ ol {
79
+ list-style-type: lower-roman;
80
+ }
81
+ }
82
+
83
+ &:not(:first-child) {
84
+ margin: 1rem 0;
85
+ }
86
+ }
87
+
88
+ h1 {
89
+ @include responsive-font-size($font-size-1);
90
+
91
+ margin-top: none;
92
+ margin-bottom: 0.75rem;
93
+ word-wrap: break-word; // browser support fallback, because FF and IE
94
+ word-break: break-word;
95
+
96
+ &:first-of-type {
97
+ margin-top: -0.625rem;
98
+ margin-bottom: none;
99
+ }
100
+ }
101
+
102
+ h2 {
103
+ @include responsive-font-size($font-size-2);
104
+
105
+ margin-top: 2rem;
106
+ }
107
+
108
+ h3 {
109
+ @include responsive-font-size($font-size-3);
110
+
111
+ margin-top: 1.875rem;
112
+ margin-bottom: 1.125rem;
113
+ }
114
+
115
+ h4 {
116
+ @include responsive-font-size($font-size-4);
117
+
118
+ margin-top: 2.25rem;
119
+ margin-bottom: 0.375rem;
120
+ }
121
+
122
+ h5 {
123
+ @include responsive-font-size($font-size-5, false, 1.1rem);
124
+
125
+ margin-top: 2.25rem;
126
+ margin-bottom: 0.375rem;
127
+ letter-spacing: 1px;
128
+ }
129
+
130
+ h6 {
131
+ @include responsive-font-size($font-size-6, false, 1.05rem);
132
+
133
+ margin-top: 2.25rem;
134
+ margin-bottom: 0.375rem;
135
+ letter-spacing: 1px;
136
+ }
137
+
138
+ p {
139
+ margin-top: $markdown-paragraph-size;
140
+ margin-bottom: none;
141
+ word-wrap: break-word;
142
+ }
143
+
144
+ blockquote {
145
+ margin: 1.2em 0 2em;
146
+ padding: 0 0.8em;
147
+ border-width: 0 0 0 3px;
148
+ border-style: solid;
149
+ border-color: $border;
150
+
151
+ footer {
152
+ color: $text-subtle;
153
+ font-size: $font-size-8;
154
+ }
155
+ }
156
+ }