Commit 65b83029 authored by Minerva and her owl's avatar Minerva and her owl Committed by Paul Slaughter

AsciiDoc: Add support for built-in alignment roles

https://gitlab.com/gitlab-org/gitlab/-/merge_requests/32928
parent 2eb346c7
...@@ -545,6 +545,24 @@ ...@@ -545,6 +545,24 @@
} }
} }
} }
/* AsciiDoc(tor) built-in alignment roles */
.text-left {
text-align: left !important;
}
.text-right {
text-align: right !important;
}
.text-center {
text-align: center !important;
}
.text-justify {
text-align: justify !important;
}
} }
/** /**
......
---
title: 'AsciiDoc: Add support for built-in alignment roles.'
merge_request: 32928
author: mnrvwl
type: fixed
...@@ -18,6 +18,7 @@ module Banzai ...@@ -18,6 +18,7 @@ module Banzai
# Classes used by Asciidoctor to style components # Classes used by Asciidoctor to style components
ADMONITION_CLASSES = %w(fa icon-note icon-tip icon-warning icon-caution icon-important).freeze ADMONITION_CLASSES = %w(fa icon-note icon-tip icon-warning icon-caution icon-important).freeze
ALIGNMENT_BUILTINS_CLASSES = %w(text-center text-left text-right text-justify).freeze
CALLOUT_CLASSES = ['conum'].freeze CALLOUT_CLASSES = ['conum'].freeze
CHECKLIST_CLASSES = %w(fa fa-check-square-o fa-square-o).freeze CHECKLIST_CLASSES = %w(fa fa-check-square-o fa-square-o).freeze
LIST_CLASSES = %w(checklist none no-bullet unnumbered unstyled).freeze LIST_CLASSES = %w(checklist none no-bullet unnumbered unstyled).freeze
...@@ -28,7 +29,7 @@ module Banzai ...@@ -28,7 +29,7 @@ module Banzai
ELEMENT_CLASSES_WHITELIST = { ELEMENT_CLASSES_WHITELIST = {
span: %w(big small underline overline line-through).freeze, span: %w(big small underline overline line-through).freeze,
div: ['admonitionblock'].freeze, div: ALIGNMENT_BUILTINS_CLASSES + ['admonitionblock'].freeze,
td: ['icon'].freeze, td: ['icon'].freeze,
i: ADMONITION_CLASSES + CALLOUT_CLASSES + CHECKLIST_CLASSES, i: ADMONITION_CLASSES + CALLOUT_CLASSES + CHECKLIST_CLASSES,
ul: LIST_CLASSES, ul: LIST_CLASSES,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment