summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-08-02 13:27:30 (GMT)
committerBoris Kolpackov <boris@codesynthesis.com>2019-08-02 13:27:30 (GMT)
commit7e75bb936cf5b2bd2fa3344e13b6c486c8ecc8a3 (patch)
tree0d993b051fd0f6fcebed24bd972847cc714ba993
parent827139821d3f043db25322b9dd91a7314d46ab01 (diff)
Add support for setting CLI code paragraph as box, similar to prev0.12.0
-rw-r--r--code-box.css16
-rw-r--r--common.css1
-rw-r--r--p-code-box.css24
-rw-r--r--pre-box.css2
4 files changed, 28 insertions, 15 deletions
diff --git a/code-box.css b/code-box.css
index 10c9154..f3d22ca 100644
--- a/code-box.css
+++ b/code-box.css
@@ -3,23 +3,11 @@
* license : MIT; see accompanying LICENSE file
*/
+/* Note: see also p-code-box.css if changing anything here. */
+
code
{
background-color: rgba(0, 0, 0, 0.05);
border-radius: 0.2em;
padding: .2em .32em .18em .32em;
}
-
-/*
-code::before
-{
- letter-spacing: -0.2em;
- content: "\00a0";
-}
-
-code::after
-{
- letter-spacing: -0.2em;
- content: "\00a0";
-}
-*/
diff --git a/common.css b/common.css
index fd4cafa..c0582bd 100644
--- a/common.css
+++ b/common.css
@@ -274,7 +274,6 @@ code, pre
}
pre {white-space: pre-wrap;}
-
@media only screen and (max-width: 567px)
{
pre {word-break: break-all;}
diff --git a/p-code-box.css b/p-code-box.css
new file mode 100644
index 0000000..5505d23
--- /dev/null
+++ b/p-code-box.css
@@ -0,0 +1,24 @@
+/* file : p-code-box.css
+ * copyright : Copyright (c) 2014-2019 Code Synthesis Ltd
+ * license : MIT; see accompanying LICENSE file
+ */
+
+/* This is the pre-like paragraph produced by CLI for code-only fragments. */
+
+/* Note: see also pre-box.css. */
+
+.code
+{
+ background-color: rgba(0, 0, 0, 0.05);
+ border-radius: 0.2em;
+ padding: .8em .4em .8em .4em;
+ margin: 2em -.4em 2em -.4em; /* Use margins of #content. */
+}
+
+/* Undo code-box.css inside .code. */
+.code code
+{
+ background-color: transparent;
+ border-radius: 0;
+ padding: 0;
+}
diff --git a/pre-box.css b/pre-box.css
index 4ac504b..62b3464 100644
--- a/pre-box.css
+++ b/pre-box.css
@@ -3,6 +3,8 @@
* license : MIT; see accompanying LICENSE file
*/
+/* Note: see also p-code-box.css. */
+
pre
{
background-color: rgba(0, 0, 0, 0.05);