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 disable inset shadow #2297

Closed
LeviSchuck opened this issue May 3, 2013 · 3 comments
Closed

Button disable inset shadow #2297

LeviSchuck opened this issue May 3, 2013 · 3 comments

Comments

@LeviSchuck
Copy link

Unlike the inputs, there's no way to globally say for buttons "Don't give me an inset box shadow!"

My workaround for this is along the lines of the following:

For foundation/scss/foundation/components/_buttons.scss, I added

$button-box-shadow: true !default; near line 33.

Then, around line 204, which starts out normall like

  @media only screen {

    button, .button {
      @include inset-shadow();

I replaced @include inset-shadow(); with

      @if $button-box-shadow != false {
        @include inset-shadow();
      }

This allows me to have the dead simple flat look I'm going for, without using mixins.

I am not familiar enough with sass to consider this a decent solution, but for me, it works.

@dmackerman
Copy link
Contributor

Instead of hacking the core of Foundation, I would suggest just overriding the .button class with box-shadow: none;, or just writing your own mixin.

I agree that this should be a part of the framework though.

@LeviSchuck
Copy link
Author

I agree that changes to foundation should be minimal and hopefully none. (Which is why I try to leave the behavior the same as the default with my option not present)

When it comes to sass, I don't know if it optimizes out duplicate rules with overriding attributes, but I would naively expect it to have both rules. To me, that's just more stuff going down the wire.

@oytuntez
Copy link

Sorry for posting on a closed issue. But this could be a reference to all who comes here after a search.

You can use these variables to set shadows of a button:

$shiny-edge-size: 0 1px 0;
$shiny-edge-color: rgba(#fff, .5);
$shiny-edge-active-color: rgba(#000, .2);

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

4 participants