feat: add Button Bold font weight option#789
Conversation
Adds a "Button Bold" checkbox to the Block Design settings under a new "Button Element" section. When enabled, buttons get font-weight: bold via CSS variable --dxt-setting-button-bold. Fixes: #787
516403b to
31ce2e4
Compare
|
|
||
| $form['dxpr_theme_settings']['block']['block_advanced']['button_el']['button_bold'] = [ | ||
| '#type' => 'checkbox', | ||
| '#title' => t('Button Bold'), |
There was a problem hiding this comment.
This new setting is missing #ai_description. generate-settings-schema.js only includes that metadata when it is present in the PHP form definition, so the generated button_bold schema entry loses the design guidance comparable settings like headings_bold already provide. Worth adding here if this setting is meant to participate in the schema-driven AI workflows.
| } | ||
|
|
||
| .btn { | ||
| font-weight: var(--dxt-setting-button-bold); |
There was a problem hiding this comment.
Disabled state is not neutral here. DXPR attaches its base libraries after the active subtheme global-styling library, so this unconditional .btn rule overrides same-specificity subtheme button weights. Because --dxt-setting-button-bold defaults to normal, existing subthemes that intentionally set .btn to 500 or 600 will regress even when the checkbox stays off. Can we preserve current behavior in the disabled state instead of forcing normal?
- Add #ai_description to button_bold setting for schema-driven AI - Change button_bold disabled default from 'normal' to 'inherit' so subthemes that set custom .btn font-weight are not overridden when the checkbox is off - Regenerate compiled CSS and settings schema
Summary
font-weight: boldto.btnelements via the CSS variable--dxt-setting-button-boldheadings_boldsettingChanges
features/sooper-block-design/block-design-theme-settings.inc: Addedbutton_eldetails group withbutton_boldcheckbox fieldfeatures/sooper-settings/css-variables-theme-settings-css.inc: Registeredbutton_boldas a CSS variable and added value massaging (bold/normal)scss/base/variables.scss: Added--dxt-setting-button-bold: normaldefaultscss/vendor-extensions/bootstrap-5.scss: Appliedfont-weight: var(--dxt-setting-button-bold)to.btncss/: Compiled CSS artifactsFixes: #787
Test plan