From: Vladimír Vondruš Date: Thu, 12 Oct 2017 09:47:47 +0000 (+0200) Subject: css: make border radius configurable. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=919bd1415b0fecc1ca4ab540d9c70c2cc3e57dad;p=blog.git css: make border radius configurable. --- diff --git a/css/m-components.css b/css/m-components.css index 9278b8cc..768f729d 100644 --- a/css/m-components.css +++ b/css/m-components.css @@ -58,7 +58,7 @@ pre { padding: 0.5rem 1rem; color: var(--code-color); background-color: var(--code-background-color); - border-radius: 0.2rem; + border-radius: var(--border-radius); overflow-x: auto; margin-top: 0; /* stupid defaults */ } @@ -577,14 +577,14 @@ dl.m-diary dd { /* Note, frame, block */ .m-note { - border-radius: 0.2rem; + border-radius: var(--border-radius); padding: 1rem; } .m-frame { background-color: var(--background-color); border-style: solid; border-width: 0.125rem; - border-radius: 0.2rem; + border-radius: var(--border-radius); border-color: var(--line-color); padding: 0.875rem; } @@ -592,7 +592,7 @@ dl.m-diary dd { border-style: solid; border-width: 0.0625rem; border-left-width: 0.25rem; - border-radius: 0.2rem; + border-radius: var(--border-radius); border-color: var(--line-color); padding: 0.9375rem 0.9375rem 0.9375rem 0.75rem; } @@ -836,7 +836,7 @@ div.m-image { } img.m-image, div.m-image img { max-width: 100%; - border-radius: 0.2rem; + border-radius: var(--border-radius); } div.m-image.m-fullwidth img { width: 100%; @@ -861,7 +861,7 @@ figure.m-figure:before { z-index: -1; /* so it doesn't make the contents inactive */ border-style: solid; border-width: 0.125rem; - border-radius: 0.2rem; + border-radius: var(--border-radius); border-color: var(--line-color); } figure.m-figure.m-flat:before { @@ -920,7 +920,7 @@ figure.m-code-figure:before { z-index: -1; /* so it doesn't make the contents inactive */ border-style: solid; border-width: 0.125rem; - border-radius: 0.2rem; + border-radius: var(--border-radius); border-color: var(--code-background-color); /* to match the
 background */
 }
 figure.m-code-figure.m-flat:before {
diff --git a/css/m-dark.css b/css/m-dark.css
index 3e1f8dcf..136cec55 100644
--- a/css/m-dark.css
+++ b/css/m-dark.css
@@ -17,6 +17,9 @@
   --nav-categories-case: lowercase;
   --heading-font-weight: bold;
 
+  /* Shapes */
+  --border-radius: 0.2rem;
+
   /* Basics */
   --background-color: #2f363f;
   --color: #dcdcdc;
diff --git a/css/m-light.css b/css/m-light.css
index db10089b..91d7cd06 100644
--- a/css/m-light.css
+++ b/css/m-light.css
@@ -14,6 +14,9 @@
   --nav-categories-case: lowercase;
   --heading-font-weight: normal;
 
+  /* Shapes */
+  --border-radius: 0.2rem;
+
   /* Basics */
   --background-color: #ffffff;
   --color: #000000;