From: Vladimír Vondruš Date: Tue, 12 Sep 2017 19:57:59 +0000 (+0200) Subject: css: styling for SVG math. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=81e857fa6716248ee3cc134cbf4306ed968aeb6b;p=blog.git css: styling for SVG math. --- diff --git a/css/m-components.css b/css/m-components.css index 42c4538d..117c50ca 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -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; }