fxcss 0.24.0__tar.gz → 0.26.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.
- {fxcss-0.24.0 → fxcss-0.26.0}/PKG-INFO +741 -147
- {fxcss-0.24.0 → fxcss-0.26.0}/README.md +739 -145
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/__init__.py +1 -1
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/adopt.py +8 -1
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/audit.py +494 -225
- fxcss-0.26.0/fxcss/capture.py +258 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/catalogue.py +30 -12
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/check.py +62 -10
- fxcss-0.26.0/fxcss/checklist.py +354 -0
- fxcss-0.26.0/fxcss/cli.py +3638 -0
- fxcss-0.26.0/fxcss/compare.py +682 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/complete.py +2 -1
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/core.py +833 -83
- fxcss-0.26.0/fxcss/fetch.py +949 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/install.py +670 -75
- fxcss-0.26.0/fxcss/inventory.py +478 -0
- fxcss-0.26.0/fxcss/layout.py +768 -0
- fxcss-0.26.0/fxcss/omni.py +275 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/probe.py +1 -1
- fxcss-0.26.0/fxcss/prompt.py +348 -0
- fxcss-0.26.0/fxcss/scaffold.py +334 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/sheets.py +65 -6
- fxcss-0.26.0/fxcss/style.py +582 -0
- fxcss-0.26.0/fxcss/support.py +584 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/firefox-watch.yml +23 -0
- fxcss-0.26.0/fxcss/templates/pr-preview-publish.yml +669 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/pr-preview.yml +58 -5
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/readme-previews.yml +2 -3
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/showcase.yml +9 -5
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/tweaks.py +14 -5
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/PKG-INFO +741 -147
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/SOURCES.txt +30 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/pyproject.toml +7 -4
- fxcss-0.26.0/tests/test_audit_sheets_regressions.py +140 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/tests/test_capture_coverage.py +49 -0
- fxcss-0.26.0/tests/test_capture_names.py +249 -0
- fxcss-0.26.0/tests/test_capture_state_checks.py +325 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/tests/test_checks.py +201 -12
- fxcss-0.26.0/tests/test_compare_resolution.py +238 -0
- fxcss-0.26.0/tests/test_connection_lifecycle.py +201 -0
- fxcss-0.26.0/tests/test_data_safety.py +612 -0
- fxcss-0.26.0/tests/test_dialog_capture.py +124 -0
- fxcss-0.26.0/tests/test_discovery_tweaks_catalogue_regressions.py +156 -0
- fxcss-0.26.0/tests/test_flag_columns.py +127 -0
- fxcss-0.26.0/tests/test_install_fidelity.py +379 -0
- fxcss-0.26.0/tests/test_inventory.py +217 -0
- fxcss-0.26.0/tests/test_layout.py +250 -0
- fxcss-0.26.0/tests/test_maintenance_cli.py +498 -0
- fxcss-0.26.0/tests/test_maintenance_preservation.py +254 -0
- fxcss-0.26.0/tests/test_prompt.py +413 -0
- fxcss-0.26.0/tests/test_release_orchestration.py +516 -0
- fxcss-0.26.0/tests/test_review_maintenance.py +280 -0
- fxcss-0.26.0/tests/test_sheet_groups.py +195 -0
- fxcss-0.26.0/tests/test_smoke_regressions.py +287 -0
- fxcss-0.26.0/tests/test_support.py +278 -0
- fxcss-0.26.0/tests/test_support_scaffold_regressions.py +98 -0
- fxcss-0.26.0/tests/test_terminal_style.py +203 -0
- fxcss-0.26.0/tests/test_threshold_and_variant_migration.py +151 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/tests/test_units.py +531 -51
- fxcss-0.26.0/tests/test_welcome_context.py +303 -0
- fxcss-0.26.0/tests/test_workflows.py +702 -0
- fxcss-0.24.0/fxcss/capture.py +0 -82
- fxcss-0.24.0/fxcss/cli.py +0 -2259
- fxcss-0.24.0/fxcss/compare.py +0 -277
- fxcss-0.24.0/fxcss/fetch.py +0 -524
- fxcss-0.24.0/fxcss/omni.py +0 -148
- fxcss-0.24.0/fxcss/scaffold.py +0 -192
- fxcss-0.24.0/fxcss/templates/pr-preview-publish.yml +0 -372
- fxcss-0.24.0/tests/test_workflows.py +0 -291
- {fxcss-0.24.0 → fxcss-0.26.0}/LICENSE +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/__main__.py +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/pr-preview-cleanup.yml +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/starter/chrome/userChrome.css +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss/templates/starter/custom/accent-red.css +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/dependency_links.txt +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/entry_points.txt +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/requires.txt +1 -1
- {fxcss-0.24.0 → fxcss-0.26.0}/fxcss.egg-info/top_level.txt +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/setup.cfg +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/tests/test_patch_duplicates.py +0 -0
- {fxcss-0.24.0 → fxcss-0.26.0}/tests/test_profile_safety.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fxcss
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.26.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
|
|
42
|
-
profile:
|
|
41
|
+
Linux. Install fxcss, then try a theme in a disposable profile:
|
|
43
42
|
|
|
44
43
|
```bash
|
|
45
|
-
pipx install
|
|
44
|
+
pipx install fxcss
|
|
46
45
|
fxcss try AdamXweb/WhiteSurFirefoxThemeMacOS
|
|
47
46
|
```
|
|
48
47
|
|
|
@@ -108,40 +107,100 @@ is never touched — close the window and nothing remains.
|
|
|
108
107
|
It reports what it found before doing anything:
|
|
109
108
|
|
|
110
109
|
```
|
|
111
|
-
|
|
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 …
|
|
110
|
+
fxcss try AdamXweb/WhiteSurFirefoxThemeMacOS
|
|
115
111
|
|
|
116
|
-
|
|
117
|
-
|
|
112
|
+
AdamXweb/WhiteSurFirefoxThemeMacOS ★619 MIT
|
|
113
|
+
MacOS Big Sur like theme for Firefox on MacOS & Windows. Make your Firefox look like Safari.
|
|
114
|
+
latest release v2.1.0 (2026-10-28)
|
|
115
|
+
latest commit 68f8699 (2026-11-10) fix: align the toolbar and close the tab bar gap …
|
|
118
116
|
|
|
119
|
-
|
|
120
|
-
it installs the files itself, which is all those scripts do.
|
|
117
|
+
fetching release v2.1.0 …
|
|
121
118
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
119
|
+
layout chrome/ at the repository root 72 stylesheets, 377 KB
|
|
120
|
+
loads 35 stylesheets 29 browser-window, 2 web-content, 4 shared
|
|
121
|
+
user hook customChrome.css not shipped, as intended
|
|
122
|
+
installer install.sh fxcss copies the files itself and never runs it
|
|
123
|
+
|
|
124
|
+
Optional stylesheets 30 · layer any on with --with name,name
|
|
125
|
+
Tweaks
|
|
126
|
+
compact-tabs hideextension increase-contrast singletabhidden tabs-swapclose
|
|
127
|
+
enabletabview highlight-tab noidentity standard-urlbar windows-swapclose
|
|
128
|
+
|
|
129
|
+
Colour schemes · pick one
|
|
130
|
+
theme-ayu-mirage theme-github-dark theme-nord
|
|
131
|
+
theme-catppuccin-frappe theme-gruvbox-dark theme-one-dark
|
|
125
132
|
…
|
|
126
133
|
|
|
127
|
-
|
|
128
|
-
|
|
134
|
+
Setup beyond the files 1 automatic · 3 to check
|
|
135
|
+
✓ automatic 3 prefs in configuration/user.js in fxcss's own block
|
|
136
|
+
! check Firefox's native vertical tabs
|
|
137
|
+
a setting in Firefox's own sidebar options
|
|
138
|
+
…
|
|
139
|
+
|
|
140
|
+
README install flags as the README words them, for its own script; fxcss never runs it
|
|
141
|
+
-c Left hand side tab close button -v Re-enables the tabview button
|
|
142
|
+
-p Makes tabs height compact like… -t <name> Colour theme (see Colour themes below)
|
|
143
|
+
…
|
|
129
144
|
```
|
|
130
145
|
|
|
131
146
|
Releases are preferred over branch tips, since that is what the author blessed;
|
|
132
147
|
`--commit` takes the latest commit instead, and `--ref` takes any tag, branch or
|
|
133
|
-
SHA.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
148
|
+
SHA. A browser URL for a branch or folder
|
|
149
|
+
(`https://github.com/owner/theme/tree/photon-style/themes/one`) is read as
|
|
150
|
+
meaning that branch and that folder, and the branch is then *tracked* rather
|
|
151
|
+
than pinned. `--with name,name` layers on the theme's optional stylesheets so
|
|
152
|
+
you can see a variant without hunting through install flags. `--shot dir`
|
|
153
|
+
captures the standard screenshots instead of opening a window, and `--keep dir`
|
|
154
|
+
leaves the download behind so you can start editing it with `watch`.
|
|
155
|
+
|
|
156
|
+
#### How the theme is found
|
|
157
|
+
|
|
158
|
+
Theme repositories are laid out in more ways than `chrome/userChrome.css`.
|
|
159
|
+
`try`, `install` and `upgrade` share one *plan* for reading a source tree, and
|
|
160
|
+
say which layout they found:
|
|
161
|
+
|
|
162
|
+
| Layout | Example | What happens |
|
|
163
|
+
| --- | --- | --- |
|
|
164
|
+
| `chrome/userChrome.css` at the root | WhiteSur Safari, ShyFox | Used where it is. |
|
|
165
|
+
| `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. |
|
|
166
|
+
| Only `userContent.css` | GlassyFox | Installed as a content-only theme; the browser window is left alone. |
|
|
167
|
+
| One theme in a subfolder | `firefox/chrome/…`, `NewFox/profile/chrome/…` | Found, and the folder recorded so upgrades read the same place. |
|
|
168
|
+
| 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. |
|
|
169
|
+
| `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. |
|
|
170
|
+
| 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. |
|
|
171
|
+
| 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. |
|
|
172
|
+
|
|
173
|
+
The planner never selects a directory outside the download, and nothing from
|
|
174
|
+
the download is executed: a theme whose entry sheet imports files the source
|
|
175
|
+
does not contain (Material Fox's uncompiled `user-chrome.css`) is reported as
|
|
176
|
+
needing a build rather than installed half-empty. `install` stops there unless
|
|
177
|
+
`--force`; `try` only warns.
|
|
178
|
+
|
|
179
|
+
`try --info` ends with a **setup checklist**: what the theme needs beyond its
|
|
180
|
+
files, read from the files it ships and its README — preference files outside
|
|
181
|
+
`configuration/user.js` (with their pref names), `.uc.js` scripts that need a
|
|
182
|
+
userChrome.js loader, extension settings to import, fonts, forks and platform
|
|
183
|
+
effects. Each item is *required*, *optional* or *unknown*, with the evidence.
|
|
184
|
+
Nothing on it is applied automatically; see `install --prefs` below.
|
|
185
|
+
|
|
186
|
+
#### Private repositories, other hosts and local folders
|
|
139
187
|
|
|
140
188
|
A private repository looks exactly like a missing one to anyone who cannot read
|
|
141
189
|
it. fxcss sends `GITHUB_TOKEN` or `GH_TOKEN` when either is set; otherwise, if a
|
|
142
|
-
repository is not publicly visible
|
|
143
|
-
(`gh auth token`) and tries again.
|
|
144
|
-
|
|
190
|
+
repository is not publicly visible or an anonymous request hits GitHub's rate
|
|
191
|
+
limit, it asks the GitHub CLI for its login (`gh auth token`) and tries again.
|
|
192
|
+
So after `gh auth login`, private themes your account can read work like public
|
|
193
|
+
ones and a signed-in person is never told to sign in. The token is only ever
|
|
194
|
+
sent to GitHub's own hosts — never to another host, and never across a redirect
|
|
195
|
+
that leaves GitHub — and never appears in a message.
|
|
196
|
+
|
|
197
|
+
Themes on **Codeberg**, **git.gay** (and other Forgejo instances listed in
|
|
198
|
+
`fetch.HOSTS`) and **GitLab** can be tried, installed and upgraded from their
|
|
199
|
+
URLs; their public APIs answer the same questions. `adopt` compares against
|
|
200
|
+
GitHub's tree API and says so when it meets another host. A repository that
|
|
201
|
+
has **moved** on GitHub resolves to its new owner/name, is downloaded from
|
|
202
|
+
there (the old name still answers on the API but not on the download host) and
|
|
203
|
+
is recorded under the new name.
|
|
145
204
|
|
|
146
205
|
A theme that is not on GitHub, or not pushed yet, can be tried from its folder:
|
|
147
206
|
`fxcss try ~/src/my-theme`. The folder is read where it is and never modified;
|
|
@@ -181,6 +240,8 @@ profile.
|
|
|
181
240
|
fxcss install owner/theme # into your default profile
|
|
182
241
|
fxcss install owner/theme --with compact-tabs # optional sheets, permanently
|
|
183
242
|
fxcss install ~/src/my-theme # a local checkout works too
|
|
243
|
+
fxcss install owner/theme --subpath 2.WithTST # one of several editions
|
|
244
|
+
fxcss install owner/theme --prefs user.js # also a shipped preference file
|
|
184
245
|
fxcss install --list-profiles # see what it found first
|
|
185
246
|
```
|
|
186
247
|
|
|
@@ -213,27 +274,67 @@ list of hashed directory names — and installing into the wrong one looks
|
|
|
213
274
|
exactly like the theme not working:
|
|
214
275
|
|
|
215
276
|
```
|
|
216
|
-
|
|
217
|
-
1. default-release
|
|
218
|
-
|
|
219
|
-
|
|
277
|
+
Which profile? 3 found in ~/Library/Application Support/Firefox/Profiles
|
|
278
|
+
› 1. default-release Release 8f2b1a.default-release (Enter)
|
|
279
|
+
2. dev-edition-default Developer Edition c41d9e.dev-edition-default
|
|
280
|
+
3. work unrecognised 7ab3.work
|
|
281
|
+
|
|
282
|
+
Which one? ↑↓ or 1-3 [1]
|
|
220
283
|
```
|
|
221
284
|
|
|
222
285
|
The label comes from the directory suffix Firefox itself assigns, so a profile
|
|
223
|
-
you named yourself reads `
|
|
286
|
+
you named yourself reads `unrecognised` rather than being guessed at.
|
|
224
287
|
|
|
225
288
|
Run it without `--with` and it offers the theme's optional stylesheets rather
|
|
226
289
|
than leaving you to find them in the repository:
|
|
227
290
|
|
|
228
291
|
```
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
292
|
+
Optional stylesheets 30 · pick any
|
|
293
|
+
Tweaks
|
|
294
|
+
1✓ compact-tabs 5. increase-contrast 9. tabs-swapclose
|
|
295
|
+
2. enabletabview 6. noidentity 10. windows-swapclose
|
|
296
|
+
…
|
|
297
|
+
|
|
298
|
+
Colour schemes · pick one
|
|
299
|
+
11. theme-ayu-mirage 21. theme-material-ocean
|
|
232
300
|
…
|
|
233
|
-
|
|
234
|
-
|
|
301
|
+
15. theme-catppuccin-mocha › 25✓ theme-nord
|
|
302
|
+
…
|
|
303
|
+
|
|
304
|
+
Include which? ↑↓←→ and space to tick, or e.g. 1,3 or all [1,25]
|
|
235
305
|
```
|
|
236
306
|
|
|
307
|
+
When a theme ships both, colour schemes (named `theme-…`, or after a palette
|
|
308
|
+
such as `nord` or `catppuccin-mocha`) are listed apart from the tweaks; any
|
|
309
|
+
other theme gets one list. The grouping is only how the menu reads: the
|
|
310
|
+
sheets are numbered straight through, and what you pick is imported in the
|
|
311
|
+
theme's own order. "Pick one" appears when every pair of the theme's colour
|
|
312
|
+
schemes clashes in the way described below, so installing any two of them
|
|
313
|
+
would be refused. Pick two anyway and the menu asks which one to keep:
|
|
314
|
+
|
|
315
|
+
```
|
|
316
|
+
Keep which colour scheme? both set the same 110 colours; only one can take effect
|
|
317
|
+
1. theme-catppuccin-mocha ██ #11111b ██ #cdd6f4 ██ #cba6f7 ██ #6c7086
|
|
318
|
+
› 2. theme-nord ██ #242933 ██ #eceff4 ██ #88c0d0 ██ #5e81ac (Enter)
|
|
319
|
+
|
|
320
|
+
Which one? ↑↓ or 1-2 [2]
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
Each row shows the colours that sheet would set, most-used first, as a
|
|
324
|
+
swatch in that colour and its hex code (just the hex code where the terminal
|
|
325
|
+
cannot show the colour). Enter keeps the one that loads last, which is the one
|
|
326
|
+
that would have won anyway.
|
|
327
|
+
|
|
328
|
+
Every numbered question answers to the keyboard at a terminal. ↑ and ↓ move
|
|
329
|
+
the `›` (← and → cross columns), Space ticks a stylesheet, Enter takes the
|
|
330
|
+
answer and Esc stops. Typing the number works as it always has, and moves the
|
|
331
|
+
pointer as you type. Through a pipe, in CI, with `TERM=dumb` or in a terminal
|
|
332
|
+
narrower than 60 columns, the question is a plain typed prompt; set
|
|
333
|
+
`FXCSS_PLAIN_PROMPTS=1` to keep it that way everywhere, for example for a
|
|
334
|
+
screen reader that copes badly with lines redrawn in place. Each question
|
|
335
|
+
ends by naming the option that skips it next time (`--profile`, `--with`,
|
|
336
|
+
`--firefox`, `--subpath`, `--ref` or `--commit`).
|
|
337
|
+
|
|
237
338
|
#### Options that cancel each other out
|
|
238
339
|
|
|
239
340
|
Some of a theme's optional sheets are alternatives rather than additions.
|
|
@@ -283,10 +384,11 @@ looking for, and equally the branch can be mid-rewrite, so neither is right to
|
|
|
283
384
|
assume:
|
|
284
385
|
|
|
285
386
|
```
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
387
|
+
Which version? the default branch has moved on since the latest release
|
|
388
|
+
1. release v2.0 2025-01-03 what the author last published (Enter)
|
|
389
|
+
2. latest commit on master 2026-08-14 newer than the release — fix tab colours
|
|
390
|
+
|
|
391
|
+
Which one? 1-2 [1]
|
|
290
392
|
```
|
|
291
393
|
|
|
292
394
|
Scripts and CI never see any of these prompts: without a terminal the release
|
|
@@ -297,13 +399,42 @@ The install is what a theme's install script does, done carefully:
|
|
|
297
399
|
- the complete replacement is prepared before your existing `chrome/` moves
|
|
298
400
|
to a timestamped `chrome.backup-*` sibling; a failed swap restores it;
|
|
299
401
|
- 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;
|
|
402
|
+
them, or load after the base theme through an import-only wrapper; the
|
|
403
|
+
local files each sheet refers to (nested `@import`s, images, fonts) come
|
|
404
|
+
along to the same relative place, so it looks as it did in `fxcss try`.
|
|
405
|
+
Files outside the theme, or where the theme already installed a different
|
|
406
|
+
file, are not copied, and the install says so;
|
|
301
407
|
- `toolkit.legacyUserProfileCustomizations.stylesheets` is enabled in
|
|
302
408
|
`user.js` — inside a clearly marked block, so it can be removed cleanly —
|
|
303
|
-
together with any `configuration/user.js` the theme ships
|
|
409
|
+
together with any `configuration/user.js` the theme ships, whose pref names
|
|
410
|
+
are listed before you confirm. Everything outside the block is kept byte
|
|
411
|
+
for byte;
|
|
412
|
+
- shipped preference files elsewhere (a root `user.js`, `config/user.js`,
|
|
413
|
+
`prefs/recommended.js`) appear on the setup checklist with their pref
|
|
414
|
+
names and are **not** applied unless you say `--prefs user.js`; then they
|
|
415
|
+
join the same removable block, as written, and upgrades carry the choice
|
|
416
|
+
forward (stopping if the file disappears upstream). Nothing is ever applied
|
|
417
|
+
from README prose or from `-moz-pref()` toggles in the CSS;
|
|
304
418
|
- a manifest (`chrome/fxcss-install.json`) records every file written, its
|
|
305
|
-
sha256,
|
|
306
|
-
|
|
419
|
+
sha256, where the theme came from — which host, repo and ref, whether that
|
|
420
|
+
ref was a release or a branch, and the full commit a branch pointed at —
|
|
421
|
+
plus the layout selected, the preference files applied and each optional
|
|
422
|
+
sheet's path in the repository.
|
|
423
|
+
|
|
424
|
+
When several options have the same name, select their repository paths, for
|
|
425
|
+
example `--with custom/tabs.css,optional/tabs.css`. Each retains its identity
|
|
426
|
+
through upgrades. Options loaded after the base get separate dependency trees
|
|
427
|
+
when combined. If two selected files need the same native import slot, or
|
|
428
|
+
would overwrite different contents already there, installation refuses before
|
|
429
|
+
changing the profile, including with `--force`.
|
|
430
|
+
|
|
431
|
+
Tracked branches are downloaded at the resolved commit SHA, and adoption
|
|
432
|
+
compares that exact tree. If the full SHA cannot be read, fxcss stops instead
|
|
433
|
+
of recording a branch name as a known revision.
|
|
434
|
+
|
|
435
|
+
Installing over a profile fxcss already manages keeps the files you added
|
|
436
|
+
there active (see [upgrade](#fxcss-upgrade)); installing over a `chrome/`
|
|
437
|
+
folder fxcss did not write moves it aside whole, as the origin backup.
|
|
307
438
|
|
|
308
439
|
Restart Firefox after installation; it reads `userChrome.css` at startup.
|
|
309
440
|
See [uninstall](#fxcss-uninstall) to remove a theme later.
|
|
@@ -330,17 +461,30 @@ guess — it is the same bytes:
|
|
|
330
461
|
```console
|
|
331
462
|
$ fxcss adopt AdamXweb/WhiteSurFirefoxThemeMacOS
|
|
332
463
|
|
|
333
|
-
|
|
464
|
+
fxcss adopt default-release
|
|
334
465
|
|
|
335
|
-
|
|
466
|
+
profile default-release
|
|
467
|
+
~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
|
|
468
|
+
|
|
469
|
+
comparing 148 files against AdamXweb/WhiteSurFirefoxThemeMacOS …
|
|
336
470
|
v2.0.0: 129/135 files match, 6 edited, 7 added
|
|
337
471
|
v1.6.3: 114/132 files match, 18 edited, 10 added
|
|
338
472
|
|
|
339
473
|
best match: v2.0.0: 129/135 files match, 6 edited, 7 added
|
|
340
474
|
Recorded as that version plus local differences, so an upgrade knows
|
|
341
475
|
not to overwrite them without being told.
|
|
476
|
+
|
|
477
|
+
backup the theme as it is now, kept as chrome.backup-20260817014143
|
|
478
|
+
yours 7 files that version does not ship, kept as your own across upgrades
|
|
479
|
+
|
|
480
|
+
✓ Recorded 135 files as AdamXweb/WhiteSurFirefoxThemeMacOS@v2.0.0
|
|
481
|
+
fxcss upgrade can now update it, and fxcss uninstall puts this back.
|
|
342
482
|
```
|
|
343
483
|
|
|
484
|
+
Files in `chrome/` that the matched version does not contain are recorded as
|
|
485
|
+
yours, not the theme's: upgrades carry them across and `uninstall` leaves them
|
|
486
|
+
where they are.
|
|
487
|
+
|
|
344
488
|
Comparison uses GitHub's git-tree API rather than downloading anything, so
|
|
345
489
|
checking ten versions costs ten small requests instead of ten archives — and
|
|
346
490
|
archives are the first thing GitHub rate-limits.
|
|
@@ -349,7 +493,15 @@ Naming the repository is usually necessary. `adopt` checks `chrome/` for a git
|
|
|
349
493
|
remote (definitive — someone cloned it there) and for GitHub URLs in the
|
|
350
494
|
theme's own files (a hint worth confirming), but plenty of themes leave no
|
|
351
495
|
trace at all once installed: WhiteSur's `chrome/` contains no URL anywhere.
|
|
352
|
-
That is normal, not a failure, and the message says so.
|
|
496
|
+
That is normal, not a failure, and the message says so. A repository that was
|
|
497
|
+
only *mentioned* — a credit, a palette, an upstream — is recorded only when at
|
|
498
|
+
least half of a version's files match; otherwise `adopt` refuses and asks you
|
|
499
|
+
to name the repository yourself, because recording the wrong project hands
|
|
500
|
+
every later upgrade to it.
|
|
501
|
+
|
|
502
|
+
A match against a branch records the commit the branch pointed at, not its
|
|
503
|
+
name, so `upgrade --check` straight after adopting an exact branch tip says
|
|
504
|
+
"up to date" instead of announcing the same commit as an update.
|
|
353
505
|
|
|
354
506
|
**Nothing is installed or replaced.** The `chrome/` already there is *copied*
|
|
355
507
|
to a `chrome.backup-*` and then described, so `uninstall` has somewhere to put
|
|
@@ -385,22 +537,23 @@ names:
|
|
|
385
537
|
```console
|
|
386
538
|
$ fxcss profiles --check
|
|
387
539
|
|
|
388
|
-
|
|
540
|
+
fxcss profiles
|
|
389
541
|
|
|
390
|
-
|
|
391
|
-
|
|
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
|
|
542
|
+
Firefox profiles
|
|
543
|
+
2 in ~/Library/Application Support/Firefox/Profiles
|
|
397
544
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
545
|
+
● default-release Release 8f2h1kqp.default-release
|
|
546
|
+
theme AdamXweb/WhiteSurFirefoxThemeMacOS @ v2.0.0
|
|
547
|
+
installed 2026-08-14 09:12 tracking the release
|
|
548
|
+
sheets theme-nord
|
|
549
|
+
files 145 ! 1 edited since install, 1 added by hand
|
|
550
|
+
update v2.1.0 available 2026-10-28
|
|
402
551
|
|
|
403
|
-
|
|
552
|
+
dev-edition-default Developer Edition p93kd0zx.dev-edition-default
|
|
553
|
+
theme ! installed by hand chrome/ holds 41 files
|
|
554
|
+
fxcss adopt takes it over; fxcss install would replace it, backing it up first
|
|
555
|
+
|
|
556
|
+
● opens by default: the profile Firefox opens on its own
|
|
404
557
|
```
|
|
405
558
|
|
|
406
559
|
Three states, kept distinct on purpose: a profile fxcss installed into and can
|
|
@@ -409,12 +562,15 @@ profile with no theme at all. Only the first can be described in detail; for
|
|
|
409
562
|
the second, all fxcss honestly knows is that files are there and that
|
|
410
563
|
installing would move them aside.
|
|
411
564
|
|
|
412
|
-
`--check` asks
|
|
565
|
+
`--check` asks the host once per theme, not once per profile, and compares like
|
|
413
566
|
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
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
567
|
+
tracking a branch against the commit that branch points at now (a branch other
|
|
568
|
+
than the default is looked up by name). An install pinned with `--ref` reports
|
|
569
|
+
as pinned rather than as behind. A release-tracked install that is current
|
|
570
|
+
while the default branch has moved on says both — and stays on releases;
|
|
571
|
+
`upgrade --commit` is the way to follow the branch instead. Where the manifest
|
|
572
|
+
predates fxcss recording which of those applied, it says so instead of
|
|
573
|
+
guessing — "up to date" is never printed unless it was actually checked.
|
|
418
574
|
|
|
419
575
|
The same reservation covers local edits: installs from before 0.16 recorded no
|
|
420
576
|
file hashes, so `fxcss profiles` reports them as *not checked for edits*
|
|
@@ -436,15 +592,27 @@ fxcss rollback # …and back again
|
|
|
436
592
|
tag, one that followed a branch moves to that branch's current commit, and one
|
|
437
593
|
pinned with `--ref` does not move at all unless you say so.
|
|
438
594
|
|
|
439
|
-
It stops rather than surprise you, in
|
|
595
|
+
It stops rather than surprise you, in four places:
|
|
440
596
|
|
|
441
597
|
- **Files you edited yourself.** Every install records a sha256 per file, so
|
|
442
598
|
an upgrade knows which ones you have since changed and refuses to write over
|
|
443
|
-
them until `--force`.
|
|
599
|
+
them until `--force`.
|
|
600
|
+
- **Files you added.** A stylesheet you dropped into `chrome/` — imported
|
|
601
|
+
from `customChrome.css`, say — is carried into the new tree so it stays
|
|
602
|
+
*active*, not merely kept in the backup where it would stop applying.
|
|
603
|
+
`customChrome.css` itself counts as yours once you have written in it, even
|
|
604
|
+
though fxcss created the empty file. The
|
|
605
|
+
manifest lists them under `user_files`. If the new version ships a file at
|
|
606
|
+
the same path with different contents, that is a collision: the upgrade
|
|
607
|
+
stops before anything moves and lists the paths; `--force` installs the
|
|
608
|
+
theme's copies and leaves yours in the backup, recorded as `displaced`.
|
|
444
609
|
- **Options that vanished.** If you installed `--with theme-nord` and the new
|
|
445
610
|
version renamed or dropped that sheet, the `@import` would simply stop
|
|
446
611
|
resolving and the option would turn itself off. `upgrade` names the loss and
|
|
447
|
-
makes you choose instead.
|
|
612
|
+
makes you choose instead. Sheets are matched by their path in the repository
|
|
613
|
+
first, so a sheet that only exists inside `chrome/extras/` survives an
|
|
614
|
+
upgrade as reliably as one in `custom/`. The same goes for preference files
|
|
615
|
+
chosen with `--prefs`.
|
|
448
616
|
- **Selectors the new version needs and your Firefox lacks** — with `--audit`,
|
|
449
617
|
which runs the same check as [`fxcss audit`](#fxcss-audit) against the
|
|
450
618
|
fetched copy *before* anything is installed.
|
|
@@ -455,31 +623,45 @@ a re-fetch of what the manifest says — and diffs them before the confirmation
|
|
|
455
623
|
prompt, printing where the before/after images landed. It completes the three
|
|
456
624
|
questions an upgrade can answer about a theme with no API: do the selectors
|
|
457
625
|
still exist (`--audit`), has the user edited anything (always checked), and
|
|
458
|
-
what actually changes on screen (`--compare`). Needs
|
|
459
|
-
|
|
626
|
+
what actually changes on screen (`--compare`). Needs a local Firefox, like
|
|
627
|
+
`shot`.
|
|
460
628
|
|
|
461
629
|
`--check` changes nothing and answers with its exit code, for cron, launchd or
|
|
462
630
|
CI: **0** up to date, **1** an upgrade is available, **2** it cannot be told
|
|
463
631
|
(no install here, an unreachable repo, or a manifest too old to say what it
|
|
464
|
-
tracked).
|
|
465
|
-
|
|
632
|
+
tracked). For a theme installed from a local folder there is no upstream to
|
|
633
|
+
ask, so the folder's files are compared with what was installed and "up to
|
|
634
|
+
date" includes the managed preference block. Explicit `--prefs` and `--with`
|
|
635
|
+
choices can also change an installation whose remote revision is current;
|
|
636
|
+
`--check` reports whether that proposed setup differs without applying it.
|
|
637
|
+
fxcss deliberately ships no scheduler of its own —
|
|
638
|
+
this is the piece you point yours at.
|
|
639
|
+
|
|
640
|
+
The layout selected at install time (`--subpath`, `--entry`) is recorded and
|
|
641
|
+
reused, so a theme taken from `2.WithTST/` is upgraded from `2.WithTST/` and
|
|
642
|
+
one taken from `src/userChrome-WhiteSur.css` from the same edition.
|
|
466
643
|
|
|
467
644
|
```console
|
|
468
645
|
$ fxcss upgrade
|
|
469
646
|
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
647
|
+
fxcss upgrade default-release
|
|
648
|
+
|
|
649
|
+
profile default-release
|
|
650
|
+
~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
|
|
651
|
+
installed AdamXweb/WhiteSurFirefoxThemeMacOS @ v1.6.3
|
|
652
|
+
upstream v2.0.0 2026-08-16
|
|
473
653
|
|
|
474
654
|
fetching v2.0.0 …
|
|
475
|
-
|
|
655
|
+
layout chrome/ at the repository root 72 stylesheets, 377 KB
|
|
656
|
+
loads 35 stylesheets 29 browser-window, 2 web-content, 4 shared
|
|
657
|
+
sheets keeping theme-nord
|
|
476
658
|
|
|
477
659
|
Upgrade to v2.0.0? [Y/n]
|
|
478
660
|
|
|
479
|
-
|
|
480
|
-
the previous version is kept as chrome.backup-20260817014202
|
|
661
|
+
backup the previous version, kept as chrome.backup-20260817014202
|
|
481
662
|
|
|
482
|
-
|
|
663
|
+
✓ Upgraded to v2.0.0
|
|
664
|
+
Restart Firefox to see it; fxcss rollback puts the previous version back.
|
|
483
665
|
```
|
|
484
666
|
|
|
485
667
|
### fxcss rollback
|
|
@@ -499,12 +681,19 @@ list can show what each one holds:
|
|
|
499
681
|
```console
|
|
500
682
|
$ fxcss rollback --list
|
|
501
683
|
|
|
502
|
-
|
|
684
|
+
fxcss rollback default-release
|
|
503
685
|
|
|
686
|
+
profile default-release
|
|
687
|
+
~/Library/Application Support/Firefox/Profiles/8f2h1kqp.default-release
|
|
688
|
+
installed AdamXweb/WhiteSurFirefoxThemeMacOS @ v2.0.0
|
|
689
|
+
|
|
690
|
+
Backups newest first
|
|
504
691
|
chrome.backup-20260817014202
|
|
505
692
|
AdamXweb/WhiteSurFirefoxThemeMacOS@v1.6.3
|
|
506
|
-
chrome.backup-20260817014143
|
|
693
|
+
chrome.backup-20260817014143 the original
|
|
507
694
|
your own chrome/, from before fxcss
|
|
695
|
+
|
|
696
|
+
fxcss rollback --to <name> restores one of these.
|
|
508
697
|
```
|
|
509
698
|
|
|
510
699
|
`fxcss rollback` restores the most recent, or `--to <name>` any of them.
|
|
@@ -518,7 +707,8 @@ That original is the reason upgrades chain rather than stack blindly. After
|
|
|
518
707
|
five upgrades the newest backup holds *the theme*, not your files, so the
|
|
519
708
|
manifest carries the original's name forward and `fxcss uninstall` still
|
|
520
709
|
restores what you had before you ever ran fxcss. `--keep N` (default 3) prunes
|
|
521
|
-
older backups; the original is never one of them
|
|
710
|
+
older backups; the original is never one of them, and neither is any
|
|
711
|
+
`chrome.backup-*` folder that holds no fxcss install record.
|
|
522
712
|
|
|
523
713
|
### fxcss uninstall
|
|
524
714
|
|
|
@@ -537,6 +727,15 @@ If the profile originally had no `chrome/`, uninstalling after an upgrade
|
|
|
537
727
|
returns it to that state when no files need to be kept. Restart Firefox to see
|
|
538
728
|
the result.
|
|
539
729
|
|
|
730
|
+
A `chrome/` with no manifest in it is yours — what a rollback to the original
|
|
731
|
+
put back, or a theme installed by hand — and `uninstall` leaves it exactly as
|
|
732
|
+
it is, however many backups sit beside it: it removes a leftover fxcss block
|
|
733
|
+
from `user.js` if there is one, lists the backups, and changes nothing else.
|
|
734
|
+
So install → rollback → uninstall ends with your original files in place, and
|
|
735
|
+
running it again does the same. If `chrome/` is absent after an interrupted
|
|
736
|
+
swap or a completed uninstall, `uninstall` leaves that absent state alone too.
|
|
737
|
+
Use `fxcss rollback --to <backup-name>` explicitly to restore a backup.
|
|
738
|
+
|
|
540
739
|
## Building and inspecting themes
|
|
541
740
|
|
|
542
741
|
Work on Firefox's tabs, toolbars and other browser UI with a live preview.
|
|
@@ -736,7 +935,9 @@ operating systems separate. `--firefox beta` overrides the list for one run.
|
|
|
736
935
|
| --- | --- |
|
|
737
936
|
| `strict` / `--strict` | Fail on actionable selector findings; `--no-strict` makes them advisory. |
|
|
738
937
|
| `strict_vars` / `--strict-vars` | Also fail on dead custom properties; deliberate `fxcss-keep` overrides remain exempt. |
|
|
739
|
-
| `max_changed_percent` / `--max-changed-percent` | Fail when any view exceeds this percentage, or a new view has no baseline. Set the saved value to `null` for advisory pixel differences. Missing baseline views always need attention. |
|
|
938
|
+
| `max_changed_percent` / `--max-changed-percent` | Fail when any view exceeds this percentage, or a new view has no baseline. Set the saved value to `null` for advisory pixel differences. Missing baseline views always need attention. Standard views a newer fxcss captures that an older baseline lacks are listed as not compared, never failed; `--update-baseline` adds them. |
|
|
939
|
+
| `min_changed_percent` / `--min-changed-percent` | List a view whose change is smaller than this percentage in the report without picturing it or counting it as changed. Must not exceed `max_changed_percent`. |
|
|
940
|
+
| `views` / `--views` | Compare only views matching these patterns, such as `["light-*", "variant-*"]` or `--views 'light-*,variant-*'`. Every view is still captured and checked for coverage. A pattern that matches no view is a configuration error. |
|
|
740
941
|
| `variants` / `--variants` | Capture `all`, named stylesheets or combinations such as `compact+dark`. Set the saved value to `null` to capture the base theme only. |
|
|
741
942
|
| `toolbar` / `--toolbar` | Apply a toolbar arrangement to the toolbar capture. |
|
|
742
943
|
| `baseline`, `out` | Paths relative to the theme root; absolute paths also work. `baseline: null` runs audits and captures without visual comparison. |
|
|
@@ -763,7 +964,10 @@ fxcss shot --out shots/before
|
|
|
763
964
|
Captures the standard set of views as PNGs: browser window, focused address bar,
|
|
764
965
|
find bar and the window-modal dialog in light and dark, then playing and muted
|
|
765
966
|
audio tab indicators, container tabs, an overflowing tab strip, a private window,
|
|
766
|
-
compact density, the sidebar, right-to-left chrome, and customize mode.
|
|
967
|
+
compact density, the sidebar, right-to-left chrome, and customize mode. It also
|
|
968
|
+
captures the surfaces no window view shows, in light and dark: hovered toolbar
|
|
969
|
+
buttons, the search engine button and its menu, the app menu, extensions and
|
|
970
|
+
account panels, and Settings.
|
|
767
971
|
|
|
768
972
|
Audio views set Firefox's playing and muted tab attributes directly. They test
|
|
769
973
|
the appearance of those indicators without requiring a sound device or playing
|
|
@@ -775,8 +979,11 @@ window around it, which is why themes break it without noticing — a dark theme
|
|
|
775
979
|
whose dialog body renders white shows up here and nowhere else.
|
|
776
980
|
|
|
777
981
|
The captures land **flat** in `--out`, one file per view (`shots/before/light-01-window.png`);
|
|
778
|
-
`--url` captures go to `<out>/live
|
|
779
|
-
|
|
982
|
+
`--url` captures go to `<out>/live/`, named after the URL without its scheme,
|
|
983
|
+
`www.`, query or fragment; URLs that differ only in those parts are numbered in
|
|
984
|
+
the order given (`example-com`, `example-com-2`) rather than overwriting each
|
|
985
|
+
other. This is the directory to publish from if you want plain screenshots —
|
|
986
|
+
`fxcss compare` writes a different shape, below.
|
|
780
987
|
|
|
781
988
|
```bash
|
|
782
989
|
fxcss shot --out shots --variants all
|
|
@@ -786,6 +993,17 @@ fxcss shot --out shots --variants all
|
|
|
786
993
|
ships (`custom/`, `optional/`, `variants/`…), each loaded on its own and removed
|
|
787
994
|
again — so `tabs-swapclose` or `compact-tabs` are checked by CI without a
|
|
788
995
|
separate install. Name specific ones (`--variants a,b`) or take them all.
|
|
996
|
+
Names are the filename lower-cased with punctuation folded to `-`. Two sheets
|
|
997
|
+
with the same name in different folders are told apart by folder
|
|
998
|
+
(`custom-tabs`, `optional-tabs`); two in one folder that differ only in case
|
|
999
|
+
or punctuation are reported as an error, since nothing distinguishes them.
|
|
1000
|
+
|
|
1001
|
+
Adding `optional/tabs.css` alongside an existing `custom/tabs.css` renames
|
|
1002
|
+
the existing `tabs` variant to `custom-tabs` and names the new one
|
|
1003
|
+
`optional-tabs`. Update explicit `--variants` selections and `--views`
|
|
1004
|
+
filters accordingly. Existing baselines retain `variant-tabs`, so checks
|
|
1005
|
+
report that view as missing until you review the renamed captures and
|
|
1006
|
+
refresh the baseline with `--update-baseline`.
|
|
789
1007
|
|
|
790
1008
|
#### Browser states it captures
|
|
791
1009
|
|
|
@@ -824,6 +1042,37 @@ renders nothing.
|
|
|
824
1042
|
Some states depend on the Firefox build; unavailable states are reported and
|
|
825
1043
|
skipped rather than treated as captured.
|
|
826
1044
|
|
|
1045
|
+
#### Surfaces outside the window
|
|
1046
|
+
|
|
1047
|
+
Each of these views is cropped to its own surface, so a change elsewhere — a
|
|
1048
|
+
restyled tab strip, say — leaves it alone:
|
|
1049
|
+
|
|
1050
|
+
| View | Category | What it shows |
|
|
1051
|
+
| --- | --- | --- |
|
|
1052
|
+
| `*-05-toolbar-hover` | Toolbars | The toolbars with each toolbar button held in its `:hover` state |
|
|
1053
|
+
| `*-06-search-engine` | Address bar | The focused address bar with the pointer on the search engine button |
|
|
1054
|
+
| `*-07-search-menu` | Address bar | The search engine button's menu, open |
|
|
1055
|
+
| `*-08-app-menu` | Panels | The app menu |
|
|
1056
|
+
| `*-09-extensions-panel` | Panels | The extensions panel |
|
|
1057
|
+
| `*-10-account-panel` | Panels | The account panel |
|
|
1058
|
+
| `*-11-settings` | Settings | `about:preferences`, styled by `userContent.css` |
|
|
1059
|
+
|
|
1060
|
+
Panels are separate OS windows that Marionette cannot see, so these four are
|
|
1061
|
+
taken with a screen capture of the panel's area. That briefly brings the
|
|
1062
|
+
capture Firefox to the front. The capture is first checked against Marionette's
|
|
1063
|
+
own image of the window; when it cannot see Firefox (no screen-recording
|
|
1064
|
+
permission on macOS, a Wayland session,
|
|
1065
|
+
another window on top) the panel views are reported as unsupported with that
|
|
1066
|
+
reason rather than captured wrong. A Firefox without the search engine button
|
|
1067
|
+
skips its two views the same way.
|
|
1068
|
+
|
|
1069
|
+
These views run in a browser session of their own, so the pointer and hover
|
|
1070
|
+
locks they use never reach the window views. Its window is up to 1280×900 and
|
|
1071
|
+
never larger than the screen, so an open panel lies wholly over Firefox: its
|
|
1072
|
+
translucent edges and rounded corners show the browser, not your desktop.
|
|
1073
|
+
Anything the system draws on top during the capture is photographed too, so a
|
|
1074
|
+
notification that pops up over a panel appears in that view; rerun if one did.
|
|
1075
|
+
|
|
827
1076
|
### fxcss compare
|
|
828
1077
|
|
|
829
1078
|
```bash
|
|
@@ -849,6 +1098,59 @@ This is what makes it useful in CI: render your theme at the base commit and at
|
|
|
849
1098
|
a pull request, and the diff shows a reviewer exactly what the change does. See
|
|
850
1099
|
[Using it in CI](#using-it-in-ci).
|
|
851
1100
|
|
|
1101
|
+
Narrow a comparison to the views you care about, and leave out changes too
|
|
1102
|
+
small to be worth a picture:
|
|
1103
|
+
|
|
1104
|
+
```bash
|
|
1105
|
+
fxcss compare --base shots/before --head shots/after --out diff/ \
|
|
1106
|
+
--views 'light-*,extra-07-many-tabs' --min-changed-percent 0.5
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
`--views` takes comma-separated patterns, with `*` and `?` as wildcards, matched
|
|
1110
|
+
against capture names. The standard names are `light-` or `dark-` followed by
|
|
1111
|
+
`01-window`, `02-urlbar`, `03-findbar`, `04-dialog`, `05-toolbar-hover`,
|
|
1112
|
+
`06-search-engine`, `07-search-menu`, `08-app-menu`, `09-extensions-panel`,
|
|
1113
|
+
`10-account-panel` or `11-settings`; `extra-04-audio`,
|
|
1114
|
+
`extra-05-muted`, `extra-06-containers`, `extra-07-many-tabs`,
|
|
1115
|
+
`extra-08-private`, `extra-09-compact`, `extra-10-sidebar-bookmarks`,
|
|
1116
|
+
`extra-11-sidebar-history`, `extra-12-rtl`, `extra-13-customize`,
|
|
1117
|
+
`extra-14-vertical-tabs` and `extra-15-toolbar`; and `variant-<name>` for each
|
|
1118
|
+
optional stylesheet. A pattern that matches nothing is an error, so a typo
|
|
1119
|
+
cannot quietly shrink the comparison. Unselected views are left out of
|
|
1120
|
+
`summary.json` and `full/`.
|
|
1121
|
+
|
|
1122
|
+
`--min-changed-percent` treats a view whose changed pixels are below that share
|
|
1123
|
+
as a small change: `summary.json` lists it under `below_threshold` with its
|
|
1124
|
+
percentage, but no comparison image is drawn and it does not count towards
|
|
1125
|
+
`changed_views` or `any_change`. A change of exactly the threshold is pictured.
|
|
1126
|
+
Changed pixels are counted in the captures' own pixels, not in the scaled-down
|
|
1127
|
+
pictures, so a one-pixel border still counts at a high device pixel ratio.
|
|
1128
|
+
Small per-channel color differences and isolated antialiasing shifts between
|
|
1129
|
+
unchanged surrounding colors are ignored as rendering noise.
|
|
1130
|
+
|
|
1131
|
+
#### Distinct changes
|
|
1132
|
+
|
|
1133
|
+
One change usually shows in many views: a restyled tab strip is in nearly every
|
|
1134
|
+
window capture, in every palette. So `compare` also groups what changed into
|
|
1135
|
+
**distinct changes**. Within a view, changed regions in the same part of the
|
|
1136
|
+
UI (the tab strip, the page, one panel) are one change. Across views, a region
|
|
1137
|
+
is the same change when its changed pixels coincide with one already seen, or
|
|
1138
|
+
when it is the same move: a toolbar 1px taller pushes the page down in every
|
|
1139
|
+
view, which as pixels is different text edges in each, but is recognised as
|
|
1140
|
+
"moved down 1px" and grouped whatever page the view shows. Each distinct change
|
|
1141
|
+
is drawn once, as `change-NN.png`, cropped to the change from the
|
|
1142
|
+
full-resolution captures, and `summary.json` lists it under `changes` with the
|
|
1143
|
+
views it appears in.
|
|
1144
|
+
|
|
1145
|
+
Every change is placed in an area of the UI: Window, Tabs, Toolbars, Address
|
|
1146
|
+
bar, Find bar, Sidebar, Content, Dialogs, Panels, Settings or Optional
|
|
1147
|
+
stylesheets. For window views the place comes from where Firefox's own
|
|
1148
|
+
landmarks were when the capture was taken (recorded in `layout.json` next to
|
|
1149
|
+
the screenshots), so a tab strip change reads as Tabs whichever view it was
|
|
1150
|
+
found in. Cropped surface views take their own category. Colour is ignored when
|
|
1151
|
+
grouping, so the same rule rendering in each palette's colours is one change;
|
|
1152
|
+
every view keeps its own comparison image, linked from the change.
|
|
1153
|
+
|
|
852
1154
|
A successful comparison reports differences; changed pixels alone do not make
|
|
853
1155
|
`compare` fail. Review the images to decide whether a change is intended. If
|
|
854
1156
|
your project needs a pass/fail threshold, use `fxcss check` or a custom check
|
|
@@ -868,6 +1170,7 @@ builds your users will get next.
|
|
|
868
1170
|
| `snapshot` | Which browser UI IDs and classes were observed in a Firefox build; saves a JSON baseline. |
|
|
869
1171
|
| `changelog` | Which names changed between that baseline and another build, and which removals the theme uses. |
|
|
870
1172
|
| `audit` | Which selectors and custom properties need attention in the selected Firefox, with suggested fixes. |
|
|
1173
|
+
| `support` | Which Firefox releases a theme change still works on: whether merging it drops styling for older releases. |
|
|
871
1174
|
|
|
872
1175
|
A snapshot records structure; `shot` records appearance. Neither is a profile
|
|
873
1176
|
backup. Use audits and visual comparisons together: a selector can still
|
|
@@ -941,6 +1244,68 @@ Use `--baseline` with a [saved snapshot](#fxcss-snapshot) when the old build is
|
|
|
941
1244
|
no longer installed. Run `fxcss audit --firefox beta` to investigate findings
|
|
942
1245
|
against a selected channel.
|
|
943
1246
|
|
|
1247
|
+
### fxcss support
|
|
1248
|
+
|
|
1249
|
+
```bash
|
|
1250
|
+
fxcss support --base ../theme-before --head . --firefox stable
|
|
1251
|
+
```
|
|
1252
|
+
|
|
1253
|
+
Compares two revisions of a theme and says which Firefox releases the change
|
|
1254
|
+
still works on. Following a Firefox rename fixes the newest release and
|
|
1255
|
+
quietly drops that styling everywhere the old name still lives: a pull request
|
|
1256
|
+
that swaps `#sidebar-box` for `.sidebar-box` because Firefox 158 moved it is
|
|
1257
|
+
right for 158, and takes the styling away from everyone on 157 and earlier,
|
|
1258
|
+
ESR included, the moment it merges. Screenshots rendered with the newest
|
|
1259
|
+
Firefox cannot show that.
|
|
1260
|
+
|
|
1261
|
+
```text
|
|
1262
|
+
> [!WARNING]
|
|
1263
|
+
> **Merging this drops styling for Firefox 157 and earlier, ESR 153 included.**
|
|
1264
|
+
> It removes rules for `#sidebar-box`, which still match there but no longer
|
|
1265
|
+
> match in Firefox 158. Keeping the old name next to the new one
|
|
1266
|
+
> (`#old, .new`) keeps both releases styled.
|
|
1267
|
+
>
|
|
1268
|
+
> New rules for `.sidebar-box` only match from Firefox 158; older releases do
|
|
1269
|
+
> not get them.
|
|
1270
|
+
```
|
|
1271
|
+
|
|
1272
|
+
It looks at what the change removes and adds: selectors, and custom
|
|
1273
|
+
properties the theme sets. A removed rule that still matched on an older
|
|
1274
|
+
release is styling those users lose. An added rule that only matches newer
|
|
1275
|
+
releases is styling they never get. Rules that match on every release, or on
|
|
1276
|
+
none, are left out, and keeping the old name beside the new one is not a drop.
|
|
1277
|
+
Rules in optional stylesheets count too. A `<details>` list gives the file and
|
|
1278
|
+
line of each rule.
|
|
1279
|
+
|
|
1280
|
+
`--oldest` sets how far back to look: `esr` (default) for the current ESR, or a
|
|
1281
|
+
major version such as `140`. The release where a rule starts or stops matching
|
|
1282
|
+
is found by bisection, and the previous release is always checked, because a
|
|
1283
|
+
name Firefox has just retired may be younger than the oldest release checked.
|
|
1284
|
+
When the newest build is a Beta or Nightly, the report also says that merging
|
|
1285
|
+
before it ships drops the styling for every release user. `--channel` labels
|
|
1286
|
+
that build, `--json` and `--markdown` write the report to files, and the exit
|
|
1287
|
+
code is **0** when the check ran and **2** when it could not.
|
|
1288
|
+
|
|
1289
|
+
No older Firefox is run. Release builds are downloaded from
|
|
1290
|
+
archive.mozilla.org as Linux tarballs and only their `omni.ja` archives are
|
|
1291
|
+
read, for the ids, classes and custom properties the shipped chrome mentions.
|
|
1292
|
+
Each build becomes a name index of about 120 KB, kept in
|
|
1293
|
+
`~/.cache/fxcss/firefox-builds` (`--cache` to move it). A change that only edits
|
|
1294
|
+
declarations downloads nothing beyond the oldest build. One that moves names
|
|
1295
|
+
downloads a handful the first time, about 10 seconds each, at most
|
|
1296
|
+
`--max-downloads` (default 8) per run. When that budget runs out the report
|
|
1297
|
+
gives a range rather than a guess. The current ESR comes from
|
|
1298
|
+
product-details.mozilla.org.
|
|
1299
|
+
|
|
1300
|
+
It compares Linux builds throughout, so a name that only exists in macOS or
|
|
1301
|
+
Windows markup is never reported, and names inside `:not()`, `:is()` and
|
|
1302
|
+
attribute selectors are not required: both only ever hide a finding. Names are
|
|
1303
|
+
read from source, including the ones scripts set with `getElementById`,
|
|
1304
|
+
`classList` or `setAttribute`. A name a script builds at run time, from a
|
|
1305
|
+
variable, is the one blind spot, and it can cut either way: a removal can look
|
|
1306
|
+
like a drop, or an addition look newer than it is. `fxcss audit` against the
|
|
1307
|
+
live browser settles a doubtful case.
|
|
1308
|
+
|
|
944
1309
|
### fxcss audit
|
|
945
1310
|
|
|
946
1311
|
```bash
|
|
@@ -956,20 +1321,21 @@ class your CSS mentions, resolves each against a running Firefox, and shows what
|
|
|
956
1321
|
to change — with the real line from your file and the replacement applied:
|
|
957
1322
|
|
|
958
1323
|
```
|
|
959
|
-
14 selectors need attention
|
|
960
|
-
|
|
961
|
-
RENAMED #urlbar-background → .urlbar-background
|
|
962
|
-
same name, now a class rather than an id
|
|
1324
|
+
✗ 14 selectors need attention
|
|
963
1325
|
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1326
|
+
✗ RENAMED #urlbar-background → .urlbar-background
|
|
1327
|
+
same name, now a class rather than an id
|
|
1328
|
+
chrome/parts/headerbar-urlbar.css:52
|
|
1329
|
+
- #urlbar-background {
|
|
1330
|
+
+ .urlbar-background {
|
|
967
1331
|
|
|
968
|
-
SIMILAR
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1332
|
+
! SIMILAR #appMenu-fullscreen-button → #appMenu-fullscreen-button2 a guess, not applied
|
|
1333
|
+
no exact match; closest live name is #appMenu-fullscreen-button2
|
|
1334
|
+
#appMenu-fullscreen-button2 belongs to browser.xhtml
|
|
1335
|
+
check what reads that name before using it: a close
|
|
1336
|
+
spelling can belong to an unrelated element
|
|
1337
|
+
chrome/parts/icons.css:198
|
|
1338
|
+
#appMenu-fullscreen-button {
|
|
973
1339
|
```
|
|
974
1340
|
|
|
975
1341
|
These examples come from findings in a long-running theme. The
|
|
@@ -1020,9 +1386,20 @@ three cases a live probe cannot tell apart:
|
|
|
1020
1386
|
with the closest consumed name suggested when there is one
|
|
1021
1387
|
(`--panel-background` → `--panel-background-color`).
|
|
1022
1388
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1389
|
+
DevTools is counted separately, because it trails the browser's renames.
|
|
1390
|
+
Firefox 158's toolbar reads `--toolbarbutton-background-color-hover`, while
|
|
1391
|
+
DevTools still reads the old `--toolbarbutton-hover-background`. DevTools'
|
|
1392
|
+
stylesheets count as reading a name only when your theme sets it inside
|
|
1393
|
+
`@-moz-document url-prefix("chrome://devtools/")`, the usual way to restyle
|
|
1394
|
+
DevTools from `userChrome.css`. When nothing but DevTools still uses a name
|
|
1395
|
+
your theme sets elsewhere, the audit lists it under **DEVTOOLS ONLY** with the
|
|
1396
|
+
browser's new name. It does this even when the theme reads the name itself.
|
|
1397
|
+
|
|
1398
|
+
Reading the shipped sources also covers documents the live audit cannot open,
|
|
1399
|
+
such as dialogs and in-content pages. It also replaces the second, unthemed
|
|
1400
|
+
Firefox launch the probe needed. A custom property the theme reads but Firefox
|
|
1401
|
+
no longer provides gets the provided name it was renamed to, when the words
|
|
1402
|
+
match (`--toolbarbutton-inner-padding` → `--toolbarbutton-padding-inner`).
|
|
1026
1403
|
|
|
1027
1404
|
A name you keep deliberately — for an ESR that still reads it, say — gets an
|
|
1028
1405
|
inline pragma rather than a CI flag nobody finds later:
|
|
@@ -1031,16 +1408,27 @@ inline pragma rather than a CI flag nobody finds later:
|
|
|
1031
1408
|
--in-content-page-background: var(--gnome-menu-background) !important; /* fxcss-keep: ESR 140 reads it */
|
|
1032
1409
|
```
|
|
1033
1410
|
|
|
1034
|
-
`--strict-vars` turns dead and
|
|
1035
|
-
`fxcss-keep` lines are exempt.
|
|
1411
|
+
`--strict-vars` turns dead, stale and DevTools-only overrides into a non-zero
|
|
1412
|
+
exit for CI; `fxcss-keep` lines are exempt.
|
|
1036
1413
|
|
|
1037
1414
|
#### Unused and unreachable code
|
|
1038
1415
|
|
|
1039
|
-
`audit` also reports housekeeping, in its own section, separate from breakage
|
|
1416
|
+
`audit` also reports housekeeping, in its own section, separate from breakage.
|
|
1417
|
+
It reads the theme through the same stylesheet inventory `install` and
|
|
1418
|
+
`upgrade` use: quoted and unquoted `@import url(…)` forms, escaped paths,
|
|
1419
|
+
imports behind `-moz-pref()` or media conditions, and the user hooks a theme
|
|
1420
|
+
imports without shipping (`customChrome.css`, FlexFox's
|
|
1421
|
+
`uc-user-settings.css`). Sheets reached only from `userContent.css` style web
|
|
1422
|
+
and extension pages, and their selectors are reported as *other-document*
|
|
1423
|
+
rather than as browser-window breakage. When an entry sheet is missing or a
|
|
1424
|
+
required import resolves to nothing, the section opens with **INCOMPLETE** and
|
|
1425
|
+
the reasons, instead of reading as a clean bill of health.
|
|
1040
1426
|
|
|
1041
1427
|
- **Stylesheets nothing imports.** Files under `chrome/` unreachable by
|
|
1042
|
-
following `@import` from `userChrome.css`. Sheets in a
|
|
1043
|
-
`optional/` folder are excluded — being
|
|
1428
|
+
following `@import` from `userChrome.css` or `userContent.css`. Sheets in a
|
|
1429
|
+
`custom/`, `optional/`, `extras/` or `tweaks/` folder are excluded — being
|
|
1430
|
+
opt-in is the point of those — and so are conditional imports that are
|
|
1431
|
+
merely switched off.
|
|
1044
1432
|
- **Custom properties used but never set**, where an unthemed Firefox does not
|
|
1045
1433
|
provide them either. These are usually typos: the `var()` silently falls back.
|
|
1046
1434
|
- **Custom properties set but read nowhere.** Reported cautiously — setting
|
|
@@ -1072,32 +1460,57 @@ fxcss init --showcase --previews # also publish screenshots
|
|
|
1072
1460
|
fxcss init --watch --showcase --previews # generate all six workflow files
|
|
1073
1461
|
```
|
|
1074
1462
|
|
|
1075
|
-
`init` writes to `.github/workflows
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1463
|
+
`init` writes to `.github/workflows/` **at the repository root** — found with
|
|
1464
|
+
`git rev-parse --show-toplevel` from the theme folder — and points every
|
|
1465
|
+
command in them at the theme's folder when that is not the root
|
|
1466
|
+
(`fxcss shot --theme 'head/firefox'`). A repository that holds several themes
|
|
1467
|
+
needs `--subpath` to say which. Flat and nested layouts both generate previews
|
|
1468
|
+
for all repository changes, including dependencies outside the theme folder.
|
|
1469
|
+
Named editions and themes that need `--entry` are refused, because the
|
|
1470
|
+
generated workflows cannot select them yet; lay the theme out as
|
|
1471
|
+
`chrome/userChrome.css` to use the workflows.
|
|
1472
|
+
Existing files are preserved unless you pass `--force`; review regenerated
|
|
1473
|
+
files before committing, especially if you have customised them. Generation
|
|
1474
|
+
pins the installed fxcss version. These layout, trigger and patch-mapping
|
|
1475
|
+
changes need fxcss **0.26.0 or later**.
|
|
1476
|
+
To try an fxcss commit that is not released yet, use
|
|
1477
|
+
`fxcss init --toolkit-ref <full-40-character-fxcss-commit-SHA>`: the generated
|
|
1478
|
+
workflows then install that commit directly instead of a PyPI version. `init`
|
|
1479
|
+
says so when the copy you are running did not come from PyPI, since a pin to
|
|
1480
|
+
an unpublished version cannot install. The preview
|
|
1481
|
+
publisher validates variant filenames and PNG headers, including options added
|
|
1482
|
+
by later PRs. Updating fxcss locally does not update workflows already in a
|
|
1483
|
+
repository.
|
|
1484
|
+
|
|
1485
|
+
Audit patches for flat and nested themes address their original files relative
|
|
1486
|
+
to the Git root, so the watch workflow can apply them there. Packaged ZIPs and
|
|
1487
|
+
assembled editions have no direct source mapping: patch generation refuses
|
|
1488
|
+
those layouts; audit the unpacked source folder to prepare a patch instead.
|
|
1080
1489
|
|
|
1081
1490
|
| Feature | Enable with | When it runs | What readers see |
|
|
1082
1491
|
| --- | --- | --- | --- |
|
|
1083
|
-
| PR previews | `init` |
|
|
1492
|
+
| 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. |
|
|
1084
1493
|
| 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. |
|
|
1085
|
-
| README previews | `init --previews` |
|
|
1494
|
+
| 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. |
|
|
1086
1495
|
| Release showcase | `init --showcase` | A release is published, or manually; macOS. | Light/dark screenshots against live websites on the `showcase` branch. |
|
|
1087
1496
|
|
|
1088
|
-
The workflows download Firefox on their runners. Generated
|
|
1089
|
-
|
|
1090
|
-
and
|
|
1497
|
+
The workflows download Firefox on their runners. Generated PR and README
|
|
1498
|
+
previews run for all repository changes, without path filters: imported CSS,
|
|
1499
|
+
images, fonts and other dependencies can live anywhere in a theme repository.
|
|
1500
|
+
This deliberately includes documentation-only edits so dependency-only changes
|
|
1501
|
+
outside standard folders cannot silently skip previews.
|
|
1091
1502
|
Re-run generation and review the changes to update the pinned fxcss version
|
|
1092
|
-
or adopt improvements to the workflow templates
|
|
1503
|
+
or adopt improvements to the workflow templates; see
|
|
1504
|
+
[Updating generated workflows](#updating-generated-workflows). New variants are
|
|
1505
|
+
included automatically unless `FXCSS_VARIANTS` names specific stylesheets.
|
|
1093
1506
|
|
|
1094
1507
|
### Pull request previews
|
|
1095
1508
|
|
|
1096
1509
|
The default setup writes three cooperating workflows:
|
|
1097
1510
|
|
|
1098
|
-
1. **Render:** capture the base and proposed theme revisions
|
|
1099
|
-
system, compare them and upload the
|
|
1100
|
-
cached for later pushes to the same PR.
|
|
1511
|
+
1. **Render:** capture the base and proposed theme revisions in the current
|
|
1512
|
+
Firefox release on each operating system, compare them and upload the
|
|
1513
|
+
images. Matching base captures are cached for later pushes to the same PR.
|
|
1101
1514
|
2. **Publish:** validate the artifacts, publish images to `ci-previews`, and
|
|
1102
1515
|
create or update the preview comment. Unchanged views remain available as
|
|
1103
1516
|
full screenshots.
|
|
@@ -1111,6 +1524,110 @@ but does not execute PR code.
|
|
|
1111
1524
|
The preview shows what changed, leaving the reviewer to decide whether it is
|
|
1112
1525
|
correct. It does not reject a PR simply because the screenshots differ.
|
|
1113
1526
|
|
|
1527
|
+
#### What the comment shows
|
|
1528
|
+
|
|
1529
|
+
The comment opens with the Firefox support result, when
|
|
1530
|
+
[that check is enabled](#choosing-what-the-preview-shows). It then groups the
|
|
1531
|
+
[distinct changes](#distinct-changes) by area of the UI and pictures each once,
|
|
1532
|
+
from the first platform that has it. The same change on another platform is
|
|
1533
|
+
folded under it, with each platform's views listed and linked to their full
|
|
1534
|
+
before-and-after; a change only one platform shows is labelled as such. A tab
|
|
1535
|
+
strip restyle that touches every view therefore reads as one picture under Tabs
|
|
1536
|
+
rather than one per view per platform.
|
|
1537
|
+
|
|
1538
|
+
Below the changes, each platform has a section for anything that needs a closer
|
|
1539
|
+
look:
|
|
1540
|
+
|
|
1541
|
+
- Views that exist only in the pull request, such as a newly added optional
|
|
1542
|
+
stylesheet, are shown as new.
|
|
1543
|
+
- Views missing from the pull request's captures are flagged, so a reviewer can
|
|
1544
|
+
check whether the view was removed or could not be captured.
|
|
1545
|
+
- Views a runner could not capture are listed as not compared.
|
|
1546
|
+
- Screenshots or change records that fail the publisher's validation are
|
|
1547
|
+
counted as unreviewed, with a prompt to check the workflow artifacts before
|
|
1548
|
+
approving.
|
|
1549
|
+
|
|
1550
|
+
A comment too long for GitHub lists its views without links; every comparison
|
|
1551
|
+
is still in the workflow run's artifacts for 14 days.
|
|
1552
|
+
|
|
1553
|
+
The comment is published only when the render job succeeds on all three
|
|
1554
|
+
platforms. If one fails, the pull request keeps any earlier comment. Re-running
|
|
1555
|
+
the failed job or pushing a fix publishes as usual. To publish what the other
|
|
1556
|
+
platforms produced for the pull request's latest commit, start the publish
|
|
1557
|
+
workflow by hand with the ID from that render run's URL:
|
|
1558
|
+
|
|
1559
|
+
```bash
|
|
1560
|
+
gh workflow run pr-preview-publish.yml -f run_id=<run-id>
|
|
1561
|
+
```
|
|
1562
|
+
|
|
1563
|
+
That comment covers only the platforms that finished, and has no Firefox
|
|
1564
|
+
support result if the Linux job was the one that failed.
|
|
1565
|
+
|
|
1566
|
+
#### Choosing what the preview shows
|
|
1567
|
+
|
|
1568
|
+
Four settings at the top of `pr-preview.yml` control what is captured and
|
|
1569
|
+
what appears in the comment:
|
|
1570
|
+
|
|
1571
|
+
```yaml
|
|
1572
|
+
env:
|
|
1573
|
+
FXCSS_VARIANTS: 'compact,tabs-swapclose' # 'all' (default), '' for none
|
|
1574
|
+
FXCSS_VIEWS: 'light-*,extra-07-many-tabs' # '' (default) shows every view
|
|
1575
|
+
FXCSS_MIN_CHANGED_PERCENT: '0.5' # '0' (default) pictures every change
|
|
1576
|
+
FXCSS_OLDEST_FIREFOX: 'esr' # 'esr' (default), '140', or '' to skip
|
|
1577
|
+
```
|
|
1578
|
+
|
|
1579
|
+
- `FXCSS_VARIANTS` chooses which optional stylesheets are captured, which also
|
|
1580
|
+
shortens the run. Join names with `+` (`compact+dark`) to capture them
|
|
1581
|
+
together. Named stylesheets must exist in both the base branch and the pull
|
|
1582
|
+
request; `all` adapts as sheets are added.
|
|
1583
|
+
- `FXCSS_VIEWS` chooses which views are compared and shown, using the
|
|
1584
|
+
[`compare --views`](#fxcss-compare) patterns. Every standard view is still
|
|
1585
|
+
captured. The comment notes that a selection is in effect. A pattern that
|
|
1586
|
+
matches none of a runner's captures fails that platform's render job, so a
|
|
1587
|
+
pattern naming only panel views can fail where a runner cannot capture them.
|
|
1588
|
+
- `FXCSS_MIN_CHANGED_PERCENT` leaves out the image for a view where less than
|
|
1589
|
+
that share of pixels changed. The comment still lists each such view with its
|
|
1590
|
+
percentage, so a small change is never reported as no change.
|
|
1591
|
+
- `FXCSS_OLDEST_FIREFOX` is the oldest Firefox the theme supports. Unless it
|
|
1592
|
+
is empty, each comment opens with the [`fxcss support`](#fxcss-support)
|
|
1593
|
+
result for it: a warning when merging drops styling for an older release
|
|
1594
|
+
("Firefox 157 and earlier, ESR 153 included"), a note when new rules only
|
|
1595
|
+
match newer releases, or one line saying support is unchanged. The Linux job
|
|
1596
|
+
runs the check, caches build indexes between runs, and never fails the
|
|
1597
|
+
preview over it; if it cannot run, the comment says so. `firefox-watch.yml`
|
|
1598
|
+
has its own copy of this setting, so change both if you edit them by hand.
|
|
1599
|
+
|
|
1600
|
+
Set them when generating the workflows, or edit the file directly:
|
|
1601
|
+
|
|
1602
|
+
```bash
|
|
1603
|
+
fxcss init --variants compact --views 'light-*,variant-*' --min-changed-percent 0.5 \
|
|
1604
|
+
--oldest-firefox 140
|
|
1605
|
+
```
|
|
1606
|
+
|
|
1607
|
+
Settings are validated against the theme before anything is written.
|
|
1608
|
+
|
|
1609
|
+
#### Updating generated workflows
|
|
1610
|
+
|
|
1611
|
+
Workflows keep the fxcss version and templates they were generated with. A
|
|
1612
|
+
repository set up with fxcss 0.24 or earlier therefore has none of the settings
|
|
1613
|
+
above, none of the [surfaces outside the window](#surfaces-outside-the-window)
|
|
1614
|
+
and no grouping in its comment until it regenerates them. Upgrade fxcss first,
|
|
1615
|
+
because generation pins the installed version, then run:
|
|
1616
|
+
|
|
1617
|
+
```bash
|
|
1618
|
+
fxcss init --force --watch --showcase --previews --oldest-firefox 140
|
|
1619
|
+
```
|
|
1620
|
+
|
|
1621
|
+
`--force` replaces only the workflows the command asks for, so name each one
|
|
1622
|
+
you use. A workflow left out keeps its old fxcss pin and template, along with
|
|
1623
|
+
its own copy of `FXCSS_OLDEST_FIREFOX`. Every setting you do not pass returns
|
|
1624
|
+
to its default, including values you edited in the file by hand, so repeat them
|
|
1625
|
+
on the command line.
|
|
1626
|
+
|
|
1627
|
+
The comment wording comes from `pr-preview-publish.yml`, and the publisher
|
|
1628
|
+
always runs from the default branch, so merge the regenerated files there
|
|
1629
|
+
before expecting the new comment.
|
|
1630
|
+
|
|
1114
1631
|
### Watching Firefox for breakage
|
|
1115
1632
|
|
|
1116
1633
|
The weekly watch checks two things independently:
|
|
@@ -1125,6 +1642,13 @@ Issues close when the associated check is healthy again. Proposed fixes still
|
|
|
1125
1642
|
need review and merging. The default audit uses `--strict --no-unused`, so
|
|
1126
1643
|
custom-property failure checks are not enabled in this workflow.
|
|
1127
1644
|
|
|
1645
|
+
A fix pull request opens with the [`fxcss support`](#fxcss-support) result for
|
|
1646
|
+
the fix, back to `FXCSS_OLDEST_FIREFOX` at the top of `firefox-watch.yml`. A
|
|
1647
|
+
rename that Firefox 158 needs usually drops the styling on 157 and earlier, and
|
|
1648
|
+
a fix opened from Beta or Nightly drops it for every release user until that
|
|
1649
|
+
version ships. The pull request says which before anyone merges. Keep the old
|
|
1650
|
+
name beside the new one to support both.
|
|
1651
|
+
|
|
1128
1652
|
The generated watch does not save structural snapshots or compare screenshots
|
|
1129
1653
|
across Firefox releases. To add that history, compose `snapshot`, `changelog`,
|
|
1130
1654
|
`shot` and `compare` in a custom workflow.
|
|
@@ -1146,7 +1670,7 @@ text.
|
|
|
1146
1670
|
For a custom workflow, the core capture-and-compare steps are:
|
|
1147
1671
|
|
|
1148
1672
|
```yaml
|
|
1149
|
-
- run: pip install "fxcss[images]==0.
|
|
1673
|
+
- run: pip install "fxcss[images]==0.25.0"
|
|
1150
1674
|
- run: fxcss shot --theme base --out shots/base
|
|
1151
1675
|
- run: fxcss shot --theme head --out shots/head
|
|
1152
1676
|
- run: fxcss compare --base shots/base --head shots/head --out out/ --platform ${{ runner.os }}
|
|
@@ -1263,16 +1787,17 @@ fxcss doctor
|
|
|
1263
1787
|
Reports your Firefox version, whether `userChrome.css` is enabled, whether
|
|
1264
1788
|
context menus are themeable on your platform, how many stylesheets your theme
|
|
1265
1789
|
has — and **every Gecko build installed on the machine**, with versions. Start
|
|
1266
|
-
here if something isn't behaving.
|
|
1790
|
+
here if something isn't behaving. Run outside a theme folder, it reports on
|
|
1791
|
+
Firefox alone, so it also works as a first check straight after installing
|
|
1792
|
+
fxcss.
|
|
1267
1793
|
|
|
1268
1794
|
### Requirements
|
|
1269
1795
|
|
|
1270
1796
|
- Python 3.9+
|
|
1271
1797
|
- Firefox (any recent release; the toolkit finds it automatically on macOS,
|
|
1272
1798
|
Windows and Linux, or set `FIREFOX_BIN`)
|
|
1273
|
-
- Pillow
|
|
1274
|
-
|
|
1275
|
-
`pipx inject fxcss pillow`. Other commands use the Python standard library.
|
|
1799
|
+
- Pillow 10.1 or newer, installed automatically. `catalogue`, `compare`,
|
|
1800
|
+
`check`, `tweaks` and `upgrade --compare` use it.
|
|
1276
1801
|
|
|
1277
1802
|
### Installation
|
|
1278
1803
|
|
|
@@ -1280,7 +1805,7 @@ fxcss is [on PyPI](https://pypi.org/project/fxcss/). Install it with **pipx**,
|
|
|
1280
1805
|
which gives it its own environment and puts `fxcss` on your PATH:
|
|
1281
1806
|
|
|
1282
1807
|
```bash
|
|
1283
|
-
pipx install
|
|
1808
|
+
pipx install fxcss
|
|
1284
1809
|
```
|
|
1285
1810
|
|
|
1286
1811
|
No pipx yet? `brew install pipx` (macOS), `sudo apt install pipx` (Debian and
|
|
@@ -1293,18 +1818,37 @@ Ubuntu), or `python3 -m pip install --user pipx` elsewhere.
|
|
|
1293
1818
|
> application. pip still works fine *inside a virtual environment*:
|
|
1294
1819
|
>
|
|
1295
1820
|
> ```bash
|
|
1296
|
-
> python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install
|
|
1821
|
+
> python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install fxcss
|
|
1297
1822
|
> ```
|
|
1298
1823
|
|
|
1824
|
+
On Linux, Pillow comes prebuilt for x86_64 and aarch64, including musl
|
|
1825
|
+
distributions such as Alpine. On other CPUs (32-bit x86, RISC-V, ppc64le,
|
|
1826
|
+
s390x) or glibc older than 2.27, pip compiles it, so install a compiler and the
|
|
1827
|
+
image headers first. On Debian and Ubuntu:
|
|
1828
|
+
|
|
1829
|
+
```bash
|
|
1830
|
+
sudo apt install gcc libc6-dev python3-dev libjpeg-dev zlib1g-dev libfreetype-dev
|
|
1831
|
+
```
|
|
1832
|
+
|
|
1833
|
+
If Pillow cannot be built, install fxcss without it in a virtual environment.
|
|
1834
|
+
pipx cannot do this. The image commands will say Pillow is missing, and
|
|
1835
|
+
everything else works:
|
|
1836
|
+
|
|
1837
|
+
```bash
|
|
1838
|
+
python3 -m venv ~/.venvs/fxcss && ~/.venvs/fxcss/bin/pip install --no-deps fxcss
|
|
1839
|
+
```
|
|
1840
|
+
|
|
1299
1841
|
For CI, or anywhere a surprise upgrade would be unwelcome, pin the release —
|
|
1300
1842
|
the [releases page](https://github.com/AdamXweb/fxcss/releases) has the latest.
|
|
1301
1843
|
CI runners' Pythons are not externally managed, so plain pip is fine there:
|
|
1302
1844
|
|
|
1303
1845
|
```bash
|
|
1304
|
-
pip install "fxcss[images]==0.
|
|
1846
|
+
pip install "fxcss[images]==0.25.0"
|
|
1305
1847
|
```
|
|
1306
1848
|
|
|
1307
|
-
|
|
1849
|
+
Pinned installs keep the `[images]` extra so the same line also brings in Pillow
|
|
1850
|
+
on older releases. Upgrade an existing pipx installation with
|
|
1851
|
+
`pipx upgrade fxcss`.
|
|
1308
1852
|
|
|
1309
1853
|
### Upgrading to 0.22
|
|
1310
1854
|
|
|
@@ -1363,17 +1907,18 @@ and Linux.
|
|
|
1363
1907
|
`fxcss watch --native-menus=false` switches Firefox to XUL menus so you can work
|
|
1364
1908
|
on that styling from a Mac.
|
|
1365
1909
|
|
|
1366
|
-
###
|
|
1910
|
+
### Panels need a screen capture
|
|
1367
1911
|
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
window.
|
|
1371
|
-
|
|
1372
|
-
|
|
1912
|
+
Panels and menus are separate OS-level windows, so they appear in neither a
|
|
1913
|
+
Marionette chrome screenshot nor a `drawWindow` rasterisation of the browser
|
|
1914
|
+
window. The panel views therefore capture the panel's own screen area, after
|
|
1915
|
+
checking that the screen capture shows the same window Marionette does
|
|
1916
|
+
([Surfaces outside the window](#surfaces-outside-the-window)). Where it cannot,
|
|
1917
|
+
they are reported as unsupported rather than captured from whatever is on top.
|
|
1373
1918
|
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1919
|
+
Context menus are not captured: on macOS they are native menus with no CSS to
|
|
1920
|
+
compare, and elsewhere they would need the same screen capture for little
|
|
1921
|
+
benefit over inspecting them in `watch` with the Browser Toolbox.
|
|
1377
1922
|
|
|
1378
1923
|
### Why not Selenium?
|
|
1379
1924
|
|
|
@@ -1421,6 +1966,7 @@ session's connection, which shows up as your theme mysteriously not applying.
|
|
|
1421
1966
|
| [`init`](#fxcss-init) | Add PR previews and CI checks to your theme repo |
|
|
1422
1967
|
| [`tweaks`](#fxcss-tweaks) | Screenshot every install option into a committable doc |
|
|
1423
1968
|
| [`audit`](#fxcss-audit) | Check selectors and custom properties for compatibility findings |
|
|
1969
|
+
| [`support`](#fxcss-support) | See which Firefox releases a theme change still works on |
|
|
1424
1970
|
| [`changelog`](#fxcss-changelog) | Diff two Firefox builds to see what chrome changed |
|
|
1425
1971
|
| [`snapshot`](#fxcss-snapshot) | Record a Firefox's chrome names, to diff against later |
|
|
1426
1972
|
| [`catalogue`](#fxcss-catalogue) | Build a directory of themeable UI parts |
|
|
@@ -1444,7 +1990,7 @@ To work on fxcss itself, clone and install it in an editable environment:
|
|
|
1444
1990
|
|
|
1445
1991
|
```bash
|
|
1446
1992
|
git clone https://github.com/AdamXweb/fxcss.git
|
|
1447
|
-
cd fxcss && python3 -m pip install -e
|
|
1993
|
+
cd fxcss && python3 -m pip install -e .
|
|
1448
1994
|
```
|
|
1449
1995
|
|
|
1450
1996
|
And if you would rather install nothing at all, the repo runs as-is:
|
|
@@ -1455,13 +2001,20 @@ python3 -m fxcss <command>
|
|
|
1455
2001
|
|
|
1456
2002
|
### Testing fxcss itself
|
|
1457
2003
|
|
|
1458
|
-
The toolkit's own CI runs unit tests on Python 3.9, 3.12 and 3.14
|
|
2004
|
+
The toolkit's own CI runs the unit tests on Python 3.9, 3.12 and 3.14 on
|
|
2005
|
+
Linux, and the whole suite again on macOS and Windows, so profile
|
|
1459
2006
|
installation, upgrade, rollback, removal and failure recovery are checked on
|
|
1460
|
-
|
|
1461
|
-
|
|
2007
|
+
all three, including edited files and paths with spaces and non-ASCII
|
|
2008
|
+
characters. Real Firefox checks cover Stable on all three platforms
|
|
1462
2009
|
and ESR on Linux, repeated capture consistency, deliberate CSS changes,
|
|
1463
2010
|
nested imports, content stylesheets and stacked optional stylesheets.
|
|
1464
2011
|
|
|
2012
|
+
A Linux/Python 3.12 job also runs the suite with the minimum supported Pillow,
|
|
2013
|
+
10.1.0. Capture determinism compares all three pairs from one `check` and two
|
|
2014
|
+
`shot` runs, prints raw changed-pixel counts, and retains original screenshots
|
|
2015
|
+
when a job fails. The scheduled compatibility jobs run the same real-change
|
|
2016
|
+
and state-specific capture assertions on Stable, ESR, Beta and Nightly.
|
|
2017
|
+
|
|
1465
2018
|
A separate compatibility workflow checks Stable, ESR, Beta and Nightly on Linux
|
|
1466
2019
|
every Monday and Thursday, or on demand. Failed audits, incomplete captures and
|
|
1467
2020
|
rendering differences fail the run; reports and screenshots are retained as
|
|
@@ -1471,16 +2024,17 @@ and enable **compatibility** to include all four channels. Normal PR CI runs
|
|
|
1471
2024
|
Stable and ESR; the additional channels are optional for manual runs.
|
|
1472
2025
|
|
|
1473
2026
|
Package publishing is gated on CI and checks of the exact wheel and source
|
|
1474
|
-
archive being published. Clean environments outside the checkout test
|
|
1475
|
-
|
|
1476
|
-
compatibility with the latest released fxcss. Package checks run on
|
|
1477
|
-
operating systems with Python 3.9 and 3.14; the release tag must also match the
|
|
2027
|
+
archive being published. Clean environments outside the checkout test an
|
|
2028
|
+
install without dependencies, a normal install with Pillow, generated workflows
|
|
2029
|
+
and profile compatibility with the latest released fxcss. Package checks run on
|
|
2030
|
+
all three operating systems with Python 3.9 and 3.14; the release tag must also match the
|
|
1478
2031
|
built package version. These are fxcss's own checks; `init` generates the theme
|
|
1479
2032
|
repository workflows described above.
|
|
1480
2033
|
|
|
1481
2034
|
Run the checks locally with:
|
|
1482
2035
|
|
|
1483
2036
|
```bash
|
|
2037
|
+
python3 -m pip install -e . # includes Pillow, which the unit tests need
|
|
1484
2038
|
python3 -m unittest discover -s tests -v
|
|
1485
2039
|
python3 -m tests.smoke_themes # requires Firefox and a display
|
|
1486
2040
|
python3 -m tests.smoke_variants # requires Firefox and a display
|
|
@@ -1489,6 +2043,46 @@ python3 -m build
|
|
|
1489
2043
|
python3 scripts/package_smoke.py --dist dist # downloads the released package and image dependencies
|
|
1490
2044
|
```
|
|
1491
2045
|
|
|
2046
|
+
The unit tests cover `compare`, `catalogue` and the other image commands, so
|
|
2047
|
+
they need Pillow: without the install above, the image tests error instead of
|
|
2048
|
+
being skipped. If `pip install` refuses with `externally-managed-environment`,
|
|
2049
|
+
create a virtual environment first (`python3 -m venv .venv && . .venv/bin/activate`). The publisher
|
|
2050
|
+
workflow tests also use Node and bash when they are installed, and skip
|
|
2051
|
+
otherwise. Offline release orchestration tests execute the workflow scripts
|
|
2052
|
+
with stubbed pip, sleep and gh commands to check tag validation, the PyPI
|
|
2053
|
+
installability retry gate and website dispatch without network access. They
|
|
2054
|
+
also check that publication still requires CI and the built-distribution checks,
|
|
2055
|
+
and run the release rules, tagging and the pin update against local Git
|
|
2056
|
+
repositories.
|
|
2057
|
+
|
|
2058
|
+
### Releasing fxcss
|
|
2059
|
+
|
|
2060
|
+
A release is one pull request. Title it **Prepare vX.Y.Z** and change
|
|
2061
|
+
`__version__` in `fxcss/__init__.py` to X.Y.Z. Merging it does the rest:
|
|
2062
|
+
|
|
2063
|
+
1. **Release** tags the merge commit `vX.Y.Z` and starts **Publish** on that tag.
|
|
2064
|
+
2. **Publish** runs CI, checks the built packages, uploads them to PyPI and
|
|
2065
|
+
waits until pip can install the new version.
|
|
2066
|
+
3. Publish then moves the README's `fxcss==` pins to the new version, refreshes
|
|
2067
|
+
fxcss.com and creates the GitHub release with generated notes. You can edit
|
|
2068
|
+
the notes afterwards.
|
|
2069
|
+
|
|
2070
|
+
Only a release pull request may change `__version__`. The **Release version**
|
|
2071
|
+
check fails any other pull request that does, and Release won't tag a version
|
|
2072
|
+
that didn't come from one. While features land, leave the version at the
|
|
2073
|
+
latest release and write "X.Y.Z or later" in the README where a feature needs
|
|
2074
|
+
the next one.
|
|
2075
|
+
|
|
2076
|
+
To release the version that is already on main, run Release by hand:
|
|
2077
|
+
|
|
2078
|
+
```bash
|
|
2079
|
+
gh workflow run release.yml --ref main
|
|
2080
|
+
```
|
|
2081
|
+
|
|
2082
|
+
If Publish fails, re-run it from the Actions tab. If the fix needs a code
|
|
2083
|
+
change, merge the fix, delete the tag with `git push origin :refs/tags/vX.Y.Z`,
|
|
2084
|
+
then run Release by hand.
|
|
2085
|
+
|
|
1492
2086
|
## How this was built
|
|
1493
2087
|
|
|
1494
2088
|
fxcss was written with the assistance of **Claude** (Anthropic's Claude Opus 5),
|