remove top margin from first child in AsciiDoc table cell and admonition content
authorDan Allen <dan@opendevise.com>
Sun, 29 Nov 2020 09:18:36 +0000 (02:18 -0700)
committerDan Allen <dan@opendevise.com>
Sun, 29 Nov 2020 09:18:36 +0000 (02:18 -0700)
preview-src/index.adoc
src/css/doc.css

index f30e1e3..7ebb679 100644 (file)
@@ -89,11 +89,16 @@ Eu mea munere vituperata constituam.
 
 [%autowidth]
 |===
-|Input | Output
+|Input | Output | Example
 
 m|"foo\nbar"
 l|foo
 bar
+a|
+[source,ruby]
+----
+puts "foo\nbar"
+----
 |===
 
 Select menu:File[Open Project] to open the project in your IDE.
index 1eb6fe7..b0f13c1 100644 (file)
   padding: 0.5rem;
 }
 
+.doc td.tableblock > .content > :first-child {
+  margin-top: 0;
+}
+
 .doc .halign-left {
   text-align: left;
 }
   font-size: calc(16 / var(--rem-base) * 1rem);
 }
 
-.doc .admonitionblock td.content > :first-child {
-  margin: 0;
+.doc .admonitionblock td.content > :not(.title):first-child,
+.doc .admonitionblock td.content > .title + * {
+  margin-top: 0;
 }
 
 .doc .admonitionblock pre {
   font-size: inherit;
 }
 
-.doc table.tableblock .paragraph {
-  margin: 0;
-  padding: 0;
-}
-
-.doc table.tableblock .admonitionblock,
-.doc .ulist .admonitionblock,
-.doc .olist .admonitionblock {
-  padding: 0;
-}
-
 .doc ol,
 .doc ul {
   margin: 0;
   padding-bottom: 0;
 }
 
-.doc .admonitionblock .title + .paragraph {
-  margin-top: 0;
-}
-
 .doc .exampleblock > .content {
   background: var(--example-background);
   border: 0.25rem solid var(--example-border-color);