From 5c72a13996e4af901522c83837fca2e1b8b7b344 Mon Sep 17 00:00:00 2001 From: chrispy Date: Sat, 14 Oct 2023 13:06:49 -0400 Subject: [PATCH] use @class="compact" (with CSS) instead of @compact="yes" for XHTML/HTML5 outputs Signed-off-by: chrispy --- .../plugins/org.dita.html5/sass/_lists.scss | 6 +-- src/main/plugins/org.dita.html5/xsl/topic.xsl | 39 ++++++++++--------- .../org.dita.xhtml/resource/commonltr.css | 5 +-- .../org.dita.xhtml/resource/commonrtl.css | 5 +-- .../xsl/xslhtml/dita2htmlImpl.xsl | 35 ++++++++++------- 5 files changed, 43 insertions(+), 47 deletions(-) diff --git a/src/main/plugins/org.dita.html5/sass/_lists.scss b/src/main/plugins/org.dita.html5/sass/_lists.scss index 85fbdee0d6..9b62f41a25 100644 --- a/src/main/plugins/org.dita.html5/sass/_lists.scss +++ b/src/main/plugins/org.dita.html5/sass/_lists.scss @@ -22,14 +22,10 @@ ul.simple { margin-top: 1em; } -*[compact="yes"] > li { +.compact > li { margin-top: 0; } -*[compact="no"] > li { - margin-top: 0.53em; -} - .liexpand { margin-bottom: 1em; margin-top: 1em; diff --git a/src/main/plugins/org.dita.html5/xsl/topic.xsl b/src/main/plugins/org.dita.html5/xsl/topic.xsl index a0e6bf239b..300f3aba1f 100644 --- a/src/main/plugins/org.dita.html5/xsl/topic.xsl +++ b/src/main/plugins/org.dita.html5/xsl/topic.xsl @@ -613,8 +613,11 @@ See the accompanying LICENSE file for applicable license.
    - - + + + + +
@@ -628,9 +631,12 @@ See the accompanying LICENSE file for applicable license.
    - + + + -
@@ -644,8 +650,11 @@ See the accompanying LICENSE file for applicable license.
    - - + + + + + a @@ -729,12 +738,11 @@ See the accompanying LICENSE file for applicable license.
    - - - dlexpand - - - + + + + +
    @@ -1936,13 +1944,6 @@ See the accompanying LICENSE file for applicable license. - - - - compact - - - diff --git a/src/main/plugins/org.dita.xhtml/resource/commonltr.css b/src/main/plugins/org.dita.xhtml/resource/commonltr.css index f55bcb0689..d0f173daa0 100644 --- a/src/main/plugins/org.dita.xhtml/resource/commonltr.css +++ b/src/main/plugins/org.dita.xhtml/resource/commonltr.css @@ -325,12 +325,9 @@ ul.simple { font-weight: bold; margin-top: 1em; } -*[compact="yes"] > li { +.compact > li { margin-top: 0; } -*[compact="no"] > li { - margin-top: .53em; -} .liexpand { margin-top: 1em; margin-bottom: 1em; diff --git a/src/main/plugins/org.dita.xhtml/resource/commonrtl.css b/src/main/plugins/org.dita.xhtml/resource/commonrtl.css index 687e153dba..8e77abee41 100644 --- a/src/main/plugins/org.dita.xhtml/resource/commonrtl.css +++ b/src/main/plugins/org.dita.xhtml/resource/commonrtl.css @@ -329,12 +329,9 @@ ul.simple { font-weight: bold; margin-top: 1em; } -*[compact="yes"] > li { +.compact > li { margin-top: 0; } -*[compact="no"] > li { - margin-top: .53em; -} .liexpand { margin-top: 1em; margin-bottom: 1em; diff --git a/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl b/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl index 4d7eef2610..1b78527f76 100644 --- a/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl +++ b/src/main/plugins/org.dita.xhtml/xsl/xslhtml/dita2htmlImpl.xsl @@ -757,8 +757,11 @@ See the accompanying LICENSE file for applicable license.
      - - + + + + +
    @@ -773,9 +776,12 @@ See the accompanying LICENSE file for applicable license.
      - + + + -
    @@ -790,8 +796,11 @@ See the accompanying LICENSE file for applicable license.
      - - + + + + + a @@ -885,8 +894,11 @@ See the accompanying LICENSE file for applicable license. dlexpand - - + + + + + @@ -2032,13 +2044,6 @@ See the accompanying LICENSE file for applicable license. - - - - compact - - -