Files
super-simple-wp-theme/style.css
T
ai-bot f8a226ecc9 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.
2026-10-14 08:35:28 +00:00

903 lines
17 KiB
CSS

/*
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: 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 {
/* 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 */
}
/* ==========================================================================
Base
========================================================================== */
html {
font-size: 100%;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
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;
}
/* ==========================================================================
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(--sswt-link-hover);
text-decoration: none;
}
:focus-visible {
outline: 3px solid var(--sswt-focus);
outline-offset: 2px;
}
/* ==========================================================================
Layout: header and navigation
========================================================================== */
header {
border-bottom: 1px solid var(--sswt-rule);
}
header nav {
width: 100%;
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;
max-width: 100%;
}
/* The link is a real grid box so that it can show a focus outline. */
.logo a {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
color: inherit;
text-decoration: none;
}
.logo img {
width: 4rem;
height: 4rem;
}
.logo span {
padding: 0 0 0 1rem;
}
.header-menu-class {
margin: auto;
}
.header-menu-class ul {
display: flex;
flex-wrap: wrap;
gap: 0.25rem;
list-style-type: none;
margin: 0;
padding: 0;
}
.header-menu-class li {
display: flex;
}
.header-menu-class a {
display: flex;
align-items: center;
min-height: var(--sswt-target);
padding: 0.5rem 0.75rem;
text-decoration: none;
}
.header-menu-class a:hover,
.entry-title a:hover {
text-decoration: underline;
}
/* ==========================================================================
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 {
width: 100%;
max-width: var(--sswt-measure);
margin: 0 auto;
padding: 2rem 1rem 0.5rem 1rem;
text-align: center;
}
.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: 0.5rem 0;
}
.date,
.categories {
color: var(--sswt-text-muted);
}
.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;
}
.pagination .prev {
order: 1;
min-width: 3rem;
}
.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; }
.wp-block-table {
margin: 1rem 0;
overflow-x: auto;
}
.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;
width: 100%;
padding-bottom: 56.25%; /* 16:9 aspect ratio */
height: 0;
overflow: hidden;
}
.wp-block-embed__wrapper iframe {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
border: 0;
}
/* ==========================================================================
Third-party: slideshow
========================================================================== */
.super-simple-slideshow {
max-width: var(--sswt-measure);
margin: 0 auto;
padding: 1rem;
border-bottom: 1px solid var(--sswt-rule);
}
.super-simple-slideshow img.super-simple-slide {
display: none;
width: 100%;
height: auto;
aspect-ratio: 16 / 9;
object-fit: cover;
object-position: center;
}
.super-simple-slideshow img.super-simple-slide.active {
display: block;
}
/* ==========================================================================
Third-party: RSS reader
========================================================================== */
.rss-feed {
max-width: var(--sswt-measure);
margin: 0 auto;
padding: 1rem;
border-bottom: 1px solid var(--sswt-rule);
}
.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;
}
/* ==========================================================================
bbPress
========================================================================== */
/* 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-breadcrumb a,
span.bbp-breadcrumb-current {
padding: 0.5rem 0.25rem;
}
.bbp-breadcrumb a.bbp-breadcrumb-root {
padding: 0.5rem 0.25rem 0.5rem 0;
}
/* 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-size: 1rem;
padding: 0 0.5rem 0.5rem 0.5rem;
}
.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: 0.8rem;
margin: 0;
}
.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;
}
/* Reply page */
#subscription-toggle {
padding: 0 0.5rem 0 0;
margin: 0;
display: inline-block;
}
.forums.bbp-replies {
padding: 0;
margin: 1rem 0 0 0;
}
.bbp-reply-post-date {
padding: 0 0.5rem 0 0;
}
.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(--sswt-rule);
}
.bbp-body .bbp-reply-header {
padding-top: 2rem;
}
.bbp-body .bbp-reply-content {
border-bottom: 1px solid var(--sswt-rule);
}
/* Forum user */
div#bbp-user-avatar {
display: none;
}
.bbp-template-notice {
background-color: var(--sswt-surface);
border: 1px solid var(--sswt-rule);
padding: 1rem;
margin: 1rem 0;
}
.bbp-template-notice ul {
list-style-type: none;
padding: 0;
margin: 0;
}
.bbp-template-notice li {
margin: 0;
}
#bbp-single-user-details {
display: flex;
flex-direction: column;
margin: 0.5rem 0;
}
#bbp-user-navigation ul {
list-style-type: none;
padding: 0;
margin: 0;
}
#bbp-user-navigation li {
padding: 0.5rem 0;
}
.bbp-user-section h3 {
font-size: 1.8rem;
margin: 1rem 0;
}
/* 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 div {
margin-bottom: 0.9375rem;
}
.bbp-form label {
display: block;
margin: 0.5rem 0;
}
/* 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: 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 textarea#description,
.bbp-form textarea#bbp_topic_content,
.bbp-form textarea#bbp_reply_content {
width: 100%;
height: 8rem;
}
.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;
}
.pw-weak {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.pw-weak label {
order: 2;
margin: 0 1rem 0 0;
}
.pw-weak input[type="checkbox"] {
order: 1;
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: 0.5rem 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;
}
.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;
}
/* ==========================================================================
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;
}
}