@microsoft/atlas-css 3.66.0 → 4.0.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/atlas-css",
3
- "version": "3.66.0",
3
+ "version": "4.0.0",
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",
@@ -52,15 +52,6 @@ $accordion-transition: transform 0.15s !default;
52
52
  flex-shrink: 0;
53
53
  }
54
54
 
55
- &:hover {
56
- color: $primary-hover;
57
-
58
- &::before,
59
- &::after {
60
- border-color: $primary-hover;
61
- }
62
- }
63
-
64
55
  .accordion-header {
65
56
  flex-grow: 1;
66
57
  }
@@ -1,9 +1,13 @@
1
+ /* stylelint-disable max-nesting-depth, selector-max-specificity */
2
+
1
3
  $popover-background-color: $body-background !default;
2
4
  $popover-border: $border-width solid $border !default;
3
5
  $popover-border-radius: $border-radius !default;
4
6
  $popover-shadow: $box-shadow-heavy !default;
5
7
  $popover-width: 224px !default;
6
8
 
9
+ $popover-chevron-color: $border !default;
10
+
7
11
  .popover {
8
12
  display: inline-block;
9
13
  position: relative;
@@ -19,31 +23,81 @@ $popover-width: 224px !default;
19
23
  .popover-content {
20
24
  position: absolute;
21
25
  width: $popover-width;
22
- margin-block-start: $spacer-3;
23
26
  padding: $spacer-5;
27
+ transform: none;
28
+ inset-inline-start: 0;
24
29
  border: $popover-border;
25
30
  border-radius: $popover-border-radius;
26
31
  background-color: $popover-background-color;
27
32
  box-shadow: $popover-shadow;
33
+
34
+ // hide popover until after position is calculated, then show
35
+ visibility: hidden;
28
36
  z-index: $zindex-popover;
29
37
  }
30
38
 
31
- &.popover-right {
39
+ &.popover-top {
32
40
  .popover-content {
33
- inset-inline-end: 0;
41
+ inset-block-end: 100%;
42
+ margin-block-end: $spacer-3;
34
43
  }
35
44
  }
36
45
 
37
- &.popover-center {
46
+ &.popover-caret {
38
47
  .popover-content {
39
- inset-inline-start: -25%;
48
+ margin-block-start: 0;
49
+ overflow: visible;
50
+
51
+ &::before {
52
+ @include chevron-up;
53
+
54
+ position: absolute;
55
+ inset-inline-start: var(--caret-left, 50%);
56
+ inset-inline-end: auto;
57
+ inset-block-start: calc($chevron-arrow-size / -1.75);
58
+ border-color: $popover-chevron-color;
59
+ background-color: $popover-background-color;
60
+ z-index: 2;
61
+ }
62
+
63
+ [dir='rtl'] & {
64
+ &::before {
65
+ transform: rotate(-135deg);
66
+ inset-inline-start: var(--caret-left, 50%);
67
+ inset-inline-end: var(--caret-left, 50%);
68
+ }
69
+ }
40
70
  }
41
71
  }
42
72
 
43
- &.popover-top {
73
+ &.popover-caret.popover-caret-bottom {
44
74
  .popover-content {
45
- inset-block-end: 100%;
75
+ margin-block-start: 0;
46
76
  margin-block-end: $spacer-3;
77
+ overflow: visible;
78
+
79
+ &::before {
80
+ @include chevron-down;
81
+
82
+ position: absolute;
83
+ inset-inline-start: var(--caret-left, 50%);
84
+ inset-inline-end: auto;
85
+ inset-block-start: auto;
86
+ inset-block-end: calc($chevron-arrow-size / -1.75);
87
+ border-color: $popover-chevron-color;
88
+ background-color: $popover-background-color;
89
+ z-index: 2;
90
+ }
91
+
92
+ [dir='rtl'] & {
93
+ &::before {
94
+ transform: rotate(45deg);
95
+ inset-inline-start: var(--caret-left, 50%);
96
+ inset-inline-end: var(--caret-left, 50%);
97
+ }
98
+ }
47
99
  }
48
100
  }
49
101
  }
102
+
103
+ /* stylelint-enable selector-max-specificity, max-nesting-depth */
@@ -46,3 +46,9 @@ $chevron-up-rotate-scale-xy-rtl: $chevron-down-rotate-rtl scaleY(-1) scaleX(-1);
46
46
 
47
47
  transform: $chevron-down-rotate-rtl;
48
48
  }
49
+
50
+ @mixin chevron-up {
51
+ @extend %chevron;
52
+
53
+ transform: $chevron-up-rotate;
54
+ }