Skip to content

Commit 47e1852

Browse files
fix: improve the style of <summary>
- Add Safari `summary::marker` compatibility code. - Vertical centered.
1 parent a3d7c53 commit 47e1852

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/util.css

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ details.now-fixed {
5656
> summary {
5757
cursor: pointer;
5858
margin-left: -0.5em;
59+
margin-bottom: 0.25em;
5960

6061
display: grid;
6162
grid-template-columns: auto 1fr;
@@ -66,15 +67,19 @@ details.now-fixed {
6667

6768
/* Replace ::marker with ::before */
6869
list-style: none;
70+
&::-webkit-details-marker {
71+
display: none;
72+
}
6973

7074
&::before {
71-
display: block;
75+
display: flex;
76+
align-items: center;
7277
height: 2em;
7378
width: 2em;
7479
}
7580

7681
> p {
77-
margin-top: 0;
82+
margin-block: 0;
7883
}
7984
}
8085

0 commit comments

Comments
 (0)