-
Hi,
I’m using 2.8.0-rc.1In three situations the data of a Global Style was correct (confirmed with an export), but the generated style-global.css did not contain the matching CSS. There was no error or warning in any of these cases. The problem only became visible on the front end.
1. A nested rule with :has(> …) is not written to the CSS
Steps to reproduceCreate or open the Global Style with selector label.
Add this nested rule:
&:has(> :is([type=checkbox],[type=radio])) {
display: flex;
column-gap: 0.75rem;
}
Save, and open style-global.css.Expected: the rule label:has(> :is([type=checkbox],[type=radio])){…} in the file. :has() with a leading child combinator is valid CSS (Selectors Level 4, relative selector), and current browsers support it. Alternatively, a validation error when saving, if this syntax is not supported.
Actual: the rule is missing from the file. The style data still contains it: an export of the Global Styles shows the nested key &:has(> :is([type=checkbox],[type=radio])) with its declarations.
Workaround: removing the > (&:has(:is([type=checkbox],[type=radio]))) makes the rule appear in the file.
Observed: I imported the style twice. Both times style-global.css was rebuilt (the ?ver= timestamp changed) and both times the two :has(> …) rules were absent. Other nested rules in the same import were written correctly, including &:focus:not(:hover) and & > *. After I removed the >, the rules appeared.
2. After an import, new design tokens are not in the :root CSS
Steps to reproduceExport the design system (Global Styles and Design Tokens).
In the JSON, add a token to the :root styles (for example “–space-form-field”: “var(–space-l)”) and a matching entry in designTokens.
Import the file.
Open style-global.css.
Expected: –space-form-field:var(–space-l) in the :root rule.Actual: the new tokens are missing from :root in the file, although:
the file was rebuilt during the import, because a new class style from the same import does appear;
a new export shows the tokens both in the :root styles and in designTokens.
Any rule that uses one of these tokens has no effect on the front end.Workaround: change the value of one token, save, change it back and save again. After that the tokens are in the file.
3. After saving in the CSS editor, the base declarations of a style were missing
Observed once; I have not tried to reproduce it on purpose.The Global Style label had two top-level declarations (font-weight, color) and two nested :has(…) rules. I edited one nested selector in the CSS editor and saved.
Result:
In the rebuilt style-global.css: the two nested rules were there, but the base rule label{color:…;font-weight:…} was gone.
In an export made afterwards: fontWeight and color were still in the style data.
Making a real change in the normal style panel and saving rebuilt the CSS with the base rule.Suggestions
Show an error when a rule cannot be compiled, instead of leaving it out of the file without any message.
Rebuild the CSS of every style that an import changes, including :root.
Offer a way to rebuild the CSS of all Global Styles, for example a button. If one already exists, it would help to make it more visible. -
Alvind
Hi,
Thanks for the detailed report.
I tested the
:has(> :is(...))example with the bundled compiler, and it preserves both the nested rule and the baselabeldeclarations. The generated selector is minified to:label:has(>:is([type=checkbox],[type=radio]))Could you check whether that version appears in the file?
For the token import case, imported Design Tokens remain staged until you click the main Save button. Newly created Global Styles save immediately, so they can trigger a stylesheet rebuild before the imported tokens are saved. Exports include staged changes too, which explains why the tokens can appear in an export at that point.
Did you click Save after importing, before checking the CSS file?
If the rules are still missing after saving, could you share the affected JSON export and the corresponding
style-global.css, ideally before applying the workaround? That will help us trace where the declarations are being omitted, including the missing base declarations after the CSS-editor save. -
Thanks, you were right on both points. I repeated both cases with a fresh export and a copy of style-global.css after each save:
&:has(> :is([type=checkbox],[type=radio])) compiles to label:has(>:is(…)), and the base label declarations stay in place after saving in the CSS editor.
After importing a file with a new token and clicking Save, the token appears in :root. The file timestamp matches the moment I clicked Save.
I couldn’t reproduce the earlier missing rules, so I’ll treat it as an unclear situation on my side rather than a bug. If it happens again, I’ll keep the export and style-global.css from before any workaround and send both. -
Alvind
Sure, let us know!
-
it happened again, and this time I kept everything from before any workaround. It is case 2 from my first post, now with an existing Global Style instead of a token, and with the main Save button clicked.
Versions: WordPress [x], GeneratePress [x], GenerateBlocks [x], GenerateBlocks Pro [x].
What I did
Exported design system = file A (my export -30). Changed five declarations in the existing Global Style .frm_forms = file B (export -31). Nothing else changed.
Imported file B in the Design dashboard. Notice: “Import complete: 0 created, 89 updated, 0 skipped.”
Clicked the main Save button.
Checked the stored style (public REST endpoint /wp-json/wp/v2/gblocks_styles?search=frm_forms) and the generated uploads/generateblocks/style-global.css.
What I found (times UTC, 12 October 2026)Moment .frm_forms gb_style_data .frm_forms gb_style_css style-global.css
Before import old (id 207, modified 2026-10-06 12:25:07) old old (?ver=1791830189)
After import + Save new (id 207, modified 19:52:56) new old (?ver=1791834776, Last-Modified 19:52:56)
After changing a value and changing it back, saving twice unchanged, no style got a new modified date still old, same ?ver
After one real change in another style (19:56:33) new new new (?ver=1791834993)
So the import did update the existing style (same post id, new data and new compiled CSS), but style-global.css was written in the same second without the new rules, and the main Save button did not rebuild it. Only a later real change in another style produced a file with the new .frm_forms rules.Example of a missing rule: the stored gb_style_css contains .frm_forms .frm_error::before{background-color:var(–form-icon-color,var(–text-error));…;forced-color-adjust:none} and @media (forced-colors:active){.frm_forms{–form-icon-color:CanvasText}}, while style-global.css at ?ver=1791834776 still has .frm_forms .frm_error::before{background-color:var(–text-error);…} and no forced-colors rule for .frm_forms.
Attached
The import file B and the previous export A.
For each moment: the REST response and the complete style-global.css with response headers.
Expected: after an import (or at the latest after Save), style-global.css contains the compiled CSS of every style the import updated.The same thing happened in two earlier imports that day with other existing styles, but I can only document this one cleanly.
-
Alvind
Thanks for keeping these files, they confirm the mismatch.
I compared the two exports, REST responses, and stylesheets. Only
.frm_formschanged between the exports. After Save, its stored declarations and compiled CSS both contain the new rules, but the servedstyle-global.cssis byte-for-byte identical to the previous file, despite having a new timestamp. The later change to.gbc-noticeproduces a stylesheet containing the updated.frm_formsrules.This confirms that the import was saved and compiled successfully. The remaining issue is in generating or serving the combined stylesheet.
We corrected a matching issue for RC2: during bulk saves, a request could read stale cached CSS when writing the stylesheet.
Could you confirm your exact installed GenerateBlocks and GenerateBlocks Pro versions? Your first post mentioned Pro RC1, but the latest report lists the versions as
[x]. That will help us determine whether the existing fix applies or whether this needs further investigation. -
I was on rc1, I now updated to 3.
-
George
Hi,
I rebuilt your scenario locally — imported your framework-30 export, saved, then imported framework-31 with overwrite and saved, with request-level tracing on the stylesheet generation. On the current release candidate the result is correct at every level: the stored style data, the cached stylesheet and the published
style-global.cssall contain your new .frm_formsrules.More usefully, the trace shows the race you hit still occurs during that import — the Design Tokens root saves in its own request alongside the batched style saves, and one of them was working from an out-of-date copy of the stylesheet. What changed in rc.2 is that the generated CSS is now handed directly to the file writer instead of being re-read from that copy, so the out-of-date version no longer gets published. Your capture was taken on rc.1, before that change, which is why you saw a file byte-identical to the previous version with a fresh timestamp.
One detail worth knowing, since it probably added to the confusion: the “89 updated” in the import notice counts the styles the import staged, not the records written. Styles whose content is identical are dropped before saving, so in your case a single record was actually written — which is why only
.frm_formspicked up a new modified date and your later save attempts registered no change at all. That part was working correctly.I’ve recorded a second, much narrower variant with the development team. It needs two styles being written at the same moment, which the import doesn’t do, so it shouldn’t affect you in practice.
If you ever do see a stale stylesheet again: any real change to any single style rebuilds it correctly, and deleting
uploads/generateblocks/style-global.cssmakes the front end generate the CSS inline from the stored data until the next save recreates the file.Thanks for the report!
- You must be logged in to reply to this topic.