From ebe37ede7d755fd8444f1f84cec576d32108e6f1 Mon Sep 17 00:00:00 2001 From: Jiminy Panoz Date: Tue, 25 Nov 2025 10:04:34 +0100 Subject: [PATCH 1/2] Correct selector for indent + align Selectors do not combine when filtering out. --- .../ReadiumCSS-paraIndent_pref.css | 11 +++++++++-- .../ReadiumCSS-textAlign_pref.css | 13 ++++++++++--- package.json | 2 +- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/css/src/modules/user-settings-submodules/ReadiumCSS-paraIndent_pref.css b/css/src/modules/user-settings-submodules/ReadiumCSS-paraIndent_pref.css index d724b53..abf3183 100644 --- a/css/src/modules/user-settings-submodules/ReadiumCSS-paraIndent_pref.css +++ b/css/src/modules/user-settings-submodules/ReadiumCSS-paraIndent_pref.css @@ -6,8 +6,15 @@ Repo: https://github.com/readium/css */ -:root[style*="--USER__paraIndent"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), -:root[style*="--USER__paraIndent"]:--experimental-header-filtering p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)) { +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root:--experimental-header-filtering p[class*="title"], + :root:--experimental-header-filtering div:has(+ *) > h1 + p, + :root:--experimental-header-filtering div:has(+ *) > p:has(+ h1) +) { text-indent: var(--USER__paraIndent) !important; } diff --git a/css/src/modules/user-settings-submodules/ReadiumCSS-textAlign_pref.css b/css/src/modules/user-settings-submodules/ReadiumCSS-textAlign_pref.css index 267d62c..bde5882 100644 --- a/css/src/modules/user-settings-submodules/ReadiumCSS-textAlign_pref.css +++ b/css/src/modules/user-settings-submodules/ReadiumCSS-textAlign_pref.css @@ -11,10 +11,17 @@ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root:--experimental-header-filtering p[class*="title"], + :root:--experimental-header-filtering div:has(+ *) > h1 + p, + :root:--experimental-header-filtering div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, -:root[style*="--USER__textAlign"] dd, -:root[style*="--USER__textAlign"]:--experimental-header-filtering p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)) { +:root[style*="--USER__textAlign"] dd { text-align: var(--USER__textAlign) !important; -moz-text-align-last: auto !important; -epub-text-align-last: auto !important; diff --git a/package.json b/package.json index 5b6878b..25b6ec8 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@readium/css", "description": "A set of reference stylesheets for EPUB Reading Systems", - "version": "2.0.0-beta.23", + "version": "2.0.0-beta.24", "homepage": "https://github.com/readium/css", "license": "BSD-3-Clause", "keywords": [ From 0b3c677c5e9a82fc37b603b071efe5a37f3fc8b8 Mon Sep 17 00:00:00 2001 From: Jiminy Panoz Date: Tue, 25 Nov 2025 10:21:24 +0100 Subject: [PATCH 2/2] Build --- css/dist/ReadiumCSS-after.css | 26 ++++++++++++++----- css/dist/ReadiumCSS-before.css | 2 +- css/dist/ReadiumCSS-default.css | 2 +- css/dist/cjk-horizontal/ReadiumCSS-after.css | 2 +- css/dist/cjk-horizontal/ReadiumCSS-before.css | 2 +- .../cjk-horizontal/ReadiumCSS-default.css | 2 +- css/dist/cjk-vertical/ReadiumCSS-after.css | 2 +- css/dist/cjk-vertical/ReadiumCSS-before.css | 2 +- css/dist/cjk-vertical/ReadiumCSS-default.css | 2 +- css/dist/rtl/ReadiumCSS-after.css | 26 ++++++++++++++----- css/dist/rtl/ReadiumCSS-before.css | 2 +- css/dist/rtl/ReadiumCSS-default.css | 2 +- css/dist/webPub/ReadiumCSS-webPub.css | 26 ++++++++++++++----- 13 files changed, 70 insertions(+), 28 deletions(-) diff --git a/css/dist/ReadiumCSS-after.css b/css/dist/ReadiumCSS-after.css index 4b3c7a5..2138d20 100644 --- a/css/dist/ReadiumCSS-after.css +++ b/css/dist/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -214,10 +214,17 @@ body{ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, -:root[style*="--USER__textAlign"] dd, -:root[style*="--USER__textAlign"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; -moz-text-align-last:auto !important; -epub-text-align-last:auto !important; @@ -355,8 +362,15 @@ body{ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="--USER__paraIndent"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), -:root[style*="--USER__paraIndent"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ text-indent:var(--USER__paraIndent) !important; } diff --git a/css/dist/ReadiumCSS-before.css b/css/dist/ReadiumCSS-before.css index 442444b..1c3b0ff 100644 --- a/css/dist/ReadiumCSS-before.css +++ b/css/dist/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/ReadiumCSS-default.css b/css/dist/ReadiumCSS-default.css index a4a1e9a..fdd4363 100644 --- a/css/dist/ReadiumCSS-default.css +++ b/css/dist/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-horizontal/ReadiumCSS-after.css b/css/dist/cjk-horizontal/ReadiumCSS-after.css index f27aa91..4681521 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-after.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-horizontal/ReadiumCSS-before.css b/css/dist/cjk-horizontal/ReadiumCSS-before.css index 86935a9..01fa1eb 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-before.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-horizontal/ReadiumCSS-default.css b/css/dist/cjk-horizontal/ReadiumCSS-default.css index 4d17c7d..31461a7 100644 --- a/css/dist/cjk-horizontal/ReadiumCSS-default.css +++ b/css/dist/cjk-horizontal/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-vertical/ReadiumCSS-after.css b/css/dist/cjk-vertical/ReadiumCSS-after.css index d108ec7..de5e03f 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-after.css +++ b/css/dist/cjk-vertical/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-vertical/ReadiumCSS-before.css b/css/dist/cjk-vertical/ReadiumCSS-before.css index 9eb04eb..4e30c47 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-before.css +++ b/css/dist/cjk-vertical/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/cjk-vertical/ReadiumCSS-default.css b/css/dist/cjk-vertical/ReadiumCSS-default.css index 34ad0fe..52b3ac7 100644 --- a/css/dist/cjk-vertical/ReadiumCSS-default.css +++ b/css/dist/cjk-vertical/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/rtl/ReadiumCSS-after.css b/css/dist/rtl/ReadiumCSS-after.css index b85c717..befc238 100644 --- a/css/dist/rtl/ReadiumCSS-after.css +++ b/css/dist/rtl/ReadiumCSS-after.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -214,10 +214,17 @@ body{ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, -:root[style*="--USER__textAlign"] dd, -:root[style*="--USER__textAlign"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; -moz-text-align-last:auto !important; -epub-text-align-last:auto !important; @@ -293,8 +300,15 @@ body{ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="--USER__paraIndent"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), -:root[style*="--USER__paraIndent"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ text-indent:var(--USER__paraIndent) !important; } diff --git a/css/dist/rtl/ReadiumCSS-before.css b/css/dist/rtl/ReadiumCSS-before.css index 86935a9..01fa1eb 100644 --- a/css/dist/rtl/ReadiumCSS-before.css +++ b/css/dist/rtl/ReadiumCSS-before.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/rtl/ReadiumCSS-default.css b/css/dist/rtl/ReadiumCSS-default.css index 846e39f..8c43482 100644 --- a/css/dist/rtl/ReadiumCSS-default.css +++ b/css/dist/rtl/ReadiumCSS-default.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. diff --git a/css/dist/webPub/ReadiumCSS-webPub.css b/css/dist/webPub/ReadiumCSS-webPub.css index e7d309e..a39093b 100644 --- a/css/dist/webPub/ReadiumCSS-webPub.css +++ b/css/dist/webPub/ReadiumCSS-webPub.css @@ -1,5 +1,5 @@ /*! - * Readium CSS v.2.0.0-beta.23 + * Readium CSS v.2.0.0-beta.24 * Copyright (c) 2017–2025. Readium Foundation. All rights reserved. * Use of this source code is governed by a BSD-style license which is detailed in the * LICENSE file present in the project repository where this source code is maintained. @@ -18,10 +18,17 @@ } :root[style*="--USER__textAlign"] body, -:root[style*="--USER__textAlign"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), +:root[style*="--USER__textAlign"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +), :root[style*="--USER__textAlign"] li, -:root[style*="--USER__textAlign"] dd, -:root[style*="--USER__textAlign"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__textAlign"] dd{ text-align:var(--USER__textAlign) !important; -moz-text-align-last:auto !important; -epub-text-align-last:auto !important; @@ -148,8 +155,15 @@ margin-bottom:var(--USER__paraSpacing) !important; } -:root[style*="--USER__paraIndent"] p:not(blockquote p):not(figcaption p):not(header p):not(hgroup p), -:root[style*="--USER__paraIndent"][style*="readium-experimentalHeaderFiltering-on"] p:not([class*="title"]):not(div:has(+ *) > h1 + p):not(div:has(+ *) > p:has(+ h1)){ +:root[style*="--USER__paraIndent"] p:not( + blockquote p, + figcaption p, + header p, + hgroup p, + :root[style*="readium-experimentalHeaderFiltering-on"] p[class*="title"], + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > h1 + p, + :root[style*="readium-experimentalHeaderFiltering-on"] div:has(+ *) > p:has(+ h1) +){ text-indent:var(--USER__paraIndent) !important; }