WIP: Abilities: unsuffixed setting keys are accepted silently on mobile-first sites

Area: AI abilities (element writes, global classes, theme styles, HTML/CSS import)

Environment

  • Bricks 2.4.5
  • WordPress 7.1.4, local install
  • Active plugins: Gravity Forms 3.2.3, WPCodeBox 2 1.4.1 (site CSS/PHP snippets), Disable Comments, WPS Hide Login
  • Custom breakpoints, mobile-first: Mobile portrait is the base breakpoint, then Mobile landscape (min-width 639px), Tablet portrait (1023px), Laptop (1279px), Desktop (1535px)
  • Bricks settings › Performance: CSS loading method set to external files
  • Bricks AI abilities called through the WordPress MCP adapter, with the Bricks skills pack v0.1.5

Summary

On a mobile-first site, an unsuffixed CSS setting key (for example _padding) belongs to the Desktop breakpoint (1535px+ here). Base styles have to be saved with the base key suffix (_padding:mobile_portrait).

The abilities accept unsuffixed keys without any warning, and commit-html-css-page-import writes unsuffixed keys itself. An agent that follows the skill examples builds a page that looks right on a wide screen and loses all of its styling below 1535px.

Steps to reproduce

  1. Set custom breakpoints with Mobile portrait as the base. list-breakpoints returns isMobileFirst: true.
  2. Write an element or global class through an ability with settings: { "_padding": { "top": "2rem" } }.
  3. View the front end at 390px and at 1600px.

Expected

One of:

  • the ability warns that the key targets the Desktop breakpoint on a mobile-first site, or
  • the ability maps unsuffixed keys to the base breakpoint (opt-in parameter), or
  • the response includes baseKey so the caller can tell.

Actual

Saved with no warning. The style only applies at 1535px and up.

HTML/CSS importer

commit-html-css-page-import has the same problem: base CSS is converted to unsuffixed keys. We had to re-key every imported setting to :mobile_portrait afterwards.

It also adds data-bricks-import-scope-* attributes to every imported section, plus a custom CSS block, when it can’t map a rule natively (in our case one link color inside running text). That’s covered by the import warnings, but cleanup is manual.

Impact

This caused more rework than any other issue in the project. Everything written through abilities had to be re-keyed and checked.

Thanks for reporting this. We reproduced the ID-selector import issue and added it to our internal bug tracker. We’ll update this thread once it’s fixed.

For direct ability writes, responsive base styles need the configured base breakpoint suffix on mobile-first sites. Non-responsive settings remain unsuffixed. The skills documentation gap is also tracked. Global-class imports already map base styles, so imported settings shouldn’t all be re-keyed.