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

[HAR-107] Add bottom box shadow to buttons #29

Merged
merged 10 commits into from
Apr 26, 2018

Conversation

michaelmaat
Copy link
Contributor

Add default box shadows to buttons. Only set the box-shadow property if the box shadow variable is not set to an empty string later on.

@bartvandebiezen
Copy link
Contributor

A box-shadow for a button is very rare. I would not advise to add this to a button, even if it is an if-statement. A box-shadow will create a kind of elevation which should be determined globally. Create 'button--elevated' or for when you want to increase the box-shadow 'button--elevated-200' and use global variables.

@edgargressie
Copy link
Contributor

I agree this is a rare case, maybe the variable should me empty by default. I'm not sure about the modifier. When it's part of your clients identity, a modifier on every button doesn't feel right to me.

An other option may be some extra layer of styling in your clients codebase.

In your button.scss:

@import '~aanzee-harbour/scss/controls/button';

.button {
	box-shadow: 0 2px 0 $color-x;
}

@bartvandebiezen
Copy link
Contributor

I believe this should never be part of a clients identity. Default elevation should always be 0.

@romypetitjean
Copy link
Contributor

I agree that a box shadow should not be default for the button. However, I think it can be part of a client's identity when a designer decides this is the default styling for all buttons. I think in that case a modifier on all buttons is not desired.

@michaelmaat michaelmaat requested a review from a team April 25, 2018 09:15
@@ -15,37 +17,47 @@ $button-disabled-background-color: $color-ui-40 !default;
color: $button-color;
text-align: center;
font-weight: normal;
line-height: 16px;
line-height: $spacing * 2;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line-height based on line-height variable and see if a multi-line button looks good? A vertical padding can be calculated automatically with: $control-height-100 - $font-size-x * $line-height-x / 2
Or is this a different pull request ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, but lets fix this in a different pull request 🥜


&:hover {
background-color: $button-primary-hover-background-color;
color: $button-primary-hover-color;
}

&:focus {
box-shadow: $button-primary-focus-box-shadow;
@if ($button-outset) {
box-shadow: $button-call-to-action-focus-box-shadow, $button-primary-outset-box-shadow;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$button-call-to-action-focus-box-shadow -> $button-primary-focus-box-shadow


&:hover {
background-color: $button-secondary-hover-background-color;
color: $button-secondary-hover-color;
}

&:focus {
box-shadow: $button-secondary-focus-box-shadow;
@if ($button-outset) {
box-shadow: $button-call-to-action-focus-box-shadow, $button-secondary-outset-box-shadow;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$button-call-to-action-focus-box-shadow -> $button-secondary-focus-box-shadow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too much copy paste :(


&:focus {
box-shadow: $button-focus-box-shadow;
@if ($button-outset) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be an if else


@include media(0, $range-palm) {
padding: 8px 24px;
padding: ($spacing) ($spacing * 3);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

($spacing) should be $spacing

font-size: $font-size-90;
}

.button--90 {
@include media(0, $range-palm) {
padding: 8px 20px;
padding: ($spacing) ($spacing * 2.5);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

($spacing) should be $spacing

@edgargressie edgargressie merged commit f75aa53 into develop Apr 26, 2018
@edgargressie edgargressie deleted the feature/HAR-107-button-box-shadow branch May 3, 2018 08:40
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

Successfully merging this pull request may close these issues.

4 participants