From c952a84e35943d1a768c8ddde412c92c8803754d Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Sun, 15 Mar 2020 23:25:58 -0400 Subject: [PATCH 1/2] Added text-alignment to our column CSS layout --- examples/grid-layout.adoc | 20 ++++++++++++++++++++ templates/asciidoctor-compatibility.css | 12 ++++++++++++ 2 files changed, 32 insertions(+) diff --git a/examples/grid-layout.adoc b/examples/grid-layout.adoc index ae5cd7e5..9722059f 100644 --- a/examples/grid-layout.adoc +++ b/examples/grid-layout.adoc @@ -172,3 +172,23 @@ fun main() { [...] .... -- + +[.columns] +== Column Text Alignment + +[.column.has-text-left] +-- +Something Short + +Something So Long That We Need It Aligned +-- + +[.column.has-text-justified] +Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. + +[.column.has-text-right] +-- +Something Short + +Something So Long That We Need It Aligned +-- diff --git a/templates/asciidoctor-compatibility.css b/templates/asciidoctor-compatibility.css index 81e4c146..051e42d0 100644 --- a/templates/asciidoctor-compatibility.css +++ b/templates/asciidoctor-compatibility.css @@ -139,3 +139,15 @@ td.hdlist1{font-weight:bold;padding-bottom:1.25em} flex: none; width: 20%; } + +.columns .slide-content > .column.has-text-left { + text-align: left; +} + +.columns .slide-content > .column.has-text-justified { + text-align: justify; +} + +.columns .slide-content > .column.has-text-right { + text-align: right; +} From e189b9b4c34224e15c5240d4dc48706c89ae0069 Mon Sep 17 00:00:00 2001 From: Olivier Bilodeau Date: Sun, 15 Mar 2020 23:38:45 -0400 Subject: [PATCH 2/2] Added test case for text alignment feature --- test/doctest/grid-layout.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/test/doctest/grid-layout.html b/test/doctest/grid-layout.html index 2ecce1a0..8b7c1f31 100644 --- a/test/doctest/grid-layout.html +++ b/test/doctest/grid-layout.html @@ -270,4 +270,32 @@

Vertically Centered Columns

+
+

Column Text Alignment

+
+
+
+
+

Something Short

+
+
+

Something So Long That We Need It Aligned

+
+
+
+
+

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

+
+
+
+
+

Something Short

+
+
+

Something So Long That We Need It Aligned

+
+
+
+
+