Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .lefthook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ pre-commit:
commands:
prettier:
glob: '*.{css,dita*,json,md,xml,xsl,yml}'
run: prettier --write {staged_files}
run: npx prettier --write {staged_files}
stage_fixed: true
54 changes: 29 additions & 25 deletions brite/cfg/fo/attrs/bootstrap.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
Expand All @@ -12,6 +16,7 @@
<!-- Brite Theme Base Colors (overriding dita-bootstrap.pdf variables) -->

<xsl:variable name="bootstrap-link">#000000</xsl:variable>
<xsl:variable name="bootstrap-heading-font-weight">500</xsl:variable>

<!-- Primary -->
<xsl:variable name="bootstrap-primary">#a2e436</xsl:variable>
Expand All @@ -25,7 +30,7 @@
<xsl:variable name="bootstrap-primary-subtle-text">#415b16</xsl:variable>

<!-- Secondary -->
<xsl:variable name="bootstrap-secondary">#ffffff</xsl:variable>
<xsl:variable name="bootstrap-secondary">#585c5e</xsl:variable>
<xsl:variable name="bootstrap-badge-secondary-bg" select="$bootstrap-secondary"/>
<xsl:variable name="bootstrap-badge-secondary-color">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-secondary-bg">#fff</xsl:variable>
Expand Down Expand Up @@ -79,27 +84,26 @@
<xsl:variable name="bootstrap-badge-danger-bg" select="$bootstrap-danger"/>
<xsl:variable name="bootstrap-badge-danger-color">#000</xsl:variable>

<!-- Light -->
<xsl:variable name="bootstrap-light">#e9ecef</xsl:variable>
<xsl:variable name="bootstrap-light-subtle">#fcfcfd</xsl:variable>
<xsl:variable name="bootstrap-light-subtle-text">#495057</xsl:variable>
<xsl:variable name="bootstrap-table-light-bg">#e9ecef</xsl:variable>
<xsl:variable name="bootstrap-table-light-color">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-light-bg">#e9ecef</xsl:variable>
<xsl:variable name="bootstrap-btn-light-color">#000</xsl:variable>
<xsl:variable name="bootstrap-badge-light-bg" select="$bootstrap-light"/>
<xsl:variable name="bootstrap-badge-light-color">#000</xsl:variable>

<!-- Dark -->
<xsl:variable name="bootstrap-dark">#000000</xsl:variable>
<xsl:variable name="bootstrap-dark-subtle">#ced4da</xsl:variable>
<xsl:variable name="bootstrap-dark-subtle-text">#495057</xsl:variable>
<xsl:variable name="bootstrap-table-dark-bg">#000</xsl:variable>
<xsl:variable name="bootstrap-table-dark-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-dark-bg">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-dark-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-badge-dark-bg" select="$bootstrap-dark"/>
<xsl:variable name="bootstrap-badge-dark-color">#fff</xsl:variable>
<!-- Accent -->
<xsl:variable name="bootstrap-accent">#f5a4c9</xsl:variable>
<xsl:variable name="bootstrap-badge-accent-bg" select="$bootstrap-accent"/>
<xsl:variable name="bootstrap-badge-accent-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-accent-bg" select="$bootstrap-accent"/>
<xsl:variable name="bootstrap-btn-accent-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-accent-subtle">#fdecf4</xsl:variable>
<xsl:variable name="bootstrap-accent-subtle-text">#624150</xsl:variable>
<xsl:variable name="bootstrap-table-accent-bg" select="$bootstrap-accent-subtle"/>
<xsl:variable name="bootstrap-table-accent-color">#222</xsl:variable>
<!-- Inverse -->
<xsl:variable name="bootstrap-inverse">#000000</xsl:variable>
<xsl:variable name="bootstrap-inverse-subtle">#ced4da</xsl:variable>
<xsl:variable name="bootstrap-inverse-subtle-text">#495057</xsl:variable>
<xsl:variable name="bootstrap-table-inverse-bg">#000</xsl:variable>
<xsl:variable name="bootstrap-table-inverse-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-inverse-bg">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-inverse-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-badge-inverse-bg" select="$bootstrap-inverse"/>
<xsl:variable name="bootstrap-badge-inverse-color">#fff</xsl:variable>

<!-- Layout & Global Variables -->
<xsl:variable name="bootstrap-body-bg">#ffffff</xsl:variable>
Expand All @@ -109,11 +113,11 @@
<xsl:variable name="bootstrap-rounded">6pt</xsl:variable>

<!-- Heading Font Sizes (converted from Brite CSS rem values) -->
<xsl:variable name="bootstrap-h1-font-size">26pt</xsl:variable>
<xsl:variable name="bootstrap-h1-font-size">26.25pt</xsl:variable>
<xsl:variable name="bootstrap-h2-font-size">21pt</xsl:variable>
<xsl:variable name="bootstrap-h3-font-size">18.5pt</xsl:variable>
<xsl:variable name="bootstrap-h3-font-size">18.375pt</xsl:variable>
<xsl:variable name="bootstrap-h4-font-size">15.75pt</xsl:variable>
<xsl:variable name="bootstrap-h5-font-size">13.25pt</xsl:variable>
<xsl:variable name="bootstrap-h5-font-size">13.125pt</xsl:variable>
<xsl:variable name="bootstrap-h6-font-size">10.5pt</xsl:variable>


Expand Down
5 changes: 5 additions & 0 deletions brite/cfg/fo/attrs/custom.xsl
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0"
>

<xsl:import href="./bootstrap.xsl"/>
<xsl:import href="./topic-attr.xsl"/>
<xsl:import href="./prismjs.xsl"/>
<xsl:import href="./dita-ot.xsl"/>

Expand Down
4 changes: 4 additions & 0 deletions brite/cfg/fo/attrs/dita-ot.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
Expand Down
27 changes: 17 additions & 10 deletions brite/cfg/fo/attrs/prismjs.xsl
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0"
>

<!-- PrismJS code block styling aligned with Brite variables -->
<xsl:variable name="prismjs.text.color">#666666</xsl:variable>
<xsl:variable name="prismjs.background.color"><xsl:value-of select="$bootstrap-secondary-subtle"/></xsl:variable>
<xsl:variable name="prismjs.comment.color">#adb5bd</xsl:variable>
<xsl:variable name="prismjs.punctuation.color">#666a70</xsl:variable>
<xsl:variable name="prismjs.string.color">#458c60</xsl:variable>
<xsl:variable name="prismjs.function.color">#8c6d00</xsl:variable>
<xsl:variable name="prismjs.name.color">#127382</xsl:variable>
<xsl:variable name="prismjs.tag.color">#a34343</xsl:variable>
<xsl:variable name="prismjs.url.color">#127382</xsl:variable>
<xsl:variable name="prismjs.keyword.color">#6c9824</xsl:variable>
<xsl:variable name="prismjs.text.color">#212529</xsl:variable>
<xsl:variable name="prismjs.comment.color">#585c5e</xsl:variable>
<xsl:variable name="prismjs.punctuation.color">#585c5e</xsl:variable>
<xsl:variable name="prismjs.namespace.color">#585c5e</xsl:variable>
<xsl:variable name="prismjs.tag.color">#c53d80</xsl:variable>
<xsl:variable name="prismjs.string.color">#57b17a</xsl:variable>
<xsl:variable name="prismjs.keyword.color">#519ed6</xsl:variable>
<xsl:variable name="prismjs.type.color">#ce5555</xsl:variable>
<xsl:variable name="prismjs.regex.color">#d2803e</xsl:variable>
<xsl:variable name="prismjs.deleted.color">#ce5555</xsl:variable>
<xsl:variable name="prismjs.url.color">#d6a700</xsl:variable>

<xsl:variable name="prismjs.font-weight">normal</xsl:variable>

</xsl:stylesheet>
51 changes: 51 additions & 0 deletions brite/cfg/fo/attrs/topic-attr.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0"
>

<xsl:attribute-set name="topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="topic.topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="topic.topic.topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="topic.topic.topic.topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="topic.topic.topic.topic.topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="topic.topic.topic.topic.topic.topic.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="__chapter__frontmatter__name__container">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="__chapter__frontmatter__number__container">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="section.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="example.title">
<xsl:attribute name="font-weight">500</xsl:attribute>
</xsl:attribute-set>
</xsl:stylesheet>
6 changes: 4 additions & 2 deletions brite/cfg/fo/xsl/custom.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
Expand All @@ -13,7 +17,6 @@

<xsl:template match="*" mode="prismDecoration" priority="10">
<xsl:attribute name="color"><xsl:value-of select="$prismjs.text.color"/></xsl:attribute>
<xsl:attribute name="background-color"><xsl:value-of select="$prismjs.background.color"/></xsl:attribute>
<xsl:attribute name="border-style">solid</xsl:attribute>
<xsl:attribute name="border-color">#000000</xsl:attribute>
<xsl:attribute name="border-width"><xsl:value-of select="$bootstrap-border-width"/></xsl:attribute>
Expand Down Expand Up @@ -57,7 +60,6 @@
<xsl:variable name="token" select="tokenize(@outputclass, ' ')[starts-with(., 'btn-')][1]"/>
<xsl:variable name="theme">
<xsl:choose>
<xsl:when test="@color"><xsl:value-of select="@color"/></xsl:when>
<xsl:when test="starts-with($token, 'btn-outline-')">
<xsl:value-of select="substring-after($token, 'btn-outline-')"/>
</xsl:when>
Expand Down
50 changes: 28 additions & 22 deletions cerulean/cfg/fo/attrs/bootstrap.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
Expand All @@ -12,6 +16,8 @@
<!-- Cerulean Theme Base Colors -->

<xsl:variable name="bootstrap-link">#2fa4e7</xsl:variable>
<xsl:variable name="bootstrap-heading-color">#2fa4e7</xsl:variable>
<xsl:variable name="bootstrap-heading-font-weight">500</xsl:variable>

<!-- Primary -->
<xsl:variable name="bootstrap-primary">#2fa4e7</xsl:variable>
Expand All @@ -25,7 +31,7 @@
<xsl:variable name="bootstrap-table-primary-color">#000</xsl:variable>

<!-- Secondary -->
<xsl:variable name="bootstrap-secondary">#e9ecef</xsl:variable>
<xsl:variable name="bootstrap-secondary">#767c81</xsl:variable>
<xsl:variable name="bootstrap-badge-secondary-bg" select="$bootstrap-secondary"/>
<xsl:variable name="bootstrap-badge-secondary-color">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-secondary-bg">#e9ecef</xsl:variable>
Expand Down Expand Up @@ -79,30 +85,30 @@
<xsl:variable name="bootstrap-table-danger-bg">#f4d2d3</xsl:variable>
<xsl:variable name="bootstrap-table-danger-color">#495057</xsl:variable>

<!-- Light -->
<xsl:variable name="bootstrap-light">#f8f9fa</xsl:variable>
<xsl:variable name="bootstrap-badge-light-bg" select="$bootstrap-light"/>
<xsl:variable name="bootstrap-badge-light-color">#000</xsl:variable>
<xsl:variable name="bootstrap-btn-light-bg">#f8f9fa</xsl:variable>
<xsl:variable name="bootstrap-btn-light-color">#000</xsl:variable>
<xsl:variable name="bootstrap-light-subtle">#fefefe</xsl:variable>
<xsl:variable name="bootstrap-light-subtle-text">#141619</xsl:variable>
<xsl:variable name="bootstrap-table-light-bg">#f8f9fa</xsl:variable>
<xsl:variable name="bootstrap-table-light-color">#495057</xsl:variable>

<!-- Dark -->
<xsl:variable name="bootstrap-dark">#343a40</xsl:variable>
<xsl:variable name="bootstrap-badge-dark-bg" select="$bootstrap-dark"/>
<xsl:variable name="bootstrap-badge-dark-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-dark-bg">#343a40</xsl:variable>
<xsl:variable name="bootstrap-btn-dark-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-dark-subtle">#ced4da</xsl:variable>
<xsl:variable name="bootstrap-dark-subtle-text">#141619</xsl:variable>
<xsl:variable name="bootstrap-table-dark-bg">#343a40</xsl:variable>
<xsl:variable name="bootstrap-table-dark-color">#fff</xsl:variable>
<!-- Accent -->
<xsl:variable name="bootstrap-accent">#c760e7</xsl:variable>
<xsl:variable name="bootstrap-badge-accent-bg" select="$bootstrap-accent"/>
<xsl:variable name="bootstrap-badge-accent-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-accent-bg" select="$bootstrap-accent"/>
<xsl:variable name="bootstrap-btn-accent-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-accent-subtle">#f3dffa</xsl:variable>
<xsl:variable name="bootstrap-accent-subtle-text">#4f265c</xsl:variable>
<xsl:variable name="bootstrap-table-accent-bg" select="$bootstrap-accent-subtle"/>
<xsl:variable name="bootstrap-table-accent-color">#222</xsl:variable>
<!-- Inverse -->
<xsl:variable name="bootstrap-inverse">#343a40</xsl:variable>
<xsl:variable name="bootstrap-badge-inverse-bg" select="$bootstrap-inverse"/>
<xsl:variable name="bootstrap-badge-inverse-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-btn-inverse-bg">#343a40</xsl:variable>
<xsl:variable name="bootstrap-btn-inverse-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-inverse-subtle">#ced4da</xsl:variable>
<xsl:variable name="bootstrap-inverse-subtle-text">#141619</xsl:variable>
<xsl:variable name="bootstrap-table-inverse-bg">#343a40</xsl:variable>
<xsl:variable name="bootstrap-table-inverse-color">#fff</xsl:variable>
<xsl:variable name="bootstrap-body-bg">#ffffff</xsl:variable>
<xsl:variable name="bootstrap-body-color">#495057</xsl:variable>
<xsl:variable name="bootstrap-border-color">#dee2e6</xsl:variable>
<xsl:variable name="bootstrap-card-border-color">#e9ecef</xsl:variable>
<xsl:variable name="bootstrap-rounded">6pt</xsl:variable>

<!-- Heading Font Sizes -->
Expand Down
5 changes: 5 additions & 0 deletions cerulean/cfg/fo/attrs/custom.xsl
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0"
>

<xsl:import href="./bootstrap.xsl"/>
<xsl:import href="./topic-attr.xsl"/>
<xsl:import href="./prismjs.xsl"/>
<xsl:import href="./dita-ot.xsl"/>

Expand Down
4 changes: 4 additions & 0 deletions cerulean/cfg/fo/attrs/dita-ot.xsl
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
Expand Down
27 changes: 17 additions & 10 deletions cerulean/cfg/fo/attrs/prismjs.xsl
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
This file is part of the DITA Bootstrap PDF Themes plug-in for DITA Open Toolkit.
See the accompanying LICENSE file for applicable licenses.
-->
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="2.0"
>

<!-- PrismJS code block styling aligned with Cerulean variables -->
<xsl:variable name="prismjs.text.color">#5d5e60</xsl:variable>
<xsl:variable name="prismjs.background.color"><xsl:value-of select="$bootstrap-secondary-subtle"/></xsl:variable>
<xsl:variable name="prismjs.comment.color">#adb5bd</xsl:variable>
<xsl:variable name="prismjs.punctuation.color">#5a6167</xsl:variable>
<xsl:variable name="prismjs.string.color">#679733</xsl:variable>
<xsl:variable name="prismjs.function.color">#d05c00</xsl:variable>
<xsl:variable name="prismjs.name.color">#1a71a1</xsl:variable>
<xsl:variable name="prismjs.tag.color">#c71c22</xsl:variable>
<xsl:variable name="prismjs.url.color">#033c73</xsl:variable>
<xsl:variable name="prismjs.keyword.color">#19aa80</xsl:variable>
<xsl:variable name="prismjs.text.color">#495057</xsl:variable>
<xsl:variable name="prismjs.comment.color">#767b80</xsl:variable>
<xsl:variable name="prismjs.punctuation.color">#767b80</xsl:variable>
<xsl:variable name="prismjs.namespace.color">#767b80</xsl:variable>
<xsl:variable name="prismjs.tag.color">#c33476</xsl:variable>
<xsl:variable name="prismjs.string.color">#618d30</xsl:variable>
<xsl:variable name="prismjs.keyword.color">#033261</xsl:variable>
<xsl:variable name="prismjs.type.color">#a7181d</xsl:variable>
<xsl:variable name="prismjs.regex.color">#d56a11</xsl:variable>
<xsl:variable name="prismjs.deleted.color">#a7181d</xsl:variable>
<xsl:variable name="prismjs.url.color">#ba4800</xsl:variable>

<xsl:variable name="prismjs.font-weight">normal</xsl:variable>

</xsl:stylesheet>
Loading