Commit e0beae4e authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'asciidoc-alignment-roles' into 'master'

AsciiDoc: Add support for built-in alignment roles.

Closes #218891

See merge request gitlab-org/gitlab!32928
parents 4944d897 65b83029
......@@ -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
# Classes used by Asciidoctor to style components
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
CHECKLIST_CLASSES = %w(fa fa-check-square-o fa-square-o).freeze
LIST_CLASSES = %w(checklist none no-bullet unnumbered unstyled).freeze
......@@ -28,7 +29,7 @@ module Banzai
ELEMENT_CLASSES_WHITELIST = {
span: %w(big small underline overline line-through).freeze,
div: ['admonitionblock'].freeze,
div: ALIGNMENT_BUILTINS_CLASSES + ['admonitionblock'].freeze,
td: ['icon'].freeze,
i: ADMONITION_CLASSES + CALLOUT_CLASSES + CHECKLIST_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