fxcss 0.25.0__tar.gz → 0.27.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. {fxcss-0.25.0 → fxcss-0.27.0}/PKG-INFO +607 -163
  2. {fxcss-0.25.0 → fxcss-0.27.0}/README.md +605 -161
  3. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/__init__.py +1 -1
  4. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/adopt.py +8 -1
  5. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/audit.py +341 -190
  6. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/capture.py +20 -2
  7. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/check.py +20 -1
  8. fxcss-0.27.0/fxcss/checklist.py +393 -0
  9. fxcss-0.27.0/fxcss/cli.py +3748 -0
  10. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/compare.py +89 -9
  11. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/complete.py +2 -1
  12. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/core.py +883 -191
  13. fxcss-0.27.0/fxcss/fetch.py +966 -0
  14. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/install.py +704 -76
  15. fxcss-0.27.0/fxcss/inventory.py +478 -0
  16. fxcss-0.27.0/fxcss/layout.py +768 -0
  17. fxcss-0.27.0/fxcss/lint.py +82 -0
  18. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/probe.py +1 -1
  19. fxcss-0.27.0/fxcss/prompt.py +348 -0
  20. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/scaffold.py +112 -36
  21. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/sheets.py +65 -6
  22. fxcss-0.27.0/fxcss/style.py +582 -0
  23. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/support.py +20 -19
  24. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/pr-preview-publish.yml +17 -3
  25. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/pr-preview.yml +2 -3
  26. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/readme-previews.yml +2 -3
  27. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/showcase.yml +9 -5
  28. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/tweaks.py +16 -12
  29. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/PKG-INFO +607 -163
  30. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/SOURCES.txt +32 -0
  31. {fxcss-0.25.0 → fxcss-0.27.0}/pyproject.toml +7 -4
  32. fxcss-0.27.0/tests/test_audit_sheets_regressions.py +140 -0
  33. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_capture_coverage.py +20 -0
  34. fxcss-0.27.0/tests/test_capture_names.py +249 -0
  35. fxcss-0.27.0/tests/test_capture_state_checks.py +333 -0
  36. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_checks.py +32 -0
  37. fxcss-0.27.0/tests/test_compare_resolution.py +238 -0
  38. fxcss-0.27.0/tests/test_connection_lifecycle.py +201 -0
  39. fxcss-0.27.0/tests/test_data_safety.py +612 -0
  40. fxcss-0.27.0/tests/test_dialog_capture.py +124 -0
  41. fxcss-0.27.0/tests/test_discovery_tweaks_catalogue_regressions.py +156 -0
  42. fxcss-0.27.0/tests/test_flag_columns.py +127 -0
  43. fxcss-0.27.0/tests/test_install_fidelity.py +387 -0
  44. fxcss-0.27.0/tests/test_inventory.py +217 -0
  45. fxcss-0.27.0/tests/test_layout.py +250 -0
  46. fxcss-0.27.0/tests/test_maintenance_cli.py +767 -0
  47. fxcss-0.27.0/tests/test_maintenance_preservation.py +254 -0
  48. fxcss-0.27.0/tests/test_pref_lint.py +73 -0
  49. fxcss-0.27.0/tests/test_private_window.py +428 -0
  50. fxcss-0.27.0/tests/test_prompt.py +413 -0
  51. fxcss-0.27.0/tests/test_release_orchestration.py +516 -0
  52. fxcss-0.27.0/tests/test_review_maintenance.py +280 -0
  53. fxcss-0.27.0/tests/test_sheet_groups.py +195 -0
  54. fxcss-0.27.0/tests/test_sidebar_history.py +224 -0
  55. fxcss-0.27.0/tests/test_smoke_regressions.py +287 -0
  56. fxcss-0.27.0/tests/test_support_scaffold_regressions.py +98 -0
  57. fxcss-0.27.0/tests/test_terminal_style.py +203 -0
  58. fxcss-0.27.0/tests/test_threshold_and_variant_migration.py +151 -0
  59. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_units.py +817 -46
  60. fxcss-0.27.0/tests/test_welcome_context.py +303 -0
  61. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_workflows.py +127 -37
  62. fxcss-0.25.0/fxcss/cli.py +0 -2321
  63. fxcss-0.25.0/fxcss/fetch.py +0 -527
  64. {fxcss-0.25.0 → fxcss-0.27.0}/LICENSE +0 -0
  65. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/__main__.py +0 -0
  66. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/catalogue.py +0 -0
  67. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/omni.py +0 -0
  68. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/firefox-watch.yml +0 -0
  69. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/pr-preview-cleanup.yml +0 -0
  70. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/starter/chrome/userChrome.css +0 -0
  71. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss/templates/starter/custom/accent-red.css +0 -0
  72. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/dependency_links.txt +0 -0
  73. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/entry_points.txt +0 -0
  74. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/requires.txt +1 -1
  75. {fxcss-0.25.0 → fxcss-0.27.0}/fxcss.egg-info/top_level.txt +0 -0
  76. {fxcss-0.25.0 → fxcss-0.27.0}/setup.cfg +0 -0
  77. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_patch_duplicates.py +0 -0
  78. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_profile_safety.py +0 -0
  79. {fxcss-0.25.0 → fxcss-0.27.0}/tests/test_support.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fxcss
3
- Version: 0.25.0
3
+ Version: 0.27.0
4
4
  Summary: Live-reload, inspect and screenshot-test Firefox userChrome.css themes
5
5
  Author: AdamXweb
6
6
  License: MIT
@@ -17,8 +17,8 @@ Classifier: Topic :: Software Development :: Testing
17
17
  Requires-Python: >=3.9
18
18
  Description-Content-Type: text/markdown
19
19
  License-File: LICENSE
20
+ Requires-Dist: pillow>=10.1
20
21
  Provides-Extra: images
21
- Requires-Dist: pillow>=10.1; extra == "images"
22
22
  Dynamic: license-file
23
23
 
24
24
 
@@ -38,11 +38,10 @@ with visual previews and Firefox compatibility checks.
38
38
  ## Getting started
39
39
 
40
40
  You need **Python 3.9+** and an installed **Firefox** on macOS, Windows or
41
- Linux. Install fxcss with its image tools, then try a theme in a disposable
42
- profile:
41
+ Linux. Install fxcss, then try a theme in a disposable profile:
43
42
 
44
43
  ```bash
45
- pipx install "fxcss[images]"
44
+ pipx install fxcss
46
45
  fxcss try AdamXweb/WhiteSurFirefoxThemeMacOS
47
46
  ```
48
47
 
@@ -97,6 +96,7 @@ repository to `fxcss try`.
97
96
  ```bash
98
97
  fxcss try adamXweb/WhiteSurFirefoxThemeMacOS
99
98
  fxcss try github.com/owner/theme --with compact-tabs
99
+ fxcss try owner/theme --prefs user.js # also set a preference file it ships
100
100
  fxcss try owner/theme --info # report what's there, launch nothing
101
101
  fxcss try ~/src/my-theme # a theme folder on this computer
102
102
  ```
@@ -108,40 +108,107 @@ is never touched — close the window and nothing remains.
108
108
  It reports what it found before doing anything:
109
109
 
110
110
  ```
111
- adamxweb/whitesurfirefoxthememacos ★614 MIT
112
- MacOS Big Sur like theme for Firefox on MacOS & Windows.
113
- latest release v1.6.3 (2025-07-26)
114
- latest commit b10c574 (2025-07-26) Merge pull request #167 …
111
+ fxcss try AdamXweb/WhiteSurFirefoxThemeMacOS
115
112
 
116
- fetching release v1.6.3 …
117
- theme found at the repository root (39 stylesheets, 134 KB)
113
+ AdamXweb/WhiteSurFirefoxThemeMacOS ★619 MIT
114
+ MacOS Big Sur like theme for Firefox on MacOS & Windows. Make your Firefox look like Safari.
115
+ latest release v2.1.0 (2026-10-28)
116
+ latest commit 68f8699 (2026-11-10) fix: align the toolbar and close the tab bar gap …
118
117
 
119
- This theme ships install.sh. fxcss does not run it —
120
- it installs the files itself, which is all those scripts do.
118
+ fetching release v2.1.0 …
121
119
 
122
- Options its README documents:
123
- -c Left hand side tab close button
124
- -p Makes tabs height compact like current Safari
120
+ layout chrome/ at the repository root 72 stylesheets, 377 KB
121
+ loads 35 stylesheets 29 browser-window, 2 web-content, 4 shared
122
+ user hook customChrome.css not shipped, as intended
123
+ installer install.sh fxcss copies the files itself and never runs it
124
+
125
+ Optional stylesheets 30 · layer any on with --with name,name
126
+ Tweaks
127
+ compact-tabs hideextension increase-contrast singletabhidden tabs-swapclose
128
+ enabletabview highlight-tab noidentity standard-urlbar windows-swapclose
129
+
130
+ Colour schemes · pick one
131
+ theme-ayu-mirage theme-github-dark theme-nord
132
+ theme-catppuccin-frappe theme-gruvbox-dark theme-one-dark
125
133
  …
126
134
 
127
- Optional stylesheets you can layer on with --with:
128
- compact-tabs, hideextension, noidentity, tabs-swapclose, …
135
+ Setup beyond the files 1 automatic · 3 to check
136
+ ✓ automatic 3 prefs in configuration/user.js in the throwaway profile
137
+ ! check Firefox's native vertical tabs
138
+ a setting in Firefox's own sidebar options
139
+ …
140
+
141
+ README install flags as the README words them, for its own script; fxcss never runs it
142
+ -c Left hand side tab close button -v Re-enables the tabview button
143
+ -p Makes tabs height compact like… -t <name> Colour theme (see Colour themes below)
144
+ …
129
145
  ```
130
146
 
131
147
  Releases are preferred over branch tips, since that is what the author blessed;
132
148
  `--commit` takes the latest commit instead, and `--ref` takes any tag, branch or
133
- SHA. `--with name,name` layers on the theme's optional stylesheets so you can see
134
- a variant without hunting through install flags. `--shot dir` captures the
135
- standard screenshots instead of opening a window, and `--keep dir` leaves the
136
- download behind so you can start editing it with `watch`.
137
-
138
- #### Private repositories and local folders
149
+ SHA. A browser URL for a branch or folder
150
+ (`https://github.com/owner/theme/tree/photon-style/themes/one`) is read as
151
+ meaning that branch and that folder, and the branch is then *tracked* rather
152
+ than pinned. `--with name,name` layers on the theme's optional stylesheets so
153
+ you can see a variant without hunting through install flags. `--prefs user.js`
154
+ loads the file's `user_pref(...)` declarations into the throwaway profile.
155
+ You can name a shipped preference file by its repository-relative path, even
156
+ when the checklist did not discover its name. Quote paths that contain spaces,
157
+ for example `--prefs "Dark Mode/user.js"`. Some themes switch their rules on
158
+ from these files. When a theme ships a user.js that you have left unset, `try`
159
+ says so once Firefox is up. `--shot dir` captures the standard screenshots
160
+ with the selected preferences and stylesheets. After a successful run,
161
+ `--keep dir` saves the download in a new directory for editing with `watch`.
162
+
163
+ #### How the theme is found
164
+
165
+ Theme repositories are laid out in more ways than `chrome/userChrome.css`.
166
+ `try`, `install` and `upgrade` share one *plan* for reading a source tree, and
167
+ say which layout they found:
168
+
169
+ | Layout | Example | What happens |
170
+ | --- | --- | --- |
171
+ | `chrome/userChrome.css` at the root | WhiteSur Safari, ShyFox | Used where it is. |
172
+ | `userChrome.css` at the root, parts beside it | ArcWTF, Foxlim, the GNOME theme | The folder *is* `chrome/`; documentation, licences, screenshots and install scripts are left out unless a stylesheet refers to them. |
173
+ | Only `userContent.css` | GlassyFox | Installed as a content-only theme; the browser window is left alone. |
174
+ | One theme in a subfolder | `firefox/chrome/…`, `NewFox/profile/chrome/…` | Found, and the folder recorded so upgrades read the same place. |
175
+ | Several themes side by side | `1.Normal/`, `2.WithTST/`; Simplify's colour families | A real choice: a menu at a terminal, otherwise an error listing the `--subpath` values. Folders that look historical (`old/`, `Old Versions/`, screenshots) or belong to Thunderbird are listed but not chosen. |
176
+ | `src/userChrome-<edition>.css` files | WhiteSur | Named editions, chosen with `--subpath src/userChrome-WhiteSur.css`; a sibling `common/` folder is merged in the way the theme's installer does, by copying. |
177
+ | A committed `chrome.zip` | Win 7 Aero | Unpacked as data within size limits and read like any other tree. `.rar`/`.7z` are reported as unsupported with the reason. |
178
+ | No entry stylesheet at all | Brave-Fox, Firefox-Onebar | Unsupported, naming the sheets a README might tell you to `@import`; `--entry path.css` generates a `userChrome.css` that imports one. |
179
+
180
+ The planner never selects a directory outside the download, and nothing from
181
+ the download is executed: a theme whose entry sheet imports files the source
182
+ does not contain (Material Fox's uncompiled `user-chrome.css`) is reported as
183
+ needing a build rather than installed half-empty. `install` stops there unless
184
+ `--force`; `try` only warns.
185
+
186
+ `try --info` ends with a **setup checklist**: what the theme needs beyond its
187
+ files, read from the files it ships and its README — preference files outside
188
+ `configuration/user.js` (with their pref names), `.uc.js` scripts that need a
189
+ userChrome.js loader, extension settings to import, fonts, forks and platform
190
+ effects. Each item is *required*, *optional* or *unknown*, with the evidence.
191
+ Nothing on it is applied automatically: `try --prefs` sets a listed preference
192
+ file in the throwaway profile, and `install --prefs` (below) writes it to yours.
193
+
194
+ #### Private repositories, other hosts and local folders
139
195
 
140
196
  A private repository looks exactly like a missing one to anyone who cannot read
141
197
  it. fxcss sends `GITHUB_TOKEN` or `GH_TOKEN` when either is set; otherwise, if a
142
- repository is not publicly visible, it asks the GitHub CLI for its login
143
- (`gh auth token`) and tries again. So after `gh auth login`, private themes your
144
- account can read work like public ones. A token also raises GitHub's rate limit.
198
+ repository is not publicly visible or an anonymous request hits GitHub's rate
199
+ limit, it asks the GitHub CLI for its login (`gh auth token`) and tries again.
200
+ So after `gh auth login`, private themes your account can read work like public
201
+ ones and a signed-in person is never told to sign in. The token is only ever
202
+ sent to GitHub's own hosts — never to another host, and never across a redirect
203
+ that leaves GitHub — and never appears in a message.
204
+
205
+ Themes on **Codeberg**, **git.gay** (and other Forgejo instances listed in
206
+ `fetch.HOSTS`) and **GitLab** can be tried, installed and upgraded from their
207
+ URLs; their public APIs answer the same questions. `adopt` compares against
208
+ GitHub's tree API and says so when it meets another host. A repository that
209
+ has **moved** on GitHub resolves to its new owner/name, is downloaded from
210
+ there (the old name still answers on the API but not on the download host) and
211
+ is recorded under the new name.
145
212
 
146
213
  A theme that is not on GitHub, or not pushed yet, can be tried from its folder:
147
214
  `fxcss try ~/src/my-theme`. The folder is read where it is and never modified;
@@ -181,6 +248,8 @@ profile.
181
248
  fxcss install owner/theme # into your default profile
182
249
  fxcss install owner/theme --with compact-tabs # optional sheets, permanently
183
250
  fxcss install ~/src/my-theme # a local checkout works too
251
+ fxcss install owner/theme --subpath 2.WithTST # one of several editions
252
+ fxcss install owner/theme --prefs user.js # also a shipped preference file
184
253
  fxcss install --list-profiles # see what it found first
185
254
  ```
186
255
 
@@ -213,27 +282,67 @@ list of hashed directory names — and installing into the wrong one looks
213
282
  exactly like the theme not working:
214
283
 
215
284
  ```
216
- Several Firefox profiles exist:
217
- 1. default-release [Release] …/Profiles/8f2b1a.default-release (Enter)
218
- 2. dev-edition-default [Developer Edition] …/Profiles/c41d9e.dev-edition-default
219
- 3. work [unrecognised] …/Profiles/7ab3.work
285
+ Which profile? 3 found in ~/Library/Application Support/Firefox/Profiles
286
+ › 1. default-release Release 8f2b1a.default-release (Enter)
287
+ 2. dev-edition-default Developer Edition c41d9e.dev-edition-default
288
+ 3. work unrecognised 7ab3.work
289
+
290
+ Which one? ↑↓ or 1-3 [1]
220
291
  ```
221
292
 
222
293
  The label comes from the directory suffix Firefox itself assigns, so a profile
223
- you named yourself reads `[unrecognised]` rather than being guessed at.
294
+ you named yourself reads `unrecognised` rather than being guessed at.
224
295
 
225
296
  Run it without `--with` and it offers the theme's optional stylesheets rather
226
297
  than leaving you to find them in the repository:
227
298
 
228
299
  ```
229
- This theme ships optional stylesheets:
230
- 1. compact-tabs
231
- 2. theme-dracula
300
+ Optional stylesheets 30 · pick any
301
+ Tweaks
302
+ 1✓ compact-tabs 5. increase-contrast 9. tabs-swapclose
303
+ 2. enabletabview 6. noidentity 10. windows-swapclose
304
+ …
305
+
306
+ Colour schemes · pick one
307
+ 11. theme-ayu-mirage 21. theme-material-ocean
308
+ …
309
+ 15. theme-catppuccin-mocha › 25✓ theme-nord
232
310
  …
233
- Numbers separated by commas, `all`, or Enter for none.
234
- Include:
311
+
312
+ Include which? ↑↓←→ and space to tick, or e.g. 1,3 or all [1,25]
313
+ ```
314
+
315
+ When a theme ships both, colour schemes (named `theme-…`, or after a palette
316
+ such as `nord` or `catppuccin-mocha`) are listed apart from the tweaks; any
317
+ other theme gets one list. The grouping is only how the menu reads: the
318
+ sheets are numbered straight through, and what you pick is imported in the
319
+ theme's own order. "Pick one" appears when every pair of the theme's colour
320
+ schemes clashes in the way described below, so installing any two of them
321
+ would be refused. Pick two anyway and the menu asks which one to keep:
322
+
323
+ ```
324
+ Keep which colour scheme? both set the same 110 colours; only one can take effect
325
+ 1. theme-catppuccin-mocha ██ #11111b ██ #cdd6f4 ██ #cba6f7 ██ #6c7086
326
+ › 2. theme-nord ██ #242933 ██ #eceff4 ██ #88c0d0 ██ #5e81ac (Enter)
327
+
328
+ Which one? ↑↓ or 1-2 [2]
235
329
  ```
236
330
 
331
+ Each row shows the colours that sheet would set, most-used first, as a
332
+ swatch in that colour and its hex code (just the hex code where the terminal
333
+ cannot show the colour). Enter keeps the one that loads last, which is the one
334
+ that would have won anyway.
335
+
336
+ Every numbered question answers to the keyboard at a terminal. ↑ and ↓ move
337
+ the `›` (← and → cross columns), Space ticks a stylesheet, Enter takes the
338
+ answer and Esc stops. Typing the number works as it always has, and moves the
339
+ pointer as you type. Through a pipe, in CI, with `TERM=dumb` or in a terminal
340
+ narrower than 60 columns, the question is a plain typed prompt; set
341
+ `FXCSS_PLAIN_PROMPTS=1` to keep it that way everywhere, for example for a
342
+ screen reader that copes badly with lines redrawn in place. Each question
343
+ ends by naming the option that skips it next time (`--profile`, `--with`,
344
+ `--firefox`, `--subpath`, `--ref` or `--commit`).
345
+
237
346
  #### Options that cancel each other out
238
347
 
239
348
  Some of a theme's optional sheets are alternatives rather than additions.
@@ -283,10 +392,11 @@ looking for, and equally the branch can be mid-rewrite, so neither is right to
283
392
  assume:
284
393
 
285
394
  ```
286
- The default branch has moved on since the latest release:
287
- 1. release v2.0 2025-01-03 what the author last published (Enter)
288
- 2. latest commit on master 2026-08-14 newer than the release — fix tab colours
289
- Install [1-2]:
395
+ Which version? the default branch has moved on since the latest release
396
+ 1. release v2.0 2025-01-03 what the author last published (Enter)
397
+ 2. latest commit on master 2026-08-14 newer than the release — fix tab colours
398
+
399
+ Which one? 1-2 [1]
290
400
  ```
291
401
 
292
402
  Scripts and CI never see any of these prompts: without a terminal the release
@@ -297,13 +407,45 @@ The install is what a theme's install script does, done carefully:
297
407
  - the complete replacement is prepared before your existing `chrome/` moves
298
408
  to a timestamped `chrome.backup-*` sibling; a failed swap restores it;
299
409
  - any `--with` optional sheets go where the theme's own `@import`s expect
300
- them, or load after the base theme through an import-only wrapper;
410
+ them, or load after the base theme through an import-only wrapper; the
411
+ local files each sheet refers to (nested `@import`s, images, fonts) come
412
+ along to the same relative place, so it looks as it did in `fxcss try`.
413
+ Files outside the theme, or where the theme already installed a different
414
+ file, are not copied, and the install says so;
301
415
  - `toolkit.legacyUserProfileCustomizations.stylesheets` is enabled in
302
416
  `user.js` — inside a clearly marked block, so it can be removed cleanly —
303
- together with any `configuration/user.js` the theme ships;
417
+ together with any `configuration/user.js` the theme ships, whose pref names
418
+ are listed before you confirm. Everything outside the block is kept byte
419
+ for byte;
420
+ - shipped preference files elsewhere (a root `user.js`, `config/user.js`,
421
+ `prefs/recommended.js`) appear on the setup checklist with their pref
422
+ names and are **not** applied unless you say `--prefs user.js`; then they
423
+ join the same removable block, as written, and upgrades carry the choice
424
+ forward (stopping if the file disappears upstream). Nothing is ever applied
425
+ from README prose or from `-moz-pref()` toggles in the CSS;
304
426
  - a manifest (`chrome/fxcss-install.json`) records every file written, its
305
- sha256, and where the theme came from — which repo, which ref, and whether
306
- that ref was a release or a branch.
427
+ sha256, where the theme came from — which host, repo and ref, whether that
428
+ ref was a release or a branch, and the full commit a branch pointed at —
429
+ plus the layout selected, the preference files applied and each optional
430
+ sheet's path in the repository.
431
+
432
+ If Firefox skips a setting in a shipped preference file, [`fxcss lint`](#fxcss-lint)
433
+ can show you where a missing semicolon belongs.
434
+
435
+ When several options have the same name, select their repository paths, for
436
+ example `--with custom/tabs.css,optional/tabs.css`. Each retains its identity
437
+ through upgrades. Options loaded after the base get separate dependency trees
438
+ when combined. If two selected files need the same native import slot, or
439
+ would overwrite different contents already there, installation refuses before
440
+ changing the profile, including with `--force`.
441
+
442
+ Tracked branches are downloaded at the resolved commit SHA, and adoption
443
+ compares that exact tree. If the full SHA cannot be read, fxcss stops instead
444
+ of recording a branch name as a known revision.
445
+
446
+ Installing over a profile fxcss already manages keeps the files you added
447
+ there active (see [upgrade](#fxcss-upgrade)); installing over a `chrome/`
448
+ folder fxcss did not write moves it aside whole, as the origin backup.
307
449
 
308
450
  Restart Firefox after installation; it reads `userChrome.css` at startup.
309
451
  See [uninstall](#fxcss-uninstall) to remove a theme later.
@@ -330,17 +472,30 @@ guess — it is the same bytes:
330
472
  ```console
331
473
  $ fxcss adopt AdamXweb/WhiteSurFirefoxThemeMacOS
332
474
 
333
- profile: default-release (~/Library/…/8f2h1kqp.default-release)
475
+ fxcss adopt default-release
334
476
 
335
- comparing 148 file(s) against AdamXweb/WhiteSurFirefoxThemeMacOS …
477
+ profile default-release
478
+ ~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
479
+
480
+ comparing 148 files against AdamXweb/WhiteSurFirefoxThemeMacOS …
336
481
  v2.0.0: 129/135 files match, 6 edited, 7 added
337
482
  v1.6.3: 114/132 files match, 18 edited, 10 added
338
483
 
339
484
  best match: v2.0.0: 129/135 files match, 6 edited, 7 added
340
485
  Recorded as that version plus local differences, so an upgrade knows
341
486
  not to overwrite them without being told.
487
+
488
+ backup the theme as it is now, kept as chrome.backup-20260817014143
489
+ yours 7 files that version does not ship, kept as your own across upgrades
490
+
491
+ ✓ Recorded 135 files as AdamXweb/WhiteSurFirefoxThemeMacOS@v2.0.0
492
+ fxcss upgrade can now update it, and fxcss uninstall puts this back.
342
493
  ```
343
494
 
495
+ Files in `chrome/` that the matched version does not contain are recorded as
496
+ yours, not the theme's: upgrades carry them across and `uninstall` leaves them
497
+ where they are.
498
+
344
499
  Comparison uses GitHub's git-tree API rather than downloading anything, so
345
500
  checking ten versions costs ten small requests instead of ten archives — and
346
501
  archives are the first thing GitHub rate-limits.
@@ -349,7 +504,15 @@ Naming the repository is usually necessary. `adopt` checks `chrome/` for a git
349
504
  remote (definitive — someone cloned it there) and for GitHub URLs in the
350
505
  theme's own files (a hint worth confirming), but plenty of themes leave no
351
506
  trace at all once installed: WhiteSur's `chrome/` contains no URL anywhere.
352
- That is normal, not a failure, and the message says so.
507
+ That is normal, not a failure, and the message says so. A repository that was
508
+ only *mentioned* — a credit, a palette, an upstream — is recorded only when at
509
+ least half of a version's files match; otherwise `adopt` refuses and asks you
510
+ to name the repository yourself, because recording the wrong project hands
511
+ every later upgrade to it.
512
+
513
+ A match against a branch records the commit the branch pointed at, not its
514
+ name, so `upgrade --check` straight after adopting an exact branch tip says
515
+ "up to date" instead of announcing the same commit as an update.
353
516
 
354
517
  **Nothing is installed or replaced.** The `chrome/` already there is *copied*
355
518
  to a `chrome.backup-*` and then described, so `uninstall` has somewhere to put
@@ -385,22 +548,23 @@ names:
385
548
  ```console
386
549
  $ fxcss profiles --check
387
550
 
388
- Firefox profiles on this machine
551
+ fxcss profiles
389
552
 
390
- ● default-release [Release]
391
- ~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
392
- theme AdamXweb/WhiteSurFirefoxThemeMacOS @ v1.0.0
393
- installed 2026-08-14 09:12:44 (tracking the release)
394
- sheets theme-nord
395
- files 137 file(s), 1 edited since install, 1 added by hand
396
- update v2.0.0 available — 2026-08-16
553
+ Firefox profiles
554
+ 2 in ~/Library/Application Support/Firefox/Profiles
397
555
 
398
- dev-edition-default [Developer Edition]
399
- ~/Library/Application Support/Firefox/Profiles/p93kd0zx.dev-edition-default
400
- chrome/ 41 file(s), not installed by fxcss
401
- `fxcss install` here would back this up first
556
+ ● default-release Release 8f2h1kqp.default-release
557
+ theme AdamXweb/WhiteSurFirefoxThemeMacOS @ v2.0.0
558
+ installed 2026-08-14 09:12 tracking the release
559
+ sheets theme-nord
560
+ files 145 ! 1 edited since install, 1 added by hand
561
+ update v2.1.0 available 2026-10-28
402
562
 
403
- ● the profile Firefox opens by default
563
+ dev-edition-default Developer Edition p93kd0zx.dev-edition-default
564
+ theme ! installed by hand chrome/ holds 41 files
565
+ fxcss adopt takes it over; fxcss install would replace it, backing it up first
566
+
567
+ ● opens by default: the profile Firefox opens on its own
404
568
  ```
405
569
 
406
570
  Three states, kept distinct on purpose: a profile fxcss installed into and can
@@ -409,12 +573,15 @@ profile with no theme at all. Only the first can be described in detail; for
409
573
  the second, all fxcss honestly knows is that files are there and that
410
574
  installing would move them aside.
411
575
 
412
- `--check` asks GitHub once per theme, not once per profile, and compares like
576
+ `--check` asks the host once per theme, not once per profile, and compares like
413
577
  for like: an install tracking releases is measured against the newest tag, one
414
- tracking a branch against the commit that branch points at now. An install
415
- pinned with `--ref` reports as pinned rather than as behind. Where the
416
- manifest predates fxcss recording which of those applied, it says so instead
417
- of guessing — "up to date" is never printed unless it was actually checked.
578
+ tracking a branch against the commit that branch points at now (a branch other
579
+ than the default is looked up by name). An install pinned with `--ref` reports
580
+ as pinned rather than as behind. A release-tracked install that is current
581
+ while the default branch has moved on says both — and stays on releases;
582
+ `upgrade --commit` is the way to follow the branch instead. Where the manifest
583
+ predates fxcss recording which of those applied, it says so instead of
584
+ guessing — "up to date" is never printed unless it was actually checked.
418
585
 
419
586
  The same reservation covers local edits: installs from before 0.16 recorded no
420
587
  file hashes, so `fxcss profiles` reports them as *not checked for edits*
@@ -436,15 +603,27 @@ fxcss rollback # …and back again
436
603
  tag, one that followed a branch moves to that branch's current commit, and one
437
604
  pinned with `--ref` does not move at all unless you say so.
438
605
 
439
- It stops rather than surprise you, in three places:
606
+ It stops rather than surprise you, in four places:
440
607
 
441
608
  - **Files you edited yourself.** Every install records a sha256 per file, so
442
609
  an upgrade knows which ones you have since changed and refuses to write over
443
- them until `--force`. Files you *added* are never touched either way.
610
+ them until `--force`.
611
+ - **Files you added.** A stylesheet you dropped into `chrome/` — imported
612
+ from `customChrome.css`, say — is carried into the new tree so it stays
613
+ *active*, not merely kept in the backup where it would stop applying.
614
+ `customChrome.css` itself counts as yours once you have written in it, even
615
+ though fxcss created the empty file. The
616
+ manifest lists them under `user_files`. If the new version ships a file at
617
+ the same path with different contents, that is a collision: the upgrade
618
+ stops before anything moves and lists the paths; `--force` installs the
619
+ theme's copies and leaves yours in the backup, recorded as `displaced`.
444
620
  - **Options that vanished.** If you installed `--with theme-nord` and the new
445
621
  version renamed or dropped that sheet, the `@import` would simply stop
446
622
  resolving and the option would turn itself off. `upgrade` names the loss and
447
- makes you choose instead.
623
+ makes you choose instead. Sheets are matched by their path in the repository
624
+ first, so a sheet that only exists inside `chrome/extras/` survives an
625
+ upgrade as reliably as one in `custom/`. The same goes for preference files
626
+ chosen with `--prefs`.
448
627
  - **Selectors the new version needs and your Firefox lacks** — with `--audit`,
449
628
  which runs the same check as [`fxcss audit`](#fxcss-audit) against the
450
629
  fetched copy *before* anything is installed.
@@ -455,31 +634,45 @@ a re-fetch of what the manifest says — and diffs them before the confirmation
455
634
  prompt, printing where the before/after images landed. It completes the three
456
635
  questions an upgrade can answer about a theme with no API: do the selectors
457
636
  still exist (`--audit`), has the user edited anything (always checked), and
458
- what actually changes on screen (`--compare`). Needs Pillow and a local
459
- Firefox, like `shot`.
637
+ what actually changes on screen (`--compare`). Needs a local Firefox, like
638
+ `shot`.
460
639
 
461
640
  `--check` changes nothing and answers with its exit code, for cron, launchd or
462
641
  CI: **0** up to date, **1** an upgrade is available, **2** it cannot be told
463
642
  (no install here, an unreachable repo, or a manifest too old to say what it
464
- tracked). fxcss deliberately ships no scheduler of its own — this is the piece
465
- you point yours at.
643
+ tracked). For a theme installed from a local folder there is no upstream to
644
+ ask, so the folder's files are compared with what was installed and "up to
645
+ date" includes the managed preference block. Explicit `--prefs` and `--with`
646
+ choices can also change an installation whose remote revision is current;
647
+ `--check` reports whether that proposed setup differs without applying it.
648
+ fxcss deliberately ships no scheduler of its own —
649
+ this is the piece you point yours at.
650
+
651
+ The layout selected at install time (`--subpath`, `--entry`) is recorded and
652
+ reused, so a theme taken from `2.WithTST/` is upgraded from `2.WithTST/` and
653
+ one taken from `src/userChrome-WhiteSur.css` from the same edition.
466
654
 
467
655
  ```console
468
656
  $ fxcss upgrade
469
657
 
470
- profile: default-release (~/Library/…/8f2h1kqp.default-release)
471
- installed: AdamXweb/WhiteSurFirefoxThemeMacOS @ v1.6.3
472
- upstream: v2.0.0 — 2026-08-16
658
+ fxcss upgrade default-release
659
+
660
+ profile default-release
661
+ ~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
662
+ installed AdamXweb/WhiteSurFirefoxThemeMacOS @ v1.6.3
663
+ upstream v2.0.0 2026-08-16
473
664
 
474
665
  fetching v2.0.0 …
475
- keeping optional sheets: theme-nord
666
+ layout chrome/ at the repository root 72 stylesheets, 377 KB
667
+ loads 35 stylesheets 29 browser-window, 2 web-content, 4 shared
668
+ sheets keeping theme-nord
476
669
 
477
670
  Upgrade to v2.0.0? [Y/n]
478
671
 
479
- upgraded to v2.0.0
480
- the previous version is kept as chrome.backup-20260817014202
672
+ backup the previous version, kept as chrome.backup-20260817014202
481
673
 
482
- Restart Firefox to see it. `fxcss rollback` puts the previous version back.
674
+ ✓ Upgraded to v2.0.0
675
+ Restart Firefox to see it; fxcss rollback puts the previous version back.
483
676
  ```
484
677
 
485
678
  ### fxcss rollback
@@ -499,12 +692,19 @@ list can show what each one holds:
499
692
  ```console
500
693
  $ fxcss rollback --list
501
694
 
502
- Backups, newest first:
695
+ fxcss rollback default-release
503
696
 
697
+ profile default-release
698
+ ~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
699
+ installed AdamXweb/WhiteSurFirefoxThemeMacOS @ v2.0.0
700
+
701
+ Backups newest first
504
702
  chrome.backup-20260817014202
505
703
  AdamXweb/WhiteSurFirefoxThemeMacOS@v1.6.3
506
- chrome.backup-20260817014143 (the original)
704
+ chrome.backup-20260817014143 the original
507
705
  your own chrome/, from before fxcss
706
+
707
+ fxcss rollback --to <name> restores one of these.
508
708
  ```
509
709
 
510
710
  `fxcss rollback` restores the most recent, or `--to <name>` any of them.
@@ -518,7 +718,8 @@ That original is the reason upgrades chain rather than stack blindly. After
518
718
  five upgrades the newest backup holds *the theme*, not your files, so the
519
719
  manifest carries the original's name forward and `fxcss uninstall` still
520
720
  restores what you had before you ever ran fxcss. `--keep N` (default 3) prunes
521
- older backups; the original is never one of them.
721
+ older backups; the original is never one of them, and neither is any
722
+ `chrome.backup-*` folder that holds no fxcss install record.
522
723
 
523
724
  ### fxcss uninstall
524
725
 
@@ -537,6 +738,15 @@ If the profile originally had no `chrome/`, uninstalling after an upgrade
537
738
  returns it to that state when no files need to be kept. Restart Firefox to see
538
739
  the result.
539
740
 
741
+ A `chrome/` with no manifest in it is yours — what a rollback to the original
742
+ put back, or a theme installed by hand — and `uninstall` leaves it exactly as
743
+ it is, however many backups sit beside it: it removes a leftover fxcss block
744
+ from `user.js` if there is one, lists the backups, and changes nothing else.
745
+ So install → rollback → uninstall ends with your original files in place, and
746
+ running it again does the same. If `chrome/` is absent after an interrupted
747
+ swap or a completed uninstall, `uninstall` leaves that absent state alone too.
748
+ Use `fxcss rollback --to <backup-name>` explicitly to restore a backup.
749
+
540
750
  ## Building and inspecting themes
541
751
 
542
752
  Work on Firefox's tabs, toolbars and other browser UI with a live preview.
@@ -613,6 +823,33 @@ That last section is the useful part: not just what the element is, but which of
613
823
  your files already style it, with line numbers. Keep clicking to pick more; Esc
614
824
  in the browser or Ctrl-C in the terminal stops.
615
825
 
826
+ ### fxcss lint
827
+
828
+ Run `fxcss lint` in a theme repository to find missing semicolons in its
829
+ Firefox preference files. You can also name a file directly, including one
830
+ with a custom name or a path containing spaces.
831
+
832
+ ```sh
833
+ fxcss lint
834
+ fxcss lint "Dark Mode/user.js"
835
+ ```
836
+
837
+ Each finding includes a local file link and a source preview. The caret
838
+ marks where to insert the semicolon, even if a comment follows the setting.
839
+
840
+ ```text
841
+ Dark Mode/user.js:7:30: missing semicolon after user_pref
842
+ file:///themes/Dark%20Mode/user.js
843
+ 7 | user_pref("theme.nord", true) // use Nord colors
844
+ | ^ add ; here
845
+ ```
846
+
847
+ Firefox can skip both an unterminated setting and the setting that follows
848
+ it. The lint command reads the files offline and leaves edits to you. It
849
+ exits with `0` for a clean scan, `1` for findings and `2` for a read error.
850
+ The checklist and lint both skip settings inside actual `/* … */`, `//`
851
+ and `#` comments. A `/*` inside a `#` comment is text on that line.
852
+
616
853
  ### fxcss inspect
617
854
 
618
855
  ```bash
@@ -780,8 +1017,11 @@ window around it, which is why themes break it without noticing — a dark theme
780
1017
  whose dialog body renders white shows up here and nowhere else.
781
1018
 
782
1019
  The captures land **flat** in `--out`, one file per view (`shots/before/light-01-window.png`);
783
- `--url` captures go to `<out>/live/`. This is the directory to publish from if
784
- you want plain screenshots — `fxcss compare` writes a different shape, below.
1020
+ `--url` captures go to `<out>/live/`, named after the URL without its scheme,
1021
+ `www.`, query or fragment; URLs that differ only in those parts are numbered in
1022
+ the order given (`example-com`, `example-com-2`) rather than overwriting each
1023
+ other. This is the directory to publish from if you want plain screenshots —
1024
+ `fxcss compare` writes a different shape, below.
785
1025
 
786
1026
  ```bash
787
1027
  fxcss shot --out shots --variants all
@@ -791,6 +1031,17 @@ fxcss shot --out shots --variants all
791
1031
  ships (`custom/`, `optional/`, `variants/`…), each loaded on its own and removed
792
1032
  again — so `tabs-swapclose` or `compact-tabs` are checked by CI without a
793
1033
  separate install. Name specific ones (`--variants a,b`) or take them all.
1034
+ Names are the filename lower-cased with punctuation folded to `-`. Two sheets
1035
+ with the same name in different folders are told apart by folder
1036
+ (`custom-tabs`, `optional-tabs`); two in one folder that differ only in case
1037
+ or punctuation are reported as an error, since nothing distinguishes them.
1038
+
1039
+ Adding `optional/tabs.css` alongside an existing `custom/tabs.css` renames
1040
+ the existing `tabs` variant to `custom-tabs` and names the new one
1041
+ `optional-tabs`. Update explicit `--variants` selections and `--views`
1042
+ filters accordingly. Existing baselines retain `variant-tabs`, so checks
1043
+ report that view as missing until you review the renamed captures and
1044
+ refresh the baseline with `--update-baseline`.
794
1045
 
795
1046
  #### Browser states it captures
796
1047
 
@@ -803,7 +1054,9 @@ mode — and three that a theme is most likely to have never been tested in:
803
1054
 
804
1055
  - **Sidebar — bookmarks and history.** Both panels, with their trees expanded,
805
1056
  because a fresh profile shows them collapsed and a collapsed panel has almost
806
- nothing in it to style.
1057
+ nothing in it to style. History is grouped by site rather than by day: a day
1058
+ heading prints the date, so the view would differ from its baseline on every
1059
+ later day.
807
1060
  - **Vertical tabs.** Firefox 133+ does not restyle the tab strip here, it
808
1061
  *moves* it: `#tabbrowser-tabs` leaves `#TabsToolbar` for `#vertical-tabs`, so
809
1062
  every `#TabsToolbar > …` rule a theme owns silently stops matching while its
@@ -845,13 +1098,18 @@ restyled tab strip, say — leaves it alone:
845
1098
  | `*-11-settings` | Settings | `about:preferences`, styled by `userContent.css` |
846
1099
 
847
1100
  Panels are separate OS windows that Marionette cannot see, so these four are
848
- taken with a screen capture of the panel's area. That needs Pillow (the
849
- `fxcss[images]` extra) and briefly brings the capture Firefox to the front. The
850
- capture is first checked against Marionette's own image of the window; when it
851
- cannot see Firefox (no screen-recording permission on macOS, a Wayland session,
852
- another window on top) the panel views are reported as unsupported with that
853
- reason rather than captured wrong. A Firefox without the search engine button
854
- skips its two views the same way.
1101
+ taken with a screen capture of the panel's area. That briefly brings the
1102
+ capture Firefox to the front. The capture is first checked against Marionette's
1103
+ own image of the window. A check that shows something else, such as a window
1104
+ that came to the front at that moment, is made again with Firefox brought to
1105
+ the front first, three times in all. When the screen cannot be captured at all
1106
+ (no screen-recording permission on macOS, a Wayland session), or still does not
1107
+ show Firefox after the third check, the panel views are reported as unsupported
1108
+ with that reason rather than captured wrong. The command still succeeds, so
1109
+ look for `unsupported` in its output. The line printed just before the panel
1110
+ views says what the check found, and it is a `warning:` when the cause may only
1111
+ have been a window that stayed in front. A Firefox without the search engine
1112
+ button skips its two views the same way.
855
1113
 
856
1114
  These views run in a browser session of their own, so the pointer and hover
857
1115
  locks they use never reach the window views. Its window is up to 1280×900 and
@@ -860,6 +1118,16 @@ translucent edges and rounded corners show the browser, not your desktop.
860
1118
  Anything the system draws on top during the capture is photographed too, so a
861
1119
  notification that pops up over a panel appears in that view; rerun if one did.
862
1120
 
1121
+ Firefox closes a panel when another application comes to the front, and a
1122
+ window that comes in front of Firefox hides one that stays open, so leave the
1123
+ machine alone while these views are taken. Each panel capture checks that the
1124
+ panel is still open and that the screen still shows Firefox's navigation bar.
1125
+ When either is not so the panel is opened again, three times in all. If that
1126
+ does not work the view is recorded as failed, the rest of the run carries on,
1127
+ and the command ends with one line naming the view and a non-zero exit status,
1128
+ so `fxcss check` cannot pass without it. Run the capture again. Something that
1129
+ covers a panel and leaves the navigation bar clear is not noticed.
1130
+
863
1131
  ### fxcss compare
864
1132
 
865
1133
  ```bash
@@ -910,6 +1178,10 @@ cannot quietly shrink the comparison. Unselected views are left out of
910
1178
  as a small change: `summary.json` lists it under `below_threshold` with its
911
1179
  percentage, but no comparison image is drawn and it does not count towards
912
1180
  `changed_views` or `any_change`. A change of exactly the threshold is pictured.
1181
+ Changed pixels are counted in the captures' own pixels, not in the scaled-down
1182
+ pictures, so a one-pixel border still counts at a high device pixel ratio.
1183
+ Small per-channel color differences and isolated antialiasing shifts between
1184
+ unchanged surrounding colors are ignored as rendering noise.
913
1185
 
914
1186
  #### Distinct changes
915
1187
 
@@ -1104,20 +1376,21 @@ class your CSS mentions, resolves each against a running Firefox, and shows what
1104
1376
  to change — with the real line from your file and the replacement applied:
1105
1377
 
1106
1378
  ```
1107
- 14 selectors need attention
1108
-
1109
- RENAMED #urlbar-background → .urlbar-background
1110
- same name, now a class rather than an id
1111
-
1112
- chrome/parts/headerbar-urlbar.css:52
1113
- - #urlbar-background {
1114
- + .urlbar-background {
1379
+ ✗ 14 selectors need attention
1115
1380
 
1116
- SIMILAR #appMenu-fullscreen-button → #appMenu-fullscreen-button2 (a guess, not applied)
1117
- no exact match; closest live name is #appMenu-fullscreen-button2
1381
+ ✗ RENAMED #urlbar-background → .urlbar-background
1382
+ same name, now a class rather than an id
1383
+ chrome/parts/headerbar-urlbar.css:52
1384
+ - #urlbar-background {
1385
+ + .urlbar-background {
1118
1386
 
1119
- chrome/parts/icons.css:198
1120
- #appMenu-fullscreen-button {
1387
+ ! SIMILAR #appMenu-fullscreen-button → #appMenu-fullscreen-button2 a guess, not applied
1388
+ no exact match; closest live name is #appMenu-fullscreen-button2
1389
+ #appMenu-fullscreen-button2 belongs to browser.xhtml
1390
+ check what reads that name before using it: a close
1391
+ spelling can belong to an unrelated element
1392
+ chrome/parts/icons.css:198
1393
+ #appMenu-fullscreen-button {
1121
1394
  ```
1122
1395
 
1123
1396
  These examples come from findings in a long-running theme. The
@@ -1195,11 +1468,22 @@ exit for CI; `fxcss-keep` lines are exempt.
1195
1468
 
1196
1469
  #### Unused and unreachable code
1197
1470
 
1198
- `audit` also reports housekeeping, in its own section, separate from breakage:
1471
+ `audit` also reports housekeeping, in its own section, separate from breakage.
1472
+ It reads the theme through the same stylesheet inventory `install` and
1473
+ `upgrade` use: quoted and unquoted `@import url(…)` forms, escaped paths,
1474
+ imports behind `-moz-pref()` or media conditions, and the user hooks a theme
1475
+ imports without shipping (`customChrome.css`, FlexFox's
1476
+ `uc-user-settings.css`). Sheets reached only from `userContent.css` style web
1477
+ and extension pages, and their selectors are reported as *other-document*
1478
+ rather than as browser-window breakage. When an entry sheet is missing or a
1479
+ required import resolves to nothing, the section opens with **INCOMPLETE** and
1480
+ the reasons, instead of reading as a clean bill of health.
1199
1481
 
1200
1482
  - **Stylesheets nothing imports.** Files under `chrome/` unreachable by
1201
- following `@import` from `userChrome.css`. Sheets in a `custom/` or
1202
- `optional/` folder are excluded — being opt-in is the point of those.
1483
+ following `@import` from `userChrome.css` or `userContent.css`. Sheets in a
1484
+ `custom/`, `optional/`, `extras/` or `tweaks/` folder are excluded — being
1485
+ opt-in is the point of those — and so are conditional imports that are
1486
+ merely switched off.
1203
1487
  - **Custom properties used but never set**, where an unthemed Firefox does not
1204
1488
  provide them either. These are usually typos: the `var()` silently falls back.
1205
1489
  - **Custom properties set but read nowhere.** Reported cautiously — setting
@@ -1231,43 +1515,60 @@ fxcss init --showcase --previews # also publish screenshots
1231
1515
  fxcss init --watch --showcase --previews # generate all six workflow files
1232
1516
  ```
1233
1517
 
1234
- `init` writes to `.github/workflows/`. Existing files are preserved unless you
1235
- pass `--force`; review regenerated files before committing, especially if you
1236
- have customised them. Generation pins the installed fxcss version. The preview publisher validates
1237
- variant filenames and PNG headers, including options added by later PRs.
1238
- Updating fxcss locally does not update workflows already in a repository.
1518
+ `init` writes to `.github/workflows/` **at the repository root** — found with
1519
+ `git rev-parse --show-toplevel` from the theme folder — and points every
1520
+ command in them at the theme's folder when that is not the root
1521
+ (`fxcss shot --theme 'head/firefox'`). A repository that holds several themes
1522
+ needs `--subpath` to say which. Flat and nested layouts both generate previews
1523
+ for all repository changes, including dependencies outside the theme folder.
1524
+ Named editions and themes that need `--entry` are refused, because the
1525
+ generated workflows cannot select them yet; lay the theme out as
1526
+ `chrome/userChrome.css` to use the workflows.
1527
+ Existing files are preserved unless you pass `--force`; review regenerated
1528
+ files before committing, especially if you have customised them. Generation
1529
+ pins the installed fxcss version. These layout, trigger and patch-mapping
1530
+ changes need fxcss **0.26.0 or later**.
1531
+ To try an fxcss commit that is not released yet, use
1532
+ `fxcss init --toolkit-ref <full-40-character-fxcss-commit-SHA>`: the generated
1533
+ workflows then install that commit directly instead of a PyPI version. `init`
1534
+ says so when the copy you are running did not come from PyPI, since a pin to
1535
+ an unpublished version cannot install. The preview
1536
+ publisher validates variant filenames and PNG headers, including options added
1537
+ by later PRs. Updating fxcss locally does not update workflows already in a
1538
+ repository.
1539
+
1540
+ Audit patches for flat and nested themes address their original files relative
1541
+ to the Git root, so the watch workflow can apply them there. Packaged ZIPs and
1542
+ assembled editions have no direct source mapping: patch generation refuses
1543
+ those layouts; audit the unpacked source folder to prepare a patch instead.
1239
1544
 
1240
1545
  | Feature | Enable with | When it runs | What readers see |
1241
1546
  | --- | --- | --- | --- |
1242
- | PR previews | `init` | Relevant pull request changes; macOS, Windows and Linux. | A comment showing before/after views and highlighted differences, including optional stylesheets. |
1547
+ | PR previews | `init` | All pull request changes; macOS, Windows and Linux. | A comment that opens with the Firefox support result, then shows each distinct change once with before/after views and highlighted differences, including optional stylesheets. |
1243
1548
  | Firefox watch | `init --watch` | Weekly on Mondays, or manually; Release, Beta and Nightly on macOS. | Fix PRs or issues for actionable selector findings, plus a separate issue if screenshot capture fails. |
1244
- | README previews | `init --previews` | Matching theme changes on `main`/`master`, or manually; macOS. | Refreshed standard and variant screenshots plus cropped option comparisons on the `previews` branch. |
1549
+ | README previews | `init --previews` | All repository changes on `main`/`master`, or manually; macOS. | Refreshed standard and variant screenshots plus cropped option comparisons on the `previews` branch. |
1245
1550
  | Release showcase | `init --showcase` | A release is published, or manually; macOS. | Light/dark screenshots against live websites on the `showcase` branch. |
1246
1551
 
1247
- The workflows download Firefox on their runners. Generated preview triggers
1248
- cover `chrome/`, `configuration/`, `custom/`, `optional/`, `options/`, `extras/`
1249
- and `variants/`. Review the filters if you keep theme assets elsewhere.
1552
+ The workflows download Firefox on their runners. Generated PR and README
1553
+ previews run for all repository changes, without path filters: imported CSS,
1554
+ images, fonts and other dependencies can live anywhere in a theme repository.
1555
+ This deliberately includes documentation-only edits so dependency-only changes
1556
+ outside standard folders cannot silently skip previews.
1250
1557
  Re-run generation and review the changes to update the pinned fxcss version
1251
- or adopt improvements to the workflow templates. New variants are included automatically.
1558
+ or adopt improvements to the workflow templates; see
1559
+ [Updating generated workflows](#updating-generated-workflows). New variants are
1560
+ included automatically unless `FXCSS_VARIANTS` names specific stylesheets.
1252
1561
 
1253
1562
  ### Pull request previews
1254
1563
 
1255
1564
  The default setup writes three cooperating workflows:
1256
1565
 
1257
- 1. **Render:** capture the base and proposed theme revisions on each operating
1258
- system, compare them and upload the images. Matching base captures are
1259
- cached for later pushes to the same PR.
1566
+ 1. **Render:** capture the base and proposed theme revisions in the current
1567
+ Firefox release on each operating system, compare them and upload the
1568
+ images. Matching base captures are cached for later pushes to the same PR.
1260
1569
  2. **Publish:** validate the artifacts, publish images to `ci-previews`, and
1261
1570
  create or update the preview comment. Unchanged views remain available as
1262
1571
  full screenshots.
1263
-
1264
- The comment groups the [distinct changes](#distinct-changes) by area of the UI
1265
- and pictures each once, from the first platform that has it. The same change
1266
- on another platform is folded under it, with each platform's views listed and
1267
- linked to their full before-and-after; a change only one platform shows is
1268
- labelled as such. A tab strip restyle that touches every view therefore reads
1269
- as one picture under Tabs rather than one per view per platform. Views a runner
1270
- could not capture are listed as not compared.
1271
1572
  3. **Clean up:** remove a PR's published images when it closes.
1272
1573
 
1273
1574
  Preview comments start once the workflows are on the default branch.
@@ -1278,6 +1579,45 @@ but does not execute PR code.
1278
1579
  The preview shows what changed, leaving the reviewer to decide whether it is
1279
1580
  correct. It does not reject a PR simply because the screenshots differ.
1280
1581
 
1582
+ #### What the comment shows
1583
+
1584
+ The comment opens with the Firefox support result, when
1585
+ [that check is enabled](#choosing-what-the-preview-shows). It then groups the
1586
+ [distinct changes](#distinct-changes) by area of the UI and pictures each once,
1587
+ from the first platform that has it. The same change on another platform is
1588
+ folded under it, with each platform's views listed and linked to their full
1589
+ before-and-after; a change only one platform shows is labelled as such. A tab
1590
+ strip restyle that touches every view therefore reads as one picture under Tabs
1591
+ rather than one per view per platform.
1592
+
1593
+ Below the changes, each platform has a section for anything that needs a closer
1594
+ look:
1595
+
1596
+ - Views that exist only in the pull request, such as a newly added optional
1597
+ stylesheet, are shown as new.
1598
+ - Views missing from the pull request's captures are flagged, so a reviewer can
1599
+ check whether the view was removed or could not be captured.
1600
+ - Views a runner could not capture are listed as not compared.
1601
+ - Screenshots or change records that fail the publisher's validation are
1602
+ counted as unreviewed, with a prompt to check the workflow artifacts before
1603
+ approving.
1604
+
1605
+ A comment too long for GitHub lists its views without links; every comparison
1606
+ is still in the workflow run's artifacts for 14 days.
1607
+
1608
+ The comment is published only when the render job succeeds on all three
1609
+ platforms. If one fails, the pull request keeps any earlier comment. Re-running
1610
+ the failed job or pushing a fix publishes as usual. To publish what the other
1611
+ platforms produced for the pull request's latest commit, start the publish
1612
+ workflow by hand with the ID from that render run's URL:
1613
+
1614
+ ```bash
1615
+ gh workflow run pr-preview-publish.yml -f run_id=<run-id>
1616
+ ```
1617
+
1618
+ That comment covers only the platforms that finished, and has no Firefox
1619
+ support result if the Linux job was the one that failed.
1620
+
1281
1621
  #### Choosing what the preview shows
1282
1622
 
1283
1623
  Four settings at the top of `pr-preview.yml` control what is captured and
@@ -1292,22 +1632,25 @@ env:
1292
1632
  ```
1293
1633
 
1294
1634
  - `FXCSS_VARIANTS` chooses which optional stylesheets are captured, which also
1295
- shortens the run. Named stylesheets must exist in both the base branch and
1296
- the pull request; `all` adapts as sheets are added.
1635
+ shortens the run. Join names with `+` (`compact+dark`) to capture them
1636
+ together. Named stylesheets must exist in both the base branch and the pull
1637
+ request; `all` adapts as sheets are added.
1297
1638
  - `FXCSS_VIEWS` chooses which views are compared and shown, using the
1298
1639
  [`compare --views`](#fxcss-compare) patterns. Every standard view is still
1299
- captured. The comment notes that a selection is in effect.
1640
+ captured. The comment notes that a selection is in effect. A pattern that
1641
+ matches none of a runner's captures fails that platform's render job, so a
1642
+ pattern naming only panel views can fail where a runner cannot capture them.
1300
1643
  - `FXCSS_MIN_CHANGED_PERCENT` leaves out the image for a view where less than
1301
1644
  that share of pixels changed. The comment still lists each such view with its
1302
1645
  percentage, so a small change is never reported as no change.
1303
- - `FXCSS_OLDEST_FIREFOX` is the oldest Firefox the theme supports. Every
1304
- comment opens with the [`fxcss support`](#fxcss-support) result for it: a
1305
- warning when merging drops styling for an older release ("Firefox 157 and
1306
- earlier, ESR 153 included"), a note when new rules only match newer
1307
- releases, or one line saying support is unchanged. The Linux job runs the
1308
- check, caches build indexes between runs, and never fails the preview over
1309
- it; if it cannot run, the comment says so. The Firefox watch reads the same
1310
- setting.
1646
+ - `FXCSS_OLDEST_FIREFOX` is the oldest Firefox the theme supports. Unless it
1647
+ is empty, each comment opens with the [`fxcss support`](#fxcss-support)
1648
+ result for it: a warning when merging drops styling for an older release
1649
+ ("Firefox 157 and earlier, ESR 153 included"), a note when new rules only
1650
+ match newer releases, or one line saying support is unchanged. The Linux job
1651
+ runs the check, caches build indexes between runs, and never fails the
1652
+ preview over it; if it cannot run, the comment says so. `firefox-watch.yml`
1653
+ has its own copy of this setting, so change both if you edit them by hand.
1311
1654
 
1312
1655
  Set them when generating the workflows, or edit the file directly:
1313
1656
 
@@ -1316,11 +1659,29 @@ fxcss init --variants compact --views 'light-*,variant-*' --min-changed-percent
1316
1659
  --oldest-firefox 140
1317
1660
  ```
1318
1661
 
1319
- Settings are validated against the theme before anything is written. Pass
1320
- `--force` to replace workflows that already exist; that also resets any
1321
- settings you edited by hand to the values given on the command line. The
1322
- comment wording comes from `pr-preview-publish.yml`, so regenerate both files
1323
- together.
1662
+ Settings are validated against the theme before anything is written.
1663
+
1664
+ #### Updating generated workflows
1665
+
1666
+ Workflows keep the fxcss version and templates they were generated with. A
1667
+ repository set up with fxcss 0.24 or earlier therefore has none of the settings
1668
+ above, none of the [surfaces outside the window](#surfaces-outside-the-window)
1669
+ and no grouping in its comment until it regenerates them. Upgrade fxcss first,
1670
+ because generation pins the installed version, then run:
1671
+
1672
+ ```bash
1673
+ fxcss init --force --watch --showcase --previews --oldest-firefox 140
1674
+ ```
1675
+
1676
+ `--force` replaces only the workflows the command asks for, so name each one
1677
+ you use. A workflow left out keeps its old fxcss pin and template, along with
1678
+ its own copy of `FXCSS_OLDEST_FIREFOX`. Every setting you do not pass returns
1679
+ to its default, including values you edited in the file by hand, so repeat them
1680
+ on the command line.
1681
+
1682
+ The comment wording comes from `pr-preview-publish.yml`, and the publisher
1683
+ always runs from the default branch, so merge the regenerated files there
1684
+ before expecting the new comment.
1324
1685
 
1325
1686
  ### Watching Firefox for breakage
1326
1687
 
@@ -1364,7 +1725,7 @@ text.
1364
1725
  For a custom workflow, the core capture-and-compare steps are:
1365
1726
 
1366
1727
  ```yaml
1367
- - run: pip install "fxcss[images]==0.24.0"
1728
+ - run: pip install "fxcss[images]==0.26.0"
1368
1729
  - run: fxcss shot --theme base --out shots/base
1369
1730
  - run: fxcss shot --theme head --out shots/head
1370
1731
  - run: fxcss compare --base shots/base --head shots/head --out out/ --platform ${{ runner.os }}
@@ -1481,16 +1842,17 @@ fxcss doctor
1481
1842
  Reports your Firefox version, whether `userChrome.css` is enabled, whether
1482
1843
  context menus are themeable on your platform, how many stylesheets your theme
1483
1844
  has — and **every Gecko build installed on the machine**, with versions. Start
1484
- here if something isn't behaving.
1845
+ here if something isn't behaving. Run outside a theme folder, it reports on
1846
+ Firefox alone, so it also works as a first check straight after installing
1847
+ fxcss.
1485
1848
 
1486
1849
  ### Requirements
1487
1850
 
1488
1851
  - Python 3.9+
1489
1852
  - Firefox (any recent release; the toolkit finds it automatically on macOS,
1490
1853
  Windows and Linux, or set `FIREFOX_BIN`)
1491
- - Pillow for `catalogue`, `compare`, `check`, `tweaks` and `upgrade --compare`.
1492
- The `fxcss[images]` extra includes it; add it later with
1493
- `pipx inject fxcss pillow`. Other commands use the Python standard library.
1854
+ - Pillow 10.1 or newer, installed automatically. `catalogue`, `compare`,
1855
+ `check`, `tweaks` and `upgrade --compare` use it.
1494
1856
 
1495
1857
  ### Installation
1496
1858
 
@@ -1498,7 +1860,7 @@ fxcss is [on PyPI](https://pypi.org/project/fxcss/). Install it with **pipx**,
1498
1860
  which gives it its own environment and puts `fxcss` on your PATH:
1499
1861
 
1500
1862
  ```bash
1501
- pipx install "fxcss[images]"
1863
+ pipx install fxcss
1502
1864
  ```
1503
1865
 
1504
1866
  No pipx yet? `brew install pipx` (macOS), `sudo apt install pipx` (Debian and
@@ -1511,18 +1873,52 @@ Ubuntu), or `python3 -m pip install --user pipx` elsewhere.
1511
1873
  > application. pip still works fine *inside a virtual environment*:
1512
1874
  >
1513
1875
  > ```bash
1514
- > python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install "fxcss[images]"
1876
+ > python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install fxcss
1515
1877
  > ```
1516
1878
 
1879
+ On Linux, Pillow comes prebuilt for x86_64 and aarch64, including musl
1880
+ distributions such as Alpine. On other CPUs (32-bit x86, RISC-V, ppc64le,
1881
+ s390x) or glibc older than 2.27, pip compiles it, so install a compiler and the
1882
+ image headers first. On Debian and Ubuntu:
1883
+
1884
+ ```bash
1885
+ sudo apt install gcc libc6-dev python3-dev libjpeg-dev zlib1g-dev libfreetype-dev
1886
+ ```
1887
+
1888
+ If Pillow cannot be built, install fxcss without it in a virtual environment.
1889
+ pipx cannot do this. The image commands will say Pillow is missing, and
1890
+ everything else works:
1891
+
1892
+ ```bash
1893
+ python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install --no-deps fxcss
1894
+ ```
1895
+
1517
1896
  For CI, or anywhere a surprise upgrade would be unwelcome, pin the release —
1518
1897
  the [releases page](https://github.com/AdamXweb/fxcss/releases) has the latest.
1519
1898
  CI runners' Pythons are not externally managed, so plain pip is fine there:
1520
1899
 
1521
1900
  ```bash
1522
- pip install "fxcss[images]==0.24.0"
1901
+ pip install "fxcss[images]==0.26.0"
1523
1902
  ```
1524
1903
 
1525
- Upgrade an existing pipx installation with `pipx upgrade fxcss`.
1904
+ Pinned installs keep the `[images]` extra so the same line also brings in Pillow
1905
+ on older releases. Upgrade an existing pipx installation with
1906
+ `pipx upgrade fxcss`.
1907
+
1908
+ ### Reviewing a baseline after upgrading to 0.27
1909
+
1910
+ Run `fxcss check` with your existing baseline, using the same operating system
1911
+ and Firefox build you used to create it. The first comparison can show an
1912
+ address bar without the automation stripes, a scrollbar that has finished
1913
+ fading, a History sidebar grouped by site, or a disabled Back button in a
1914
+ fresh private window. Selected stylesheets and preferences now also apply to
1915
+ screenshots taken in a separate Firefox session.
1916
+
1917
+ Review the changed images and `capture-coverage.json` before running
1918
+ `fxcss check --update-baseline`. In particular, check the light and dark panel
1919
+ views. On some wide-gamut displays, a strongly coloured toolbar can make the
1920
+ screen check report those views as `unsupported`, even when Firefox is in
1921
+ front. Keep your existing baseline if it contains panel views you still need.
1526
1922
 
1527
1923
  ### Upgrading to 0.22
1528
1924
 
@@ -1664,7 +2060,7 @@ To work on fxcss itself, clone and install it in an editable environment:
1664
2060
 
1665
2061
  ```bash
1666
2062
  git clone https://github.com/AdamXweb/fxcss.git
1667
- cd fxcss && python3 -m pip install -e ".[images]"
2063
+ cd fxcss && python3 -m pip install -e .
1668
2064
  ```
1669
2065
 
1670
2066
  And if you would rather install nothing at all, the repo runs as-is:
@@ -1675,13 +2071,20 @@ python3 -m fxcss <command>
1675
2071
 
1676
2072
  ### Testing fxcss itself
1677
2073
 
1678
- The toolkit's own CI runs unit tests on Python 3.9, 3.12 and 3.14. Profile
2074
+ The toolkit's own CI runs the unit tests on Python 3.9, 3.12 and 3.14 on
2075
+ Linux, and the whole suite again on macOS and Windows, so profile
1679
2076
  installation, upgrade, rollback, removal and failure recovery are checked on
1680
- macOS, Windows and Linux, including edited files and paths with spaces and
1681
- non-ASCII characters. Real Firefox checks cover Stable on all three platforms
2077
+ all three, including edited files and paths with spaces and non-ASCII
2078
+ characters. Real Firefox checks cover Stable on all three platforms
1682
2079
  and ESR on Linux, repeated capture consistency, deliberate CSS changes,
1683
2080
  nested imports, content stylesheets and stacked optional stylesheets.
1684
2081
 
2082
+ A Linux/Python 3.12 job also runs the suite with the minimum supported Pillow,
2083
+ 10.1.0. Capture determinism compares all three pairs from one `check` and two
2084
+ `shot` runs, prints raw changed-pixel counts, and retains original screenshots
2085
+ when a job fails. The scheduled compatibility jobs run the same real-change
2086
+ and state-specific capture assertions on Stable, ESR, Beta and Nightly.
2087
+
1685
2088
  A separate compatibility workflow checks Stable, ESR, Beta and Nightly on Linux
1686
2089
  every Monday and Thursday, or on demand. Failed audits, incomplete captures and
1687
2090
  rendering differences fail the run; reports and screenshots are retained as
@@ -1691,16 +2094,17 @@ and enable **compatibility** to include all four channels. Normal PR CI runs
1691
2094
  Stable and ESR; the additional channels are optional for manual runs.
1692
2095
 
1693
2096
  Package publishing is gated on CI and checks of the exact wheel and source
1694
- archive being published. Clean environments outside the checkout test the
1695
- base install, optional image dependencies, generated workflows and profile
1696
- compatibility with the latest released fxcss. Package checks run on all three
1697
- operating systems with Python 3.9 and 3.14; the release tag must also match the
2097
+ archive being published. Clean environments outside the checkout test an
2098
+ install without dependencies, a normal install with Pillow, generated workflows
2099
+ and profile compatibility with the latest released fxcss. Package checks run on
2100
+ all three operating systems with Python 3.9 and 3.14; the release tag must also match the
1698
2101
  built package version. These are fxcss's own checks; `init` generates the theme
1699
2102
  repository workflows described above.
1700
2103
 
1701
2104
  Run the checks locally with:
1702
2105
 
1703
2106
  ```bash
2107
+ python3 -m pip install -e . # includes Pillow, which the unit tests need
1704
2108
  python3 -m unittest discover -s tests -v
1705
2109
  python3 -m tests.smoke_themes # requires Firefox and a display
1706
2110
  python3 -m tests.smoke_variants # requires Firefox and a display
@@ -1709,6 +2113,46 @@ python3 -m build
1709
2113
  python3 scripts/package_smoke.py --dist dist # downloads the released package and image dependencies
1710
2114
  ```
1711
2115
 
2116
+ The unit tests cover `compare`, `catalogue` and the other image commands, so
2117
+ they need Pillow: without the install above, the image tests error instead of
2118
+ being skipped. If `pip install` refuses with `externally-managed-environment`,
2119
+ create a virtual environment first (`python3 -m venv .venv && . .venv/bin/activate`). The publisher
2120
+ workflow tests also use Node and bash when they are installed, and skip
2121
+ otherwise. Offline release orchestration tests execute the workflow scripts
2122
+ with stubbed pip, sleep and gh commands to check tag validation, the PyPI
2123
+ installability retry gate and website dispatch without network access. They
2124
+ also check that publication still requires CI and the built-distribution checks,
2125
+ and run the release rules, tagging and the pin update against local Git
2126
+ repositories.
2127
+
2128
+ ### Releasing fxcss
2129
+
2130
+ A release is one pull request. Title it **Prepare vX.Y.Z** and change
2131
+ `__version__` in `fxcss/__init__.py` to X.Y.Z. Merging it does the rest:
2132
+
2133
+ 1. **Release** tags the merge commit `vX.Y.Z` and starts **Publish** on that tag.
2134
+ 2. **Publish** runs CI, checks the built packages, uploads them to PyPI and
2135
+ waits until pip can install the new version.
2136
+ 3. Publish then moves the README's `fxcss==` pins to the new version, refreshes
2137
+ fxcss.com and creates the GitHub release with generated notes. You can edit
2138
+ the notes afterwards.
2139
+
2140
+ Only a release pull request may change `__version__`. The **Release version**
2141
+ check fails any other pull request that does, and Release won't tag a version
2142
+ that didn't come from one. While features land, leave the version at the
2143
+ latest release and write "X.Y.Z or later" in the README where a feature needs
2144
+ the next one.
2145
+
2146
+ To release the version that is already on main, run Release by hand:
2147
+
2148
+ ```bash
2149
+ gh workflow run release.yml --ref main
2150
+ ```
2151
+
2152
+ If Publish fails, re-run it from the Actions tab. If the fix needs a code
2153
+ change, merge the fix, delete the tag with `git push origin :refs/tags/vX.Y.Z`,
2154
+ then run Release by hand.
2155
+
1712
2156
  ## How this was built
1713
2157
 
1714
2158
  fxcss was written with the assistance of **Claude** (Anthropic's Claude Opus 5),