Skip to content

Commit

Permalink
more thoroughly document the noborder role on block images
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Feb 20, 2023
1 parent 2403818 commit 803b575
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/roles.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ The sign spelled out [.big]#WELCOME# in glowing neon lights.
When text is enclosed in a pair of single or double hash symbols (`#`) and has at least one role, the role(s) will be applied to that text without adding any other implicit formatting.
That is, the text won't be highlighted.

Roles are sometimes used to control behavior.
For example, if the `noborder` role is present on a block image, the border will not be drawn even if configured on the `image` category in the theme.
The `noborder` role cannot be redefined.

[#custom]
== Use a custom role

Expand Down
9 changes: 9 additions & 0 deletions docs/modules/theme/pages/block-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ image:
width: 100%
|===

=== noborder role

If the `noborder` role is present on a block image, the border is not drawn on that image even if the border-related keys are defined on the `image` category in the theme.

[,asciidoc]
----
image::image-without-border.png[role=noborder]
----

[#border-color]
=== border-color

Expand Down
4 changes: 4 additions & 0 deletions docs/modules/theme/pages/role.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ line-through:: The `line-through` role adds the strikethrough decoration.
subtitle:: The `subtitle` role is used to configure the font properties of the subtitle of a section title.
// end::user-formatting[]
unresolved:: The `unresolved` role is applied automatically to the text of an unresolved footnote reference.
(Only recognizes the `font-color` theme key).
noborder:: Only applies to block images.
If this role is present on the block image, the border will not be added.
This role cannot be redefined.

NOTE: The color roles (e.g., `blue`), which you may be familiar with from the HTML converter, are not mapped by default.
You'll need to define these color roles as xref:custom-role.adoc[custom roles] in your theme if you'd like to make use of them when converting to PDF.

0 comments on commit 803b575

Please sign in to comment.