Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Button] Disabled button mixin does not respect "opacity" argument #12557

Open
4 tasks done
emprice opened this issue Jul 23, 2023 · 0 comments
Open
4 tasks done

[Button] Disabled button mixin does not respect "opacity" argument #12557

emprice opened this issue Jul 23, 2023 · 0 comments

Comments

@emprice
Copy link

emprice commented Jul 23, 2023

Expected Behavior

When the button-disabled mixin is included in Sass, the button should get the opacity given in the $opacity argument, using $button-opacity-disabled as a fallback.

Current Behavior

Currently, button-disabled sets the opacity to $button-opacity-disabled no matter what value is passed for $opacity.

Possible Solution

The mixin simply doesn't read its argument and is set up to use the default no matter what. The fix is trivial:

// scss/components/_button.scss, line 283
@mixin button-disabled(
  $opacity: $button-opacity-disabled
) {
  // previously: opacity: $button-opacity-disabled;
  opacity: $opacity;
  cursor: not-allowed;
}

Steps to Reproduce

How to reproduce:

  1. Add @include button-disabled to a Sass rule
  2. Compile stylesheet with Sass and link in a document

Context

Nothing fancy, just using the more fine-grained mixins to customize the appearance of my web app. In its current form, the mixin won't work for me, because I don't set the value of $button-opacity-disabled before importing Foundation.

Your Environment

  • Foundation version(s) used: 6.7.5, via npm
  • Browser(s) name and version(s): Firefox
  • Device, Operating System and version: Ubuntu

Checklist

  • I have read and follow the CONTRIBUTING.md document.
  • This is a bug report or a feature request.
  • There are no other issues similar to this one.
  • The issue title and template are correctly filled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant