Sha256: 42e8055bcaaf5fce0ec1210e3d65e9a197f268552efa23245f3daa2297874a44

Contents?: true

Size: 994 Bytes

Versions: 4

Compression:

Stored size: 994 Bytes

Contents

//load functions before calling them. put in helpers
@function set-text-color($color) {
  @if (lightness($color) > 60%) {
    @return rgba($black, $transparent-weak); // Lighter backgorund, return dark color
  } @else {
    @return rgba($white, $transparent-strong); // Darker background, return light color
  }
}
//DEFAULT
.button{
	background-color: $primary-color;
	color: set-text-color($primary-color);
	font-weight: 200;
 	letter-spacing: 1px;
 	transition: background-color 150ms ease-out;
}
.button:hover{
	background-color: lighten($primary-color, $transition-brighten);
}

//BUTTON GENERATOR FOR EACH COLOR
@each $color in $button-classes {
	$i: index($button-classes, $color);
	$temp-color: nth($button-define, $i);
	.button.#{$color}{
		background-color: $temp-color;
		color: set-text-color($temp-color);
	}
	.button.#{$color}:hover{
		background-color: lighten($temp-color, $transition-brighten);
	}
}

//MODIFY DEFAULT STYLE
//APPEND ADDITIONAL GENERATORS WITH COMMANDS AS NEEDED

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
staple-0.1.6 source/stylesheets/staple/builders/build_buttons.scss
staple-0.1.5 source/stylesheets/staple/builders/build_buttons.scss
staple-0.1.4 source/stylesheets/staple/builders/build_buttons.scss
staple-0.1.3 source/stylesheets/staple/builders/build_buttons.scss