diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2021-09-14 23:54:12 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-14 23:54:12 -0600 |
| commit | 48533baac43a15709f536c2aaa24ef5bbebeeb5b (patch) | |
| tree | b5b14a2735ce2c2e0f9d018462c026b800a75c50 | |
| parent | 1b6da4f2d883e61d2e785ff5dd986c8e2ce0c988 (diff) | |
resolves #4169 consolidate styles applied to primary containers in default stylesheet (PR #4170)
| -rw-r--r-- | CHANGELOG.adoc | 1 | ||||
| -rw-r--r-- | data/stylesheets/asciidoctor-default.css | 9 | ||||
| -rw-r--r-- | src/stylesheets/asciidoctor.css | 35 |
3 files changed, 12 insertions, 33 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index f7741122..39c45194 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -41,6 +41,7 @@ Improvements:: * Remove duplicate selectors in default stylesheet; enable stylelint rule to check for them * Use CSS class instead of inline style to apply page break behavior (#4051) * Set width of line number table column of source block to 0.01% to restrict width and force table to span available width (#4137) + * Consolidate styles applied to primary containers (`#header`, `#content`, `#footnotes`, `#footer`) in default stylesheet (#4169) // tag::compact[] == 2.0.16 (2021-08-03) - @mojavelinux diff --git a/data/stylesheets/asciidoctor-default.css b/data/stylesheets/asciidoctor-default.css index c84b5559..aef74962 100644 --- a/data/stylesheets/asciidoctor-default.css +++ b/data/stylesheets/asciidoctor-default.css @@ -109,9 +109,8 @@ b.button::before,b.button::after{position:relative;top:-1px;font-weight:400} b.button::before{content:"[";padding:0 3px 0 2px} b.button::after{content:"]";padding:0 2px 0 3px} p a>code:hover{color:rgba(0,0,0,.9)} -#header,#content,#footnotes,#footer{width:100%;margin:0 auto;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em} -#header::before,#header::after,#content::before,#content::after,#footnotes::before,#footnotes::after,#footer::before,#footer::after{content:"";display:table} -#header::after,#content::after,#footnotes::after,#footer::after{clear:both} +body>div[id]{margin:0 auto;max-width:62.5em;position:relative;padding-left:.9375em;padding-right:.9375em;width:100%} +body>div[id]::before,body>div[id]::after,#content #footnotes::before{content:"";display:table;clear:both} #content{margin-top:1.25em;margin-bottom:.625em} #content::before{content:none} #header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0} @@ -386,7 +385,7 @@ thead{display:table-header-group} svg{max-width:100%} p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3} h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid} -#header,#content,#footnotes,#footer{max-width:none} +body>div[id]{max-width:none} #toc,.sidebarblock,.exampleblock>.content{background:none!important} #toc{border-bottom:1px solid #dddddf!important;padding-bottom:0!important} body.book #header{text-align:center} @@ -409,4 +408,4 @@ div.page-break{display:block;page-break-after:always} .sect1+.sect1{border:0} #footer{background:none} #footer-text{color:rgba(0,0,0,.6);font-size:.9em}} -@media amzn-kf8{#header,#content,#footnotes,#footer{padding:0}} +@media amzn-kf8{body>div[id]{padding:0}} diff --git a/src/stylesheets/asciidoctor.css b/src/stylesheets/asciidoctor.css index 9994fc0c..0150f0f1 100644 --- a/src/stylesheets/asciidoctor.css +++ b/src/stylesheets/asciidoctor.css @@ -667,35 +667,20 @@ p a > code:hover { color: rgba(0, 0, 0, 0.9); } -#header, -#content, -#footnotes, -#footer { - width: 100%; +body > div[id] { margin: 0 auto; max-width: 62.5em; - *zoom: 1; position: relative; padding-left: 0.9375em; padding-right: 0.9375em; + width: 100%; } -#header::before, -#header::after, -#content::before, -#content::after, -#footnotes::before, -#footnotes::after, -#footer::before, -#footer::after { +body > div[id]::before, +body > div[id]::after, +#content #footnotes::before { content: ""; display: table; -} - -#header::after, -#content::after, -#footnotes::after, -#footer::after { clear: both; } @@ -2238,10 +2223,7 @@ p.tableblock { page-break-after: avoid; } - #header, - #content, - #footnotes, - #footer { + body > div[id] { max-width: none; } @@ -2351,10 +2333,7 @@ p.tableblock { } @media amzn-kf8 { - #header, - #content, - #footnotes, - #footer { + body > div[id] { padding: 0; } } |
