From 8449d53c387e2e34bf30fc2350771164b8dbe1fe Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Tue, 28 Jul 2026 09:37:32 +0200 Subject: [PATCH 01/38] Fix alert --- Customization/xsl/topic.xsl | 4 +- css/common-bootstrap.css | 6 +- includes/bootstrap.hdf.xml | 29 ++++++--- includes/ftr.sidebar.example.xml | 4 +- sample/alerts.dita | 104 +++++++++++++++---------------- sample/document.ditamap | 12 ++-- xsl/utility-classes.xsl | 45 ++++++------- 7 files changed, 105 insertions(+), 99 deletions(-) diff --git a/Customization/xsl/topic.xsl b/Customization/xsl/topic.xsl index 4a7a2c57..961add5b 100644 --- a/Customization/xsl/topic.xsl +++ b/Customization/xsl/topic.xsl @@ -296,9 +296,7 @@ - - - +
diff --git a/css/common-bootstrap.css b/css/common-bootstrap.css index 6e29dafd..a8e95852 100644 --- a/css/common-bootstrap.css +++ b/css/common-bootstrap.css @@ -44,7 +44,7 @@ } [data-bs-theme='light'] { - --dita-violet: var(--bs-purple); + --dita-violet: var(--bs-purple-400); } } @@ -127,11 +127,11 @@ .note { border-left: 6px solid; - border-left-color: var(--bs-alert-color, transparent); + border-left-color: var(--bs-alert-border-color, transparent); } [dir='rtl'] .note { border-right: 6px solid; - border-right-color: var(--bs-alert-color, transparent); + border-right-color: var(--bs-alert-border-color, transparent); border-left: 0; } diff --git a/includes/bootstrap.hdf.xml b/includes/bootstrap.hdf.xml index f8fa94d6..e19a37d4 100644 --- a/includes/bootstrap.hdf.xml +++ b/includes/bootstrap.hdf.xml @@ -1,13 +1,26 @@
- -
diff --git a/includes/ftr.sidebar.example.xml b/includes/ftr.sidebar.example.xml index 95268b4d..90828772 100644 --- a/includes/ftr.sidebar.example.xml +++ b/includes/ftr.sidebar.example.xml @@ -1,7 +1,7 @@ -
+

- +

diff --git a/sample/alerts.dita b/sample/alerts.dita index 9ffc442a..e08181d5 100644 --- a/sample/alerts.dita +++ b/sample/alerts.dita @@ -30,71 +30,71 @@ Example

Alerts are available for any length of text, as well as an optional close button. For proper styling, use one of the eight required contextual classes (e.g., set outputclass to - alert-success).

+ alert theme-success).

-
A simple primary alertβ€”check it out!
-
A simple secondary alertβ€”check it out!
-
A simple success alertβ€”check it out!
-
A simple danger alertβ€”check it out!
-
A simple warning alertβ€”check it out!
-
A simple info alertβ€”check it out!
-
A simple light alertβ€”check it out!
-
A simple dark alertβ€”check it out!
+
A simple primary alert β€” check it out!
+
A simple secondary alert β€” check it out!
+
A simple success alert β€” check it out!
+
A simple danger alert β€” check it out!
+
A simple warning alert β€” check it out!
+
A simple info alert β€” check it out!
+
A simple accent alert β€” check it out!
+
A simple inverse alert β€” check it out!
<xmlatt>outputclass</xmlatt> - <section outputclass="alert-primary"> - A simple primary alertβ€”check it out! + <section outputclass="alert theme-primary"> + A simple primary alert β€” check it out! </section> -<section outputclass="alert-secondary"> - A simple secondary alertβ€”check it out! +<section outputclass="alert theme-secondary"> + A simple secondary alert β€” check it out! </section> -<section outputclass="alert-success"> - A simple success alertβ€”check it out! +<section outputclass="alert theme-success"> + A simple success alert β€” check it out! </section> -<section outputclass="alert-danger"> - A simple danger alertβ€”check it out! +<section outputclass="alert theme-danger"> + A simple danger alert β€” check it out! </section> -<section outputclass="alert-warning"> - A simple warning alertβ€”check it out! +<section outputclass="alert theme-warning"> + A simple warning alert β€” check it out! </section> -<section outputclass="alert-info"> - A simple info alertβ€”check it out! +<section outputclass="alert theme-info"> + A simple info alert β€” check it out! </section> -<section outputclass="alert-light"> - A simple light alertβ€”check it out! +<section outputclass="alert theme-accent"> + A simple accent alert β€” check it out! </section> -<section outputclass="alert-dark"> - A simple dark alertβ€”check it out! +<section outputclass="alert theme-inverse"> + A simple inverse alert β€” check it out! </section>
Specialization <alert color="primary"> - A simple primary alertβ€”check it out! + A simple primary alert β€” check it out! </alert> <alert color="secondary"> - A simple secondary alertβ€”check it out! + A simple secondary alert β€” check it out! </alert> <alert color="success"> - A simple success alertβ€”check it out! + A simple success alert β€” check it out! </alert> <alert color="danger"> - A simple danger alertβ€”check it out! + A simple danger alert β€” check it out! </alert> <alert color="warning"> - A simple warning alertβ€”check it out! + A simple warning alert β€” check it out! </alert> <alert color="info"> - A simple info alertβ€”check it out! + A simple info alert β€” check it out! </alert> -<alert color="light"> - A simple light alertβ€”check it out! +<alert color="accent"> + A simple accent alert β€” check it out! </alert> -<alert color="dark"> - A simple dark alertβ€”check it out! +<alert color="inverse"> + A simple inverse alert β€” check it out! </alert>
@@ -104,7 +104,7 @@

Alerts can also contain additional HTML elements like headings, paragraphs, icons and links.

-
+
<ph outputclass="bi bi-emoji-smile pe-2"/>Well done!

Aww yeah, you successfully read this important alert message. This example text with a link is going to run a bit longer so that you can see how spacing within an alert works @@ -115,7 +115,7 @@

<xmlatt>outputclass</xmlatt> - <section outputclass="alert alert-success"> + <section outputclass="alert theme-success vstack"> <title><i outputclass="bi bi-emoji-smile pe-2"/>Well done!</title> <p> Aww yeah, you successfully read this important alert message. This example text with a @@ -129,7 +129,7 @@
Specialization - <alert color="success"> + <alert color="success" outputclass="vstack"> <title><icon outputclass="bi-emoji-smile" padding="e2"/>Well done!</title> <p> Aww yeah, you successfully read this important alert message. This example text with a @@ -198,23 +198,23 @@

The default colors can be overridden by using a color attribute or an outputclass.

- This is a primary note. - This is a secondary note. - This is light note. - This is dark note. + This is a primary note. + This is a secondary note. + This is accent note. + This is inverse note.
<xmlatt>outputclass</xmlatt> - <note type="note" outputclass="alert-primary"> + <note type="note" outputclass="theme-primary"> This is a primary note.</note> -<note type="note" outputclass="alert-secondary"> +<note type="note" outputclass="theme-secondary"> This is a secondary note.</note> -<note type="note" outputclass="alert-light"> - This is light note. +<note type="note" outputclass="theme-accent"> + This is accent note. </note> -<note type="note" outputclass="alert-dark"> - This is dark note. +<note type="note" outputclass="theme-inverse"> + This is inverse note. </note>
@@ -225,11 +225,11 @@ <note color="secondary"> This is a secondary note. </note> -<note color="light"> - This is light note. +<note color="accent"> + This is accent note. </note> -<note color="dark"> - This is dark note. +<note color="inverse"> + This is inverse note. </note>
diff --git a/sample/document.ditamap b/sample/document.ditamap index 0c8db616..e648033f 100644 --- a/sample/document.ditamap +++ b/sample/document.ditamap @@ -11,7 +11,7 @@ Getting Started - + @@ -19,7 +19,7 @@ Layout - + @@ -30,7 +30,7 @@ Content - + @@ -41,7 +41,7 @@ Components - + @@ -64,7 +64,7 @@ Utilities - + @@ -75,7 +75,7 @@ Extend - + diff --git a/xsl/utility-classes.xsl b/xsl/utility-classes.xsl index 358c4f9a..48d04636 100644 --- a/xsl/utility-classes.xsl +++ b/xsl/utility-classes.xsl @@ -11,14 +11,14 @@ exclude-result-prefixes="xs dita-ot" > - + - + @@ -51,7 +51,7 @@ - alert alert- + alert theme- @@ -123,7 +123,7 @@ - alert p-0 alert- + alert p-0 theme- @@ -329,7 +329,7 @@ - alert alert- + card theme- @@ -477,11 +477,6 @@ else if (contains(@outputclass, 'btn-group-vertical')) then '' else if (contains(@outputclass, 'btn-group')) then '' else if (contains(@outputclass, 'btn-toolbar')) then '' - else if (contains(@outputclass, 'accordion-')) then 'accordion' - else if (contains(@outputclass, 'btn-')) then 'btn' - else if (contains(@outputclass, 'collapse-')) then 'collapse' - else if (contains(@outputclass, 'alert-')) then 'alert' - else if (contains(@outputclass, 'list-group-')) then 'list-group' else if (contains(@class, ' topic/fig ')) then ' figure ' || $BOOTSTRAP_CSS_FIGURE else if (contains(@class, ' topic/lq ')) then ' blockquote ' else if (contains(@class, ' topic/dl ')) then $BOOTSTRAP_CSS_DL @@ -597,26 +592,26 @@ alert - alert- + theme- From ce3e74aeed9eeea9ba43de3fe68f3174cf018279 Mon Sep 17 00:00:00 2001 From: Jason Fox Date: Tue, 28 Jul 2026 13:05:44 +0200 Subject: [PATCH 02/38] Fix badge --- Customization/xsl/topic.xsl | 8 +++--- css/bootswatch-colors.css | 2 +- css/common-bootstrap.css | 4 +-- includes/bootstrap.hdf.xml | 5 +++- sample/badge.dita | 50 ++++++++++++++++++------------------- xsl/utility-classes.xsl | 4 +-- 6 files changed, 39 insertions(+), 34 deletions(-) diff --git a/Customization/xsl/topic.xsl b/Customization/xsl/topic.xsl index 961add5b..72410d42 100644 --- a/Customization/xsl/topic.xsl +++ b/Customization/xsl/topic.xsl @@ -307,6 +307,7 @@ +
@@ -320,13 +321,14 @@ + select="*[contains(@class, ' ditaot-d/ditaval-startprop ')]/revprop" + mode="ditaval-outputflag" + />
+
svg { diff --git a/includes/bootstrap.hdf.xml b/includes/bootstrap.hdf.xml index e19a37d4..9045fc03 100644 --- a/includes/bootstrap.hdf.xml +++ b/includes/bootstrap.hdf.xml @@ -8,7 +8,10 @@ src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-Z+5YElvegGtTorgF5XlhCRkdTbU6SmOE+vvqYkVzGctueilwTIsac8hLXOvDlX3B" crossorigin="anonymous" /--> - + +