@@ -121,9 +121,18 @@ This is all of the CSS applied to the admonitions. Override these classes to cus
121121Every admonition receives the following CSS classes:
122122
123123``` css
124+ :root {
125+ --admonition-details-icon : url (" data:image/svg+xml;charset=utf-8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z'/></svg>" );
126+ }
127+
128+ .use-csv-marker > svg {
129+ color : yellow ;
130+ margin-right : 8px ;
131+ }
132+
124133.admonition {
125134 margin : 1.5625em 0 ;
126- padding : 0 0.6 rem ;
135+ padding : 0 ;
127136 overflow : hidden ;
128137 color : var (--text-normal );
129138 page-break-inside : avoid ;
@@ -135,30 +144,36 @@ Every admonition receives the following CSS classes:
135144
136145.admonition-title {
137146 position : relative ;
138- margin : 0 -0.6rem 0 -0.8rem ;
139- padding : 0.4rem 0.6rem 0.4rem 2rem ;
147+ padding : 0.6rem 0.25em ;
140148 font-weight : 700 ;
141- border-left : 0.2rem solid ;
142149 background-color : rgba (var (--admonition-color ), 0.1 );
143150}
151+ .admonition-title > * {
152+ display : flex ;
153+ justify-content : flex-start ;
154+ margin-top : 0 !important ;
155+ margin-bottom : 0 !important ;
156+ }
144157
145158.admonition-title-icon {
146- position : absolute ;
147- left : 0.6rem ;
148- width : 1.25rem ;
149- height : 1.25rem ;
150159 color : rgb (var (--admonition-color ));
151160 display : flex ;
152- justify-content : center ;
153161 align-items : center ;
162+ justify-content : center ;
163+ margin : 0 0.5em 0 0.25em ;
164+ min-width : 1em ;
154165}
155166
156167.admonition-title.no-title {
157168 display : none ;
158169}
159170
160171.admonition > .admonition-title.no-title + .admonition-content {
161- margin : 1em 0 ;
172+ margin : 1rem 0 ;
173+ }
174+
175+ .admonition-content {
176+ margin : 0 0.6rem ;
162177}
163178```
164179
@@ -188,7 +203,6 @@ details.admonition > summary {
188203 list-style : none ;
189204 display : block ;
190205 min-height : 1rem ;
191- padding : 0.4rem 1.8rem 0.4rem 2rem ;
192206 border-top-left-radius : 0.1rem ;
193207 border-top-right-radius : 0.1rem ;
194208 cursor : pointer ;
@@ -197,24 +211,29 @@ details.admonition > summary::-webkit-details-marker {
197211 display : none ;
198212}
199213
200- details .admonition > summary :after {
214+ details .admonition > summary > .collapser {
201215 position : absolute ;
202- top : 8 px ;
216+ top : 50 % ;
203217 right : 8px ;
204- width : 20px ;
205- height : 20px ;
218+ transform : translateY (-50% );
219+ content : " " ;
220+ }
221+
222+ details .admonition > summary > .collapser > .handle {
223+ transform : rotate (0deg );
224+ transition : transform 0.25s ;
206225 background-color : currentColor ;
207- -webkit-mask-image : var (--admonition-details-icon );
208- mask-image : var (--admonition-details-icon );
209226 -webkit-mask-repeat : no-repeat ;
210227 mask-repeat : no-repeat ;
211228 -webkit-mask-size : contain ;
212229 mask-size : contain ;
213- transform : rotate (0deg );
214- transition : transform 0.25s ;
215- content : " " ;
230+ -webkit-mask-image : var (--admonition-details-icon );
231+ mask-image : var (--admonition-details-icon );
232+ width : 20px ;
233+ height : 20px ;
216234}
217- details .admonition [open ] > summary :after {
235+
236+ details .admonition [open ] > summary > .collapser > .handle {
218237 transform : rotate (90deg );
219238}
220239```
@@ -238,6 +257,13 @@ An icon without a title will have this CSS:
238257
239258# Version History
240259
260+ ## 3.3.0
261+
262+ - Added commands to open and collapse all admonitions in active note
263+ - Admonition icons now respect the font size of the admonition title
264+ - Collapse handle now centers inside the title element
265+ - CSS changes
266+ -
241267## 3.2.0
242268
243269- Added a setting to turn on default Obsidian syntax highlighting to admonition code block types
0 commit comments