CoreFiles by mySites.guru
style-editor.scss958 lines, 17,823 bytes, from wordpress-5.5.21.zip
Raw History Compare with 5.5.20
md5
ceb05a36a279b5508c9014940aacd29e
sha1
7e8e3c9da31b685b6113c08b20f5bf4f41adc2d8
sha256
258b135e716d79bcac9682a40c20151c2e46487c5e2bc28fd969cbd65564a1a2
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958
/*!
Twenty Nineteen Editor Styles
*/

/** === Includes === */

@import "sass/variables-site/variables-site";
@import "sass/mixins/mixins-master";

/** === Editor Frame === */

body {

	.wp-block[data-align="full"],
	.wp-block.alignfull {
		width: calc(100% + 20px);
		max-width: calc(100% + 20px);
	}

	.wp-block[data-align="left"],
	.wp-block.alignleft, {
		margin-right: $size__spacing-unit;
		width: inherit;
	}

	.wp-block[data-align="right"],
	.wp-block.alignright, {
		margin-left: $size__spacing-unit;
		width: inherit;
	}

	.wp-block[data-align="center"],
	.wp-block.aligncenter, {
		margin-left: 0;
	}

	@include media(tablet) {

		.block-editor-writing-flow {
			max-width: 80%;
			margin: 0 10%;
		}

		.block-editor-default-block-appender,
		.block-editor-block-list__block {
			margin-left: 0;
			margin-right: 0;
		}

		.wp-block[data-align="wide"],
		.wp-block.alignwide {
			width: 100%;
		}

		.wp-block[data-align="full"],
		.wp-block.alignfull {
			width: calc( 125% + 20px );
			max-width: calc( 125% + 20px );
			position: relative;
			left: -12.5%;
		}
	}
}

/** === Content Width === */

.wp-block {
	max-width: 100%;

	@include media(tablet) {
		width: calc(8 * (100vw / 12));
	}

	@include media(desktop) {
		width: calc(6 * (100vw / 12 ));
	}

	// Only the top level blocks need specific widths, therefore override for every nested block.
	.wp-block {
		width: initial;
	}
}

/** === Base Typography === */

body {
	font-size: $font__size_base;
	@include font-family( $font__body );
	line-height: $font__line-height-body;
	color: $color__text-main;
}

p {
	font-size: $font__size_base;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	@include font-family( $font__heading );
	font-weight: 700;
}

h1 {
	font-size: $font__size-xl;
	@include post-section-dash;

	@include media(tablet) {
		font-size: $font__size-xxl;
	}
}

h2 {
	font-size: $font__size-lg;
	@include post-section-dash;

	@include media(tablet) {
		font-size: $font__size-xl;
	}
}

h3 {
	font-size: $font__size-lg;
}

h4 {
	font-size: $font__size-md;
}

h5 {
	font-size: $font__size-sm;
}

h6 {
	font-size: $font__size-xs;
}

a {
	@include link-transition;
	color: $color__link;

	*:visited {

	}

	&:hover,
	&:active {
		color: $color__link-hover;
		outline: 0;
		text-decoration: none;
	}

	&:focus {
		outline: 0;
		text-decoration: underline;
	}
}

// Use white text against these backgrounds by default.
.has-primary-background-color,
.has-secondary-background-color,
.has-dark-gray-background-color,
.has-light-gray-background-color {
	color: $color__background-body;

	p,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	a {
		color: $color__background-body;
	}
}

// Use dark gray text against this background by default.
.has-white-background-color {
	color: $color__text-main;

	p,
	h1,
	h2,
	h3,
	h4,
	h5,
	h6,
	a {
		color: $color__text-main;
	}
}

figcaption,
.gallery-caption {
	@include font-family( $font__heading );
	font-size: $font__size-xs;
	line-height: 1.6;
	color: $color__text-light;
}

/** === Post Title === */

.editor-post-title__block {
	width: 100%;
	@include post-section-dash;

	&:before {
		width: $font__size-xxl;
		margin-top: 0;
		margin-bottom: 0;
		margin-left: 1rem;
		position: relative;
		top: 0.5em;

		@include media(mobile) {
			margin-left: 0;
		}
	}

	.editor-post-title__input {
		@include font-family( $font__heading );
		font-size: $font__size-xxl;
		font-weight: 700;
	}
}

/** === Default Appender === */

.block-editor-default-block-appender textarea.block-editor-default-block-appender__content {
	@include font-family( $font__body );
	font-size: $font__size_base;
}

/** === Heading === */

.wp-block-heading {
	strong {
		font-weight: bolder;
	}
}
/** === Paragraph === */

.wp-block-paragraph {

	&.has-drop-cap:not(:focus)::first-letter {
		@include font-family( $font__heading );
		font-size: $font__size-xxxl;
		line-height: 1;
		font-weight: bold;
		margin: 0 0.25em 0 0;

		@-moz-document url-prefix()  {
			& {
				margin-top: 0.2em;
			}
		}
	}
}

/** === Table === */

.wp-block-table {
	@include font-family( $font__heading );
}

/** === Cover === */

.wp-block-cover {

	h2,
	.wp-block-cover-text {
		@include font-family( $font__heading );
		font-size: $font__size-lg;
		font-weight: bold;
		line-height: 1.4;
		padding-left: $size__spacing-unit;
		padding-right: $size__spacing-unit;

		strong {
			font-weight: bolder;
		}

		@include media(tablet) {
			margin-left: auto;
			margin-right: auto;
			padding: 0;
		}
	}

	@include media(tablet) {
		padding-left: 10%;
		padding-right: 10%;

		h2,
		.wp-block-cover-text {
			font-size: $font__size-xl;
		}
	}
}

.wp-block[data-type="core/cover"][data-align="left"],
.wp-block[data-type="core/cover"][data-align="right"] {

	.editor-block-list__block-edit {
		width: calc(4 * (100vw / 12));
	}

	.wp-block-cover {
		width: 100%;
		max-width: 100%;
		padding: calc(1.375 * #{$size__spacing-unit});

		p {
			padding-left: 0;
			padding-right: 0;
		}

		@include media(tablet) {
			padding: calc(2.75 * #{$size__spacing-unit}) calc(2.75 * #{$size__spacing-unit}) calc(3.125 * #{$size__spacing-unit});
		}
	}
}

.wp-block[data-type="core/cover"][data-align="wide"],
.wp-block[data-type="core/cover"][data-align="full"] {

	@include media(tablet) {

		h2,
		.wp-block-cover-text {
			max-width: calc(8 * (100vw / 12));
		}
	}

	@include media(desktop) {

		h2,
		.wp-block-cover-text {
			max-width: calc(6 * (100vw / 12));
		}
	}
}

.wp-block[data-type="core/cover"][data-align="full"] {

	@include media(tablet) {

		.wp-block-cover {
			padding-left: calc(10% + 64px);
			padding-right: calc(10% + 64px);
		}
	}
}

/** === Gallery === */

.wp-block-gallery {

	.blocks-gallery-image figcaption,
	.blocks-gallery-item figcaption,
	.gallery-item .gallery-caption {
		font-size: $font__size-xs;
		line-height: 1.6;
	}
}

/** === Button === */

.wp-block-button {

	.wp-block-button__link {
		line-height: 1.8;
		@include font-family( $font__heading );
		font-size: $font__size-sm;
		font-weight: bold;
	}

	&:not(.is-style-outline) .wp-block-button__link {
		background: $color__background-button;
	}

	&:not(.is-style-squared) .wp-block-button__link {
		border-radius: 5px;
	}

	&.is-style-outline,
	&.is-style-outline:hover,
	&.is-style-outline:focus,
	&.is-style-outline:active {
		background: transparent;
		color: $color__background-button;

		.wp-block-button__link {
			background: transparent;

			&:not(.has-text-color) {
				color: $color__background-button;
			}
		}
	}
}

/** === Blockquote === */

.wp-block-quote {

	&:not(.is-large):not(.is-style-large) {
		border-width: 2px;
		border-color: $color__link;
	}

	&.is-large,
	&.is-style-large {
		margin-top: $font__size-xxl;
		margin-bottom: $font__size-xxl;
	}

	&.is-large p,
	&.is-style-large p {
		font-size: $font__size-lg;
		line-height: 1.3;
		margin-bottom: 0.5em;
		margin-top: 0.5em;
	}

	cite,
	footer,
	.wp-block-quote__citation {
		@include font-family( $font__heading );
		font-size: $font__size-xs;
		line-height: 1.6;
		color: $color__text-light;
	}
}

/** === Pullquote === */

.wp-block-pullquote {
	border-color: transparent;
	border-width: 2px;
	color: #000;

	blockquote {
		margin-top: calc(3 * #{ $size__spacing-unit});
		margin-bottom: calc(3.33 * #{ $size__spacing-unit});
		hyphens: auto;
		word-break: break-word;
	}

	&:not(.is-style-solid-color) .wp-block-pullquote__citation {
		color: $color__text-light;
	}

	&.is-style-solid-color {

		blockquote {
			width: calc(100% - (2 * #{ $size__spacing-unit}));
			max-width: calc( 100% - (2 * #{ $size__spacing-unit}));

			a,
			&.has-text-color p,
			&.has-text-color a {
				color: inherit;
			}

			&:not(.has-text-color) {
				color: $color__background-body;
			}

			@include media(tablet) {
				max-width: 80%;
			}
		}

		&:not(.has-background-color) {
			background-color: $color__link;
		}
	}
}

.wp-block[data-type="core/pullquote"],
.wp-block[data-type="core/pullquote"][data-align="left"],
.wp-block[data-type="core/pullquote"][data-align="right"] {

	blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
	blockquote > .editor-rich-text p,
	p {
		font-size: $font__size-lg;
		font-style: italic;
		line-height: 1.3;
		margin-bottom: 0.5em;
		margin-top: 0.5em;

		@include media(tablet) {
			font-size: $font__size-xl;
		}
	}

	.wp-block-pullquote__citation {
		@include font-family( $font__heading );
		font-size: $font__size-xs;
		line-height: 1.6;
		text-transform: none;
	}

	em {
		font-style: normal;
	}
}

.wp-block[data-type="core/pullquote"][data-align="left"],
.wp-block[data-type="core/pullquote"][data-align="right"] {

	.editor-block-list__block-edit {
		width: calc(4 * (100vw / 12));
		max-width: 50%;

		.wp-block-pullquote:not(.is-style-solid-color) {
			padding: 0;
		}

		.wp-block-pullquote.is-style-solid-color {
			padding: 1em;
		}
	}

	blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
	blockquote > .editor-rich-text p,
	p,
	.wp-block-pullquote__citation {
		text-align: left;
	}
}

.wp-block[data-type="core/pullquote"][data-align="full"] {

	@include media(tablet) {

		.wp-block-pullquote blockquote {
			max-width: calc(80% - 128px);
		}
	}
}


/** === File === */

.wp-block-file {
	@include font-family( $font__heading );

	.wp-block-file__textlink {
		text-decoration: underline;
		color: $color__link;

		&:hover {
			color: $color__link-hover;
			text-decoration: none;
		}
	}

	.wp-block-file__button {
		display: table;
		line-height: 1.8;
		font-size: $font__size-sm;
		font-weight: bold;
		background-color: $color__link;
		border-radius: 5px;
	}

	.wp-block-file__button-richtext-wrapper {
		display: block;
		margin-top: calc(0.75 * #{$size__spacing-unit});
		margin-left: 0;
	}

}

/** === Verse === */

.wp-block-verse,
.wp-block-verse pre {
	padding: 0;
}

/** === Code === */

.wp-block-code {
	border-radius: 0;
}

/** === Table === */

.wp-block-table {

	td, th {
		border-color: $color__text-light;
	}
}

/** === Separator === */

.wp-block-separator {

	&:not(.is-style-dots) {
		background-color: $color__text-light;
		height: 2px;
	}

	&:not(.is-style-wide):not(.is-style-dots) {
		width: $font__size-xl;
		margin-left: 0;
	}

	&.is-style-dots {
		color: $color__text-light;
	}

	&.is-style-dots:before {
		font-size: $font__size-lg;
		letter-spacing: calc(2 * #{$size__spacing-unit});
		padding-left: calc(2 * #{$size__spacing-unit});
	}
}

/* Remove duplicate rule-line when a separator
 * is followed by an H1, or H2 */
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h1:before,
.wp-block[data-type="core/separator"] + .wp-block[data-type="core/heading"] h2:before {
	display: none;
}

/** === Latest Posts, Archives, Categories === */

ul.wp-block-archives,
.wp-block-categories,
.wp-block-latest-posts {
	padding: 0;
	list-style-type: none;

	ul {
		padding: 0;
		list-style-type: none;
	}

	li {

		> a {
			@include font-family( $font__heading );
			font-size: calc(#{$font__size_base} * #{$font__size-ratio});
			font-weight: bold;
			line-height: $font__line-height-heading;
			text-decoration: none;
		}

		ul {
			padding-left: $size__spacing-unit;
		}
	}
}

.wp-block-categories {

	ul {
		padding-top: ( .75 * $size__spacing-unit );
		@include nestedSubMenuPadding();
	}

	li ul {
		list-style: none;
		padding-left: 0;
		margin-bottom: ( -.75 * $size__spacing-unit );
	}

}

/** === Latest Posts === */
.wp-block-latest-posts {

	.wp-block-latest-posts__post-date {
		@include font-family( $font__heading );
		font-size: $font__size-xs;
		color: $color__text-light;
		line-height: 1.2;
	}

	.wp-block-latest-posts__post-full-content,
	.wp-block-latest-posts__post-excerpt {
		margin-top: $font__size_base;
		margin-bottom: $font__size_base;

		> div > p:first-child {
			margin-top: $font__size_base;
		}
	}

	li {
		padding-bottom: ( .5 * $size__spacing-unit );

		&.menu-item-has-children,
		&:last-child {
			padding-bottom: 0;
		}

		:not(:last-child) .wp-block-latest-posts__post-excerpt {
			padding-bottom: ( .5 * $size__spacing-unit );
		}
	}

	&.is-grid {
		li {
			border-top: 2px solid $color__border;
			padding-top: (1 * $size__spacing-unit);
			margin-bottom: (2 * $size__spacing-unit);
			a {
				&:after {
					content: '';
				}
			}
			&:last-child {
				margin-bottom: auto;
				a:after {
					content: '';
				}
			}
		}
	}
}

/** === Latest Comments === */

.wp-block-latest-comments {

	.wp-block-latest-comments__comment-meta {
		@include font-family( $font__heading );
		font-weight: bold;

		.wp-block-latest-comments__comment-date {
			font-weight: normal;
		}
	}

	.wp-block-latest-comments__comment,
	.wp-block-latest-comments__comment-date,
	.wp-block-latest-comments__comment-excerpt p {
		font-size: inherit;
	}

	.wp-block-latest-comments__comment-date {
		font-size: $font__size-xs;
	}
}

/** === Classic Editor === */

/* Properly center-align captions in the classic-editor block */
.wp-caption {
	dd {
		color: $color__text-light;
 		font-size: $font__size-xs;
 		@include font-family( $font__heading );
 		line-height: $font__line-height-pre;
 		margin: 0;
 		padding: ( $size__spacing-unit * .5 );
 		text-align: left;
		text-align: center;
		-webkit-margin-start: 0px;
		margin-inline-start: 0px;
	}
}

.wp-block-freeform {

	/* Add style for galleries in classic-editor block */
	blockquote {
		border-left: 2px solid $color__link;

		cite {
			@include font-family( $font__heading );
			font-size: $font__size-xs;
			font-style: normal;
			line-height: 1.6;
			color: $color__text-light;
		}
	}
}

/** === Group Block === */

// This matches the 22px value for 1rem that used on the front end.
// It must be specified in pixels for the editor, since the root font 
// size is different here. 
$group-block-background__padding: $font__size_base;

.wp-block-group {

	// Child: Full alignment
	> .wp-block-group__inner-container > .wp-block[data-align="full"],
	> .wp-block-group__inner-container > .wp-block.alignfull {
		margin-left: 0;
		margin-right: 0;
		left: 0;
	}

	// Group block with background color
	&.has-background {
		padding: $group-block-background__padding;

		// Child: Full alignment
		> .wp-block-group__inner-container > .wp-block[data-align="full"],
		> .wp-block-group__inner-container > .wp-block.alignfull {
			margin-left: -$group-block-background__padding;
			width: calc(100% + #{$group-block-background__padding * 2});
			max-width: calc(100% + #{$group-block-background__padding * 2});
		}
	}
}

// Wide and full alignments
.wp-block[data-align="wide"] > .wp-block-group {

	> .wp-block-group__inner-container > .wp-block:not([data-align="wide"]):not([data-align="full"]):not(.alignwide):not(.alignfull) {
		@include media(tablet) {
			width: calc(8 * (100vw / 12));
		}

		@include media(desktop) {
			width: calc(6 * (100vw / 12 ));
		}
	}

	// Child blocks: Full alignment
	> .wp-block-group__inner-container > .wp-block[data-align="full"],
	> .wp-block-group__inner-container > .wp-block.alignfull {
		padding-left: 0;
		padding-right: 0;
	}


	// Group block with background color
	&.has-background {
		
		// Child blocks: Default alignments
		> .wp-block-group__inner-container > .wp-block:not([data-align="wide"]):not([data-align="full"]):not(.alignwide):not(.alignfull) {
			@include media(tablet) {
				width: calc(8 * (100vw / 12) - #{$group-block-background__padding * 2});
			}

			@include media(desktop) {
				width: calc(6 * (100vw / 12 ) - #{$group-block-background__padding * 2});
			}
		}
	}
}

// Full alignment
.wp-block[data-align="full"] > .wp-block-group {

		// Margins & padding are added to this container to mimic 
		// the style + spacing of the .editor-writing-flow global 
		// container. This way, child items sync up with the placement 
		// and size of other top-level blocks. 
		> .wp-block-group__inner-container {

			// 2px of extra padding are added to each side here
			// To better match up with the spacing of the whole 
			// document. 
			@include media(tablet) {
				width: 80%;
				margin-left: 10%;
				margin-right: 10%; 
				padding-left: 10px;
				padding-right: 10px;
			}

			// Child blocks: Normal Alignments
			> .wp-block:not([data-align="wide"]):not(.alignwide):not([data-align="full"]):not(.alignfull) {

				@include media(tablet) {
					max-width: calc(8 * (100vw / 12));
				}

				@include media(desktop) {
					max-width: calc(6 * (100vw / 12));
				}
			}

			// Child blocks: Not Full Alignments
			> .wp-block:not([data-align="full"]):not(.alignfull) {
				padding-left: 10px;
				padding-right: 10px;

				@include media(tablet) {
					padding-left: 0;
					padding-right: 0;
				}
			}

			// Child blocks: Right alignments
			> .wp-block[data-align="right"] {

				@include media(tablet) {
					max-width: 125%;
				}
			}

			// Child blocks: Wide alignments
			> .wp-block[data-align="wide"],
			> .wp-block.alignwide {

				@include media(tablet) {
					width: 100%;
					max-width: 100%;
				}
			}

			// Child blocks: Full alignments
			> .wp-block[data-align=full],
			> .wp-block.alignfull {

				@include media(tablet) {
					left: calc( -12.5% - 13px );
					width: calc( 125% + 26px );
					max-width: calc( 125% + 25px );
				}
			}
		}

		// Group block with background color
		&.has-background {

			// When the Group block is full width, we can remove the left/right padding.
			padding: $group-block-background__padding 0;

			@include media(mobile) {
				padding-left: 0;
				padding-right: 0;
			}

			// Child blocks: Full alignment
			> .wp-block-group__inner-container > .wp-block[data-align="full"],
			> .wp-block-group__inner-container > .wp-block.alignfull {
				margin-left: 0;
				width: 100%;

				@include media(mobile) {
					width: calc(100% + 92px);
				}

				@include media(tablet) {
					width: calc(125% + 120px);
				}
			}
		}
	}

The same content is in 32 releases, WordPress 5.5-beta4 to 5.5.25. See them all, or every version of this file.