CoreFiles by mySites.guru
_mixins.scss39 lines, 945 bytes, from wordpress-6.8.zip
Raw History Compare with 6.7.12
md5
c4eefbf748e6974a0840249c91dacf15
sha1
769e377ad723d72e786f8115d1f3e55cd7d1ea98
sha256
f0d90c1a1a62553ce0fb1f22975f1fecd18d70a8b653925653ba3b138d935082
@use 'sass:color';

/*
 * Button mixin- creates a button effect with correct
 * highlights/shadows, based on a base color.
 */
@mixin button( $button-color, $button-text-color: #fff ) {
	background: $button-color;
	border-color: $button-color;
	color: $button-text-color;

	&:hover,
	&:focus {
		background: color.adjust($button-color, $lightness: 3%);
		border-color: color.adjust($button-color, $lightness: -3%);
		color: $button-text-color;
	}

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

	&:active {
		background: color.adjust($button-color, $lightness: -5%);
		border-color: color.adjust($button-color, $lightness: -5%);
		color: $button-text-color;
	}

	&.active,
	&.active:focus,
	&.active:hover {
		background: $button-color;
		color: $button-text-color;
		border-color: color.adjust($button-color, $lightness: -15%);
		box-shadow: inset 0 2px 5px -3px color.adjust($button-color, $lightness: -50%);
	}
}

The same content is in 45 releases, WordPress 6.8-beta1 to 6.9.12. See them all, or every version of this file.