Mixin make-button issues


Topic: Mixin "make-button" issues

HeyCaptain pro asked 3 years ago

In file scss/core/_mixins.scss, for the mixin @mixin make-button ($name, $color) {

this scss is in a loop but it generates the same code for different colors :

a.btn:not([href]):not([tabindex]),

a.btn:not([href]):not([tabindex]):focus,

a.btn:not([href]):not([tabindex]):hover {

color: set-notification-text-color($color);

}

Maybe $name should be used for the generation of some different selector ?I've used this solution with success :

a.btn.btn-#{$name}:not([href]):not([tabindex]),

a.btn.btn-#{$name}:not([href]):not([tabindex]):focus,

a.btn.btn-#{$name}:not([href]):not([tabindex]):hover {

color: set-notification-text-color($color);

}


Marta Szymanska staff pro premium answered 3 years ago

Hi,

thank you for noticing this, we will check out your idea.

Best, Marta


leifcr pro premium answered 2 years ago

I'm seeing the same issue. This is repeated 52 times in mdb.css (Counting #fff and #000 entries)

a.btn:not([href]):not([tabindex]),
a.btn:not([href]):not([tabindex]):focus,
a.btn:not([href]):not([tabindex]):hover {
  color: #fff;
}

The solution from the first message should be the correct one. However, it could in theory be optimized, so that the default states:

a.btn:not([href]):not([tabindex]),
a.btn:not([href]):not([tabindex]):focus,
a.btn:not([href]):not([tabindex]):hover {
  color: #fff;
}

And for all that is not #fff, it should create an entry. Example of entry that needs #000 (btn-white)

a.btn-white:not([href]):not([tabindex]),
a.btn-white:not([href]):not([tabindex]):focus,
a.btn-white:not([href]):not([tabindex]):hover {
  color: #000; }

Marta Szymanska staff pro premium commented 2 years ago

Hi,

we will deal with this problem in our package as soon as we have the opportunity.

Best, Marta


Please insert min. 20 characters.
Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.7.7
  • Device: All
  • Browser: All
  • OS: All
  • Provided sample code: No
  • Provided link: No
Tags