Problem/Motivation

Button CSS rules from bs_base/themes/bs_bootstrap/sass/components/partials/_navbar-offcanvas.scss

.navmenu.in {
   ....

  .btn {
    background-color: $navbar-offcanvas-btn-color-bg;
    @if ($navbar-offcanvas-color) {
      border: $input-btn-border-width solid $navbar-offcanvas-color;
    }
    @if ($navbar-offcanvas-btn-color) {
      color: $navbar-offcanvas-btn-color;
    }
  }

  ...
}

is too strong and will override regular button rules like btn-primary, etc.

This rule is probably added for a close off-canvas navigation button.

Proposed resolution

We should modify rule selector and target only close and btn-ghost buttons.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pivica created an issue. See original summary.

pivica’s picture

Status: Active » Needs review
FileSize
1.11 KB

It seems we don't really have btn-ghost in base theme, nor it is supported by Bootstrap. There is now btn-link but that is not exactly the same as btn-ghost.

Here is a patch that should fix this and also ads support for btn-link in sidebar.

pivica’s picture

FileSize
878 bytes

Updated patch against latest dev.

pivica’s picture

FileSize
773 bytes

Let's put .offcanvas-close-link after .btn-link so it is more specific rule.

pivica’s picture

FileSize
1.35 KB
1.52 KB

I don't see a point of wrapping btn-link and offcanvas-close-link rules into `@if ($navbar-offcanvas-btn-color-bg)`, this other rules should not depend on $navbar-offcanvas-btn-color-bg variable.

Also for a offcanvas-close-link border we shoud use `$navbar-offcanvas-btn-color` variable.

  • pivica committed e4db225 on 8.x-1.x
    Issue #3228499 by pivica: Button CSS rule for sidebar off-canvas...
pivica’s picture

Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

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