Lock decisions: palette, font stack, no markup renames, keep behaviour unchanged

This commit is contained in:
ai-bot committed 2026-10-14 08:19:16 +00:00
1 parent 3072aa6f34
commit f917f327ed
1 file changed
+104 -52
+104 -52
View File
@@ -30,6 +30,10 @@ easy to read for both older and younger visitors, on desktop and on mobile.
This is a refresh, not a redesign. Do not add features, do not change the This is a refresh, not a redesign. Do not add features, do not change the
information architecture, do not introduce a block theme or `theme.json`. information architecture, do not introduce a block theme or `theme.json`.
**The overriding principle: the site must behave and look the same as it does
today — only cleaner, more readable and more accessible. Do not break any
existing markup, class name or ID.**
## Deliverables ## Deliverables
| File | Action | | File | Action |
@@ -50,52 +54,83 @@ information architecture, do not introduce a block theme or `theme.json`.
## Non-negotiable constraints ## Non-negotiable constraints
1. **Keep every third-party class name.** These must keep working unchanged: 1. **Do not rename any existing HTML class name or ID.** The site owner may
- RSS plugin: `.rss-feed`, `.rss-title` have custom CSS under Appearance → Customize → Additional CSS that targets
- Slideshow plugin: `.super-simple-slideshow`, `img.super-simple-slide`, `.active` them. Keep all of these exactly as they are: `.header-menu-class`,
- bbPress: every `.bbp-*`, `#bbp_*`, `.forums`, `.favorite-toggle`, `#nav-grid`, `.logo`, `.entry-title`, `.entry-meta`, `.entry-content`,
`#subscription-toggle`, `.pw-weak`, `#new-post`, `.bbp-form`, `.date`, `.categories`, `.author`, `.pagination`, `.prev`, `.page-numbers`,
`.bbp-submit-wrapper` `.next`, `.search-container`, `.search-form`, `.search-field`,
- WordPress core: `.screen-reader-text`, `.wp-block-*`, `.alignnone`, `.search-submit`, `.footer-logo`, `#logout`, `#org-nr`, `.rss-feed`,
`.has-fixed-layout`, `.pagination`, `.page-numbers`, `.entry-title`, `.rss-title`, `.super-simple-slideshow`, `.super-simple-slide`, every
`.entry-meta`, `.entry-content`, `.search-container`, `.search-form`, `.bbp-*`, every `.wp-block-*`, `.screen-reader-text`, `.alignnone`,
`.search-field`, `.search-submit` `.has-fixed-layout`.
2. **Everything hidden today must stay hidden.** Copy the existing You may **add** new class names, but never remove or rename an existing one.
2. **Keep every third-party class name working.** RSS plugin: `.rss-feed`,
`.rss-title`. Slideshow plugin: `.super-simple-slideshow`,
`img.super-simple-slide`, `.active`. bbPress: every `.bbp-*`, `#bbp_*`,
`.forums`, `.favorite-toggle`, `#subscription-toggle`, `.pw-weak`,
`#new-post`, `.bbp-form`, `.bbp-submit-wrapper`.
3. **Everything hidden today must stay hidden.** Copy the existing
`display: none !important` selector list for bbPress verbatim, reindented `display: none !important` selector list for bbPress verbatim, reindented
only. The single exception is `.screen-reader-text`, which must be changed only. The single exception is `.screen-reader-text`, which must be changed
to a proper visually-hidden technique (see task H below). to a proper visually-hidden technique. It stays invisible to the eye — it
3. **Keep the nav menu location slug `header-menu`.** Renaming it would make just becomes readable by screen readers again.
4. **Keep the nav menu location slug `header-menu`.** Renaming it would make
the site lose its menu assignment on theme switch. the site lose its menu assignment on theme switch.
4. **No external requests.** No Google Fonts, no CDNs. Everything local. 5. **Keep content, pagination, slideshow, search and RSS exactly where they are
5. **No build step.** Plain CSS in `style.css`. No npm, no minification. today.** Do not move them, do not add conditional guards around them beyond
6. **No `!important`** outside the preserved hide list. the shortcode check described below.
7. Escape all output: `esc_html()`, `esc_attr()`, `esc_url()`, `wp_kses_post()`. 6. **No external requests.** No Google Fonts, no CDNs. No webfont is
8. Comments in code in English. User-facing strings in Norwegian Nynorsk, downloaded.
7. **No build step.** Plain CSS in `style.css`. No npm, no minification.
8. **No `!important`** outside the preserved hide list.
9. Escape all output: `esc_html()`, `esc_attr()`, `esc_url()`, `wp_kses_post()`.
10. Comments in code in English. User-facing strings in Norwegian Nynorsk,
wrapped in `__()` / `esc_html__()` / `esc_attr__()` with the text domain wrapped in `__()` / `esc_html__()` / `esc_attr__()` with the text domain
`super-simple-wp-theme`. `super-simple-wp-theme`.
## Design tokens to implement ## Design tokens to implement
Colour palette. The current `#38629F` only reaches 6.1:1 with white text and Palette. The current `#38629F` only reaches 6.1:1 with white text, and the
the muted colour `#AAA` on it fails at 2.6:1. Move to a darker blue so both muted colour `#AAA` on it fails at 2.6:1. The new palette stays in the same
body text and meta text pass AAA. blue family but is darker, so that **all text reaches AAA (7:1)** and all
functional borders reach 3:1. A second surface colour makes it impossible for
form fields to end up white-on-white.
| Token | Value | Role | Contrast on `--sswt-bg` | | Token | Value | Role |
|---|---|---|---| |---|---|---|
| `--sswt-bg` | `#1F3E6B` | page background | – | | `--sswt-bg` | `#1F3E6B` | page background |
| `--sswt-text` | `#FFFFFF` | body text, headings | 10.7:1 (AAA) | | `--sswt-surface` | `#2A4E80` | form fields, notice boxes, table headers |
| `--sswt-text-muted` | `#C6D3E8` | date, category, feed source | 7.1:1 (AAA) | | `--sswt-text` | `#FFFFFF` | body text, headings |
| `--sswt-link` | `#FFD479` | links | 7.6:1 (AAA) | | `--sswt-text-muted` | `#C6D3E8` | date, category, feed source, meta text |
| `--sswt-link-hover` | `#FFFFFF` | link hover and focus | 10.7:1 | | `--sswt-link` | `#FFD479` | links |
| `--sswt-border` | `#6C8CBF` | rules and borders | 3.1:1 (≥3:1 UI) | | `--sswt-link-hover` | `#FFFFFF` | link hover |
| `--sswt-accent-bg` | `#FFD479` | button background | – | | `--sswt-rule` | `#6C8CBF` | decorative separators |
| `--sswt-accent-text` | `#1F3E6B` | button text | 7.6:1 | | `--sswt-border` | `#8FA9D4` | form field and button borders |
| `--sswt-accent-bg` | `#FFD479` | button background |
| `--sswt-accent-text` | `#1F3E6B` | button text |
| `--sswt-focus` | `#FFFFFF` | focus outline |
Measured contrasts — do not regress these:
| Combination | Contrast | Level |
|---|---|---|
| `--sswt-text` on `--sswt-bg` | 10.7:1 | AAA |
| `--sswt-text` on `--sswt-surface` | 8.4:1 | AAA |
| `--sswt-text-muted` on `--sswt-bg` | 7.1:1 | AAA |
| `--sswt-text-muted` on `--sswt-surface` | 5.6:1 | AA |
| `--sswt-link` on `--sswt-bg` | 7.6:1 | AAA |
| `--sswt-link` on `--sswt-surface` | 6.0:1 | AA |
| `--sswt-accent-text` on `--sswt-accent-bg` | 7.6:1 | AAA |
| `--sswt-rule` on `--sswt-bg` | 3.1:1 | ≥3:1 (UI) |
| `--sswt-border` on `--sswt-surface` | 3.5:1 | ≥3:1 (UI) |
| `--sswt-focus` on `--sswt-bg` | 10.7:1 | AAA |
Typography and layout: Typography and layout:
| Token | Value | | Token | Value |
|---|---| |---|---|
| `--sswt-font` | `Manrope, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif` | | `--sswt-font` | `Manrope, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif` |
| `body` | `font-size: 1.125rem` (18 px), `line-height: 1.6`, `letter-spacing: 0.01em` | | `body` | `font-size: 1.125rem` (18 px), `line-height: 1.6`, `letter-spacing: 0.01em` |
| `--sswt-measure` | `42rem` — body text column | | `--sswt-measure` | `42rem` — body text column |
| `--sswt-wide` | `64rem` — header, nav, footer | | `--sswt-wide` | `64rem` — header, nav, footer |
@@ -105,6 +140,10 @@ Typography and layout:
| `h4` | `1.15rem` | | `h4` | `1.15rem` |
| interactive target | minimum `44px` tall | | interactive target | minimum `44px` tall |
Manrope stays first in the stack but is **not downloaded**. Visitors who have it
locally get it; everyone else gets their system font. No external requests, no
layout shift.
`html` must be `font-size: 100%` — never a pixel value. All sizes in `rem` so `html` must be `font-size: 100%` — never a pixel value. All sizes in `rem` so
that user font-size settings are respected. that user font-size settings are respected.
@@ -140,8 +179,7 @@ it, then move on. Do not batch unrelated changes.
9. Keep the `wp_mail_from` / `wp_mail_from_name` filters, but read the values 9. Keep the `wp_mail_from` / `wp_mail_from_name` filters, but read the values
through `apply_filters( 'sswt_mail_from', ... )` and through `apply_filters( 'sswt_mail_from', ... )` and
`apply_filters( 'sswt_mail_from_name', ... )` so they are configurable. `apply_filters( 'sswt_mail_from_name', ... )` so they are configurable.
10. Add a small helper `sswt_shortcode_exists()` or use `shortcode_exists()` 10. Do not add anything else. No new features.
directly — see tasks D and E.
### C. `header.php` ### C. `header.php`
1. Add `wp_head()` inside `<head>`. Add `body_class()` on `<body>` and 1. Add `wp_head()` inside `<head>`. Add `body_class()` on `<body>` and
@@ -151,9 +189,10 @@ it, then move on. Do not batch unrelated changes.
`<a class="skip-link screen-reader-text" href="#main">` with the Nynorsk `<a class="skip-link screen-reader-text" href="#main">` with the Nynorsk
label `Hopp til innhald`. label `Hopp til innhald`.
4. Wrap the header in `<header class="site-header">` and the menu in 4. Wrap the header in `<header class="site-header">` and the menu in
`<nav class="site-nav" aria-label="…">`. `<nav class="site-nav" aria-label="…">`. These are new classes — adding them
5. Rename the theme-internal class `.header-menu-class` to `.site-nav-menu` is fine.
and the id `#nav-grid` to `.nav-grid`. These are theme-internal only. 5. **Keep** the existing container class `header-menu-class` and the existing
id `nav-grid` on the menu wrapper. Do not rename them.
6. Give the logo `<img>` an `alt` attribute and handle the case where 6. Give the logo `<img>` an `alt` attribute and handle the case where
`get_site_icon_url()` returns an empty string. `get_site_icon_url()` returns an empty string.
7. Open `<main id="main" class="site-main">` after the header. 7. Open `<main id="main" class="site-main">` after the header.
@@ -165,7 +204,8 @@ it, then move on. Do not batch unrelated changes.
3. Guard the slideshow call: 3. Guard the slideshow call:
`if ( shortcode_exists( 'super_simple_slideshow' ) ) { echo do_shortcode( '[super_simple_slideshow]' ); }` `if ( shortcode_exists( 'super_simple_slideshow' ) ) { echo do_shortcode( '[super_simple_slideshow]' ); }`
Today, a deactivated plugin prints the raw shortcode text on the page. Today, a deactivated plugin prints the raw shortcode text on the page.
4. Only render the pagination block when `is_archive() || is_home() || is_search()`. 4. **Leave the pagination block where it is and as it is.** Do not add
conditions, do not move it.
5. Keep the search form, but replace `get_search_query()` with 5. Keep the search form, but replace `get_search_query()` with
`esc_attr( get_search_query() )` and use a single text domain. `esc_attr( get_search_query() )` and use a single text domain.
6. Keep the footer logo and the organisation number, but move the number into 6. Keep the footer logo and the organisation number, but move the number into
@@ -174,10 +214,11 @@ it, then move on. Do not batch unrelated changes.
### E. Templates ### E. Templates
1. `index.php`, `category.php`, `author.php`, `search.php`: keep the existing 1. `index.php`, `category.php`, `author.php`, `search.php`: keep the existing
structure. Wrap the archive heading strings in `esc_html__()` / structure and keep `the_content()`. Wrap the archive heading strings in
`esc_html()` and use the correct text domain. `esc_html__()` / `esc_html()` and use the correct text domain.
2. `single.php` and `page.php`: the post title must be `<h1 class="entry-title">`, 2. `single.php` and `page.php`: the post title must be `<h1 class="entry-title">`,
not `<h2>`. Right now no template outputs an `<h1>` at all. not `<h2>`. Right now no template outputs an `<h1>` at all. The class name
`entry-title` stays untouched.
3. `index.php`: guard the RSS call with 3. `index.php`: guard the RSS call with
`if ( shortcode_exists( 'super_simple_rssreader' ) )`. `if ( shortcode_exists( 'super_simple_rssreader' ) )`.
4. Remove commented-out dead code from the templates. 4. Remove commented-out dead code from the templates.
@@ -203,20 +244,22 @@ it, then move on. Do not batch unrelated changes.
3. Heading scale `h1`–`h4` per the tokens table. No fixed `3rem` titles. 3. Heading scale `h1`–`h4` per the tokens table. No fixed `3rem` titles.
4. Links: keep an underline, add `text-underline-offset: 0.15em`. Remove the 4. Links: keep an underline, add `text-underline-offset: 0.15em`. Remove the
underline on hover. underline on hover.
5. Add `:focus-visible { outline: 3px solid var(--sswt-link); outline-offset: 2px; }` 5. Add `:focus-visible { outline: 3px solid var(--sswt-focus); outline-offset: 2px; }`
and delete every `outline: none` rule, including the one on `.bbp-form` inputs. and delete every `outline: none` rule, including the one on `.bbp-form` inputs.
6. Replace `display: none` on `.screen-reader-text` (and the 6. Replace `display: none` on `.screen-reader-text` (and the
`h2.screen-reader-text` rule) with the standard visually-hidden technique: `h2.screen-reader-text` rule) with the standard visually-hidden technique:
`clip-path: inset(50%)`, `position: absolute`, `width: 1px`, `height: 1px`, `clip-path: inset(50%)`, `position: absolute`, `width: 1px`, `height: 1px`,
`overflow: hidden`, plus a `:focus` rule that reveals it — that is what `overflow: hidden`, plus a `:focus` rule that reveals it — that is what
makes the skip link appear on keyboard focus. makes the skip link appear on keyboard focus. The element must remain
invisible in normal use.
7. Add `@media (prefers-reduced-motion: reduce)` that disables transitions 7. Add `@media (prefers-reduced-motion: reduce)` that disables transitions
and animations. and animations.
### H. `style.css` — layout and components ### H. `style.css` — layout and components
1. Header, nav and footer use `--sswt-wide`. Body content uses `--sswt-measure`. 1. Header, nav and footer use `--sswt-wide`. Body content uses `--sswt-measure`.
2. Replace the `float: left` menu and the `overflow: hidden` clearfix with 2. Replace the `float: left` menu and the `overflow: hidden` clearfix with
flex or grid. Menu links must be at least 44 px tall. flex or grid. Menu links must be at least 44 px tall. **Keep the existing
`.header-menu-class` and `#nav-grid` names.**
3. Remove the no-op `align-items: center` on `header` (it has no `display`). 3. Remove the no-op `align-items: center` on `header` (it has no `display`).
4. Search input: remove `calc(640px - 8rem)` and the `100vw` patch in the 4. Search input: remove `calc(640px - 8rem)` and the `100vw` patch in the
media query. Use fluid widths. media query. Use fluid widths.
@@ -226,8 +269,11 @@ it, then move on. Do not batch unrelated changes.
horizontally on mobile instead of breaking the page. horizontally on mobile instead of breaking the page.
7. Keep the 16:9 embed wrapper. 7. Keep the 16:9 embed wrapper.
8. Keep block styles for image, file, list, details, quote and caption. 8. Keep block styles for image, file, list, details, quote and caption.
9. **Ask before changing these three**, they look deliberate: `h3.wp-block-heading { font-size: inherit; }`, 9. **Keep these rules exactly as they are** — they are deliberate fixes dated
`a.wp-block-file__button { display: none; }`, and the `.wp-block-details` rules. 2026-03-05 and must keep working:
`h3.wp-block-heading { font-size: inherit; }`,
`a.wp-block-file__button { display: none; }`,
`.is-vertical .wp-block-file` margin, and the `.wp-block-details` rules.
### I. `style.css` — third-party and bbPress ### I. `style.css` — third-party and bbPress
1. Slideshow: keep `.super-simple-slideshow`, `img.super-simple-slide`, 1. Slideshow: keep `.super-simple-slideshow`, `img.super-simple-slide`,
@@ -238,11 +284,15 @@ it, then move on. Do not batch unrelated changes.
`.screen-reader-text`. Keep every other bbPress selector working. `.screen-reader-text`. Keep every other bbPress selector working.
4. bbPress tables, forms, reply pages, user pages and the new-topic form: keep 4. bbPress tables, forms, reply pages, user pages and the new-topic form: keep
the selectors, but convert fixed pixel widths to `rem` or percentages. the selectors, but convert fixed pixel widths to `rem` or percentages.
5. Fix `.bbp-form input#user_login`: it currently sets `color: var(--txt-color)` 5. Form fields (`.search-field`, `.bbp-form input`, `.bbp-form textarea`):
with `background-color: var(--border-color)`, i.e. white text on white. `background: var(--sswt-surface)`, `color: var(--sswt-text)`,
6. Give bbPress buttons and links a visible `:focus-visible` style. `border: 1px solid var(--sswt-border)`. This fixes
7. Give all bbPress buttons a proper background and text colour pair so that `.bbp-form input#user_login`, which today sets white text on a white
white-on-light-grey never happens again. background.
6. Buttons (`.search-submit`, `.bbp-submit-wrapper button`, submit inputs):
`background: var(--sswt-accent-bg)`, `color: var(--sswt-accent-text)`.
Never white-on-light-grey.
7. Give bbPress buttons and links a visible `:focus-visible` style.
### J. Responsive and accessibility ### J. Responsive and accessibility
1. Verify reflow at 320 px, 768 px and 1440 px with no horizontal scrolling. 1. Verify reflow at 320 px, 768 px and 1440 px with no horizontal scrolling.
@@ -261,7 +311,8 @@ it, then move on. Do not batch unrelated changes.
4. Write `README.md` in English: installation, what the theme is for, the 4. Write `README.md` in English: installation, what the theme is for, the
third-party markup it styles, the customisation filters (`sswt_org_number`, third-party markup it styles, the customisation filters (`sswt_org_number`,
`sswt_mail_from`, `sswt_mail_from_name`, `sswt_redirect_bbpress_profile`), `sswt_mail_from`, `sswt_mail_from_name`, `sswt_redirect_bbpress_profile`),
and a note that `screenshot.png` needs replacing. an old → new CSS variable mapping table, and a note that `screenshot.png`
needs replacing.
5. Bump `Version` to `2.0.0` and add a short changelog comment in `style.css`. 5. Bump `Version` to `2.0.0` and add a short changelog comment in `style.css`.
## Acceptance criteria ## Acceptance criteria
@@ -271,6 +322,7 @@ it, then move on. Do not batch unrelated changes.
- Front page, single post, page, category, author and search render with no PHP - Front page, single post, page, category, author and search render with no PHP
notices while `WP_DEBUG` is on. notices while `WP_DEBUG` is on.
- All previously hidden bbPress elements are still hidden. - All previously hidden bbPress elements are still hidden.
- Existing Additional CSS still applies — no class name or ID was renamed.
- `[super_simple_rssreader]` and `[super_simple_slideshow]` render correctly — - `[super_simple_rssreader]` and `[super_simple_slideshow]` render correctly —
and print **no raw shortcode text** when the plugins are deactivated. and print **no raw shortcode text** when the plugins are deactivated.
- Slideshow images fill the width and keep a 16:9 ratio. - Slideshow images fill the width and keep a 16:9 ratio.