CoreFiles by mySites.guru
_mixins.scss40 lines, 879 bytes, from wordpress-5.3-beta1.zip
Raw History Compare with 5.2-beta3
md5
2a2f0fedb60dcca01df92319bdf14abb
sha1
9374edeaef61e0a8a15685879b5fc156de847aaf
sha256
d462d51f8a7f1c1d58a74dbb8732a506f1e4e83df9b97f4de306f039105d1fa4
/*
 * Button mixin- creates a button effect with correct
 * highlights/shadows, based on a base color.
 */
@mixin button( $button-color, $text-color: #fff ) {
	background: $button-color;
	border-color: $button-color;
	color: $text-color;

	&:hover,
	&:focus {
		background: lighten( $button-color, 3% );
		border-color: darken( $button-color, 3% );
		color: $text-color;
	}

	&:focus {
		box-shadow:
			0 0 0 1px #fff,
			0 0 0 3px $button-color;
	}

	&:active,
	&.active,
	&.active:focus,
	&.active:hover {
		background: darken( $button-color, 5% );
		border-color: darken( $button-color, 5% );
	}

	&[disabled],
	&:disabled,
	&.button-primary-disabled,
	&.disabled {
		color: hsl( hue( $button-color ), 10%, 80% ) !important;
		background: lighten( $button-color, 15% ) !important;
		border-color: lighten( $button-color, 15% ) !important;
		text-shadow: none !important;
	}
}

The same content is in 2 releases, WordPress 5.3-beta1 to 5.3-beta2. See them all, or every version of this file.