CoreFiles by mySites.guru
mixins.scss79 lines, 1,682 bytes, from wordpress-5.6-RC1.zip
Raw History Compare with 5.5.1-RC2
md5
2fe961ffe0a0d18f923f1cee01fe3f4b
sha1
5c464b4f49b87a931ee028c20346cb6d9ae3f610
sha256
27a9e5be4e2ebe32a9256a032f1506c405374a9dc942d35f333d7683c45479f7
// Responsive breakpoints mixin
@mixin add_variables( $view: frontend ) {

	@if frontend == $view {

		:root {
			@content;
		}
	}

	@if editor == $view {

		:root,
		body {
			@content;
		}
	}
}

// Crop Text Boundry
// - Sets a fixed-width on content within alignwide and alignfull blocks
@mixin crop-text($inset-line-height: 1) {

	line-height: $inset-line-height;
	$offset-top: calc(.5em * #{$inset-line-height} + -.38);
	$offset-bottom: calc(.5em * #{$inset-line-height} + -.39);

	&:before,
	&:after {
		content: "";
		display: block;
		height: 0;
		width: 0;
	}

	&:before {
		margin-bottom: -($offset-top);
	}

	&:after {
		margin-top: -($offset-bottom);
	}
}

// Button style
// - Applies button styles to blocks and elements that share them.
@mixin button-style() {
	@include crop-text(var(--button--line-height));
	color: var(--button--color-text);
	cursor: pointer;
	font-weight: var(--button--font-weight);
	font-family: var(--button--font-family);
	font-size: var(--button--font-size);
	background-color: var(--button--color-background);
	border-radius: var(--button--border-radius);
	border: var(--button--border-width) solid var(--button--color-background);
	text-decoration: none;
	padding: var(--button--padding-vertical) var(--button--padding-horizontal);

	&:focus {
		background: transparent;
		outline-offset: -6px;
		outline: 2px dotted currentColor;

		.is-dark-theme & {
			color: var(--button--color-background);
		}

		&:not(.has-background) {
			color: var(--button--color-text-hover);
		}
	}

	&:disabled {
		background-color: var(--global--color-white-50);
		border-color: var(--global--color-white-50);
		color: var(--button--color-text-active);
	}
}

The same content is in 2 releases, WordPress 5.6-beta4 to 5.6-RC1. See them all, or every version of this file.