@microsoft/atlas-css 3.33.0 → 3.34.1
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/dist/class-names.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/package.json +7 -7
- package/src/atomics/colors.scss +10 -2
- package/src/components/banner.scss +28 -7
- package/src/components/notification.scss +37 -22
- package/src/core/animations.scss +29 -0
- package/src/mixins/dismiss.scss +22 -0
- package/src/mixins/index.scss +1 -0
- package/src/mixins/media-queries.scss +13 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/atlas-css",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.34.1",
|
|
4
4
|
"description": "Styles backing the Atlas Design System used by Microsoft's Developer Relations.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -73,17 +73,17 @@
|
|
|
73
73
|
"license": "MIT",
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@microsoft/stylelint-config-atlas": "4.1.0",
|
|
76
|
-
"@parcel/transformer-sass": "^2.
|
|
76
|
+
"@parcel/transformer-sass": "^2.9.3",
|
|
77
77
|
"css-tree": "^2.3.1",
|
|
78
78
|
"eslint-plugin-security": "^1.7.1",
|
|
79
79
|
"fs-extra": "^11.1.1",
|
|
80
|
-
"parcel": "^2.
|
|
81
|
-
"lightningcss": "1.
|
|
82
|
-
"prettier": "^2.8.
|
|
83
|
-
"quicktype-core": "^23.0.
|
|
80
|
+
"parcel": "^2.9.3",
|
|
81
|
+
"lightningcss": "1.21.1",
|
|
82
|
+
"prettier": "^2.8.8",
|
|
83
|
+
"quicktype-core": "^23.0.48",
|
|
84
84
|
"grass": "^1.0.2",
|
|
85
85
|
"sass-export": "^2.1.2",
|
|
86
|
-
"stylelint": "^
|
|
86
|
+
"stylelint": "^15.9.0",
|
|
87
87
|
"stylelint-config-prettier": "^9.0.5",
|
|
88
88
|
"stylelint-prettier": "^3.0.0",
|
|
89
89
|
"wireit": "^0.9.5"
|
package/src/atomics/colors.scss
CHANGED
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
$invert: nth($color-set, $color-index-invert);
|
|
10
10
|
|
|
11
11
|
.color-#{$name} {
|
|
12
|
-
|
|
12
|
+
@if $name == 'warning' {
|
|
13
|
+
color: $active !important;
|
|
14
|
+
} @else {
|
|
15
|
+
color: $base !important;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
a.color-#{$name} {
|
|
16
20
|
&:hover {
|
|
17
|
-
|
|
21
|
+
@if $name == 'warning' {
|
|
22
|
+
color: $active !important;
|
|
23
|
+
} @else {
|
|
24
|
+
color: $hover !important;
|
|
25
|
+
}
|
|
18
26
|
}
|
|
19
27
|
|
|
20
28
|
@include focus-visible {
|
|
@@ -7,20 +7,24 @@ $banner-color: $info-dark !default;
|
|
|
7
7
|
$banner-border-color: $border-white-high-contrast !default;
|
|
8
8
|
$banner-border-width: $border-width !default;
|
|
9
9
|
|
|
10
|
+
$banner-dismiss-margin: $spacer-2 !default;
|
|
11
|
+
|
|
10
12
|
.banner {
|
|
11
13
|
@extend %layout-gap;
|
|
12
14
|
|
|
13
|
-
display:
|
|
15
|
+
display: grid;
|
|
14
16
|
position: relative;
|
|
17
|
+
grid-template: auto / 1fr auto;
|
|
18
|
+
grid-template-areas: 'banner-content dismiss';
|
|
15
19
|
outline-color: $text;
|
|
16
20
|
background-color: $banner-background;
|
|
17
21
|
color: $banner-color;
|
|
18
22
|
font-size: $banner-font-size;
|
|
23
|
+
line-height: $line-height-normal;
|
|
19
24
|
padding-block: $banner-padding;
|
|
20
25
|
word-wrap: break-word;
|
|
21
26
|
word-break: break-word;
|
|
22
27
|
border-block: $banner-border-width solid $banner-border-color;
|
|
23
|
-
line-height: $line-height-normal;
|
|
24
28
|
|
|
25
29
|
&.is-loading {
|
|
26
30
|
color: transparent;
|
|
@@ -33,16 +37,33 @@ $banner-border-width: $border-width !default;
|
|
|
33
37
|
@include loader;
|
|
34
38
|
|
|
35
39
|
position: absolute;
|
|
40
|
+
inset-block-start: $banner-padding;
|
|
41
|
+
inset-inline-start: $layout-gap;
|
|
36
42
|
border-color: transparent transparent $banner-color $banner-color;
|
|
43
|
+
|
|
44
|
+
@include widescreen {
|
|
45
|
+
inset-inline-start: $layout-widescreen-gap;
|
|
46
|
+
}
|
|
37
47
|
}
|
|
38
48
|
}
|
|
39
49
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
font-weight: $weight-semibold;
|
|
50
|
+
.banner-content {
|
|
51
|
+
grid-area: banner-content;
|
|
43
52
|
|
|
44
|
-
.
|
|
45
|
-
color:
|
|
53
|
+
a:not(.button) {
|
|
54
|
+
color: currentColor;
|
|
55
|
+
font-weight: $weight-semibold;
|
|
56
|
+
|
|
57
|
+
.theme-high-contrast & {
|
|
58
|
+
color: $hyperlink;
|
|
59
|
+
}
|
|
46
60
|
}
|
|
47
61
|
}
|
|
62
|
+
|
|
63
|
+
.banner-dismiss {
|
|
64
|
+
@include dismiss-square;
|
|
65
|
+
|
|
66
|
+
grid-area: dismiss;
|
|
67
|
+
margin-inline-start: $banner-dismiss-margin;
|
|
68
|
+
}
|
|
48
69
|
}
|
|
@@ -11,19 +11,23 @@ $notification-border-radius: $border-radius !default;
|
|
|
11
11
|
$notification-icon-inline-spacing: 0.375em !default;
|
|
12
12
|
$notification-icon-block-spacing: 0.2em !default;
|
|
13
13
|
|
|
14
|
+
$notification-dismiss-margin: $spacer-2 !default;
|
|
15
|
+
|
|
14
16
|
.notification {
|
|
15
|
-
display:
|
|
17
|
+
display: grid;
|
|
16
18
|
position: relative;
|
|
17
19
|
padding: $notification-padding;
|
|
20
|
+
grid-template: auto / 1fr auto;
|
|
21
|
+
grid-template-areas: 'notification-content dismiss';
|
|
18
22
|
border: $notification-border-width solid $notification-border-color;
|
|
19
23
|
border-radius: $notification-border-radius;
|
|
20
24
|
outline-color: $text;
|
|
21
25
|
background-color: $notification-background;
|
|
22
26
|
color: $notification-color;
|
|
23
27
|
font-size: $notification-font-size;
|
|
28
|
+
line-height: $line-height-normal;
|
|
24
29
|
word-wrap: break-word;
|
|
25
30
|
word-break: break-word;
|
|
26
|
-
line-height: $line-height-normal;
|
|
27
31
|
|
|
28
32
|
@each $name, $color-set in $colors {
|
|
29
33
|
$base: nth($color-set, $color-index-base);
|
|
@@ -58,29 +62,40 @@ $notification-icon-block-spacing: 0.2em !default;
|
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
|
-
.notification-
|
|
62
|
-
|
|
63
|
-
color: currentColor;
|
|
64
|
-
font-weight: $weight-semibold;
|
|
65
|
-
}
|
|
65
|
+
.notification-content {
|
|
66
|
+
grid-area: notification-content;
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
.
|
|
69
|
-
color:
|
|
68
|
+
.notification-title,
|
|
69
|
+
a:not(.button) {
|
|
70
|
+
color: currentColor;
|
|
71
|
+
font-weight: $weight-semibold;
|
|
70
72
|
}
|
|
71
|
-
}
|
|
72
73
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
margin-block-end: $layout-1;
|
|
78
|
-
|
|
79
|
-
.icon {
|
|
80
|
-
flex-shrink: 0;
|
|
81
|
-
align-self: start;
|
|
82
|
-
margin-inline-end: $notification-icon-inline-spacing;
|
|
83
|
-
margin-block-start: $notification-icon-block-spacing;
|
|
74
|
+
a:not(.button) {
|
|
75
|
+
.theme-high-contrast & {
|
|
76
|
+
color: $hyperlink;
|
|
77
|
+
}
|
|
84
78
|
}
|
|
79
|
+
|
|
80
|
+
.notification-title {
|
|
81
|
+
display: flex;
|
|
82
|
+
align-items: center;
|
|
83
|
+
justify-content: flex-start;
|
|
84
|
+
margin-block-end: $layout-1;
|
|
85
|
+
|
|
86
|
+
.icon {
|
|
87
|
+
flex-shrink: 0;
|
|
88
|
+
align-self: start;
|
|
89
|
+
margin-inline-end: $notification-icon-inline-spacing;
|
|
90
|
+
margin-block-start: $notification-icon-block-spacing;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.notification-dismiss {
|
|
96
|
+
@include dismiss-square;
|
|
97
|
+
|
|
98
|
+
grid-area: dismiss;
|
|
99
|
+
margin-inline-start: $notification-dismiss-margin;
|
|
85
100
|
}
|
|
86
101
|
}
|
package/src/core/animations.scss
CHANGED
|
@@ -24,3 +24,32 @@
|
|
|
24
24
|
transform: scale(1);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
@keyframes slide-up-fade-out {
|
|
29
|
+
100% {
|
|
30
|
+
transform: translateY(-100%);
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes fade-out {
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.animation-fade {
|
|
42
|
+
animation: fade-out 0.4s ease-in forwards;
|
|
43
|
+
|
|
44
|
+
@include prefers-reduced-motion {
|
|
45
|
+
animation-duration: 0s;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.animation-slide-up {
|
|
50
|
+
animation: slide-up-fade-out 0.4s ease-in forwards;
|
|
51
|
+
|
|
52
|
+
@include prefers-reduced-motion {
|
|
53
|
+
animation-duration: 0s;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
%dismiss {
|
|
2
|
+
@include transparent-effects;
|
|
3
|
+
|
|
4
|
+
display: inline-block;
|
|
5
|
+
color: currentColor;
|
|
6
|
+
font-size: 1rem;
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@mixin dismiss {
|
|
11
|
+
@extend %dismiss;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@mixin dismiss-square {
|
|
15
|
+
@extend %dismiss;
|
|
16
|
+
|
|
17
|
+
width: 1em;
|
|
18
|
+
height: 1em;
|
|
19
|
+
padding: 0;
|
|
20
|
+
border: 0;
|
|
21
|
+
border-radius: $border-radius-rounded;
|
|
22
|
+
}
|
package/src/mixins/index.scss
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// Orientation
|
|
2
2
|
|
|
3
3
|
@mixin orientation-portrait {
|
|
4
|
-
@media screen and (
|
|
5
|
-
screen and (
|
|
4
|
+
@media screen and (aspect-ratio <= 1/1),
|
|
5
|
+
screen and (resolution >= 120dpi) and (aspect-ratio <= 1/1) {
|
|
6
6
|
@content;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@mixin orientation-landscape {
|
|
11
|
-
@media screen and (
|
|
12
|
-
screen and (
|
|
11
|
+
@media screen and (aspect-ratio >= 1/1),
|
|
12
|
+
screen and (resolution >= 120dpi) and (aspect-ratio >= 1/1) {
|
|
13
13
|
@content;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
@mixin orientation-square {
|
|
18
|
-
@media screen and (aspect-ratio
|
|
19
|
-
screen and (
|
|
18
|
+
@media screen and (aspect-ratio <= 1/1),
|
|
19
|
+
screen and (resolution >= 120dpi) and (aspect-ratio <= 1/1) {
|
|
20
20
|
@content;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
// Please avoid using this mixin if possible. It doesn't follow the mobile-first approach to writing CSS.
|
|
45
45
|
@mixin discouraged-mobile {
|
|
46
|
-
@media screen and (max-width: $breakpoint-tablet - 1px) {
|
|
46
|
+
@media screen and (max-width: ($breakpoint-tablet - 1px)) {
|
|
47
47
|
@content;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -53,3 +53,9 @@
|
|
|
53
53
|
@content;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
+
|
|
57
|
+
@mixin prefers-reduced-motion {
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
@content;
|
|
60
|
+
}
|
|
61
|
+
}
|