Problem/Motivation
bs_base's `bs-button-variant()` mixin in `sass/mixins/_util.scss` is still BS3/4-era: it emits direct property declarations
(`color`, `background-color`, `border-color`, hover/focus/active properties) instead of overriding the `--bs-btn-*` CSS custom properties that BS5 buttons cascade through.
Result: `.btn-neutral` (the only current consumer) and any child-theme variant defined via this mixin does not compose with global `--bs-btn-hover-*` / `--bs-btn-active-*` overrides.
Proposed resolution
Rewrite the mixin to set the BS5 button CSS variables on the variant selector instead of direct properties:
@mixin bs-button-variant($color, $bg, $border, ...) {
--bs-btn-color: #{$color};
--bs-btn-bg: #{$bg};
--bs-btn-border-color: #{$border};
--bs-btn-hover-color: #{$hover-color};
// ...
}
Update `.btn-neutral` accordingly. Existing call signature stays; only the emitted CSS changes.
Follow-up from #2844385: Default button.css file is too big.
Issue fork bs_base-3588556
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
pivica commentedDone.