Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added text-alignment to our column CSS layout #354

Merged
merged 2 commits into from
Mar 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions examples/grid-layout.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
--
12 changes: 12 additions & 0 deletions templates/asciidoctor-compatibility.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
28 changes: 28 additions & 0 deletions test/doctest/grid-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,32 @@ <h2>Vertically Centered Columns</h2>
</div>
</div>
</section>
<section class="columns" id="_column_text_alignment">
<h2>Column Text Alignment</h2>
<div class="slide-content">
<div class="openblock column has-text-left">
<div class="content">
<div class="paragraph">
<p>Something Short</p>
</div>
<div class="paragraph">
<p>Something So Long That We Need It Aligned</p>
</div>
</div>
</div>
<div class="paragraph column has-text-justified">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
<div class="openblock column has-text-right">
<div class="content">
<div class="paragraph">
<p>Something Short</p>
</div>
<div class="paragraph">
<p>Something So Long That We Need It Aligned</p>
</div>
</div>
</div>
</div>
</section>
</div>