Skip to content

fix(admin): define the --pn-* CSS variables the admin views use - #467

Merged
Panelica merged 1 commit into
Panelica:mainfrom
ertugrulkeyvan:fix/admin-pn-css-variables
Nov 18, 2026
Merged

Panelica merged 1 commit into
Panelica:mainfrom
ertugrulkeyvan:fix/admin-pn-css-variables

Conversation

@ertugrulkeyvan

Copy link
Copy Markdown
Contributor

Fixes #450.

Report tables, the dashboard widgets and several admin screens style themselves with --pn-primary, --pn-muted, --pn-border and six more --pn-* variables. Nothing defines them. A report's column titles are background:var(--pn-primary);color:#fff, so they were white on no background.

The admin layout now defines all nine from the theme tokens (--theme-primary, --theme-muted-color, --theme-border-color, …), with the starter theme's colours when a token is not set. They are defined outside the $themeCssVars check, so the fallbacks apply even with no theme variables.

Tests

tests/Feature/AdminPnCssVariablesTest.php collects every var(--pn-…) used under resources/views and app, then checks that the admin dashboard defines each one. It fails on main and passes with the change. Full suite: 5,427 passed; the 2 failures (CurrencyAndBackupTest, MailLinkHostTest) fail the same way on main.

Report tables, widgets and several admin screens style themselves with
--pn-primary, --pn-muted, --pn-border and six more variables, but nothing
defined them. A report's column titles are background:var(--pn-primary);
color:#fff, so they were white on no background.

The admin layout now defines all nine from the theme tokens
(--theme-primary, --theme-muted-color, ...), with the starter theme's
colours when a token is not set.

Fixes Panelica#450.
@Panelica
Panelica merged commit 81a4e49 into Panelica:main Nov 18, 2026
1 check passed
@Panelica

Copy link
Copy Markdown
Owner

Merged, thank you. The report headings really were white text on no background.

One note: the test walks every file under resources/views and app/, so the first --pn-* name used in a client view will turn it red even though the admin layout is not where it belongs. Easy to answer when it happens (define it where that page gets its variables), just worth knowing it is a repo-wide guard, not an admin-only one. Measured on the merge result: the full suite is green — 5463 passed in parallel (--exclude-group=serial, 4 processes) plus the 17 serial installer tests, 5 skipped, 0 failed.

@Panelica

Copy link
Copy Markdown
Owner

Released in 1.30.0, the stable channel, offered to every installation.

Gates on the tag and that package: full suite 5463 passed in parallel plus the 17 serial installer tests (0 failed, 5 skipped); 276 translation and parity tests green; the update lab 14 scenarios ALL GREEN; the real package updated the last stable (1.29.0 → 1.30.0, 13 checks) and the last beta (1.25.1-beta.1 → 1.30.0, 14 checks), each installed from its published package in the published runtime image with the signature checked by the key built into the application; the three uploaded assets re-downloaded and compared byte for byte before publishing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Admin pages use --pn-* CSS variables that the admin layout never defines (report table headings are white on white)

2 participants