papegaaij commented on code in PR #1845: URL: https://github.com/apache/wicket/pull/1845#discussion_r4527623925
########## wicket-user-guide/src/main/asciidoc/docinfo-header.html: ########## @@ -0,0 +1,26 @@ +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<header class="mast"> +<a class="mast-brand" href="https://wicket.apache.org/"><img src="./img/wicket-mark.svg" alt="" width="30" height="30"><span>Apache Wicket</span></a> Review Comment: Below 640px `wicket.css` hides the "Apache Wicket" span with `display: none`, which hides it from screen readers too. The image has `alt=""`, so on a phone this link has no accessible name and is announced as just "link" (WCAG 2.4.4, 4.1.2). An `aria-label` names it at every width and matches the visible text on wide screens (2.5.3): ```suggestion <a class="mast-brand" href="https://wicket.apache.org/" aria-label="Apache Wicket"><img src="./img/wicket-mark.svg" alt="" width="30" height="30"><span>Apache Wicket</span></a> ``` ########## wicket-user-guide/src/main/asciidoc/css/wicket.css: ########## @@ -0,0 +1,393 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + The reference guide in the design of wicket.apache.org: cool paper, ink and one orange ribbon, + set in Alegreya with JetBrains Mono for code. Loaded after the default Asciidoctor stylesheet + and overrides only what makes the guide Wicket's. The tokens are those of the site's + _sass/ribbon/_base.scss. +*/ + +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-italic.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sc-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); } + +:root { + --paper: #F6F8F7; + --paper-tint: #E9F0ED; + --ink: #14241F; + --ink-soft: #4A5E57; + --rule: #CFDAD5; + --code-bg: #E4ECE8; + --cloth: #103C35; + --muted: #A8C7BD; + --ribbon: #EE7F2D; + --ribbon-text: #F39A55; + --ribbon-deep: #9A430A; + --ribbon-wash: rgba(238, 127, 45, .16); + --on-ribbon: #14241F; + --on-cloth: #F6F8F7; + --code-green: #1C5E43; + --code-tag: #0F4A40; + --code-op: #33473F; + + --serif: "Alegreya", Georgia, serif; + --sc: "Alegreya SC", "Alegreya", Georgia, serif; + --sans: "Alegreya Sans", "Alegreya", sans-serif; + --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; + + --measure: 68ch; + --column: 60rem; + --mast-h: 60px; + --toc-w: 17rem; + --rw: 5px; + + color-scheme: light dark; +} + +@media (prefers-color-scheme: dark) { + :root { + --paper: #0E1C19; + --paper-tint: #132622; + --ink: #E2EBE7; + --ink-soft: #A4B8B0; + --rule: #2A403A; + --code-bg: #182E29; + --ribbon-deep: #F39A55; + --ribbon-wash: rgba(238, 127, 45, .13); + --code-green: #9FD3AE; + --code-tag: #86CBBE; + --code-op: #B9C9C2; + } +} + +@media (min-width: 1280px) { :root { --toc-w: 19rem; } } + +/* ---------------------------------------------------------------- ground, type, links */ + +html { background: var(--paper); scroll-padding-top: calc(var(--mast-h) + 16px); } +body { + background: var(--paper); color: var(--ink); + font: 400 1.1875rem/1.6 var(--serif); + font-variant-numeric: lining-nums; +} +::selection { background: var(--ribbon); color: var(--on-ribbon); } + +a, a:hover, a:focus { + color: inherit; + text-decoration: underline; text-decoration-color: var(--ribbon-deep); + text-decoration-thickness: 1.5px; text-underline-offset: .22em; +} +a:hover { text-decoration-thickness: 3px; } +a:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 3px; border-radius: 2px; } + +p, td.content, .paragraph, .ulist, .olist, .dlist, table tr th, table tr td, tbody tr th, tbody tr th p, +.exampleblock > .content, .verseblock pre, .literalblock.output pre { color: var(--ink); } +#content p, #content .ulist, #content .olist, #content .dlist, +#preamble, .quoteblock, .verseblock, .sidebarblock { max-width: var(--measure); } +.paragraph, .ulist, .olist, .dlist { font-family: var(--serif); } +#content p { font-size: 1em; line-height: 1.6; text-rendering: optimizeLegibility; } +li::marker { color: var(--ribbon-deep); } +.ulist li > p, .olist li > p { margin-bottom: .3em; } +.dlist dt { font-weight: 700; color: var(--ink); } + +h1, h2, h3, h4, h5, h6, #toctitle { + font-family: var(--serif); font-weight: 700; color: var(--ink); + letter-spacing: -.015em; word-spacing: normal; +} +h5, h6 { font: 500 1.1rem/1.25 var(--sc); letter-spacing: .03em; color: var(--ink-soft); } + +/* The anchor Asciidoctor puts on every section title links the title text itself. */ +h2 > a.link, h3 > a.link, h4 > a.link, h5 > a.link { color: inherit; text-decoration: none; } +h2 > a.link:hover, h3 > a.link:hover, h4 > a.link:hover { text-decoration: underline; text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 2px; } + +/* ---------------------------------------------------------------- masthead */ + +.mast { + position: sticky; top: 0; z-index: 20; + display: flex; align-items: center; gap: 18px; + height: var(--mast-h); padding: 0 18px; + background: var(--paper); border-bottom: 1px solid var(--rule); + font: 500 1.0625rem/1.2 var(--sans); +} +.mast-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; } +.mast-brand:hover { text-decoration: none; } +.mast-brand img { width: 30px; height: 30px; display: block; } +.mast-brand span { font: 700 1.3rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; } +.mast-plate { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink-soft); white-space: nowrap; } +.mast-version { + padding: 1px 8px 2px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; +} +.mast-nav { display: flex; gap: 18px; margin-left: auto; } +.mast-nav a { color: var(--ink); text-decoration-color: transparent; white-space: nowrap; } +.mast-nav a:hover { text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 1.5px; } +@media (max-width: 640px) { + .mast { gap: 12px; } + .mast-brand span, .mast-plate-label, .mast-nav a.mast-optional { display: none; } +} +@media (pointer: coarse) { .mast-nav a { display: inline-flex; align-items: center; min-height: 44px; } } + +/* ---------------------------------------------------------------- title block */ + +#header, #content, #footnotes { max-width: var(--column); padding-left: 36px; padding-right: 36px; } +#header > h1:first-child { + margin: 2.75rem 0 .5rem; color: var(--ink); + font: 700 clamp(2.4rem, 4.4vw, 3.6rem)/1.02 var(--serif); letter-spacing: -.02em; +} +#header > h1:first-child + #toc, #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border: 0; } +#header .details { + border: 0; border-bottom: 2px solid var(--ink); padding: 0 0 14px; + font: 500 1.05rem/1.3 var(--sc); letter-spacing: .03em; color: var(--ink-soft); +} + +/* ---------------------------------------------------------------- the table of contents on the ribbon */ + +#toc.toc2, #toc { + background: var(--paper); border: 0; + font: 400 1.0625rem/1.3 var(--sans); +} +#toctitle, #toc.toc2 #toctitle { + position: relative; margin: 0; padding: 0 0 10px 24px; + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); +} +#toctitle::before { content: ""; position: absolute; left: 0; top: -24px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); } +#toc ul.sectlevel0 > li > a { font-style: normal; } +#toc li { position: relative; margin: 0; padding: 0 0 0 22px; line-height: 1.3; } +#toc li::before { + content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 17px; + border-left: var(--rw) solid var(--ribbon); border-bottom: var(--rw) solid var(--ribbon); border-bottom-left-radius: 2px; +} +#toc li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc li li { padding-left: 18px; } +#toc li li::before { width: 11px; height: 15px; border-width: 0 0 3px 3px; } +#toc li li:not(:last-child)::after { top: 12px; border-left-width: 3px; } +#toc a { + display: inline-block; margin: 3px 0; padding: 3px 7px 4px; border-radius: 3px; + color: var(--ink-soft); text-decoration: none; transition: background-color .15s, color .15s; +} +#toc li li a { margin: 1px 0; padding-block: 2px 3px; font-size: .95rem; } +#toc a:hover { color: var(--ink); background: var(--ribbon-wash); text-decoration: none; } +#toc a.is-current { color: var(--on-ribbon); background: var(--ribbon); } +#toc a .toc-num { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; margin-right: .35em; } + +/* With the script, a chapter shows its sections only while it is read. */ +.js-toc #toc li > ul { display: none; } +.js-toc #toc li.is-open > ul { display: block; } Review Comment: A chapter's sections open only by scrolling to it. `display: none` takes them out of the tab order and away from screen readers, so a keyboard user can't reach "Accessibility → Testing" from the TOC: activating the chapter link moves focus into the content, and Shift+Tab from there doesn't lead back to the TOC. Opening a chapter while focus is inside it fixes that for keyboard users. Tabbing onto a chapter link shows its sections, and the next Tab goes into them: ```suggestion .js-toc #toc li > ul { display: none; } .js-toc #toc li.is-open > ul, .js-toc #toc li:focus-within > ul { display: block; } ``` Two related points: - `guide.js` could set `aria-current="location"` next to the `is-current` class (and remove it with the class), so the current entry isn't conveyed by colour alone. - Screen readers in browse mode don't always move focus, so `:focus-within` doesn't fully help them. A disclosure button with `aria-expanded` per chapter would, at the cost of more script. ########## wicket-user-guide/pom.xml: ########## @@ -101,15 +101,16 @@ <attributes> <gemPath>${project.build.directory}/gems-provided</gemPath> <allow-uri-read>allow-uri-read</allow-uri-read> - <stylesheet>css/style.css</stylesheet> <linkcss>true</linkcss> + <source-highlighter>rouge</source-highlighter> + <rouge-css>class</rouge-css> + <webfonts>false</webfonts> Review Comment: `wicket_line` has to be bumped by hand at every major release, and adjusted on every cherry-pick to a maintenance line; that's easy to forget, and the masthead and the Javadoc link would then point at the wrong line. It can come from the project version instead. `build-helper-maven-plugin` is already managed in the root pom; its `parse-version` goal, added next to the asciidoctor plugin in the `guide` profile: ```xml <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>parse-version</id> <goals> <goal>parse-version</goal> </goals> </execution> </executions> </plugin> ``` then provides the major version for the attributes here: ```suggestion <webfonts>false</webfonts> <wicket_line>${parsedVersion.majorVersion}.x</wicket_line> <wicket_line_major>${parsedVersion.majorVersion}</wicket_line_major> ``` I tried it on this branch with `mvn -pl wicket-user-guide -Pguide generate-resources`: the masthead shows "12.x" and the Javadoc link points at `apidocs/12.x`. The two attributes in `single.adoc` can then go. ########## wicket-user-guide/src/main/asciidoc/css/wicket.css: ########## @@ -0,0 +1,393 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + The reference guide in the design of wicket.apache.org: cool paper, ink and one orange ribbon, + set in Alegreya with JetBrains Mono for code. Loaded after the default Asciidoctor stylesheet + and overrides only what makes the guide Wicket's. The tokens are those of the site's + _sass/ribbon/_base.scss. +*/ + +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-italic.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sc-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); } + +:root { + --paper: #F6F8F7; + --paper-tint: #E9F0ED; + --ink: #14241F; + --ink-soft: #4A5E57; + --rule: #CFDAD5; + --code-bg: #E4ECE8; + --cloth: #103C35; + --muted: #A8C7BD; + --ribbon: #EE7F2D; + --ribbon-text: #F39A55; + --ribbon-deep: #9A430A; + --ribbon-wash: rgba(238, 127, 45, .16); + --on-ribbon: #14241F; + --on-cloth: #F6F8F7; + --code-green: #1C5E43; + --code-tag: #0F4A40; + --code-op: #33473F; + + --serif: "Alegreya", Georgia, serif; + --sc: "Alegreya SC", "Alegreya", Georgia, serif; + --sans: "Alegreya Sans", "Alegreya", sans-serif; + --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; + + --measure: 68ch; + --column: 60rem; + --mast-h: 60px; + --toc-w: 17rem; + --rw: 5px; + + color-scheme: light dark; +} + +@media (prefers-color-scheme: dark) { + :root { + --paper: #0E1C19; + --paper-tint: #132622; + --ink: #E2EBE7; + --ink-soft: #A4B8B0; + --rule: #2A403A; + --code-bg: #182E29; + --ribbon-deep: #F39A55; + --ribbon-wash: rgba(238, 127, 45, .13); + --code-green: #9FD3AE; + --code-tag: #86CBBE; + --code-op: #B9C9C2; + } +} + +@media (min-width: 1280px) { :root { --toc-w: 19rem; } } + +/* ---------------------------------------------------------------- ground, type, links */ + +html { background: var(--paper); scroll-padding-top: calc(var(--mast-h) + 16px); } +body { + background: var(--paper); color: var(--ink); + font: 400 1.1875rem/1.6 var(--serif); + font-variant-numeric: lining-nums; +} +::selection { background: var(--ribbon); color: var(--on-ribbon); } + +a, a:hover, a:focus { + color: inherit; + text-decoration: underline; text-decoration-color: var(--ribbon-deep); + text-decoration-thickness: 1.5px; text-underline-offset: .22em; +} +a:hover { text-decoration-thickness: 3px; } +a:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 3px; border-radius: 2px; } + +p, td.content, .paragraph, .ulist, .olist, .dlist, table tr th, table tr td, tbody tr th, tbody tr th p, +.exampleblock > .content, .verseblock pre, .literalblock.output pre { color: var(--ink); } +#content p, #content .ulist, #content .olist, #content .dlist, +#preamble, .quoteblock, .verseblock, .sidebarblock { max-width: var(--measure); } +.paragraph, .ulist, .olist, .dlist { font-family: var(--serif); } +#content p { font-size: 1em; line-height: 1.6; text-rendering: optimizeLegibility; } +li::marker { color: var(--ribbon-deep); } +.ulist li > p, .olist li > p { margin-bottom: .3em; } +.dlist dt { font-weight: 700; color: var(--ink); } + +h1, h2, h3, h4, h5, h6, #toctitle { + font-family: var(--serif); font-weight: 700; color: var(--ink); + letter-spacing: -.015em; word-spacing: normal; +} +h5, h6 { font: 500 1.1rem/1.25 var(--sc); letter-spacing: .03em; color: var(--ink-soft); } + +/* The anchor Asciidoctor puts on every section title links the title text itself. */ +h2 > a.link, h3 > a.link, h4 > a.link, h5 > a.link { color: inherit; text-decoration: none; } +h2 > a.link:hover, h3 > a.link:hover, h4 > a.link:hover { text-decoration: underline; text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 2px; } + +/* ---------------------------------------------------------------- masthead */ + +.mast { + position: sticky; top: 0; z-index: 20; + display: flex; align-items: center; gap: 18px; + height: var(--mast-h); padding: 0 18px; + background: var(--paper); border-bottom: 1px solid var(--rule); + font: 500 1.0625rem/1.2 var(--sans); +} +.mast-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; } +.mast-brand:hover { text-decoration: none; } +.mast-brand img { width: 30px; height: 30px; display: block; } +.mast-brand span { font: 700 1.3rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; } +.mast-plate { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink-soft); white-space: nowrap; } +.mast-version { + padding: 1px 8px 2px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; +} +.mast-nav { display: flex; gap: 18px; margin-left: auto; } +.mast-nav a { color: var(--ink); text-decoration-color: transparent; white-space: nowrap; } +.mast-nav a:hover { text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 1.5px; } +@media (max-width: 640px) { + .mast { gap: 12px; } + .mast-brand span, .mast-plate-label, .mast-nav a.mast-optional { display: none; } +} +@media (pointer: coarse) { .mast-nav a { display: inline-flex; align-items: center; min-height: 44px; } } + +/* ---------------------------------------------------------------- title block */ + +#header, #content, #footnotes { max-width: var(--column); padding-left: 36px; padding-right: 36px; } +#header > h1:first-child { + margin: 2.75rem 0 .5rem; color: var(--ink); + font: 700 clamp(2.4rem, 4.4vw, 3.6rem)/1.02 var(--serif); letter-spacing: -.02em; +} +#header > h1:first-child + #toc, #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border: 0; } +#header .details { + border: 0; border-bottom: 2px solid var(--ink); padding: 0 0 14px; + font: 500 1.05rem/1.3 var(--sc); letter-spacing: .03em; color: var(--ink-soft); +} + +/* ---------------------------------------------------------------- the table of contents on the ribbon */ + +#toc.toc2, #toc { + background: var(--paper); border: 0; + font: 400 1.0625rem/1.3 var(--sans); +} +#toctitle, #toc.toc2 #toctitle { + position: relative; margin: 0; padding: 0 0 10px 24px; + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); +} +#toctitle::before { content: ""; position: absolute; left: 0; top: -24px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); } +#toc ul.sectlevel0 > li > a { font-style: normal; } +#toc li { position: relative; margin: 0; padding: 0 0 0 22px; line-height: 1.3; } +#toc li::before { + content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 17px; + border-left: var(--rw) solid var(--ribbon); border-bottom: var(--rw) solid var(--ribbon); border-bottom-left-radius: 2px; +} +#toc li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc li li { padding-left: 18px; } +#toc li li::before { width: 11px; height: 15px; border-width: 0 0 3px 3px; } +#toc li li:not(:last-child)::after { top: 12px; border-left-width: 3px; } +#toc a { + display: inline-block; margin: 3px 0; padding: 3px 7px 4px; border-radius: 3px; + color: var(--ink-soft); text-decoration: none; transition: background-color .15s, color .15s; +} +#toc li li a { margin: 1px 0; padding-block: 2px 3px; font-size: .95rem; } +#toc a:hover { color: var(--ink); background: var(--ribbon-wash); text-decoration: none; } +#toc a.is-current { color: var(--on-ribbon); background: var(--ribbon); } +#toc a .toc-num { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; margin-right: .35em; } + +/* With the script, a chapter shows its sections only while it is read. */ +.js-toc #toc li > ul { display: none; } +.js-toc #toc li.is-open > ul { display: block; } + +@media screen and (min-width: 768px) { + body.toc2 { padding-left: 0; } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes, body.toc2 > #footer { + margin-left: var(--toc-w); + } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { margin-right: auto; } + #toc.toc2 { + top: var(--mast-h); width: var(--toc-w); height: calc(100% - var(--mast-h)); + padding: 24px 16px 32px 18px; border-right: 1px solid var(--rule); + } + #toc.toc2 > ul { font-size: 1rem; } + #toc.toc2 ul ul { padding-left: 0; } + @media (min-width: 1500px) { + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { + margin-left: max(var(--toc-w), calc((100vw - var(--column)) / 2)); + } + } +} +@media screen and (max-width: 767px) { + #toc.toc2 { padding: 24px 18px 8px; margin: 0 -36px; } + #header, #content, #footnotes { padding-left: 18px; padding-right: 18px; } +} + +/* ---------------------------------------------------------------- sections */ + +#content .sect1 { padding-bottom: 1.5rem; } +#content .sect1 + .sect1 { border: 0; } +#content > .sect1:first-child > h2 { border-top: 0; padding-top: 0; margin-top: 2.5rem; } +.sect1 > h2 { + margin: 3.5rem 0 1rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); + font: 700 clamp(1.9rem, 2.8vw, 2.4rem)/1.08 var(--serif); +} +.sect2 > h3 { margin: 2.75rem 0 .6rem; font: 700 1.6rem/1.15 var(--serif); } +.sect3 > h4 { margin: 2rem 0 .5rem; font: 700 1.3rem/1.2 var(--serif); } +.sect4 > h5 { margin: 1.5rem 0 .4rem; } + +/* ---------------------------------------------------------------- inline code */ + +:not(pre):not([class^=L]) > code { + padding: .08em .32em; background: var(--code-bg); border-radius: 2px; + color: var(--ink); font: 400 .82em/1.4 var(--mono); letter-spacing: 0; word-spacing: 0; + font-variant-ligatures: none; +} +a > code { text-decoration: inherit; } + +/* ---------------------------------------------------------------- code blocks */ + +.listingblock, .literalblock { margin: 1.25rem 0 1.75rem; } +.listingblock > .content, .literalblock > .content { position: relative; } +.listingblock pre, .listingblock pre.highlight, .listingblock pre.rouge, .literalblock pre { + margin: 0; padding: 12px 16px 14px; + background: var(--code-bg); border: 0; border-radius: 0 0 2px 2px; + color: var(--ink); font: 400 .8125rem/1.65 var(--mono); tab-size: 4; + font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; + overflow-x: auto; white-space: pre; word-wrap: normal; +} +.literalblock pre, .listingblock:not(.has-bar) pre { border-radius: 2px; } +.listingblock pre code, .literalblock pre code { font: inherit; padding: 0; background: none; } + +/* The bar the script puts above a listing: its language and a copy button. */ +.code-bar { + display: flex; align-items: center; justify-content: space-between; gap: 12px; + padding: 7px 8px 0 16px; background: var(--code-bg); border-radius: 2px 2px 0 0; +} +.code-lang { font: 500 .95rem/1 var(--sc); letter-spacing: .04em; color: var(--ink-soft); } +.code-copy { + padding: 4px 10px 5px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--paper); color: var(--ink); font: 500 .9rem/1 var(--sans); cursor: pointer; + transition: background-color .15s; +} +.code-copy:hover { background: var(--ribbon); color: var(--on-ribbon); } +.code-copy:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 2px; } + +/* A listing's title is the file it shows. */ +.listingblock > .title, .literalblock > .title { + margin: 0; padding: 0 0 6px; color: var(--ink-soft); + font: italic 400 1.05rem/1.3 var(--serif); +} + +/* Rouge, in the palette of the homepage code: keywords in deep orange, strings and tags in green. */ +pre.rouge .c, pre.rouge .c1, pre.rouge .cm, pre.rouge .cd, pre.rouge .cs, pre.rouge .ch { color: var(--ink-soft); font-style: italic; } +pre.rouge .cp { color: var(--ink-soft); } +pre.rouge .k, pre.rouge .kd, pre.rouge .kn, pre.rouge .kp, pre.rouge .kr, pre.rouge .kv, pre.rouge .kc { color: var(--ribbon-deep); font-weight: 400; } +pre.rouge .kt { color: var(--code-tag); font-weight: 400; } +pre.rouge .o, pre.rouge .ow, pre.rouge .p, pre.rouge .pi { color: var(--code-op); font-weight: 400; } +pre.rouge .s, pre.rouge .s1, pre.rouge .s2, pre.rouge .sa, pre.rouge .sb, pre.rouge .sc, pre.rouge .sd, +pre.rouge .se, pre.rouge .sh, pre.rouge .si, pre.rouge .sx, pre.rouge .sr, pre.rouge .ss, pre.rouge .dl { color: var(--code-green); } +pre.rouge .m, pre.rouge .mb, pre.rouge .mf, pre.rouge .mh, pre.rouge .mi, pre.rouge .mo, pre.rouge .mx, pre.rouge .il { color: var(--code-green); } +pre.rouge .nt { color: var(--code-tag); font-weight: 400; } +pre.rouge .na { color: var(--ribbon-deep); } Review Comment: `.nl` isn't overridden, so CSS property names in the HTML examples (about 23 of them) keep rouge-github's `#990000`. On the dark code background that is a contrast of about 1.6:1. The token plays the same role as `.na`: ```suggestion pre.rouge .na, pre.rouge .nl { color: var(--ribbon-deep); } ``` ########## wicket-user-guide/src/main/asciidoc/single.adoc: ########## @@ -20,8 +20,10 @@ The Apache Software Foundation :description: Official User Guide for Apache Wicket framework. :keywords: Apache Wicket, User Guide, examples, AJAX, stateless :toc: left -:icons: font :sectlinks: +:docinfo: shared +:wicket_line: 12.x +:wicket_line_major: 12 Review Comment: With `wicket_line` and `wicket_line_major` set from the project version in the pom (see the comment there), these two lines can go: ```suggestion ``` ########## wicket-user-guide/src/main/asciidoc/css/wicket.css: ########## @@ -0,0 +1,393 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + The reference guide in the design of wicket.apache.org: cool paper, ink and one orange ribbon, + set in Alegreya with JetBrains Mono for code. Loaded after the default Asciidoctor stylesheet + and overrides only what makes the guide Wicket's. The tokens are those of the site's + _sass/ribbon/_base.scss. +*/ + +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-latin-400-italic.woff2") format("woff2"); } +@font-face { font-family: "Alegreya"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/alegreya-sans-latin-400-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sans-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/alegreya-sans-latin-700-normal.woff2") format("woff2"); } +@font-face { font-family: "Alegreya SC"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/alegreya-sc-latin-500-normal.woff2") format("woff2"); } +@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2"); } + +:root { + --paper: #F6F8F7; + --paper-tint: #E9F0ED; + --ink: #14241F; + --ink-soft: #4A5E57; + --rule: #CFDAD5; + --code-bg: #E4ECE8; + --cloth: #103C35; + --muted: #A8C7BD; + --ribbon: #EE7F2D; + --ribbon-text: #F39A55; + --ribbon-deep: #9A430A; + --ribbon-wash: rgba(238, 127, 45, .16); + --on-ribbon: #14241F; + --on-cloth: #F6F8F7; + --code-green: #1C5E43; + --code-tag: #0F4A40; + --code-op: #33473F; + + --serif: "Alegreya", Georgia, serif; + --sc: "Alegreya SC", "Alegreya", Georgia, serif; + --sans: "Alegreya Sans", "Alegreya", sans-serif; + --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace; + + --measure: 68ch; + --column: 60rem; + --mast-h: 60px; + --toc-w: 17rem; + --rw: 5px; + + color-scheme: light dark; +} + +@media (prefers-color-scheme: dark) { + :root { + --paper: #0E1C19; + --paper-tint: #132622; + --ink: #E2EBE7; + --ink-soft: #A4B8B0; + --rule: #2A403A; + --code-bg: #182E29; + --ribbon-deep: #F39A55; + --ribbon-wash: rgba(238, 127, 45, .13); + --code-green: #9FD3AE; + --code-tag: #86CBBE; + --code-op: #B9C9C2; + } +} + +@media (min-width: 1280px) { :root { --toc-w: 19rem; } } + +/* ---------------------------------------------------------------- ground, type, links */ + +html { background: var(--paper); scroll-padding-top: calc(var(--mast-h) + 16px); } +body { + background: var(--paper); color: var(--ink); + font: 400 1.1875rem/1.6 var(--serif); + font-variant-numeric: lining-nums; +} +::selection { background: var(--ribbon); color: var(--on-ribbon); } + +a, a:hover, a:focus { + color: inherit; + text-decoration: underline; text-decoration-color: var(--ribbon-deep); + text-decoration-thickness: 1.5px; text-underline-offset: .22em; +} +a:hover { text-decoration-thickness: 3px; } +a:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 3px; border-radius: 2px; } + +p, td.content, .paragraph, .ulist, .olist, .dlist, table tr th, table tr td, tbody tr th, tbody tr th p, +.exampleblock > .content, .verseblock pre, .literalblock.output pre { color: var(--ink); } +#content p, #content .ulist, #content .olist, #content .dlist, +#preamble, .quoteblock, .verseblock, .sidebarblock { max-width: var(--measure); } +.paragraph, .ulist, .olist, .dlist { font-family: var(--serif); } +#content p { font-size: 1em; line-height: 1.6; text-rendering: optimizeLegibility; } +li::marker { color: var(--ribbon-deep); } +.ulist li > p, .olist li > p { margin-bottom: .3em; } +.dlist dt { font-weight: 700; color: var(--ink); } + +h1, h2, h3, h4, h5, h6, #toctitle { + font-family: var(--serif); font-weight: 700; color: var(--ink); + letter-spacing: -.015em; word-spacing: normal; +} +h5, h6 { font: 500 1.1rem/1.25 var(--sc); letter-spacing: .03em; color: var(--ink-soft); } + +/* The anchor Asciidoctor puts on every section title links the title text itself. */ +h2 > a.link, h3 > a.link, h4 > a.link, h5 > a.link { color: inherit; text-decoration: none; } +h2 > a.link:hover, h3 > a.link:hover, h4 > a.link:hover { text-decoration: underline; text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 2px; } + +/* ---------------------------------------------------------------- masthead */ + +.mast { + position: sticky; top: 0; z-index: 20; + display: flex; align-items: center; gap: 18px; + height: var(--mast-h); padding: 0 18px; + background: var(--paper); border-bottom: 1px solid var(--rule); + font: 500 1.0625rem/1.2 var(--sans); +} +.mast-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; } +.mast-brand:hover { text-decoration: none; } +.mast-brand img { width: 30px; height: 30px; display: block; } +.mast-brand span { font: 700 1.3rem/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; } +.mast-plate { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink-soft); white-space: nowrap; } +.mast-version { + padding: 1px 8px 2px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--ribbon); color: var(--on-ribbon); font-weight: 700; +} +.mast-nav { display: flex; gap: 18px; margin-left: auto; } +.mast-nav a { color: var(--ink); text-decoration-color: transparent; white-space: nowrap; } +.mast-nav a:hover { text-decoration-color: var(--ribbon-deep); text-decoration-thickness: 1.5px; } +@media (max-width: 640px) { + .mast { gap: 12px; } + .mast-brand span, .mast-plate-label, .mast-nav a.mast-optional { display: none; } +} +@media (pointer: coarse) { .mast-nav a { display: inline-flex; align-items: center; min-height: 44px; } } + +/* ---------------------------------------------------------------- title block */ + +#header, #content, #footnotes { max-width: var(--column); padding-left: 36px; padding-right: 36px; } +#header > h1:first-child { + margin: 2.75rem 0 .5rem; color: var(--ink); + font: 700 clamp(2.4rem, 4.4vw, 3.6rem)/1.02 var(--serif); letter-spacing: -.02em; +} +#header > h1:first-child + #toc, #header > h1:only-child, body.toc2 #header > h1:nth-last-child(2) { border: 0; } +#header .details { + border: 0; border-bottom: 2px solid var(--ink); padding: 0 0 14px; + font: 500 1.05rem/1.3 var(--sc); letter-spacing: .03em; color: var(--ink-soft); +} + +/* ---------------------------------------------------------------- the table of contents on the ribbon */ + +#toc.toc2, #toc { + background: var(--paper); border: 0; + font: 400 1.0625rem/1.3 var(--sans); +} +#toctitle, #toc.toc2 #toctitle { + position: relative; margin: 0; padding: 0 0 10px 24px; + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); +} +#toctitle::before { content: ""; position: absolute; left: 0; top: -24px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc ul { list-style: none; margin: 0; padding: 0; font-family: var(--sans); } +#toc ul.sectlevel0 > li > a { font-style: normal; } +#toc li { position: relative; margin: 0; padding: 0 0 0 22px; line-height: 1.3; } +#toc li::before { + content: ""; position: absolute; left: 0; top: 0; width: 13px; height: 17px; + border-left: var(--rw) solid var(--ribbon); border-bottom: var(--rw) solid var(--ribbon); border-bottom-left-radius: 2px; +} +#toc li:not(:last-child)::after { content: ""; position: absolute; left: 0; top: 13px; bottom: 0; border-left: var(--rw) solid var(--ribbon); } +#toc li li { padding-left: 18px; } +#toc li li::before { width: 11px; height: 15px; border-width: 0 0 3px 3px; } +#toc li li:not(:last-child)::after { top: 12px; border-left-width: 3px; } +#toc a { + display: inline-block; margin: 3px 0; padding: 3px 7px 4px; border-radius: 3px; + color: var(--ink-soft); text-decoration: none; transition: background-color .15s, color .15s; +} +#toc li li a { margin: 1px 0; padding-block: 2px 3px; font-size: .95rem; } +#toc a:hover { color: var(--ink); background: var(--ribbon-wash); text-decoration: none; } +#toc a.is-current { color: var(--on-ribbon); background: var(--ribbon); } +#toc a .toc-num { font-variant-numeric: tabular-nums; color: inherit; opacity: .7; margin-right: .35em; } + +/* With the script, a chapter shows its sections only while it is read. */ +.js-toc #toc li > ul { display: none; } +.js-toc #toc li.is-open > ul { display: block; } + +@media screen and (min-width: 768px) { + body.toc2 { padding-left: 0; } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes, body.toc2 > #footer { + margin-left: var(--toc-w); + } + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { margin-right: auto; } + #toc.toc2 { + top: var(--mast-h); width: var(--toc-w); height: calc(100% - var(--mast-h)); + padding: 24px 16px 32px 18px; border-right: 1px solid var(--rule); + } + #toc.toc2 > ul { font-size: 1rem; } + #toc.toc2 ul ul { padding-left: 0; } + @media (min-width: 1500px) { + body.toc2 > #header, body.toc2 > #content, body.toc2 > #footnotes { + margin-left: max(var(--toc-w), calc((100vw - var(--column)) / 2)); + } + } +} +@media screen and (max-width: 767px) { + #toc.toc2 { padding: 24px 18px 8px; margin: 0 -36px; } + #header, #content, #footnotes { padding-left: 18px; padding-right: 18px; } +} + +/* ---------------------------------------------------------------- sections */ + +#content .sect1 { padding-bottom: 1.5rem; } +#content .sect1 + .sect1 { border: 0; } +#content > .sect1:first-child > h2 { border-top: 0; padding-top: 0; margin-top: 2.5rem; } +.sect1 > h2 { + margin: 3.5rem 0 1rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); + font: 700 clamp(1.9rem, 2.8vw, 2.4rem)/1.08 var(--serif); +} +.sect2 > h3 { margin: 2.75rem 0 .6rem; font: 700 1.6rem/1.15 var(--serif); } +.sect3 > h4 { margin: 2rem 0 .5rem; font: 700 1.3rem/1.2 var(--serif); } +.sect4 > h5 { margin: 1.5rem 0 .4rem; } + +/* ---------------------------------------------------------------- inline code */ + +:not(pre):not([class^=L]) > code { + padding: .08em .32em; background: var(--code-bg); border-radius: 2px; + color: var(--ink); font: 400 .82em/1.4 var(--mono); letter-spacing: 0; word-spacing: 0; + font-variant-ligatures: none; +} +a > code { text-decoration: inherit; } + +/* ---------------------------------------------------------------- code blocks */ + +.listingblock, .literalblock { margin: 1.25rem 0 1.75rem; } +.listingblock > .content, .literalblock > .content { position: relative; } +.listingblock pre, .listingblock pre.highlight, .listingblock pre.rouge, .literalblock pre { + margin: 0; padding: 12px 16px 14px; + background: var(--code-bg); border: 0; border-radius: 0 0 2px 2px; + color: var(--ink); font: 400 .8125rem/1.65 var(--mono); tab-size: 4; + font-variant-ligatures: none; font-feature-settings: "calt" 0, "liga" 0; + overflow-x: auto; white-space: pre; word-wrap: normal; +} +.literalblock pre, .listingblock:not(.has-bar) pre { border-radius: 2px; } +.listingblock pre code, .literalblock pre code { font: inherit; padding: 0; background: none; } + +/* The bar the script puts above a listing: its language and a copy button. */ +.code-bar { + display: flex; align-items: center; justify-content: space-between; gap: 12px; + padding: 7px 8px 0 16px; background: var(--code-bg); border-radius: 2px 2px 0 0; +} +.code-lang { font: 500 .95rem/1 var(--sc); letter-spacing: .04em; color: var(--ink-soft); } +.code-copy { + padding: 4px 10px 5px; border: 1px solid var(--ribbon); border-radius: 3px; + background: var(--paper); color: var(--ink); font: 500 .9rem/1 var(--sans); cursor: pointer; + transition: background-color .15s; +} +.code-copy:hover { background: var(--ribbon); color: var(--on-ribbon); } +.code-copy:focus-visible { outline: 2px solid var(--ribbon-deep); outline-offset: 2px; } + +/* A listing's title is the file it shows. */ +.listingblock > .title, .literalblock > .title { + margin: 0; padding: 0 0 6px; color: var(--ink-soft); + font: italic 400 1.05rem/1.3 var(--serif); +} + +/* Rouge, in the palette of the homepage code: keywords in deep orange, strings and tags in green. */ +pre.rouge .c, pre.rouge .c1, pre.rouge .cm, pre.rouge .cd, pre.rouge .cs, pre.rouge .ch { color: var(--ink-soft); font-style: italic; } +pre.rouge .cp { color: var(--ink-soft); } +pre.rouge .k, pre.rouge .kd, pre.rouge .kn, pre.rouge .kp, pre.rouge .kr, pre.rouge .kv, pre.rouge .kc { color: var(--ribbon-deep); font-weight: 400; } +pre.rouge .kt { color: var(--code-tag); font-weight: 400; } +pre.rouge .o, pre.rouge .ow, pre.rouge .p, pre.rouge .pi { color: var(--code-op); font-weight: 400; } +pre.rouge .s, pre.rouge .s1, pre.rouge .s2, pre.rouge .sa, pre.rouge .sb, pre.rouge .sc, pre.rouge .sd, +pre.rouge .se, pre.rouge .sh, pre.rouge .si, pre.rouge .sx, pre.rouge .sr, pre.rouge .ss, pre.rouge .dl { color: var(--code-green); } +pre.rouge .m, pre.rouge .mb, pre.rouge .mf, pre.rouge .mh, pre.rouge .mi, pre.rouge .mo, pre.rouge .mx, pre.rouge .il { color: var(--code-green); } +pre.rouge .nt { color: var(--code-tag); font-weight: 400; } +pre.rouge .na { color: var(--ribbon-deep); } +pre.rouge .nc, pre.rouge .nn, pre.rouge .ne, pre.rouge .nf, pre.rouge .fm, pre.rouge .nb, pre.rouge .bp, +pre.rouge .no, pre.rouge .nv, pre.rouge .vc, pre.rouge .vg, pre.rouge .vi, pre.rouge .n { color: var(--ink); font-weight: 400; } +pre.rouge .nd { color: var(--code-tag); } +pre.rouge .ni { color: var(--code-tag); } +pre.rouge .err { color: inherit; background: none; } +pre.rouge .gp { color: var(--ink-soft); user-select: none; } + +/* Where markup binds to Java: wicket:id and the wicket: tags, marked by the script. */ +pre.rouge .wicket-id, pre.rouge .wicket-tag { + border-radius: 2px; box-shadow: 0 0 0 1px var(--ribbon-wash); background: var(--ribbon-wash); +} +pre.rouge .wicket-id { color: var(--ribbon-deep); } + +/* ---------------------------------------------------------------- admonitions: asides on the tint */ + +.admonitionblock { margin: 1.5rem 0 1.75rem; max-width: var(--measure); } +.admonitionblock > table, .admonitionblock > table > tbody, .admonitionblock > table > tbody > tr, +.admonitionblock > table td { display: block; width: auto; border: 0; padding: 0; background: none; } +.admonitionblock > table { + padding: 10px 18px 14px; background: var(--paper-tint); border-top: 1px solid var(--ribbon); +} +.admonitionblock > table td.icon { text-align: left; } +.admonitionblock > table td.icon .title { + margin: 0 0 2px; font: 500 1.05rem/1.3 var(--sc); letter-spacing: .04em; color: var(--ribbon-deep); + text-transform: lowercase; +} +.admonitionblock > table td.content { + color: var(--ink); font: 400 1.0625rem/1.55 var(--serif); + padding: 0; border: 0; +} +.admonitionblock td.content > :last-child, .admonitionblock td.content > :last-child > :last-child { margin-bottom: 0; } +.admonitionblock td.content > .title { font: 700 1.1rem/1.3 var(--serif); color: var(--ink); font-style: normal; } +.admonitionblock.warning > table, .admonitionblock.caution > table, .admonitionblock.important > table { + border-top-width: 3px; + box-shadow: inset var(--rw) 0 0 var(--ribbon); + padding-left: 23px; +} + +/* ---------------------------------------------------------------- tables: an ink rule above, hairlines between */ + +table.tableblock, table.tableblock.frame-all, table.tableblock.frame-topbot { + border: 0; border-top: 2px solid var(--ink); border-collapse: collapse; + background: none; margin: 1.5rem 0 2.25rem; + font: 400 1.0625rem/1.45 var(--sans); +} +table.tableblock th.tableblock, table.tableblock td.tableblock { + padding: 9px 18px 9px 0; border: 0; border-bottom: 1px solid var(--rule); background: none; +} +table.tableblock th.tableblock:last-child, table.tableblock td.tableblock:last-child { padding-right: 0; } +table.tableblock thead th.tableblock { + font: 500 1.05rem/1.2 var(--sc); letter-spacing: .03em; color: var(--ink-soft); vertical-align: bottom; +} +table.tableblock p.tableblock, td.tableblock > .content > :last-child { font-family: var(--sans); font-size: 1em; color: var(--ink); max-width: none; } +table.stripes-all tr, table.stripes-odd tr:nth-of-type(odd), table.stripes-even tr:nth-of-type(even), +table.stripes-hover tr:hover, table tr.even, table tr.alt { background: none; } +table.tableblock > caption.title { + padding-bottom: 6px; color: var(--ink-soft); font: italic 400 1.05rem/1.3 var(--serif); text-align: left; +} +@media (max-width: 767px) { table.tableblock { display: block; overflow-x: auto; } } + +/* ---------------------------------------------------------------- images and other blocks */ + +.imageblock { margin: 1.5rem 0 2rem; } +.imageblock img { border-radius: 2px; } Review Comment: Some images have a transparent background with dark lines and text, `img/component-lifecycle.png` for one; on the dark page its arrows are nearly invisible. A light background for images in dark mode keeps them readable: ```suggestion .imageblock img { border-radius: 2px; } @media (prefers-color-scheme: dark) { .imageblock img { background: #fff; } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
