File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed
docs/src/routes/(routes)/components/collapse Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 165165
166166.collapse : is (details ) {
167167 width : 100% ;
168-
168+ @media (prefers-reduced-motion : no-preference) {
169+ @supports (transition : content-visibility allow-discrete) and (interpolate-size : allow-keywords) {
170+ & ::details-content {
171+ transition :
172+ content-visibility 0.2s allow-discrete,
173+ height 0.2s ;
174+ height : 0 ;
175+ interpolate-size : allow-keywords;
176+ }
177+ & : where ([open ], .collapse-open )::details-content {
178+ height : auto;
179+ }
180+ }
181+ }
169182 & summary {
170183 position : relative;
171184 display : block;
Original file line number Diff line number Diff line change @@ -88,11 +88,6 @@ classnames:
8888</details >
8989```
9090
91- <div class =" alert text-sm mt-4 " >
92- <svg xmlns =" http://www.w3.org/2000/svg " fill =" none " viewBox =" 0 0 24 24 " class =" stroke-current shrink-0 w-6 h-6 " ><path stroke-linecap =" round " stroke-linejoin =" round " stroke-width =" 2 " d =" M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z " ></path ></svg >
93- <div >Using <code >< ; details> ; </code > tag, we can't have animations because <code >< ; details> ; </code > tag doesn't allow CSS transitions.</div >
94- </div >
95-
9691### ~ Without border and background color
9792
9893<div tabindex =" 0 " class =" collapse " >
You can’t perform that action at this time.
0 commit comments