From: Vladimír Vondruš Date: Sun, 14 Oct 2018 15:12:36 +0000 (+0200) Subject: css: enforce bottom padding on figures w/ components in description. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=2a5fc72e23b34ce9c26cb851e70a4441c64df705;p=blog.git css: enforce bottom padding on figures w/ components in description. Otherwise stuff like `div.m-graph:last-child` that resets it back to 0 gets a priority. --- diff --git a/css/m-components.css b/css/m-components.css index 1af4e97b..993cdd18 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -728,7 +728,9 @@ figure.m-figure > *:first-child { display: inline; } figure.m-figure > *:last-child { - margin-bottom: 1rem; + /* Need !important so the :last-child margin reset doesn't have higher + priority than this */ + margin-bottom: 1rem !important; } figure.m-figure img, figure.m-figure svg { position: relative; /* so it's above the border */ diff --git a/css/m-dark+doxygen.compiled.css b/css/m-dark+doxygen.compiled.css index 6cf310b6..ba1bb2a1 100644 --- a/css/m-dark+doxygen.compiled.css +++ b/css/m-dark+doxygen.compiled.css @@ -1048,7 +1048,7 @@ figure.m-figure > *:first-child { display: inline; } figure.m-figure > *:last-child { - margin-bottom: 1rem; + margin-bottom: 1rem !important; } figure.m-figure img, figure.m-figure svg { position: relative; diff --git a/css/m-dark.compiled.css b/css/m-dark.compiled.css index 47a98d46..27d5e755 100644 --- a/css/m-dark.compiled.css +++ b/css/m-dark.compiled.css @@ -1048,7 +1048,7 @@ figure.m-figure > *:first-child { display: inline; } figure.m-figure > *:last-child { - margin-bottom: 1rem; + margin-bottom: 1rem !important; } figure.m-figure img, figure.m-figure svg { position: relative; diff --git a/css/m-light+doxygen.compiled.css b/css/m-light+doxygen.compiled.css index 6229d5f7..4629aa15 100644 --- a/css/m-light+doxygen.compiled.css +++ b/css/m-light+doxygen.compiled.css @@ -1048,7 +1048,7 @@ figure.m-figure > *:first-child { display: inline; } figure.m-figure > *:last-child { - margin-bottom: 1rem; + margin-bottom: 1rem !important; } figure.m-figure img, figure.m-figure svg { position: relative; diff --git a/css/m-light.compiled.css b/css/m-light.compiled.css index cd2cd85b..0c1c71d5 100644 --- a/css/m-light.compiled.css +++ b/css/m-light.compiled.css @@ -1048,7 +1048,7 @@ figure.m-figure > *:first-child { display: inline; } figure.m-figure > *:last-child { - margin-bottom: 1rem; + margin-bottom: 1rem !important; } figure.m-figure img, figure.m-figure svg { position: relative;