chiark / gitweb /
css: styling for SVG math.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 12 Sep 2017 19:57:59 +0000 (21:57 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 14 Sep 2017 22:11:11 +0000 (00:11 +0200)
css/m-components.css

index 42c4538d7d29e9a0745bac7d613e7216afd6dd1f..117c50ca8c95b7d93c3530a1e511f5a6d2e091f3 100644 (file)
@@ -1000,12 +1000,27 @@ pre.m-code.m-inverted > span.hll {
   border-color: transparent;
 }
 
+/* Math block, inline math */
+div.m-math {
+  text-align: center;
+}
+
+/* Colored math block, inline math */
+div.m-math svg, svg.m-math { fill: var(--color); }
+div.m-math.m-default svg, svg.m-math.m-default { fill: var(--default-color); }
+div.m-math.m-primary svg, svg.m-math.m-primary { fill: var(--primary-color); }
+div.m-math.m-success svg, svg.m-math.m-success { fill: var(--success-color); }
+div.m-math.m-warning svg, svg.m-math.m-warning { fill: var(--warning-color); }
+div.m-math.m-danger svg, svg.m-math.m-danger { fill: var(--danger-color); }
+div.m-math.m-info svg, svg.m-math.m-info { fill: var(--info-color); }
+div.m-math.m-dim svg, svg.m-math.m-dim { fill: var(--dim-color); }
+
 /* Spacing after every block element, but not after the last */
 p, ul, ol, dl, blockquote, hr, pre,
 article, article > header, article section,
 .m-note, .m-frame, .m-block,
 div.m-scroll, table.m-table, div.m-image, img.m-image,
-figure.m-figure, .m-imagegrid {
+figure.m-figure, .m-imagegrid, div.m-math {
   margin-bottom: 1rem;
 }
 p:last-child, ul:last-child, ol:last-child, dl:last-child, 
@@ -1013,7 +1028,7 @@ blockquote:last-child, hr:last-child, pre:last-child,
 article:last-child, article section:last-child,
 .m-note:last-child, .m-frame:last-child, .m-block:last-child,
 table.m-table:last-child, img.m-image:last-child, div.m-image:last-child,
-figure.m-figure:last-child, .m-imagegrid:last-child {
+figure.m-figure:last-child, .m-imagegrid:last-child, div.m-math:last-child {
   margin-bottom: 0;
 }