@stackoverflow/stacks 0.75.0 → 0.76.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 (87) hide show
  1. package/LICENSE.MD +9 -9
  2. package/README.md +47 -47
  3. package/dist/controllers/index.d.ts +7 -0
  4. package/dist/controllers/s-expandable-control.d.ts +17 -0
  5. package/dist/controllers/s-modal.d.ts +97 -0
  6. package/dist/controllers/s-navigation-tablist.d.ts +36 -0
  7. package/dist/controllers/s-popover.d.ts +155 -0
  8. package/dist/controllers/s-table.d.ts +8 -0
  9. package/dist/controllers/s-tooltip.d.ts +82 -0
  10. package/dist/controllers/s-uploader.d.ts +48 -0
  11. package/dist/css/stacks.css +86 -53
  12. package/dist/css/stacks.min.css +1 -1
  13. package/dist/index.d.ts +3 -0
  14. package/dist/js/stacks.js +6128 -5505
  15. package/dist/js/stacks.min.js +1 -1
  16. package/dist/stacks.d.ts +21 -0
  17. package/lib/css/atomic/_stacks-borders.less +378 -378
  18. package/lib/css/atomic/_stacks-colors.less +209 -209
  19. package/lib/css/atomic/_stacks-flex.less +374 -374
  20. package/lib/css/atomic/_stacks-grid.less +174 -173
  21. package/lib/css/atomic/_stacks-misc.less +343 -343
  22. package/lib/css/atomic/_stacks-spacing.less +168 -168
  23. package/lib/css/atomic/_stacks-typography.less +273 -273
  24. package/lib/css/atomic/_stacks-width-height.less +195 -195
  25. package/lib/css/base/_stacks-body.less +44 -46
  26. package/lib/css/base/_stacks-configuration-static.less +59 -59
  27. package/lib/css/base/_stacks-icons.less +20 -20
  28. package/lib/css/base/_stacks-internals.less +220 -230
  29. package/lib/css/base/_stacks-reset-meyer.less +64 -64
  30. package/lib/css/base/_stacks-reset-normalize.less +449 -449
  31. package/lib/css/base/_stacks-reset.less +20 -20
  32. package/lib/css/components/_stacks-activity-indicator.less +45 -45
  33. package/lib/css/components/_stacks-avatars.less +189 -189
  34. package/lib/css/components/_stacks-badges.less +209 -209
  35. package/lib/css/components/_stacks-banners.less +80 -81
  36. package/lib/css/components/_stacks-blank-states.less +26 -26
  37. package/lib/css/components/_stacks-breadcrumbs.less +44 -44
  38. package/lib/css/components/_stacks-button-groups.less +104 -104
  39. package/lib/css/components/_stacks-buttons.less +658 -660
  40. package/lib/css/components/_stacks-cards.less +44 -44
  41. package/lib/css/components/_stacks-code-blocks.less +130 -130
  42. package/lib/css/components/_stacks-collapsible.less +104 -104
  43. package/lib/css/components/_stacks-inputs.less +728 -728
  44. package/lib/css/components/_stacks-link-previews.less +136 -136
  45. package/lib/css/components/_stacks-links.less +218 -218
  46. package/lib/css/components/_stacks-menu.less +47 -47
  47. package/lib/css/components/_stacks-modals.less +133 -133
  48. package/lib/css/components/_stacks-navigation.less +146 -146
  49. package/lib/css/components/_stacks-notices.less +233 -233
  50. package/lib/css/components/_stacks-page-titles.less +60 -60
  51. package/lib/css/components/_stacks-pagination.less +55 -55
  52. package/lib/css/components/_stacks-popovers.less +197 -197
  53. package/lib/css/components/_stacks-post-summary.less +425 -425
  54. package/lib/css/components/_stacks-progress-bars.less +331 -331
  55. package/lib/css/components/_stacks-prose.less +503 -503
  56. package/lib/css/components/_stacks-spinner.less +107 -107
  57. package/lib/css/components/_stacks-tables.less +341 -341
  58. package/lib/css/components/_stacks-tags.less +236 -244
  59. package/lib/css/components/_stacks-toggle-switches.less +144 -144
  60. package/lib/css/components/_stacks-topbar.less +425 -440
  61. package/lib/css/components/_stacks-uploader.less +210 -210
  62. package/lib/css/components/_stacks-user-cards.less +169 -169
  63. package/lib/css/components/_stacks-widget-dynamic.less +33 -33
  64. package/lib/css/components/_stacks-widget-static.less +272 -272
  65. package/lib/css/exports/_stacks-constants-colors.less +1112 -1112
  66. package/lib/css/exports/_stacks-constants-helpers.less +139 -139
  67. package/lib/css/exports/_stacks-constants-type.less +152 -91
  68. package/lib/css/exports/_stacks-exports.less +15 -15
  69. package/lib/css/exports/_stacks-mixins.less +220 -220
  70. package/lib/css/stacks-dynamic.less +35 -36
  71. package/lib/css/stacks-static.less +86 -86
  72. package/lib/ts/controllers/index.ts +8 -0
  73. package/lib/ts/controllers/s-expandable-control.ts +189 -190
  74. package/lib/ts/controllers/s-modal.ts +321 -323
  75. package/lib/ts/controllers/s-navigation-tablist.ts +118 -119
  76. package/lib/ts/controllers/s-popover.ts +547 -549
  77. package/lib/ts/controllers/s-table.ts +220 -220
  78. package/lib/ts/controllers/s-tooltip.ts +246 -247
  79. package/lib/ts/controllers/s-uploader.ts +172 -174
  80. package/lib/ts/index.ts +20 -0
  81. package/lib/ts/stacks.ts +88 -83
  82. package/lib/tsconfig.json +13 -11
  83. package/package.json +87 -71
  84. package/dist/css/stacks-flexgrid-shim.min.css +0 -1
  85. package/lib/css/base/_stacks-configuration-dynamic.less +0 -106
  86. package/lib/ts/finalize.ts +0 -1
  87. package/lib/ts/stimulus.d.ts +0 -4
@@ -1,44 +1,44 @@
1
- //
2
- // STACK OVERFLOW
3
- // CARDS
4
- //
5
- // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
- // Stack Overflow. For documentation of all these classes and how to contribute,
7
- // visit https://stackoverflow.design/
8
- //
9
- // TABLE OF CONTENTS
10
- // • BASE STYLE
11
- // • MODIFIERS
12
- //
13
- // ============================================================================
14
- // $ BASE STYLE
15
- // ----------------------------------------------------------------------------
16
- .s-card {
17
- padding: @su12;
18
- border: 1px solid var(--bc-medium);
19
- border-radius: @br-sm;
20
- background-color: var(--white);
21
-
22
- p:last-of-type {
23
- margin-bottom: 0;
24
- }
25
- }
26
-
27
- // ============================================================================
28
- // $ MODIFIERS
29
- // ----------------------------------------------------------------------------
30
- .s-card__muted {
31
- border-color: var(--bc-light);
32
-
33
- // Dim only the first child card content
34
- > * {
35
- opacity: 0.65;
36
- }
37
- }
38
-
39
- // ============================================================================
40
- // $ LINKED CARDS
41
- // ----------------------------------------------------------------------------
42
- a.s-card {
43
- text-decoration: none !important;
44
- }
1
+ //
2
+ // STACK OVERFLOW
3
+ // CARDS
4
+ //
5
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
+ // Stack Overflow. For documentation of all these classes and how to contribute,
7
+ // visit https://stackoverflow.design/
8
+ //
9
+ // TABLE OF CONTENTS
10
+ // • BASE STYLE
11
+ // • MODIFIERS
12
+ //
13
+ // ============================================================================
14
+ // $ BASE STYLE
15
+ // ----------------------------------------------------------------------------
16
+ .s-card {
17
+ padding: @su12;
18
+ border: 1px solid var(--bc-medium);
19
+ border-radius: @br-sm;
20
+ background-color: var(--white);
21
+
22
+ p:last-of-type {
23
+ margin-bottom: 0;
24
+ }
25
+ }
26
+
27
+ // ============================================================================
28
+ // $ MODIFIERS
29
+ // ----------------------------------------------------------------------------
30
+ .s-card__muted {
31
+ border-color: var(--bc-light);
32
+
33
+ // Dim only the first child card content
34
+ > * {
35
+ opacity: 0.65;
36
+ }
37
+ }
38
+
39
+ // ============================================================================
40
+ // $ LINKED CARDS
41
+ // ----------------------------------------------------------------------------
42
+ a.s-card {
43
+ text-decoration: none !important;
44
+ }
@@ -1,130 +1,130 @@
1
- //
2
- // STACK OVERFLOW
3
- // CODE BLOCKS
4
- //
5
- // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
- // Stack Overflow. For documentation of all these classes and how to contribute,
7
- // visit https://stackoverflow.design/
8
- //
9
-
10
- pre.s-code-block {
11
- font-size: @fs-body1;
12
- font-family: var(--ff-mono);
13
- line-height: @lh-md;
14
- color: var(--highlight-color);
15
- background-color: var(--highlight-bg);
16
- border-radius: @br-md;
17
- margin: 0;
18
- padding: @su12;
19
- overflow: auto;
20
-
21
- @scrollbar-styles();
22
- }
23
-
24
- code[class*="language-"],
25
- pre.s-code-block > code {
26
- font-family: inherit;
27
-
28
- .hljs-subst {
29
- color: var(--highlight-color);
30
- }
31
-
32
- .hljs-comment {
33
- color: var(--highlight-comment);
34
- }
35
-
36
- .hljs-keyword,
37
- .hljs-selector-tag,
38
- .hljs-meta-keyword,
39
- .hljs-doctag,
40
- .hljs-section {
41
- color: var(--highlight-keyword);
42
- }
43
-
44
- .hljs-attr {
45
- color: var(--highlight-attribute);
46
- }
47
-
48
- .hljs-attribute {
49
- color: var(--highlight-symbol);
50
- }
51
-
52
- .hljs-name,
53
- .hljs-type,
54
- .hljs-number,
55
- .hljs-selector-id,
56
- .hljs-quote,
57
- .hljs-template-tag {
58
- color: var(--highlight-namespace);
59
- }
60
-
61
- .hljs-selector-class {
62
- color: var(--highlight-keyword);
63
- }
64
-
65
- .hljs-string,
66
- .hljs-regexp,
67
- .hljs-symbol,
68
- .hljs-variable,
69
- .hljs-template-variable,
70
- .hljs-link,
71
- .hljs-selector-attr {
72
- color: var(--highlight-variable);
73
- }
74
-
75
- .hljs-meta,
76
- .hljs-selector-pseudo {
77
- color: var(--highlight-keyword);
78
- }
79
-
80
- .hljs-built_in,
81
- .hljs-title,
82
- .hljs-literal {
83
- color: var(--highlight-literal);
84
- }
85
-
86
- .hljs-bullet,
87
- .hljs-code {
88
- color: var(--highlight-punctuation);
89
- }
90
-
91
- .hljs-meta-string {
92
- color: var(--highlight-variable);
93
- }
94
-
95
- .hljs-deletion {
96
- color: var(--highlight-deletion);
97
- }
98
-
99
- .hljs-addition {
100
- color: var(--highlight-addition);
101
- }
102
-
103
- .hljs-emphasis {
104
- font-style: italic;
105
- }
106
-
107
- .hljs-strong {
108
- font-weight: bold;
109
- }
110
- }
111
-
112
- pre.s-code-block .s-code-block--line-numbers {
113
- float: left;
114
- color: var(--black-300);
115
- text-align: right;
116
- border-width: 0;
117
- border-style: solid;
118
- border-color: var(--bc-medium);
119
- border-right-width: 1px;
120
- margin: -@su12;
121
- margin-right: @su12;
122
- padding: @su12;
123
- padding-right: @su6;
124
- background-color: var(--black-050);
125
-
126
- .dark-mode({
127
- background-color: var(--black-025);
128
- });
129
- }
130
-
1
+ //
2
+ // STACK OVERFLOW
3
+ // CODE BLOCKS
4
+ //
5
+ // This CSS comes from Stacks, our CSS & Pattern library for rapidly building
6
+ // Stack Overflow. For documentation of all these classes and how to contribute,
7
+ // visit https://stackoverflow.design/
8
+ //
9
+
10
+ pre.s-code-block {
11
+ font-size: @fs-body1;
12
+ font-family: var(--ff-mono);
13
+ line-height: @lh-md;
14
+ color: var(--highlight-color);
15
+ background-color: var(--highlight-bg);
16
+ border-radius: @br-md;
17
+ margin: 0;
18
+ padding: @su12;
19
+ overflow: auto;
20
+
21
+ @scrollbar-styles();
22
+ }
23
+
24
+ code[class*="language-"],
25
+ pre.s-code-block > code {
26
+ font-family: inherit;
27
+
28
+ .hljs-subst {
29
+ color: var(--highlight-color);
30
+ }
31
+
32
+ .hljs-comment {
33
+ color: var(--highlight-comment);
34
+ }
35
+
36
+ .hljs-keyword,
37
+ .hljs-selector-tag,
38
+ .hljs-meta-keyword,
39
+ .hljs-doctag,
40
+ .hljs-section {
41
+ color: var(--highlight-keyword);
42
+ }
43
+
44
+ .hljs-attr {
45
+ color: var(--highlight-attribute);
46
+ }
47
+
48
+ .hljs-attribute {
49
+ color: var(--highlight-symbol);
50
+ }
51
+
52
+ .hljs-name,
53
+ .hljs-type,
54
+ .hljs-number,
55
+ .hljs-selector-id,
56
+ .hljs-quote,
57
+ .hljs-template-tag {
58
+ color: var(--highlight-namespace);
59
+ }
60
+
61
+ .hljs-selector-class {
62
+ color: var(--highlight-keyword);
63
+ }
64
+
65
+ .hljs-string,
66
+ .hljs-regexp,
67
+ .hljs-symbol,
68
+ .hljs-variable,
69
+ .hljs-template-variable,
70
+ .hljs-link,
71
+ .hljs-selector-attr {
72
+ color: var(--highlight-variable);
73
+ }
74
+
75
+ .hljs-meta,
76
+ .hljs-selector-pseudo {
77
+ color: var(--highlight-keyword);
78
+ }
79
+
80
+ .hljs-built_in,
81
+ .hljs-title,
82
+ .hljs-literal {
83
+ color: var(--highlight-literal);
84
+ }
85
+
86
+ .hljs-bullet,
87
+ .hljs-code {
88
+ color: var(--highlight-punctuation);
89
+ }
90
+
91
+ .hljs-meta-string {
92
+ color: var(--highlight-variable);
93
+ }
94
+
95
+ .hljs-deletion {
96
+ color: var(--highlight-deletion);
97
+ }
98
+
99
+ .hljs-addition {
100
+ color: var(--highlight-addition);
101
+ }
102
+
103
+ .hljs-emphasis {
104
+ font-style: italic;
105
+ }
106
+
107
+ .hljs-strong {
108
+ font-weight: bold;
109
+ }
110
+ }
111
+
112
+ pre.s-code-block .s-code-block--line-numbers {
113
+ float: left;
114
+ color: var(--black-300);
115
+ text-align: right;
116
+ border-width: 0;
117
+ border-style: solid;
118
+ border-color: var(--bc-medium);
119
+ border-right-width: 1px;
120
+ margin: -@su12;
121
+ margin-right: @su12;
122
+ padding: @su12;
123
+ padding-right: @su6;
124
+ background-color: var(--black-050);
125
+
126
+ .dark-mode({
127
+ background-color: var(--black-025);
128
+ });
129
+ }
130
+
@@ -1,104 +1,104 @@
1
- // see http://stackoverflow.com/a/43965099 for how this works:
2
-
3
- // Notes on the clip-path stuff: What we would really like is overflow: hidden during the transition,
4
- // but not when the element is expanded. Unfortunately, although the CSS spec provides for it, there's
5
- // no browser support yet for transitioning non-interpolatable properties, and therefore we cannot say
6
- // "change overflow to visible *after* the transition".
7
- //
8
- // So we use clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%), which is essentially the same
9
- // as overflow: hidden, but unlike overflow, clip-path is interpolatable -- but only if the opposite state
10
- // is also a polygon, and has the same vertice count. So our version of overflow: visible is a rectangle
11
- // of 2x2 million pixels, which should be enough for everybody (TM).
12
- //
13
- // At the time of writing, clip-path works in Chrome, Firefox Beta, and Safari (with vendor prefix).
14
- //
15
- // In browsers that do not support this yet, we have to have another way to prevent the expandable content
16
- // from being visible below the bottom edge during the transition, and the best I could come up with is
17
- // transitioning to scaleY(0) with a timing function that's faster than the height-reducing transitions.
18
- // This does kinda look like a deliberate effect, even more so if we also transition to transparency
19
- // (which we therefore do), so I feel it's an okay fallback.
20
- //
21
- // We still set overflow to hidden in the collapsed state (which also applies to the collapsing transition),
22
- // we just can't do that for the expanding transition.
23
- //
24
- // A major drawback of clip-path is that even though the content is clipped (not visible), it will still
25
- // contribute to the document height. This caused a jumping around of the scrollbar (and possibly even
26
- // of the viewport) when the expandable was at the bottom of the page, because once the negative bottom
27
- // margin of the -expandable-group exceeds the actual height, any additional pixels were added on to the
28
- // bottom. The fix is to set the -expandable-group's flex alignment to flex-start, which forces the
29
- // (no longer visible) element itself to remain at the top, thereby forcing the excess pixels to be added
30
- // above the top, not below the bottom. And because extending content above the document top will not do
31
- // anything to the document height, there is no jumping during the transition.
32
-
33
- @stacks-internals-s-expandable-transition-duration: 100ms;
34
-
35
- // Per the answer referenced above, the component can only guarantee smooth transitions if above a minimum
36
- // height and can only guarantee the element will be hidden is below a maximimum height.
37
- // The minimum height has been set at 10px because that's below the height of a single line of text in an s-description.
38
- @stacks-internal-s-expandable-min-expected-height: 10px;
39
- @stacks-internal-s-expandable-max-expected-height: 1500px;
40
-
41
- .s-expandable {
42
- display: flex;
43
- -webkit-clip-path: polygon(-1000000px -1000000px, 1000000px -1000000px, 1000000px 1000000px, -1000000px 1000000px);
44
- clip-path: polygon(-1000000px -1000000px, 1000000px -1000000px, 1000000px 1000000px, -1000000px 1000000px);
45
- align-items: flex-start; // see comment above
46
- transition: clip-path 0s @stacks-internals-s-expandable-transition-duration, -webkit-clip-path 0s @stacks-internals-s-expandable-transition-duration;
47
-
48
- &:after {
49
- content: '';
50
- -ms-flex-preferred-size: 0;
51
- flex-basis: 0;
52
- height: @stacks-internal-s-expandable-min-expected-height;
53
- max-height: 0;
54
- transition:
55
- height @stacks-internals-s-expandable-transition-duration linear,
56
- max-height 0s @stacks-internals-s-expandable-transition-duration linear;
57
- }
58
- }
59
-
60
- .s-expandable--content {
61
- -ms-flex-preferred-size: 100%;
62
- flex-basis: 100%;
63
- max-height: 1000000px;
64
- margin-bottom: 0;
65
- -webkit-transform-origin: 0 0;
66
- transform-origin: 0 0;
67
- transition:
68
- margin-bottom @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 0, 0, 1),
69
- transform @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1),
70
- opacity @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1);
71
- }
72
-
73
- .s-expandable:not(.is-expanded) {
74
- overflow: hidden;
75
- -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
76
- clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
77
- transition: none;
78
-
79
- .s-expandable--content {
80
- visibility: hidden;
81
- max-height: 0;
82
- margin-bottom: -@stacks-internal-s-expandable-max-expected-height;
83
- opacity: 0;
84
- -webkit-transform: scaleY(0);
85
- transform: scaleY(0);
86
- transition:
87
- margin-bottom @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1),
88
- visibility 0s @stacks-internals-s-expandable-transition-duration,
89
- max-height 0s @stacks-internals-s-expandable-transition-duration,
90
- transform @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 1, 1, 1),
91
- opacity @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 1, 1, 1);
92
- @supports ((-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)) or (clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%))) {
93
- opacity: 1;
94
- -webkit-transform: none;
95
- transform: none;
96
- }
97
- }
98
-
99
- &:after {
100
- height: 0;
101
- max-height: @stacks-internal-s-expandable-min-expected-height;
102
- transition: height @stacks-internals-s-expandable-transition-duration linear;
103
- }
104
- }
1
+ // see http://stackoverflow.com/a/43965099 for how this works:
2
+
3
+ // Notes on the clip-path stuff: What we would really like is overflow: hidden during the transition,
4
+ // but not when the element is expanded. Unfortunately, although the CSS spec provides for it, there's
5
+ // no browser support yet for transitioning non-interpolatable properties, and therefore we cannot say
6
+ // "change overflow to visible *after* the transition".
7
+ //
8
+ // So we use clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%), which is essentially the same
9
+ // as overflow: hidden, but unlike overflow, clip-path is interpolatable -- but only if the opposite state
10
+ // is also a polygon, and has the same vertice count. So our version of overflow: visible is a rectangle
11
+ // of 2x2 million pixels, which should be enough for everybody (TM).
12
+ //
13
+ // At the time of writing, clip-path works in Chrome, Firefox Beta, and Safari (with vendor prefix).
14
+ //
15
+ // In browsers that do not support this yet, we have to have another way to prevent the expandable content
16
+ // from being visible below the bottom edge during the transition, and the best I could come up with is
17
+ // transitioning to scaleY(0) with a timing function that's faster than the height-reducing transitions.
18
+ // This does kinda look like a deliberate effect, even more so if we also transition to transparency
19
+ // (which we therefore do), so I feel it's an okay fallback.
20
+ //
21
+ // We still set overflow to hidden in the collapsed state (which also applies to the collapsing transition),
22
+ // we just can't do that for the expanding transition.
23
+ //
24
+ // A major drawback of clip-path is that even though the content is clipped (not visible), it will still
25
+ // contribute to the document height. This caused a jumping around of the scrollbar (and possibly even
26
+ // of the viewport) when the expandable was at the bottom of the page, because once the negative bottom
27
+ // margin of the -expandable-group exceeds the actual height, any additional pixels were added on to the
28
+ // bottom. The fix is to set the -expandable-group's flex alignment to flex-start, which forces the
29
+ // (no longer visible) element itself to remain at the top, thereby forcing the excess pixels to be added
30
+ // above the top, not below the bottom. And because extending content above the document top will not do
31
+ // anything to the document height, there is no jumping during the transition.
32
+
33
+ @stacks-internals-s-expandable-transition-duration: 100ms;
34
+
35
+ // Per the answer referenced above, the component can only guarantee smooth transitions if above a minimum
36
+ // height and can only guarantee the element will be hidden is below a maximimum height.
37
+ // The minimum height has been set at 10px because that's below the height of a single line of text in an s-description.
38
+ @stacks-internal-s-expandable-min-expected-height: 10px;
39
+ @stacks-internal-s-expandable-max-expected-height: 1500px;
40
+
41
+ .s-expandable {
42
+ display: flex;
43
+ -webkit-clip-path: polygon(-1000000px -1000000px, 1000000px -1000000px, 1000000px 1000000px, -1000000px 1000000px);
44
+ clip-path: polygon(-1000000px -1000000px, 1000000px -1000000px, 1000000px 1000000px, -1000000px 1000000px);
45
+ align-items: flex-start; // see comment above
46
+ transition: clip-path 0s @stacks-internals-s-expandable-transition-duration, -webkit-clip-path 0s @stacks-internals-s-expandable-transition-duration;
47
+
48
+ &:after {
49
+ content: '';
50
+ -ms-flex-preferred-size: 0;
51
+ flex-basis: 0;
52
+ height: @stacks-internal-s-expandable-min-expected-height;
53
+ max-height: 0;
54
+ transition:
55
+ height @stacks-internals-s-expandable-transition-duration linear,
56
+ max-height 0s @stacks-internals-s-expandable-transition-duration linear;
57
+ }
58
+ }
59
+
60
+ .s-expandable--content {
61
+ -ms-flex-preferred-size: 100%;
62
+ flex-basis: 100%;
63
+ max-height: 1000000px;
64
+ margin-bottom: 0;
65
+ -webkit-transform-origin: 0 0;
66
+ transform-origin: 0 0;
67
+ transition:
68
+ margin-bottom @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 0, 0, 1),
69
+ transform @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1),
70
+ opacity @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1);
71
+ }
72
+
73
+ .s-expandable:not(.is-expanded) {
74
+ overflow: hidden;
75
+ -webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
76
+ clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%);
77
+ transition: none;
78
+
79
+ .s-expandable--content {
80
+ visibility: hidden;
81
+ max-height: 0;
82
+ margin-bottom: -@stacks-internal-s-expandable-max-expected-height;
83
+ opacity: 0;
84
+ -webkit-transform: scaleY(0);
85
+ transform: scaleY(0);
86
+ transition:
87
+ margin-bottom @stacks-internals-s-expandable-transition-duration cubic-bezier(1, 0, 1, 1),
88
+ visibility 0s @stacks-internals-s-expandable-transition-duration,
89
+ max-height 0s @stacks-internals-s-expandable-transition-duration,
90
+ transform @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 1, 1, 1),
91
+ opacity @stacks-internals-s-expandable-transition-duration cubic-bezier(0, 1, 1, 1);
92
+ @supports ((-webkit-clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)) or (clip-path: polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%))) {
93
+ opacity: 1;
94
+ -webkit-transform: none;
95
+ transform: none;
96
+ }
97
+ }
98
+
99
+ &:after {
100
+ height: 0;
101
+ max-height: @stacks-internal-s-expandable-min-expected-height;
102
+ transition: height @stacks-internals-s-expandable-transition-duration linear;
103
+ }
104
+ }