Skip to content

Commit ac06578

Browse files
committed
fix: Add missing style for preview admonitions
1 parent e030fb8 commit ac06578

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

project/docs/css/material.css.jinja

+22
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,25 @@
22
.md-main__inner {
33
margin-bottom: 1.5rem;
44
}
5+
6+
/* Custom admonition: preview */
7+
:root {
8+
--md-admonition-icon--preview: url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.5 12a3.5 3.5 0 1 1-7 0 3.5 3.5 0 0 1 7 0Z"/><path d="M12 3.5c3.432 0 6.124 1.534 8.054 3.241 1.926 1.703 3.132 3.61 3.616 4.46a1.6 1.6 0 0 1 0 1.598c-.484.85-1.69 2.757-3.616 4.461-1.929 1.706-4.622 3.24-8.054 3.24-3.432 0-6.124-1.534-8.054-3.24C2.02 15.558.814 13.65.33 12.8a1.6 1.6 0 0 1 0-1.598c.484-.85 1.69-2.757 3.616-4.462C5.875 5.034 8.568 3.5 12 3.5ZM1.633 11.945a.115.115 0 0 0-.017.055c.001.02.006.039.017.056.441.774 1.551 2.527 3.307 4.08C6.691 17.685 9.045 19 12 19c2.955 0 5.31-1.315 7.06-2.864 1.756-1.553 2.866-3.306 3.307-4.08a.111.111 0 0 0 .017-.056.111.111 0 0 0-.017-.056c-.441-.773-1.551-2.527-3.307-4.08C17.309 6.315 14.955 5 12 5 9.045 5 6.69 6.314 4.94 7.865c-1.756 1.552-2.866 3.306-3.307 4.08Z"/></svg>');
9+
}
10+
11+
.md-typeset .admonition.preview,
12+
.md-typeset details.preview {
13+
border-color: rgb(220, 139, 240);
14+
}
15+
16+
.md-typeset .preview>.admonition-title,
17+
.md-typeset .preview>summary {
18+
background-color: rgba(142, 43, 155, 0.1);
19+
}
20+
21+
.md-typeset .preview>.admonition-title::before,
22+
.md-typeset .preview>summary::before {
23+
background-color: rgb(220, 139, 240);
24+
-webkit-mask-image: var(--md-admonition-icon--preview);
25+
mask-image: var(--md-admonition-icon--preview);
26+
}

0 commit comments

Comments
 (0)