summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-11-28 01:51:44 -0700
committerGitHub <noreply@github.com>2023-11-28 01:51:44 -0700
commit5f3bb0a288a3a11578d8ec5ea13fd2ebd2314fc9 (patch)
tree0ee1f6d23faa662cb1c5d4f104dfba8005551c94
parent45a8c31aea6607775fd6a52b75f8f8bfbf05b1e8 (diff)
resolves #3466 update stylesheet to use break-after in place of page-break-before/after/inside (PR #4495)
-rw-r--r--CHANGELOG.adoc1
-rw-r--r--data/stylesheets/asciidoctor-default.css10
-rw-r--r--src/stylesheets/asciidoctor.css10
3 files changed, 11 insertions, 10 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc
index 9b53b376..4eaa9e41 100644
--- a/CHANGELOG.adoc
+++ b/CHANGELOG.adoc
@@ -43,6 +43,7 @@ Compliance::
* Don't promote level-0 special section at start of document to document title (#4151)
* Disallow the use of dot (`.`) in the name of a named element attribute (#4147)
* Disallow the use of the left square bracket in an attribute list on formatted text (#4306)
+ * Update stylesheet to use break-after in place of page-break-before/after/inside (#3466)
* Drop support for Ruby < 2.7 and JRuby < 9.2
* Update latest Ruby to 3.2 in CI workflows
* Update latest JRuby in CI workflow to 9.4.2.0
diff --git a/data/stylesheets/asciidoctor-default.css b/data/stylesheets/asciidoctor-default.css
index 6987bb7d..9ec0af2f 100644
--- a/data/stylesheets/asciidoctor-default.css
+++ b/data/stylesheets/asciidoctor-default.css
@@ -295,7 +295,7 @@ sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
div.page-break{display:none}
-div.unbreakable{page-break-inside:avoid}
+div.unbreakable{-moz-column-break-inside:avoid;break-inside:avoid}
.big{font-size:larger}
.small{font-size:smaller}
.underline{text-decoration:underline}
@@ -362,10 +362,10 @@ a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare)::after,a[href^="https:"]:not(.bare)::after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]{border-bottom:1px dotted}
abbr[title]::after{content:" (" attr(title) ")"}
-pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
+pre,blockquote,tr,img,object,svg{-moz-column-break-inside:avoid;break-inside:avoid}
thead{display:table-header-group}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
-h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
+h2,h3,#toctitle,.sidebarblock>.content>.title{-moz-column-break-after:avoid;break-after:avoid}
body>div[id]{max-width:none}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
#toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important}
@@ -376,9 +376,9 @@ body.book #header .details span:first-child{margin-left:0!important}
body.book #header .details br{display:block}
body.book #header .details br+span::before{content:none!important}
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
-body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
+body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{-moz-column-break-before:page;break-before:page}
.listingblock code[data-lang]::before{display:block}
-div.page-break{display:block;page-break-after:always}
+div.page-break{display:block;-moz-column-break-after:page;break-after:page}
#footer{padding:0 .9375em}
.hide-on-print{display:none!important}
.print-only{display:block!important}
diff --git a/src/stylesheets/asciidoctor.css b/src/stylesheets/asciidoctor.css
index 03de8566..04409b10 100644
--- a/src/stylesheets/asciidoctor.css
+++ b/src/stylesheets/asciidoctor.css
@@ -1790,7 +1790,7 @@ div.page-break {
}
div.unbreakable {
- page-break-inside: avoid;
+ break-inside: avoid;
}
.big {
@@ -2111,7 +2111,7 @@ p.tableblock {
img,
object,
svg {
- page-break-inside: avoid;
+ break-inside: avoid;
}
thead {
@@ -2131,7 +2131,7 @@ p.tableblock {
h3,
#toctitle,
.sidebarblock > .content > .title {
- page-break-after: avoid;
+ break-after: avoid;
}
body > div[id] {
@@ -2187,7 +2187,7 @@ p.tableblock {
body.book #preamble,
body.book h1.sect0,
body.book .sect1 > h2 {
- page-break-before: always;
+ break-before: page;
}
.listingblock code[data-lang]::before {
@@ -2196,7 +2196,7 @@ p.tableblock {
div.page-break {
display: block;
- page-break-after: always;
+ break-after: page;
}
#footer {