From: Vladimír Vondruš Date: Mon, 18 Jun 2018 13:05:26 +0000 (+0200) Subject: css: make it possible to have math *in buttons*. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=e475a708be53d92f1a78f42d147af2ed8d44c95a;p=blog.git css: make it possible to have math *in buttons*. Yes, I'm crazy. --- diff --git a/css/m-components.css b/css/m-components.css index 2546a0ec..7260014d 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -949,12 +949,18 @@ pre.m-code.m-inverted > span.hll { border-color: transparent; } -/* Math block, inline math */ +/* Math block, inline math, math inside buttons because I am crazy */ div.m-math { overflow-x: auto; overflow-y: hidden; /* Chrome 62 displays a vertical scrollbar otherwise */ text-align: center; } +div.m-button a svg.m-math { fill: var(--button-background-color); } +div.m-button.m-flat a svg.m-math { fill: var(--color); } +div.m-button.m-flat a:hover svg.m-math, div.m-button.m-default a:focus svg.m-math, +div.m-button.m-default a:active svg.m-math { + fill: var(--link-active-color); +} /* Plots */ div.m-plot svg { diff --git a/css/m-dark+doxygen.compiled.css b/css/m-dark+doxygen.compiled.css index d94915ad..f38ecfb4 100644 --- a/css/m-dark+doxygen.compiled.css +++ b/css/m-dark+doxygen.compiled.css @@ -1262,6 +1262,12 @@ div.m-math { overflow-y: hidden; text-align: center; } +div.m-button a svg.m-math { fill: #22272e; } +div.m-button.m-flat a svg.m-math { fill: #dcdcdc; } +div.m-button.m-flat a:hover svg.m-math, div.m-button.m-default a:focus svg.m-math, +div.m-button.m-default a:active svg.m-math { + fill: #a5c9ea; +} div.m-plot svg { text-align: center; } diff --git a/css/m-dark.compiled.css b/css/m-dark.compiled.css index 8051709a..f17f987a 100644 --- a/css/m-dark.compiled.css +++ b/css/m-dark.compiled.css @@ -1262,6 +1262,12 @@ div.m-math { overflow-y: hidden; text-align: center; } +div.m-button a svg.m-math { fill: #22272e; } +div.m-button.m-flat a svg.m-math { fill: #dcdcdc; } +div.m-button.m-flat a:hover svg.m-math, div.m-button.m-default a:focus svg.m-math, +div.m-button.m-default a:active svg.m-math { + fill: #a5c9ea; +} div.m-plot svg { text-align: center; } diff --git a/css/m-light+doxygen.compiled.css b/css/m-light+doxygen.compiled.css index 5835573a..54648fb1 100644 --- a/css/m-light+doxygen.compiled.css +++ b/css/m-light+doxygen.compiled.css @@ -1262,6 +1262,12 @@ div.m-math { overflow-y: hidden; text-align: center; } +div.m-button a svg.m-math { fill: #ffffff; } +div.m-button.m-flat a svg.m-math { fill: #000000; } +div.m-button.m-flat a:hover svg.m-math, div.m-button.m-default a:focus svg.m-math, +div.m-button.m-default a:active svg.m-math { + fill: #cb4b16; +} div.m-plot svg { text-align: center; } diff --git a/css/m-light.compiled.css b/css/m-light.compiled.css index 4a5e052f..f341b00e 100644 --- a/css/m-light.compiled.css +++ b/css/m-light.compiled.css @@ -1262,6 +1262,12 @@ div.m-math { overflow-y: hidden; text-align: center; } +div.m-button a svg.m-math { fill: #ffffff; } +div.m-button.m-flat a svg.m-math { fill: #000000; } +div.m-button.m-flat a:hover svg.m-math, div.m-button.m-default a:focus svg.m-math, +div.m-button.m-default a:active svg.m-math { + fill: #cb4b16; +} div.m-plot svg { text-align: center; }