diff options
Diffstat (limited to 'themes/hugo-book/assets')
| -rw-r--r-- | themes/hugo-book/assets/_defaults.scss | 23 | ||||
| -rw-r--r-- | themes/hugo-book/assets/_fonts.scss | 34 | ||||
| -rw-r--r-- | themes/hugo-book/assets/_main.scss | 113 | ||||
| -rw-r--r-- | themes/hugo-book/assets/_markdown.scss | 46 | ||||
| -rw-r--r-- | themes/hugo-book/assets/_shortcodes.scss | 198 | ||||
| -rw-r--r-- | themes/hugo-book/assets/_utils.scss | 4 | ||||
| -rw-r--r-- | themes/hugo-book/assets/book.scss | 1 | ||||
| -rw-r--r-- | themes/hugo-book/assets/katex.json | 7 | ||||
| -rw-r--r-- | themes/hugo-book/assets/normalize.css | 376 | ||||
| -rw-r--r-- | themes/hugo-book/assets/plugins/_numbered.scss | 4 |
10 files changed, 439 insertions, 367 deletions
diff --git a/themes/hugo-book/assets/_defaults.scss b/themes/hugo-book/assets/_defaults.scss index 96c4d84..ff7ecb9 100644 --- a/themes/hugo-book/assets/_defaults.scss +++ b/themes/hugo-book/assets/_defaults.scss @@ -22,9 +22,16 @@ $toc-width: 16rem !default; $mobile-breakpoint: $menu-width + $body-min-width * 1.2 + $toc-width !default; $hint-colors: ( - info: #6bf, - warning: #fd6, - danger: #f66, + default: #64748b, + info: #4486dd, + success: #3bad3b, + warning: #f59e42, + danger: #d84747, + + note: #4486dd, + tip: #3bad3b, + important: #8144dd, + caution: #d84747 ) !default; // Themes @@ -34,16 +41,12 @@ $hint-colors: ( --gray-500: #adb5bd; --color-link: #0055bb; - --color-visited-link: #8440f1; + --color-visited-link: #5500bb; --body-background: white; --body-font-color: black; --icon-filter: none; - - --hint-color-info: #6bf; - --hint-color-warning: #fd6; - --hint-color-danger: #f66; } @mixin theme-dark { @@ -58,8 +61,4 @@ $hint-colors: ( --body-font-color: #e9ecef; --icon-filter: brightness(0) invert(1); - - --hint-color-info: #6bf; - --hint-color-warning: #fd6; - --hint-color-danger: #f66; } diff --git a/themes/hugo-book/assets/_fonts.scss b/themes/hugo-book/assets/_fonts.scss deleted file mode 100644 index da83660..0000000 --- a/themes/hugo-book/assets/_fonts.scss +++ /dev/null @@ -1,34 +0,0 @@ -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - font-display: fallback; - src: url(https://fonts.gstatic.com/s/roboto/v32/KFOmCnqEu92Fr1Mu4mxKKTU1Kg.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 700; - font-display: fallback; - src: url(https://fonts.gstatic.com/s/roboto/v32/KFOlCnqEu92Fr1MmWUlfBBc4AMP6lQ.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -@font-face { - font-family: 'Roboto Mono'; - font-style: normal; - font-weight: 400; - font-display: fallback; - src: url(https://fonts.gstatic.com/s/robotomono/v23/L0xuDF4xlVMF-BfR8bXMIhJHg45mwgGEFl0_3vq_ROW4AJi8SJQt.woff2) format('woff2'); - unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; -} - -body { - font-family: 'Roboto', sans-serif; -} - -code { - font-family: 'Roboto Mono', monospace; -} diff --git a/themes/hugo-book/assets/_main.scss b/themes/hugo-book/assets/_main.scss index 8b4e687..8c21806 100644 --- a/themes/hugo-book/assets/_main.scss +++ b/themes/hugo-book/assets/_main.scss @@ -10,29 +10,27 @@ body { color: var(--body-font-color); background: var(--body-background); - // letter-spacing: 0.33px; font-weight: $body-font-weight; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - - box-sizing: border-box; - * { - box-sizing: inherit; - } } h1, h2, h3, h4, -h5 { +h5, +h6 { font-weight: $body-font-weight; } a { text-decoration: none; - color: var(--color-link); + + &[href] { + color: var(--color-link); + } } img { @@ -43,17 +41,17 @@ img { @include outline; } -aside nav ul { +nav ul { padding: 0; margin: 0; list-style: none; li { - margin: 1em 0; position: relative; } - a { + a, span { + padding: .5em 0; display: block; } @@ -89,7 +87,6 @@ ul.pagination { a .book-icon { height: 1em; width: 1em; - margin-inline-end: .5em; } .book-brand { @@ -136,10 +133,12 @@ a .book-icon { input.toggle + label::after { content: "▸"; + align-self: center; + transition: transform 0.1s ease-in-out; } input.toggle:checked + label::after { - content: "▾"; + transform: rotate(90deg); } } @@ -150,12 +149,12 @@ body[dir="rtl"] .book-menu { } input.toggle:checked + label::after { - content: "▾"; + transform: rotate(-90deg); } } .book-section-flat { - margin: $padding-16 * 2 0; + margin: $padding-16 0; > a, > span, @@ -175,7 +174,7 @@ body[dir="rtl"] .book-menu { } .book-post { - margin-bottom: $padding-16 * 2; + margin-bottom: $padding-16 * 4; .book-post-date img { height: 1em; @@ -183,9 +182,19 @@ body[dir="rtl"] .book-menu { margin-inline-end: .5em; } - .book-post-content > :first-child { + .book-post-content { margin-top: $padding-16; } + + .book-post-thumbnail { + flex: 0 0 34%; + + img { + width: 100%; + aspect-ratio: 4 / 3; + object-fit: cover; + } + } } .book-header { @@ -208,9 +217,36 @@ body[dir="rtl"] .book-menu { } } +.book-layout-landing .book-header { + display: block; + position: relative; + z-index: 1; + + nav > ul { + display: flex; + gap: $padding-16; + justify-content: end; + + > li { + display: block; + white-space: nowrap; + + > ul { + display: none; + position: absolute; + padding: 0; + } + + &:hover > ul { + display: block; + } + } + } +} + .book-search { position: relative; - margin: $padding-16 0; + margin: $padding-8 0; border-bottom: 1px solid transparent; input { @@ -244,6 +280,10 @@ body[dir="rtl"] .book-menu { @include spin(1s); } + ul a { + padding-bottom: 0; + } + small { opacity: 0.5; } @@ -273,6 +313,14 @@ body[dir="rtl"] .book-menu { .book-footer { padding-top: $padding-16; font-size: $font-size-14; + + a { + margin: $padding-8 0; + } + + a.flex { + gap: $padding-8; + } } .book-comments { @@ -280,30 +328,30 @@ body[dir="rtl"] .book-menu { } .book-languages { - margin-block-end: $padding-16 * 2; + margin-bottom: $padding-16; + + span { + padding: 0; + } ul { padding-inline-start: 1.5em; } + + a.flex { + gap: 0.5em; + } } // Responsive styles .book-menu-content, -.book-toc-content, -.book-page, -.book-header aside, -.markdown { +.book-toc-content { transition: 0.2s ease-in-out; transition-property: transform, margin, opacity, visibility; will-change: transform, margin, opacity; } @media screen and (max-width: $mobile-breakpoint) { - #menu-control, - #toc-control { - display: inline; - } - .book-menu { visibility: hidden; margin-inline-start: -$menu-width; @@ -318,6 +366,15 @@ body[dir="rtl"] .book-menu { display: block; } + .book-post-container { + flex-direction: column-reverse; + } + + #menu-control, + #toc-control { + display: inline; + } + #menu-control:focus ~ main label[for="menu-control"] { @include outline; } diff --git a/themes/hugo-book/assets/_markdown.scss b/themes/hugo-book/assets/_markdown.scss index 2a95453..3f40f59 100644 --- a/themes/hugo-book/assets/_markdown.scss +++ b/themes/hugo-book/assets/_markdown.scss @@ -14,7 +14,7 @@ h4, h5, h6 { - font-weight: normal; + font-weight: $body-font-weight; line-height: 1; margin-top: 1.5em; margin-bottom: $padding-16; @@ -32,19 +32,12 @@ } } - h4, - h5, - h6 { - font-weight: bolder; - } - - h5 { - font-size: 0.875em; - } - - h6 { - font-size: 0.75em; - } + h1 { font-size: $font-size-16 * 2; } + h2 { font-size: $font-size-16 * 1.5; } + h3 { font-size: $font-size-16 * 1.25; } + h4 { font-size: $font-size-16 * 1.125; } + h5 { font-size: $font-size-16 * 1; } + h6 { font-size: $font-size-16 * 0.875; } b, optgroup, @@ -55,10 +48,10 @@ a { text-decoration: none; - &:hover { + &[href]:hover { text-decoration: underline; } - &:visited { + &[href]:visited { color: var(--color-visited-link); } } @@ -78,8 +71,6 @@ } pre { - direction: ltr; - unicode-bidi: embed; padding: $padding-16; background: var(--gray-100); border-radius: $border-radius; @@ -122,6 +113,7 @@ tr td { padding: $padding-8 $padding-16; border: $padding-1 solid var(--gray-200); + text-align: start; } tr:nth-child(2n) { @@ -158,7 +150,6 @@ direction: ltr; unicode-bidi: embed; border-radius: $border-radius; - overflow: hidden; table tr { td pre code > span { @@ -186,23 +177,32 @@ padding: $padding-16; margin: -$padding-16; cursor: pointer; + list-style: none; + + &::before { + content: "▸"; + display: inline-block; + margin-inline-end: $padding-8; + transition: transform 0.1s ease-in-out; + } } &[open] summary { margin-bottom: 0; + + &::before { + transform: rotate(90deg); + } } } figure { margin: $padding-16 0; - figcaption p { - margin-top: 0; - } } } .markdown-inner { - // Util class to remove extra margin in nested markdown content + // Utility class to remove extra margin in nested markdown content > :first-child { margin-top: 0; } diff --git a/themes/hugo-book/assets/_shortcodes.scss b/themes/hugo-book/assets/_shortcodes.scss index 41a8e3e..5a09eba 100644 --- a/themes/hugo-book/assets/_shortcodes.scss +++ b/themes/hugo-book/assets/_shortcodes.scss @@ -1,4 +1,5 @@ .markdown { + // {{< expand "Label" "icon" >}} .book-expand { margin-top: $padding-16; @@ -20,7 +21,7 @@ padding: $padding-16; } - input[type="checkbox"]:checked + .book-expand-content { + input[type="checkbox"]:checked+.book-expand-content { display: block; } } @@ -53,31 +54,44 @@ display: none; } - input[type="radio"]:checked + label { + input[type="radio"]:checked+label { border-bottom: $padding-1 solid var(--color-link); } - input[type="radio"]:checked + label + .book-tabs-content { + + input[type="radio"]:checked+label+.book-tabs-content { display: block; } - input[type="radio"]:focus + label { + + input[type="radio"]:focus+label { @include outline; } } // {{< columns >}} .book-columns { - margin-left: -$padding-16; - margin-right: -$padding-16; + gap: $padding-16; - > div { + >div { margin: $padding-16 0; min-width: $body-min-width * 0.66; - padding: 0 $padding-16; + } + + >ul { + list-style: none; + display: flex; + padding: 0; + flex-wrap: wrap; + gap: $padding-16; + + >li { + flex: 1 1; + min-width: $body-min-width * 0.66; + } } } // {{< button >}} - a.book-btn { + a.book-btn[href] { display: inline-block; font-size: $font-size-14; color: var(--color-link); @@ -101,4 +115,168 @@ } } } -} + + // {{< badge >}} + .book-badge { + display: inline-block; + font-size: $font-size-14; + font-weight: $body-font-weight; + vertical-align: middle; + border-radius: $border-radius; + overflow: hidden; + text-wrap: nowrap; + color: var(--body-font-color); + + span { + display: inline-block; + padding: 0 $padding-8; + } + + span.book-badge-title { + --background-opacity: 0.1; + } + + span.book-badge-value { + --background-opacity: 1; + color: var(--body-background); + } + + @each $name, $color in $hint-colors { + &.#{$name} span { + background-color: rgba($color, var(--background-opacity)); + } + } + } + + // {{< steps >}} + .book-steps { + position: relative; + + >ol { + counter-reset: steps; + list-style: none; + padding-inline-start: $padding-16 + $padding-4; + margin-top: $padding-16 * 2; + + >li::before { + content: counter(steps); + counter-increment: steps; + + position: absolute; + display: flex; + justify-content: center; + left: $padding-8; + + height: $padding-16 * 1.5; + width: $padding-16 * 1.5; + padding: $padding-4; + border-radius: $padding-8; + + white-space: nowrap; + line-height: $padding-16; + + color: var(--body-background); + background: var(--gray-500); + outline: $padding-4 solid var(--body-background); + } + + >li { + @extend .markdown-inner; + border-inline-start: $padding-1 solid var(--gray-500); + padding-inline-start: $padding-16 * 3; + + padding-bottom: $padding-16 * 2; + } + + >li:last-child { + border: 0; + } + } + } + + // {{< card >}}, {{< figure >}} + .book-card, figure { + display: block; + overflow: hidden; + height: 100%; + border-radius: $border-radius; + border: $padding-1 solid var(--gray-200); + + &[href], &[href]:visited { + color: var(--body-font-color); + } + &[href]:hover { + text-decoration: none; + background: var(--gray-100); + } + + > img { + width: 100%; + display: block; + aspect-ratio: 4 / 3; + object-fit: cover; + } + + .markdown-inner { + padding: $padding-16; + } + + figcaption { + @extend .markdown-inner; + padding: $padding-16; + } + } + + .book-image { + input + img { + cursor: zoom-in; + transition: transform 0.2s ease-in-out; + } + + input:checked + img { + position: fixed; + + top: 0; + left: 0; + right: 0; + bottom: 0; + + background: var(--body-background); + object-fit: contain; + width: 100%; + height: 100%; + + z-index: 1; + cursor: zoom-out; + padding: $padding-16; + } + } + + .book-hero { + min-height: $padding-16 * 24; + align-content: center; + + h1 { + font-size: 3em; + } + } + + .book-codeblock-filename { + background: var(--gray-200); + font-size: $font-size-14; + margin-top: $padding-16; + padding: $padding-4 $padding-16; + border-start-start-radius: $border-radius; + border-start-end-radius: $border-radius; + + a { + color: var(--body-font-color); + } + + + .highlight pre { + margin-top: 0; + border-start-start-radius: 0; + border-start-end-radius: 0; + } + } +}
\ No newline at end of file diff --git a/themes/hugo-book/assets/_utils.scss b/themes/hugo-book/assets/_utils.scss index 92fad0f..52f97f3 100644 --- a/themes/hugo-book/assets/_utils.scss +++ b/themes/hugo-book/assets/_utils.scss @@ -1,5 +1,9 @@ .flex { display: flex; + + &.gap { + gap: $padding-16; + } } .flex-auto { diff --git a/themes/hugo-book/assets/book.scss b/themes/hugo-book/assets/book.scss index 59369fa..8d4d8c0 100644 --- a/themes/hugo-book/assets/book.scss +++ b/themes/hugo-book/assets/book.scss @@ -5,7 +5,6 @@ @import "normalize"; @import "utils"; @import "main"; -@import "fonts"; @import "print"; @import "markdown"; diff --git a/themes/hugo-book/assets/katex.json b/themes/hugo-book/assets/katex.json new file mode 100644 index 0000000..1eba855 --- /dev/null +++ b/themes/hugo-book/assets/katex.json @@ -0,0 +1,7 @@ +{ + "delimiters": [ + {"left": "$$", "right": "$$", "display": true}, + {"left": "\\(", "right": "\\)", "display": false}, + {"left": "\\[", "right": "\\]", "display": true} + ] +}
\ No newline at end of file diff --git a/themes/hugo-book/assets/normalize.css b/themes/hugo-book/assets/normalize.css index 192eb9c..4b9f38e 100644 --- a/themes/hugo-book/assets/normalize.css +++ b/themes/hugo-book/assets/normalize.css @@ -1,349 +1,213 @@ -/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ +/*! modern-normalize v3.0.1 | MIT License | https://github.com/sindresorhus/modern-normalize */ -/* Document - ========================================================================== */ - -/** - * 1. Correct the line height in all browsers. - * 2. Prevent adjustments of font size after orientation changes in iOS. - */ - -html { - line-height: 1.15; /* 1 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/* Sections - ========================================================================== */ - -/** - * Remove the margin in all browsers. - */ - -body { - margin: 0; -} - -/** - * Render the `main` element consistently in IE. - */ - -main { - display: block; -} +/* +Document +======== +*/ /** - * Correct the font size and margin on `h1` elements within `section` and - * `article` contexts in Chrome, Firefox, and Safari. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/* Grouping content - ========================================================================== */ +Use a better box model (opinionated). +*/ -/** - * 1. Add the correct box sizing in Firefox. - * 2. Show the overflow in Edge and IE. - */ - -hr { - box-sizing: content-box; /* 1 */ - height: 0; /* 1 */ - overflow: visible; /* 2 */ +*, +::before, +::after { + box-sizing: border-box; } -/** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ - -pre { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ +html { + /* Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) */ + font-family: + system-ui, + 'Segoe UI', + Roboto, + Helvetica, + Arial, + sans-serif, + 'Apple Color Emoji', + 'Segoe UI Emoji'; + line-height: 1.15; /* 1. Correct the line height in all browsers. */ + -webkit-text-size-adjust: 100%; /* 2. Prevent adjustments of font size after orientation changes in iOS. */ + tab-size: 4; /* 3. Use a more readable tab size (opinionated). */ } -/* Text-level semantics - ========================================================================== */ - -/** - * Remove the gray background on active links in IE 10. - */ +/* +Sections +======== +*/ -a { - background-color: transparent; +body { + margin: 0; /* Remove the margin in all browsers. */ } -/** - * 1. Remove the bottom border in Chrome 57- - * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. - */ - -abbr[title] { - border-bottom: none; /* 1 */ - text-decoration: underline; /* 2 */ - text-decoration: underline dotted; /* 2 */ -} +/* +Text-level semantics +==================== +*/ /** - * Add the correct font weight in Chrome, Edge, and Safari. - */ +Add the correct font weight in Chrome and Safari. +*/ b, strong { - font-weight: bolder; + font-weight: bolder; } /** - * 1. Correct the inheritance and scaling of font size in all browsers. - * 2. Correct the odd `em` font sizing in all browsers. - */ +1. Improve consistency of default fonts in all browsers. (https://github.com/sindresorhus/modern-normalize/issues/3) +2. Correct the odd 'em' font sizing in all browsers. +*/ code, kbd, -samp { - font-family: monospace, monospace; /* 1 */ - font-size: 1em; /* 2 */ +samp, +pre { + font-family: + ui-monospace, + SFMono-Regular, + Consolas, + 'Liberation Mono', + Menlo, + monospace; /* 1 */ + font-size: 1em; /* 2 */ } /** - * Add the correct font size in all browsers. - */ +Add the correct font size in all browsers. +*/ small { - font-size: 80%; + font-size: 80%; } /** - * Prevent `sub` and `sup` elements from affecting the line height in - * all browsers. - */ +Prevent 'sub' and 'sup' elements from affecting the line height in all browsers. +*/ sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; } sub { - bottom: -0.25em; + bottom: -0.25em; } sup { - top: -0.5em; + top: -0.5em; } -/* Embedded content - ========================================================================== */ +/* +Tabular data +============ +*/ /** - * Remove the border on images inside links in IE 10. - */ +Correct table border color inheritance in Chrome and Safari. (https://issues.chromium.org/issues/40615503, https://bugs.webkit.org/show_bug.cgi?id=195016) +*/ -img { - border-style: none; +table { + border-color: currentcolor; } -/* Forms - ========================================================================== */ +/* +Forms +===== +*/ /** - * 1. Change the font styles in all browsers. - * 2. Remove the margin in Firefox and Safari. - */ +1. Change the font styles in all browsers. +2. Remove the margin in Firefox and Safari. +*/ button, input, optgroup, select, textarea { - font-family: inherit; /* 1 */ - font-size: 100%; /* 1 */ - line-height: 1.15; /* 1 */ - margin: 0; /* 2 */ + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ } /** - * Show the overflow in IE. - * 1. Show the overflow in Edge. - */ +Correct the inability to style clickable types in iOS and Safari. +*/ button, -input { /* 1 */ - overflow: visible; +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; } /** - * Remove the inheritance of text transform in Edge, Firefox, and IE. - * 1. Remove the inheritance of text transform in Firefox. - */ - -button, -select { /* 1 */ - text-transform: none; -} - -/** - * Correct the inability to style clickable types in iOS and Safari. - */ - -button, -[type="button"], -[type="reset"], -[type="submit"] { - -webkit-appearance: button; -} - -/** - * Remove the inner border and padding in Firefox. - */ - -button::-moz-focus-inner, -[type="button"]::-moz-focus-inner, -[type="reset"]::-moz-focus-inner, -[type="submit"]::-moz-focus-inner { - border-style: none; - padding: 0; -} - -/** - * Restore the focus styles unset by the previous rule. - */ - -button:-moz-focusring, -[type="button"]:-moz-focusring, -[type="reset"]:-moz-focusring, -[type="submit"]:-moz-focusring { - outline: 1px dotted ButtonText; -} - -/** - * Correct the padding in Firefox. - */ - -fieldset { - padding: 0.35em 0.75em 0.625em; -} - -/** - * 1. Correct the text wrapping in Edge and IE. - * 2. Correct the color inheritance from `fieldset` elements in IE. - * 3. Remove the padding so developers are not caught out when they zero out - * `fieldset` elements in all browsers. - */ +Remove the padding so developers are not caught out when they zero out 'fieldset' elements in all browsers. +*/ legend { - box-sizing: border-box; /* 1 */ - color: inherit; /* 2 */ - display: table; /* 1 */ - max-width: 100%; /* 1 */ - padding: 0; /* 3 */ - white-space: normal; /* 1 */ + padding: 0; } /** - * Add the correct vertical alignment in Chrome, Firefox, and Opera. - */ +Add the correct vertical alignment in Chrome and Firefox. +*/ progress { - vertical-align: baseline; + vertical-align: baseline; } /** - * Remove the default vertical scrollbar in IE 10+. - */ +Correct the cursor style of increment and decrement buttons in Safari. +*/ -textarea { - overflow: auto; +::-webkit-inner-spin-button, +::-webkit-outer-spin-button { + height: auto; } /** - * 1. Add the correct box sizing in IE 10. - * 2. Remove the padding in IE 10. - */ - -[type="checkbox"], -[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} +1. Correct the odd appearance in Chrome and Safari. +2. Correct the outline style in Safari. +*/ -/** - * Correct the cursor style of increment and decrement buttons in Chrome. - */ - -[type="number"]::-webkit-inner-spin-button, -[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Correct the odd appearance in Chrome and Safari. - * 2. Correct the outline style in Safari. - */ - -[type="search"] { - -webkit-appearance: textfield; /* 1 */ - outline-offset: -2px; /* 2 */ +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ } /** - * Remove the inner padding in Chrome and Safari on macOS. - */ +Remove the inner padding in Chrome and Safari on macOS. +*/ -[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; +::-webkit-search-decoration { + -webkit-appearance: none; } /** - * 1. Correct the inability to style clickable types in iOS and Safari. - * 2. Change font properties to `inherit` in Safari. - */ +1. Correct the inability to style clickable types in iOS and Safari. +2. Change font properties to 'inherit' in Safari. +*/ ::-webkit-file-upload-button { - -webkit-appearance: button; /* 1 */ - font: inherit; /* 2 */ + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ } -/* Interactive - ========================================================================== */ - /* - * Add the correct display in Edge, IE 10+, and Firefox. - */ - -details { - display: block; -} +Interactive +=========== +*/ /* - * Add the correct display in all browsers. - */ +Add the correct display in Chrome and Safari. +*/ summary { - display: list-item; -} - -/* Misc - ========================================================================== */ - -/** - * Add the correct display in IE 10+. - */ - -template { - display: none; -} - -/** - * Add the correct display in IE 10. - */ - -[hidden] { - display: none; -} + display: list-item; +}
\ No newline at end of file diff --git a/themes/hugo-book/assets/plugins/_numbered.scss b/themes/hugo-book/assets/plugins/_numbered.scss index d7ad4d5..3b5570e 100644 --- a/themes/hugo-book/assets/plugins/_numbered.scss +++ b/themes/hugo-book/assets/plugins/_numbered.scss @@ -25,10 +25,8 @@ $endLevel: 6; li { counter-increment: item; - &:before { + > a:before { content: counters(item, ".") ". "; - float: left; - margin-inline-end: $padding-4; } } } |
