Area: AI abilities › audit-design-system
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
A component can expose a Global classes property (type: "class") with named options, where each option’s value is an array of class IDs. A class that is only referenced in those options is reported as unused, even when instances select that option.
Steps to reproduce
- Create a class
banner--full. - Create a component with a class property whose options include
{ "name": "Full", "value": ["<banner--full id>"] }. - Place an instance on a page and select “Full”.
- Run
audit-design-systemwithscope: "unused".
Expected
banner--full is not reported, because a published page uses it.
Actual
Reported as unused (info). Anyone following the audit’s suggestion would delete a class that is in use.
Suggested fix
When scanning components, also collect class IDs from properties[].options[].value for properties of type: "class", and from instance properties values that resolve to those options.