@@ -247,12 +247,6 @@ html:not(.dark) .vp-doc .vp-code span {
247247}
248248
249249.vp-doc .custom-block .custom-block-title {
250- font-family : var (--font-display );
251- font-variation-settings : "wdth" 85 ;
252- font-weight : 600 ;
253- font-size : 10.5px ;
254- letter-spacing : 0.1em ;
255- text-transform : uppercase;
256250 margin-bottom : 6px ;
257251}
258252
@@ -287,10 +281,41 @@ html:not(.dark) .vp-doc .vp-code span {
287281 color : var (--redline-ink );
288282}
289283
290- /* Note: the title WORDS (TIP / WARNING / DANGER) stay as VitePress emits them —
291- a CSS content-swap to NOTE / CAUTION / REVISION would clobber any author-set
292- custom title (CSS can't tell a default title from a custom one). The drafting
293- read comes from the micro-label typography + coloured left rule above. */
284+ /* Relabel the default container words to drafting vernacular: tip/info → NOTE,
285+ warning → CAUTION, danger → REVISION. The original word is collapsed
286+ (font-size: 0) and the drafting label is drawn as a micro-label ::before, so
287+ the type-specific colour above still cascades to it.
288+ CAVEAT: this is a content-swap keyed off the block TYPE, not its title text —
289+ it assumes the DEFAULT title (bare `::: tip`). There are zero custom-titled
290+ containers in the docs today; if a page ever writes `::: tip Some Title`, this
291+ would overwrite it. Add a per-block opt-out class (or drop the swap) then. */
292+ .vp-doc .custom-block .tip > .custom-block-title ,
293+ .vp-doc .custom-block .info > .custom-block-title ,
294+ .vp-doc .custom-block .warning > .custom-block-title ,
295+ .vp-doc .custom-block .danger > .custom-block-title {
296+ font-size : 0 ; /* collapse the default word; ::before carries the label */
297+ }
298+ .vp-doc .custom-block .tip > .custom-block-title ::before ,
299+ .vp-doc .custom-block .info > .custom-block-title ::before ,
300+ .vp-doc .custom-block .warning > .custom-block-title ::before ,
301+ .vp-doc .custom-block .danger > .custom-block-title ::before {
302+ font-family : var (--font-display );
303+ font-variation-settings : "wdth" 85 ;
304+ font-weight : 600 ;
305+ font-size : 10.5px ;
306+ letter-spacing : 0.1em ;
307+ text-transform : uppercase;
308+ }
309+ .vp-doc .custom-block .tip > .custom-block-title ::before ,
310+ .vp-doc .custom-block .info > .custom-block-title ::before {
311+ content : "Note" ;
312+ }
313+ .vp-doc .custom-block .warning > .custom-block-title ::before {
314+ content : "Caution" ;
315+ }
316+ .vp-doc .custom-block .danger > .custom-block-title ::before {
317+ content : "Revision" ;
318+ }
294319
295320/* details block stays quiet */
296321.vp-doc .custom-block .details {
0 commit comments