From f8a226ecc9fd4446f0d5b4d2e56175b9c67b4c39 Mon Sep 17 00:00:00 2001 From: ai-bot Date: Wed, 14 Oct 2026 08:35:28 +0000 Subject: [PATCH] Rewrite style.css for 2.0.0 - Full theme header plus a short changelog. - Replace the old colour and font variables with the --sswt-* tokens and delete the commented out dark palette block. - Organise the file: tokens, base, typography, links and focus, layout, entry, pagination, search, blocks, third-party, bbPress, utilities, media queries. - Base: html font-size 100%, border-box, 18px body text, line-height 1.6, letter-spacing 0.01em. - Heading scale h1-h4; no fixed 3rem titles. - Underlined links with text-underline-offset, no underline on hover. - One global :focus-visible outline; every outline: none is gone. - .screen-reader-text is now a real visually-hidden class with a focus reveal, so the skip link works. - Flex navigation with 44px targets, fluid search field, no fixed pixel widths, no overflow clearfix, no no-op align-items on header. - Images use max-width, tables scroll horizontally, 16:9 embed kept. - The 2026-03-05 fixes are kept exactly as they were. - bbPress hide list copied verbatim minus .screen-reader-text; form fields and buttons use the surface and accent tokens. - No !important outside the preserved hide list. --- style.css | 1013 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 658 insertions(+), 355 deletions(-) diff --git a/style.css b/style.css index 9fd13f0..294c7d2 100644 --- a/style.css +++ b/style.css @@ -1,84 +1,177 @@ /* -Theme Name: NTKF -Theme URI: http://sondreolav.com/ +Theme Name: Super Simple WordPress Theme +Theme URI: https://gitea.sondreolav.com/ai-bot/super-simple-wp-theme Author: sondreolav Author URI: http://sondreolav.com/ -Description: Eit tema tilpassa for Taubaneforeningen.no -Version: 1.0 +Description: Small classic theme for taubaneforeningen.no. Plain PHP and plain CSS, no build step and no external requests. High-contrast blue palette, rem based typography and accessible forms. Styles bbPress, super-simple-slideshow and super-simple-rssreader markup. +Version: 2.0.0 +Requires at least: 5.9 +Tested up to: 6.7 +Requires PHP: 7.4 +License: GNU General Public License v2 or later +License URI: https://www.gnu.org/licenses/gpl-2.0.html +Text Domain: super-simple-wp-theme +Tags: accessibility-ready, blog, custom-menu, featured-images, one-column, translation-ready */ +/* +Changelog +--------- +2.0.0 - Renamed from "NTKF" to "Super Simple WordPress Theme". New --sswt-* + design tokens (all text AAA, all functional borders at least 3:1), + rem based typography, visible focus outline, a real + .screen-reader-text class, flex navigation, fluid search field and + accessible form fields and buttons. No HTML class name or ID was + renamed or removed. +1.0.0 - Initial NTKF theme. +*/ + +/* ========================================================================== + Tokens + ========================================================================== */ + :root { - /*--bg-color: #131313; - --txt-color: #FFF; - --a: #D2C291; - --a-hover: #AAA; - --border-color: #444; - --font: Manrope, sans-serif;*/ - --bg-color: #38629F; - --txt-color: #FFF; - --a: #DDD; - --a-hover: #AAA; - --border-color: #FFF; - --font: Manrope, sans-serif; + /* Palette */ + --sswt-bg: #1F3E6B; + --sswt-surface: #2A4E80; + --sswt-text: #FFFFFF; + --sswt-text-muted: #C6D3E8; + --sswt-link: #FFD479; + --sswt-link-hover: #FFFFFF; + --sswt-rule: #6C8CBF; + --sswt-border: #8FA9D4; + --sswt-accent-bg: #FFD479; + --sswt-accent-text: #1F3E6B; + --sswt-focus: #FFFFFF; + + /* Typography. Manrope is used when it happens to be installed locally. + It is never downloaded, so there is no external request and no + layout shift. */ + --sswt-font: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + + /* Layout */ + --sswt-measure: 42rem; + --sswt-wide: 64rem; + --sswt-radius: 0.25rem; + --sswt-target: 2.75rem; /* 44px at the default 16px root font size */ } -body { - background-color: var(--bg-color); - font-family: var(--font); - color: var(--txt-color); - font-size: 1.1rem; - line-height: 1.5; - letter-spacing: .08rem; - margin: 0; +/* ========================================================================== + Base + ========================================================================== */ + +html { + font-size: 100%; } -* { +*, +*::before, +*::after { box-sizing: border-box; } -a { - color: var(--a); - text-decoration: underline solid .05rem; +body { + margin: 0; + background-color: var(--sswt-bg); + color: var(--sswt-text); + font-family: var(--sswt-font); + font-size: 1.125rem; + line-height: 1.6; + letter-spacing: 0.01em; overflow-wrap: break-word; - word-wrap: break-word; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 1rem 0; + color: var(--sswt-text); + font-weight: normal; + line-height: 1.25; +} + +h1 { font-size: 2.25rem; } +h2 { font-size: 1.75rem; } +h3 { font-size: 1.375rem; } +h4 { font-size: 1.15rem; } +h5 { font-size: 1.05rem; } +h6 { font-size: 1rem; } + +blockquote { + margin: 1rem; + padding: 0 0 0 1rem; + border-left: 1px solid var(--sswt-rule); + font-style: italic; +} + +figcaption { + font-style: italic; + padding: 0.5rem 0; +} + +/* ========================================================================== + Links and focus + ========================================================================== */ + +a { + color: var(--sswt-link); + text-decoration: underline; + text-underline-offset: 0.15em; } a:hover { - color: var(--a-hover); - /*text-decoration: underline dotted .1rem;*/ + color: var(--sswt-link-hover); text-decoration: none; } -.header-menu-class a, .entry-title a { text-decoration: none; } - -.header-menu-class a:hover, .entry-title a:hover { text-decoration: underline solid .05rem; } - -header { - border-color: var(--border-color); - border-style: solid; - border-width: 0 0 1px 0; - align-items: center; +:focus-visible { + outline: 3px solid var(--sswt-focus); + outline-offset: 2px; } -header nav, .entry-title, .entry-meta, div.pagination { +/* ========================================================================== + Layout: header and navigation + ========================================================================== */ + +header { + border-bottom: 1px solid var(--sswt-rule); +} + +header nav { width: 100%; - max-width: 1024px; - /*position: relative;*/ - margin: auto; + max-width: var(--sswt-wide); + margin: 0 auto; padding: 0 1rem; } +#nav-grid { + display: grid; + grid-template-columns: auto 1fr; + column-gap: 1rem; + align-items: center; + padding: 1.5rem 0; +} + .logo { font-size: 1.2rem; width: 20rem; - display: grid; - grid-template-columns: auto auto; - align-items: center; + max-width: 100%; } +/* The link is a real grid box so that it can show a focus outline. */ .logo a { - display: contents; + display: grid; + grid-template-columns: auto 1fr; + align-items: center; color: inherit; + text-decoration: none; } .logo img { @@ -86,118 +179,305 @@ header nav, .entry-title, .entry-meta, div.pagination { height: 4rem; } -.logo span { padding: 0 0 0 1rem; } - -#nav-grid { - grid-template-columns: auto 1fr; - column-gap: 1rem; - align-items: center; - display: grid; - padding: 1.5rem 0; +.logo span { + padding: 0 0 0 1rem; } -.header-menu-class, .rss-feed { - overflow: hidden; +.header-menu-class { margin: auto; - /*position: absolute; - right: 1rem;*/ } -.header-menu-class ul, .rss-feed ul { +.header-menu-class ul { + display: flex; + flex-wrap: wrap; + gap: 0.25rem; list-style-type: none; margin: 0; padding: 0; } -.header-menu-class li { float: left; } - -.rss-feed li { - padding: 1rem 0 0 0; - line-height: 1.2; +.header-menu-class li { + display: flex; } -.header-menu-class li a { - display: block; - padding: .5rem; +.header-menu-class a { + display: flex; + align-items: center; + min-height: var(--sswt-target); + padding: 0.5rem 0.75rem; + text-decoration: none; } -.rss-feed span { color: var(--a-hover); } +.header-menu-class a:hover, +.entry-title a:hover { + text-decoration: underline; +} -.entry-title, .entry-meta/*, .rss-title*/ { text-align: center; } +/* ========================================================================== + Layout: main and footer + ========================================================================== */ + +footer { + border-top: 1px solid var(--sswt-rule); +} + +.footer-logo { + margin: auto; + padding: 1rem 0 0.5rem 0; +} + +#logout { + margin: auto; + width: fit-content; +} + +#org-nr { + margin: auto; + width: fit-content; +} + +#org-nr p { + margin: 0.5rem 0 1rem 0; +} + +/* ========================================================================== + Entry: title, meta and content + ========================================================================== */ .entry-title { - font-size: 3rem; - font-weight: normal; - padding: 2rem 1rem .5rem 1rem; - overflow-wrap: break-word; - word-wrap: break-word; + width: 100%; + max-width: var(--sswt-measure); + margin: 0 auto; + padding: 2rem 1rem 0.5rem 1rem; + text-align: center; } -.rss-title { - font-size: 2rem; - font-weight: normal; - margin: 0; -} - -.entry-title a, .author a { color: var(--txt-color); } -.entry-title a:hover, .author a:hover { color: var(--a-hover) !important; } - .entry-title.search { padding: 2rem 1rem 0 1rem; } +.entry-title a, +.author a { + color: var(--sswt-text); +} + +/* Keeps the dim-on-hover feedback the old #AAA gave, at 7.1:1. */ +.entry-title a:hover, +.author a:hover { + color: var(--sswt-text-muted); +} + +.entry-meta { + width: 100%; + max-width: var(--sswt-measure); + margin: 0 auto; + padding: 0 1rem; + text-align: center; +} + .entry-meta p { font-size: 1.2rem; margin: 0; - padding: .5rem 0; + padding: 0.5rem 0; } -.date, .categories { color: var(--a-hover) } +.date, +.categories { + color: var(--sswt-text-muted); +} -.entry-content, .rss-feed { - max-width: 640px; - border-bottom: 1px solid var(--border-color); - margin: auto; +.entry-content { + max-width: var(--sswt-measure); + margin: 0 auto; + padding: 0 1rem; + border-bottom: 1px solid var(--sswt-rule); +} + +.entry-content p, +.wp-block-image, +.wp-block-file, +.bbp-breadcrumb p { + margin: 1rem 0; +} + +/* ========================================================================== + Pagination + ========================================================================== */ + +div.pagination { + width: 100%; + max-width: var(--sswt-measure); + display: flex; + justify-content: center; + align-items: center; + margin: 0.5rem auto 0 auto; padding: 0 1rem; } -.rss-feed { padding: 1rem; } - -.entry-content p, .wp-block-image, .wp-block-file, .bbp-breadcrumb p { margin: 1rem 0; } - -.wp-block-file a, .entry-content a { text-decoration: underline solid .05rem; } -.wp-block-file a:hover, .entry-content a:hover { text-decoration: none; } - -.wp-block-image img, .alignnone { - width: 100%; - height: auto; +.pagination .prev { + order: 1; + min-width: 3rem; } -blockquote { - margin: 1rem; - padding: 0 0 0 1rem; - border-left: 1px solid var(--border-color); - font-style: italic; +.pagination .page-numbers { + order: 2; + flex-grow: 1; + text-align: center; +} + +.pagination .next { + order: 3; + min-width: 3rem; +} + +.pagination a, +.pagination .page-numbers.current { + display: inline-flex; + align-items: center; + justify-content: center; + min-height: var(--sswt-target); + min-width: var(--sswt-target); + padding: 0 0.5rem; +} + +.page-numbers.current { + color: var(--sswt-link); +} + +/* ========================================================================== + Search + ========================================================================== */ + +.search-container { + width: 100%; + max-width: var(--sswt-measure); + margin: 0.5rem auto 1rem auto; + padding: 0 1rem; +} + +.search-form { + display: flex; + flex-wrap: wrap; + gap: 0.5rem; +} + +.search-field, +.entry-content input[type="password"], +.bbp-search-form input[type="text"] { + min-width: 0; + font-size: 1rem; + padding: 0.5rem; + background-color: var(--sswt-surface); + color: var(--sswt-text); + border: 1px solid var(--sswt-border); + border-radius: var(--sswt-radius); +} + +.search-field { + flex: 1 1 12rem; +} + +.entry-content input[type="password"] { + margin: 0; + width: auto; +} + +.bbp-search-form input[type="text"] { + width: calc(100% - 6rem); + margin: 0; +} + +#bbp_search_submit { + margin: 0; +} + +.search-submit, +.search-container button, +.entry-content input[type="submit"], +.bbp-submit-wrapper button, +.bbp-submit-wrapper input[type="submit"], +.submit button#bbp_user_edit_submit[type="submit"] { + background-color: var(--sswt-accent-bg); + color: var(--sswt-accent-text); + font-size: 1rem; + border: 1px solid var(--sswt-accent-bg); + border-radius: var(--sswt-radius); + cursor: pointer; + min-height: var(--sswt-target); + padding: 0.5rem 1rem; +} + +.search-submit { + flex: 0 0 auto; +} + +/* ========================================================================== + WordPress blocks + ========================================================================== */ + +.wp-block-image img, +.alignnone { + max-width: 100%; + height: auto; } /* 2026-03-05 */ a.wp-block-file__button { display: none; } -/* table */ -.wp-block-table { margin: 1rem 0; } -.has-fixed-layout { border-collapse: collapse; border-spacing: 0; width: 100%; display: table; } -.has-fixed-layout td, .has-fixed-layout th { padding: .5rem; display: table-cell; text-align: left; vertical-align: top; } -.has-fixed-layout th:first-child, .has-fixed-layout td:first-child { /*padding-left:16px;*/ } -.has-fixed-layout tr { border-bottom: 1px solid var(--border-color); } - -figcaption { - font-style: italic; - padding: .5rem 0; +.wp-block-table { + margin: 1rem 0; + overflow-x: auto; } -/* end: table */ -/* youtube */ -.wp-block-embed { margin: 1rem 0; } +.has-fixed-layout { + border-collapse: collapse; + border-spacing: 0; + width: 100%; + display: table; +} + +.has-fixed-layout th { + background-color: var(--sswt-surface); +} + +.has-fixed-layout td, +.has-fixed-layout th { + padding: 0.5rem; + display: table-cell; + text-align: left; + vertical-align: top; +} + +.has-fixed-layout tr { + border-bottom: 1px solid var(--sswt-rule); +} + +/* 2026-03-05: block headings follow the global h1-h4 scale, except h3, + which intentionally inherits the body size. */ +h3.wp-block-heading { font-size: inherit; } + +.wp-block-list { + margin: 1rem 0; + padding: 0 0 0 1.5rem; +} + +/* 2026-03-05 */ +.entry-content ol.wp-block-list li, +.entry-content ul.wp-block-list li { margin: 0 0 .4rem 0; } + +.entry-content ol.wp-block-list li ul.wp-block-list, +.entry-content ul.wp-block-list li ul.wp-block-list { margin: -.4rem 0 .4rem 0; } + +/* 2026-03-05 fikse liste med filer */ +.is-vertical .wp-block-file { margin: -.2rem 0 0 1.2rem; } + +.wp-block-details { margin: 1rem 0; } + +.wp-block-details p { margin: .5rem 0 1rem 0; } + +.wp-block-embed { + margin: 1rem 0; +} .wp-block-embed__wrapper { position: relative; @@ -215,262 +495,203 @@ figcaption { height: 100%; border: 0; } -/* end: youtube */ -/* heding */ -.wp-block-heading { - font-size: 2.5rem; - font-weight: normal !important; - margin: 1rem 0; -} +/* ========================================================================== + Third-party: slideshow + ========================================================================== */ -/* 2026-03-05 */ -h3.wp-block-heading { font-size: inherit; } -/* end: heading */ - -/* list */ -.wp-block-list { - margin: 1rem 0; - padding: 0 0 0 1.5rem; -} - -/* 2026-03-05 */ -.entry-content ol.wp-block-list li, .entry-content ul.wp-block-list li { margin: 0 0 .4rem 0; } - -.entry-content ol.wp-block-list li ul.wp-block-list, .entry-content ul.wp-block-list li ul.wp-block-list { margin: -.4rem 0 .4rem 0; } -/* end: list */ - -/* 2026-03-05 fikse liste med filer */ -.is-vertical .wp-block-file { margin: -.2rem 0 0 1.2rem; } - -/* details */ -.wp-block-details { margin: 1rem 0; } - -.wp-block-details p { margin: .5rem 0 1rem 0; } -/* end: details */ - -h2.screen-reader-text { display: none; } - -div.pagination { - max-width: 640px; - display: flex; - justify-content: center; - align-items: center; - /*padding: 1rem !important;*/ - /*padding: 1rem 1rem .5rem 1rem !important;*/ - margin: .5rem auto 0 auto; -} - -.pagination .prev { - order: 1; - min-width: 3rem; -} - -.pagination .page-numbers { - order: 2; - flex-grow: 1; - text-align: center; -} - -.page-numbers.current { color: var(--a) } - -.pagination .next { - order: 3; - min-width: 3rem; -} - -.search-container { - width: fit-content; - margin: .5rem auto 1rem auto; -} - -.search-container input[type=search], .entry-content input[type=password], .bbp-search-form input[type=text] { - font-size: 1rem; - border: none; - width: calc(640px - 8rem); - margin: 0 0 0 1rem; - padding: .5rem; - float: inline-start; -} - -.entry-content input[type=password] { - float: unset; - margin: 0; - width: auto; -} - -.search-container button, .entry-content input[type=submit], .submit button#bbp_user_edit_submit[type=submit], .bbp-submit-wrapper button#bbp_reply_submit[type=submit], .bbp-submit-wrapper button#bbp_topic_submit[type=submit] { - background: var(--a-hover); - font-size: 1rem; - border: none; - cursor: pointer; - width: 6rem; - margin: 0 1rem 0 0; - padding: .5rem 1rem; -} - -/* footer */ -footer { border-top: 1px solid var(--border-color); } - -.footer-logo { - margin: auto; - padding: 1rem 0 .5rem 0; -} - -#logout { - margin: auto; - width: fit-content; -} - -#org-nr { - margin: auto; - width: fit-content; -} - -#org-nr p { margin: .5rem 0 1rem 0; } -/* end: footer */ - -/* Slideshow */ .super-simple-slideshow { - max-width: 640px; - margin: auto; + max-width: var(--sswt-measure); + margin: 0 auto; padding: 1rem; - border-bottom: 1px solid var(--border-color); + border-bottom: 1px solid var(--sswt-rule); } .super-simple-slideshow img.super-simple-slide { display: none; - width: 100% !important; - height: auto !important; + width: 100%; + height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: center; } -.super-simple-slideshow img.super-simple-slide.active { display: block; } -/* end: slideshow */ - -@media (max-width: 768px) { - #nav-grid { grid-template-columns: 1fr; } - .header-menu-class { - margin: 0; - padding: 1.5rem 0 0 0; - position: unset; - } - .header-menu-class li { - float: unset; - } - .header-menu-class a { - padding: .5rem 0 !important; - } - .search-container input[type=search] { - width: calc(100vw - 8rem); - } +.super-simple-slideshow img.super-simple-slide.active { + display: block; } -/* bbPress */ +/* ========================================================================== + Third-party: RSS reader + ========================================================================== */ -.screen-reader-text, .bbp-breadcrumb-home, .bbp-breadcrumb-sep:first-of-type, .bbp-template-notice.info, .bbp-pagination, .bbp-topic-voice-count, .bbp-author-avatar, .bbp-forum-info .bbp-forums-list, .bbp-footer, .bbp-forum-freshness p.bbp-topic-meta, .bbp-topic-freshness p.bbp-topic-meta, .forums.bbp-replies li.bbp-header, li.bbp-forum-topic-count, .favorite-toggle, .bbp-reply-permalink, .bbp-reply-author div.bbp-author-role, .bbp-reply-author div.bbp-reply-ip, #bbp-user-profile h2.entry-title { display:none !important; } +.rss-feed { + max-width: var(--sswt-measure); + margin: 0 auto; + padding: 1rem; + border-bottom: 1px solid var(--sswt-rule); +} -.bbp-search-form input[type=text] { - width: calc(100% - 6rem); +.rss-feed ul { + list-style-type: none; + margin: 0; + padding: 0; +} + +.rss-feed li { + padding: 1rem 0 0 0; + line-height: 1.2; +} + +.rss-feed span { + color: var(--sswt-text-muted); +} + +.rss-title { + font-size: 2rem; + font-weight: normal; margin: 0; } -#bbp_search_submit { margin: 0; } +/* ========================================================================== + bbPress + ========================================================================== */ -.bbp-breadcrumb a, span.bbp-breadcrumb-current { padding: .5rem .25rem; } - -.bbp-breadcrumb a.bbp-breadcrumb-root { padding: .5rem .25rem .5rem 0; } - -/* bbPress-table */ -.bbp-forums, .bbp-topics { - display: table; - width: 100%; - padding: 0; - margin: 1rem 0; - border-collapse: collapse; +/* Hidden in the old theme, hidden here. Copied verbatim, minus + .screen-reader-text, which is now a real visually-hidden class. */ +.bbp-breadcrumb-home, +.bbp-breadcrumb-sep:first-of-type, +.bbp-template-notice.info, +.bbp-pagination, +.bbp-topic-voice-count, +.bbp-author-avatar, +.bbp-forum-info .bbp-forums-list, +.bbp-footer, +.bbp-forum-freshness p.bbp-topic-meta, +.bbp-topic-freshness p.bbp-topic-meta, +.forums.bbp-replies li.bbp-header, +li.bbp-forum-topic-count, +.favorite-toggle, +.bbp-reply-permalink, +.bbp-reply-author div.bbp-author-role, +.bbp-reply-author div.bbp-reply-ip, +#bbp-user-profile h2.entry-title { + display: none !important; } -.bbp-header, .bbp-body, .bbp-footer { display: table-row-group; } +.bbp-breadcrumb a, +span.bbp-breadcrumb-current { + padding: 0.5rem 0.25rem; +} -.bbp-header .forum-titles, .bbp-body .forum, .bbp-body .topic { display: table-row; } +.bbp-breadcrumb a.bbp-breadcrumb-root { + padding: 0.5rem 0.25rem 0.5rem 0; +} -.bbp-header .forum-titles li, .bbp-body .forum li, .bbp-body .topic li { - display: table-cell; - padding: .5rem; - border-bottom: 1px solid var(--border-color); +/* Forum and topic tables */ +.bbp-forums, +.bbp-topics { + display: table; + width: 100%; + padding: 0; + margin: 1rem 0; + border-collapse: collapse; +} + +.bbp-header, +.bbp-body, +.bbp-footer { + display: table-row-group; +} + +.bbp-header .forum-titles, +.bbp-body .forum, +.bbp-body .topic { + display: table-row; +} + +.bbp-header .forum-titles li, +.bbp-body .forum li, +.bbp-body .topic li { + display: table-cell; + padding: 0.5rem; + border-bottom: 1px solid var(--sswt-rule); } .bbp-header .forum-titles li { - /*font-weight: bold;*/ - font-size: 1rem !important; - padding: .0 .5rem .5rem .5rem; + font-size: 1rem; + padding: 0 0.5rem 0.5rem 0.5rem; } -.bbp-forum-permalink, .bbp-topic-permalink { font-size: 1rem; } +.bbp-forum-permalink, +.bbp-topic-permalink { + font-size: 1rem; +} -p.bbp-forum-meta, .bbp-forum-reply-count, .bbp-forum-freshness, .bbp-forum-content, p.bbp-topic-meta, .bbp-topic-reply-count, .bbp-topic-freshness { - font-size: .8rem; +p.bbp-forum-meta, +.bbp-forum-reply-count, +.bbp-forum-freshness, +.bbp-forum-content, +p.bbp-topic-meta, +.bbp-topic-reply-count, +.bbp-topic-freshness { + font-size: 0.8rem; margin: 0; } -.bbp-forum-freshness a, .bbp-forum-freshness a:hover, .bbp-topic-freshness a, .bbp-topic-freshness a:hover { - color: var(--txt-color); +.bbp-forum-freshness a, +.bbp-forum-freshness a:hover, +.bbp-topic-freshness a, +.bbp-topic-freshness a:hover { + color: var(--sswt-text); text-decoration: none; cursor: default; } -@media (max-width: 768px) { li.bbp-forum-reply-count, li.bbp-topic-reply-count { display: none !important; }} -/* end: bbPress-table */ -/* Innleggside*/ +/* Reply page */ #subscription-toggle { - /*padding: .5rem .5rem .5rem 0;*/ - padding: 0 .5rem 0 0; + padding: 0 0.5rem 0 0; margin: 0; display: inline-block; } -.favorite-toggle { - /* Sjult */ - /*padding: 0 .5rem; - margin: 0; - display: inline-block;*/ -} - .forums.bbp-replies { padding: 0; - margin: 1rem 0 0 0 + margin: 1rem 0 0 0; } -.bbp-reply-post-date { padding: 0 .5rem 0 0; } +.bbp-reply-post-date { + padding: 0 0.5rem 0 0; +} -.bbp-admin-links a { padding: 0 .25rem; } +.bbp-admin-links a { + padding: 0 0.25rem; +} .bbp-reply-author { margin: 1rem 0; font-size: 1.4rem; } -.entry-content .forums.bbp-replies { border-top: 1px solid var(--border-color); } +.entry-content .forums.bbp-replies { + border-top: 1px solid var(--sswt-rule); +} .bbp-body .bbp-reply-header { - /*border-top: 1px solid var(--border-color);*/ padding-top: 2rem; } -/*.bbp-reply-content p {*/ .bbp-body .bbp-reply-content { - border-bottom: 1px solid var(--border-color); - /*padding-bottom: .5rem;*/ + border-bottom: 1px solid var(--sswt-rule); } -/* end: innleggside */ -/* Forumbrukar */ -div#bbp-user-avatar { display: none; } +/* Forum user */ +div#bbp-user-avatar { + display: none; +} .bbp-template-notice { - border: 1px solid var(--border-color); + background-color: var(--sswt-surface); + border: 1px solid var(--sswt-rule); padding: 1rem; margin: 1rem 0; } @@ -481,12 +702,14 @@ div#bbp-user-avatar { display: none; } margin: 0; } -.bbp-template-notice li { margin: 0; } +.bbp-template-notice li { + margin: 0; +} #bbp-single-user-details { display: flex; flex-direction: column; - margin: .5rem 0; + margin: 0.5rem 0; } #bbp-user-navigation ul { @@ -495,64 +718,69 @@ div#bbp-user-avatar { display: none; } margin: 0; } -#bbp-user-navigation li { padding: .5rem 0; } +#bbp-user-navigation li { + padding: 0.5rem 0; +} .bbp-user-section h3 { font-size: 1.8rem; - font-weight: normal !important; margin: 1rem 0; } -/* Rediger brukar*/ -.bbp-form, #bbp-your-profile fieldset.submit { - border: 1px solid var(--border-color); +/* Edit user */ +.bbp-form, +#bbp-your-profile fieldset.submit { + border: 1px solid var(--sswt-rule); padding: 0 1rem; margin: 1rem 0; } -.bbp-form legend { display: none; } +.bbp-form legend { + display: none; +} -.bbp-form div { margin-bottom: 15px; } +.bbp-form div { + margin-bottom: 0.9375rem; +} .bbp-form label { display: block; - margin: .5rem 0; + margin: 0.5rem 0; } -.bbp-form input[type="text"], .bbp-form select, .bbp-form input#pass1, .bbp-form input#pass2 { +/* Fixes the old white-on-white input#user_login. */ +.bbp-form input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), +.bbp-form select, +.bbp-form textarea { width: 100%; - padding: 10px; - border: 1px solid var(--border-color); - box-sizing: border-box; - font-size: 1em; + padding: 0.625rem; + font-size: 1rem; + background-color: var(--sswt-surface); + color: var(--sswt-text); + border: 1px solid var(--sswt-border); + border-radius: var(--sswt-radius); } -.bbp-form input[type="text"]:focus, .bbp-form select:focus, .bbp-form input#pass1:focus, .bbp-form input#pass2:focus { - border-color: var(--border-color); - outline: none; -} - -.bbp-form select#display_name { /*appearance: none;*/ } - -.bbp-form textarea#description, .bbp-form textarea#bbp_topic_content, .bbp-form textarea#bbp_reply_content { +.bbp-form textarea#description, +.bbp-form textarea#bbp_topic_content, +.bbp-form textarea#bbp_reply_content { width: 100%; height: 8rem; } -.bbp-form input#user_login { - color: var(--txt-color); - background-color: var(--border-color); +.bbp-form button.hide-if-no-js { + display: none; } -.bbp-form button.hide-if-no-js { display: none; } - .bbp-form fieldset.hide-if-js { border: none; padding: 0; margin: 0; } -.user-pass2-wrap p.description { display: none; } +.user-pass2-wrap p.description { + display: none; +} .pw-weak { display: flex; @@ -571,29 +799,104 @@ div#bbp-user-avatar { display: none; } margin: 0 1rem 0 0; } -.pw-weak .description { order: 3; } - -.submit button#bbp_user_edit_submit[type=submit], .bbp-submit-wrapper button#bbp_reply_submit[type=submit] { - width: auto; - margin: .5rem 0 1rem 0; +.pw-weak .description { + order: 3; } -#bbp-your-profile fieldset.submit { margin: 1rem 0; } -/* end: rediger brukar */ -/* end: forum-brukar */ +.submit button#bbp_user_edit_submit[type="submit"], +.bbp-submit-wrapper button#bbp_reply_submit[type="submit"] { + width: auto; + margin: 0.5rem 0 1rem 0; +} -/* Nytt innlegg */ -#new-post .bbp-form { margin: 2rem 0 1rem 0;} +#bbp-your-profile fieldset.submit { + margin: 1rem 0; +} + +/* New topic */ +#new-post .bbp-form { + margin: 2rem 0 1rem 0; +} #new-post legend { display: unset; font-size: 1.4rem; } -#wp-bbp_reply_content-editor-container .hide-if-no-js, #wp-bbp_topic_content-editor-container .hide-if-no-js { display: none; } +#wp-bbp_reply_content-editor-container .hide-if-no-js, +#wp-bbp_topic_content-editor-container .hide-if-no-js { + display: none; +} -.bbp-submit-wrapper button#bbp_reply_submit[type=submit], .bbp-submit-wrapper button#bbp_topic_submit[type=submit] { margin: .5rem 0} +.bbp-submit-wrapper button#bbp_reply_submit[type="submit"], +.bbp-submit-wrapper button#bbp_topic_submit[type="submit"] { + margin: 0.5rem 0; +} -.bbp-form br { display:none; } -/* end: nytt innlegg */ -/* end: bbPress */ +.bbp-form br { + display: none; +} + +/* ========================================================================== + Utilities + ========================================================================== */ + +/* Visually hidden but still available to screen readers. */ +.screen-reader-text { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip-path: inset(50%); + margin: -1px; + padding: 0; + border: 0; + white-space: nowrap; +} + +/* Reveals the skip link on keyboard focus. */ +.screen-reader-text:focus { + position: absolute; + top: 0.5rem; + left: 0.5rem; + z-index: 100000; + width: auto; + height: auto; + overflow: visible; + clip-path: none; + margin: 0; + padding: 0.5rem 1rem; + background-color: var(--sswt-surface); + color: var(--sswt-text); + text-decoration: none; +} + +/* ========================================================================== + Media queries + ========================================================================== */ + +@media (max-width: 48rem) { + #nav-grid { + grid-template-columns: 1fr; + } + + .header-menu-class { + margin: 0; + padding: 1.5rem 0 0 0; + } + + li.bbp-forum-reply-count, + li.bbp-topic-reply-count { + display: none !important; + } +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + animation: none; + transition: none; + scroll-behavior: auto; + } +}