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

Command icon 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

pivica created an issue. See original summary.

  • pivica committed c99fe355 on 2.0.x
    fix: #3588556 Modernize bs-button-variant: delegate to BS5 button-...
pivica’s picture

Status: Active » Fixed

Done.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.