瀏覽代碼

Merge pull request #341 from Automattic/shoreditch-add-gutenberg-support

Shoreditch: Add Gutenberg support
Laurel 6 年之前
父節點
當前提交
06064e2e19
共有 4 個文件被更改,包括 1188 次插入0 次删除
  1. 545 0
      shoreditch/css/blocks.css
  2. 586 0
      shoreditch/css/editor-blocks.css
  3. 50 0
      shoreditch/functions.php
  4. 7 0
      shoreditch/inc/extras.php

+ 545 - 0
shoreditch/css/blocks.css

@@ -0,0 +1,545 @@
+/*
+Theme Name: Shoreditch
+Description: Used to style Gutenberg Blocks.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 Block Alignments
+2.0 General Block Styles
+3.0 Blocks - Common Blocks
+4.0 Blocks - Formatting
+5.0 Blocks - Layout Elements
+6.0 Blocks - Widgets
+7.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 Block Alignments
+--------------------------------------------------------------*/
+
+.site-content {
+	overflow-x: hidden;
+}
+
+.alignfull,
+.alignwide {
+	clear: both;
+	margin: 0;
+}
+
+.can-align-wide .alignfull,
+.page-template-full-width-page .alignfull,
+.page-template-panel-page .alignfull {
+	margin-left: calc(50% - 50vw);
+	margin-right: calc(50% - 50vw);
+	width: auto;
+}
+
+/* Make non image-based blocks a bit narrower, so they don't get cut off. */
+
+.can-align-wide .wp-block-columns.alignfull,
+.page-template-full-width-page .wp-block-columns.alignfull,
+.page-template-panel-page .wp-block-columns.alignfull,
+.can-align-wide .wp-block-audio.alignfull,
+.page-template-full-width-page .wp-block-audio.alignfull,
+.page-template-panel-page .wp-block-audio.alignfull,
+.can-align-wide .wp-block-table.alignfull,
+.page-template-full-width-page .wp-block-table.alignfull,
+.page-template-panel-page .wp-block-table.alignfull,
+.can-align-wide .wp-block-latest-comments.alignfull,
+.page-template-full-width-page .wp-block-latest-comments.alignfull,
+.page-template-panel-page .wp-block-latest-comments.alignfull,
+.can-align-wide .wp-block-latest-posts.alignfull,
+.page-template-full-width-page .wp-block-latest-posts.alignfull,
+.page-template-panel-page .wp-block-latest-posts.alignfull,
+.can-align-wide .wp-block-categories.alignfull,
+.page-template-full-width-page .wp-block-categories.alignfull,
+.page-template-panel-page .wp-block-categories.alignfull,
+.can-align-wide .wp-block-archives.alignfull,
+.page-template-full-width-page .wp-block-archives.alignfull,
+.page-template-panel-page .wp-block-archives.alignfull {
+	margin-left: calc(50% - 48vw );
+	margin-right: calc(50% - 48vw );
+}
+
+@media (min-width: 900px) {
+	.can-align-wide .alignfull {
+		margin-left: calc(50% - 50vw + 150px + 0.5em );
+		margin-right: calc(50% - 50vw - 150px - 0.5em );
+	}
+
+	.can-align-wide .wp-block-columns.alignfull,
+	.can-align-wide .wp-block-audio.alignfull,
+	.can-align-wide .wp-block-table.alignfull,
+	.can-align-wide .wp-block-latest-comments.alignfull,
+	.can-align-wide .wp-block-latest-posts.alignfull,
+	.can-align-wide .wp-block-categories.alignfull,
+	.can-align-wide .wp-block-archives.alignfull {
+		margin-left: calc(50% - 48vw + 150px + 0.5em );
+		margin-right: calc(50% - 48vw - 150px - 0.5em );
+	}
+
+	.can-align-wide .alignwide {
+		margin-left: 0;
+		margin-right: calc(25% - 25vw);
+		width: auto;
+		max-width: 900px;
+	}
+
+	.page-template-full-width-page .alignwide,
+	.page-template-panel-page .alignwide {
+		margin-left: calc(25% - 25vw);
+		margin-right: calc(25% - 25vw);
+		width: auto;
+	}
+
+	.rtl.can-align-wide .alignfull {
+		margin-left: calc(50% - 50vw - 150px - 0.5em );
+		margin-right: calc(50% - 50vw + 150px + 0.5em );
+	}
+
+	.rtl.can-align-wide .alignwide {
+		margin-left: calc(25% - 25vw);
+		margin-right: 0;
+	}
+
+	.rtl.can-align-wide .wp-block-columns.alignfull,
+	.rtl.can-align-wide .wp-block-audio.alignfull,
+	.rtl.can-align-wide .wp-block-table.alignfull,
+	.rtl.can-align-wide .wp-block-latest-comments.alignfull,
+	.rtl.can-align-wide .wp-block-latest-posts.alignfull,
+	.rtl.can-align-wide .wp-block-categories.alignfull,
+	.rtl.can-align-wide .wp-block-archives.alignfull {
+		margin-left: calc(50% - 48vw - 150px - 0.5em );
+		margin-right: calc(50% - 48vw + 150px + 0.5em );
+	}
+}
+
+.can-align-wide .wp-block-embed.is-type-video.alignfull iframe {
+	width: 100% !important;
+	height: 100% !important;
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Caption */
+
+[class^="wp-block-"] figcaption {
+	color: inherit;
+	font-size: 16px;
+	font-style: italic;
+}
+
+[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
+	border-bottom: 1px solid #f3f3f3;
+	margin-top: 0.25em;
+	padding-bottom: 0.25em;
+}
+
+.can-align-wide [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption,
+.page-template-full-width-page [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption,
+.page-template-panel-page [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption {
+	text-align: left;
+}
+
+.rtl.can-align-wide [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption,
+.rtl.page-template-full-width-page [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption,
+.rtl.page-template-panel-page [class^="wp-block-"]:not(.wp-block-gallery):not(.alignfull) figcaption {
+	text-align: right;
+}
+
+/* Video */
+
+.wp-block-embed.is-type-video iframe {
+	max-height: 100%;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+	font-size: 5em;
+	margin-top: 0.15em;
+}
+
+/* Image */
+
+.wp-block-image.alignfull,
+.wp-block-image.alignwide {
+	max-width: 1000%;
+}
+
+/* Gallery */
+
+.wp-block-gallery {
+	margin-bottom: 1.5em;
+}
+
+.wp-block-gallery:not(.alignfull):not(.alignwide) {
+	margin-left: 0;
+}
+
+.rtl .wp-block-gallery:not(.alignfull):not(.alignwide) {
+	margin-right: 0;
+}
+
+/* Quote */
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	padding: 0 0 0 1.875rem;
+}
+
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+	font-size: 26px;
+}
+
+.wp-block-quote.is-large cite,
+.wp-block-quote.is-style-large cite {
+	font-size: 26px;
+	text-align: left;
+}
+
+@media (min-width: 768px) {
+	.wp-block-quote.is-large p,
+	.wp-block-quote.is-style-large p,
+	.wp-block-quote.is-large cite,
+	.wp-block-quote.is-style-large cite {
+		font-size: 32px;
+	}
+}
+
+.rtl .wp-block-quote.is-large,
+.rtl .wp-block-quote.is-style-large {
+	padding: 0 1.875rem 0 0;
+}
+
+.rtl .wp-block-quote.is-large cite,
+.rtl .wp-block-quote.is-style-large cite {
+	text-align: right;
+}
+
+/* Audio */
+
+.wp-block-audio {
+	margin-bottom: 1.5em;
+}
+
+.wp-block-audio audio {
+	display: block;
+	width: 100%;
+}
+
+/* Cover */
+
+.wp-block-cover.aligncenter,
+.wp-block-cover-image.aligncenter,
+.wp-block-cover.alignleft,
+.wp-block-cover-image.alignleft,
+.wp-block-cover.alignright,
+.wp-block-cover-image.alignright {
+	display: flex;
+}
+
+.wp-block-cover-image .wp-block-cover-image-text,
+.wp-block-cover-image .wp-block-cover-text,
+.wp-block-cover-image h2,
+.wp-block-cover .wp-block-cover-image-text,
+.wp-block-cover .wp-block-cover-text,
+.wp-block-cover h2 {
+	font-size: 1.5em;
+}
+
+/* File */
+
+.wp-block-file a.wp-block-file__button,
+.wp-block-file a.wp-block-file__button:visited {
+	background: #3e69dc;
+	border: 0;
+	border-radius: 5em;
+	color: #fff;
+	font-size: 13px;
+	font-size: 0.8125rem;
+	font-weight: bold;
+	letter-spacing: 0.0625em;
+	line-height: 1.3847;
+	padding: 0.5625rem 1.5em;
+	text-transform: uppercase;
+}
+
+.wp-block-file a.wp-block-file__button:hover,
+.wp-block-file a.wp-block-file__button:focus {
+	background: #2c313f;
+	outline: none;
+}
+
+.rtl .wp-block-file * + .wp-block-file__button {
+	margin-left: 0.75em;
+	margin-right: 0;
+}
+
+@media (min-width: 768px) {
+	.wp-block-file a.wp-block-file__button,
+	.wp-block-file a.wp-block-file__button:visited {
+		font-size: 16px;
+	}
+}
+
+/* Video */
+
+.wp-block-video video {
+	width: 100%;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse {
+	border: 0;
+	font-family: inherit;
+	font-style: italic;
+	padding: 0;
+}
+
+/* Code */
+
+.wp-block-code code {
+	background: transparent;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote blockquote {
+	border: 0;
+	padding-left: 0;
+	padding-right: 0;
+}
+
+/* Table */
+
+.wp-block-table.alignfull {
+	width: 96vw;
+}
+
+.wp-block-table.alignwide {
+	width: 100%
+}
+
+@media (min-width: 900px) {
+	.wp-block-table.alignwide {
+		width: calc( 100vw - 6em );
+	}
+
+	.wp-block-table.alignfull {
+		width: calc( 96vw - 0.5em );
+	}
+}
+
+.rtl .wp-block-table th {
+	text-align: right;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Buttons */
+
+.wp-block-button .wp-block-button__link:not(.has-text-color) {
+	color: #fff;
+}
+
+.wp-block-button .wp-block-button__link:not(.has-background) {
+	background: #3e69dc;
+}
+
+.wp-block-button .wp-block-button__link {
+	border: 0;
+	border-radius: 5em;
+	font-size: 13px;
+	font-size: 0.8125rem;
+	font-weight: bold;
+	letter-spacing: 0.0625em;
+	line-height: 1.3847;
+	padding: 0.5625rem 1.5em;
+	text-transform: uppercase;
+}
+
+.wp-block-button__link:hover,
+.wp-block-button__link:not(.has-background):hover,
+.wp-block-button__link:focus,
+.wp-block-button__link:not(.has-background):focus {
+	background: #2c313f;
+	outline: none;
+}
+
+@media (min-width: 768px) {
+	.wp-block-button .wp-block-button__link {
+		font-size: 16px;
+	}
+}
+
+/* Separator */
+
+.wp-block-separator {
+	border: 0;
+}
+
+.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
+	margin-left: auto;
+	margin-right: auto;
+	max-width: 100px;
+}
+
+/* Media & Text */
+
+.wp-block-media-text {
+	margin-bottom: 1.5em;
+}
+
+.wp-block-media-text *:last-child {
+	margin-bottom: 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/* Categories, Latest Posts & Archives */
+
+.wp-block-categories.aligncenter,
+.wp-block-categories.aligncenter ul,
+.wp-block-latest-posts.aligncenter,
+.wp-block-archives.aligncenter {
+	list-style-position: inside;
+	margin-left: 0;
+	margin-right: 0;
+	text-align: center;
+}
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+	margin-left: 0;
+	margin-right: 0;
+}
+
+.wp-block-latest-comments__comment-date {
+	color: inherit;
+}
+
+.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: 80%;
+}
+
+/* Latest Posts */
+
+.wp-block-latest-posts.is-grid:not(.alignfull) {
+	margin-left: 0;
+}
+
+.rtl .wp-block-latest-posts.is-grid:not(.alignwide) {
+	margin-right: 0;
+}
+
+
+/*--------------------------------------------------------------
+7.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-blue-color,
+.has-blue-color:hover,
+.has-blue-color:focus,
+.has-blue-color:active,
+.has-blue-color:visited {
+	color: #3e69dc;
+}
+
+.has-blue-background-color,
+.has-blue-background-color:hover,
+.has-blue-background-color:focus,
+.has-blue-background-color:active,
+.has-blue-background-color:visited {
+	background-color: #3e69dc;
+}
+
+.has-dark-gray-color,
+.has-dark-gray-color:hover,
+.has-dark-gray-color:focus,
+.has-dark-gray-color:active,
+.has-dark-gray-color:visited {
+	color: #2c313f;
+}
+
+.has-dark-gray-background-color,
+.has-dark-gray-background-color:hover,
+.has-dark-gray-background-color:focus,
+.has-dark-gray-background-color:active,
+.has-dark-gray-background-color:visited {
+	background-color: #2c313f;
+}
+
+.has-medium-gray-color,
+.has-medium-gray-color:hover,
+.has-medium-gray-color:focus,
+.has-medium-gray-color:active,
+.has-medium-gray-color:visited {
+	color: #7a7c84;
+}
+
+.has-medium-gray-background-color,
+.has-medium-gray-background-color:hover,
+.has-medium-gray-background-color:focus,
+.has-medium-gray-background-color:active,
+.has-medium-gray-background-color:visited {
+	background-color: #7a7c84;
+}
+
+.has-light-gray-color,
+.has-light-gray-color:hover,
+.has-light-gray-color:focus,
+.has-light-gray-color:active,
+.has-light-gray-color:visited {
+	color: #f3f3f3;
+}
+
+.has-light-gray-background-color,
+.has-light-gray-background-color:hover,
+.has-light-gray-background-color:focus,
+.has-light-gray-background-color:active,
+.has-light-gray-background-color:visited {
+	background-color: #f3f3f3;
+}
+
+.has-white-color,
+.has-white-color:hover,
+.has-white-color:focus,
+.has-white-color:active,
+.has-white-color:visited {
+	color: #fff;
+}
+
+.has-white-background-color,
+.has-white-background-color:hover,
+.has-white-background-color:focus,
+.has-white-background-color:active,
+.has-white-background-color:visited {
+	background-color: #fff;
+}

+ 586 - 0
shoreditch/css/editor-blocks.css

@@ -0,0 +1,586 @@
+/*
+Theme Name: Shoreditch
+Description: Used to style Gutenberg Blocks in the editor.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Typography
+2.0 General Block Settings
+3.0 Blocks - Common Blocks
+4.0 Blocks - Formatting
+5.0 Blocks - Layout Elements
+6.0 Blocks - Widgets
+
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 General Typography
+--------------------------------------------------------------*/
+
+.edit-post-visual-editor .editor-block-list__block,
+.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
+	font-family: Lato, sans-serif;
+}
+
+/* Font size */
+
+.edit-post-visual-editor .editor-block-list__block,
+.edit-post-visual-editor .editor-block-list__block p,
+.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
+	font-size: 16px;
+	line-height: 1.5;
+}
+
+@media screen and (min-width: 768px) {
+	.edit-post-visual-editor .editor-block-list__block,
+	.edit-post-visual-editor .editor-block-list__block p,
+	.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
+		font-size: 20px;
+	}
+}
+
+/* Color */
+
+.edit-post-visual-editor .editor-block-list__block {
+	color: #7a7c84;
+}
+
+/* Post title */
+
+.editor-post-title__block .editor-post-title__input {
+	color: #2c313f;
+	font-family: Poppins, sans-serif;
+	font-weight: bold;
+	font-size: 40px;
+}
+
+@media screen and (min-width: 768px) {
+	.editor-post-title__block .editor-post-title__input {
+		font-size: 49px;
+	}
+}
+
+/* Headings */
+
+.edit-post-visual-editor h1,
+.wp-block-freeform.block-library-rich-text__tinymce h1,
+.edit-post-visual-editor h2,
+.wp-block-freeform.block-library-rich-text__tinymce h2,
+.edit-post-visual-editor h3,
+.wp-block-freeform.block-library-rich-text__tinymce h3,
+.edit-post-visual-editor h4,
+.wp-block-freeform.block-library-rich-text__tinymce h4,
+.edit-post-visual-editor h5,
+.wp-block-freeform.block-library-rich-text__tinymce h5,
+.edit-post-visual-editor h6,
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+	color: #2c313f;
+	font-family: Poppins, sans-serif;
+	font-weight: bold;
+	margin: 0 0 1.875rem;
+}
+
+.edit-post-visual-editor h1,
+.wp-block-freeform.block-library-rich-text__tinymce h1 {
+	font-size: 40px;
+}
+
+.edit-post-visual-editor h2,
+.wp-block-freeform.block-library-rich-text__tinymce h2 {
+	font-size: 32px;
+}
+
+.edit-post-visual-editor h3,
+.wp-block-freeform.block-library-rich-text__tinymce h3 {
+	font-size: 25px;
+}
+
+.edit-post-visual-editor h4,
+.wp-block-freeform.block-library-rich-text__tinymce h4 {
+	font-size: 20px;
+}
+
+.edit-post-visual-editor h5,
+.wp-block-freeform.block-library-rich-text__tinymce h5 {
+	font-size: 16px;
+}
+
+.edit-post-visual-editor h6,
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+	font-size: 13px;
+}
+
+@media screen and (min-width: 768px) {
+	.edit-post-visual-editor h1,
+	.wp-block-freeform.block-library-rich-text__tinymce h1 {
+		font-size: 49px;
+	}
+
+	.edit-post-visual-editor h2,
+	.wp-block-freeform.block-library-rich-text__tinymce h2 {
+		font-size: 40px;
+	}
+
+	.edit-post-visual-editor h3,
+	.wp-block-freeform.block-library-rich-text__tinymce h3 {
+		font-size: 32px;
+	}
+
+	.edit-post-visual-editor h4,
+	.wp-block-freeform.block-library-rich-text__tinymce h4 {
+		font-size: 25px;
+	}
+
+	.edit-post-visual-editor h5,
+	.wp-block-freeform.block-library-rich-text__tinymce h5 {
+		font-size: 20px;
+	}
+
+	.edit-post-visual-editor h6,
+	.wp-block-freeform.block-library-rich-text__tinymce h6 {
+		font-size: 16px;
+	}
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Settings
+--------------------------------------------------------------*/
+
+/* Main content width */
+
+.wp-block {
+	max-width: 610px; /* 580px + 30px to account for padding */
+}
+
+/* Link styles */
+
+.edit-post-visual-editor a,
+.editor-block-list__block a,
+.wp-block-freeform.block-library-rich-text__tinymce a {
+	color: #2c313f;
+	text-decoration: underline;
+}
+
+/* Table styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce table {
+	border-collapse: collapse;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table th,
+.wp-block-freeform.block-library-rich-text__tinymce table td {
+	border-color: #f3f3f3;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table th {
+	text-align: center;
+}
+
+/* Quote styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border: 0 solid #3e69dc;
+	border-left-width: 2px;
+	color: inherit;
+	font-style: italic;
+	line-height: 1.5;
+	margin: 0 0 1.5rem;
+	padding-left: 1.5rem;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce cite {
+	color: #2c313f;
+	font-size: 20px;
+	font-style: italic;
+}
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-freeform.block-library-rich-text__tinymce blockquote p {
+	font-size: 20px;
+}
+
+
+@media (min-width: 768px) {
+	.edit-post-visual-editor .editor-block-list__block .wp-block-freeform.block-library-rich-text__tinymce blockquote p,
+	.wp-block-freeform.block-library-rich-text__tinymce cite  {
+		font-size: 25px;
+	}
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border-left-width: 0;
+	border-right-width: 2px;
+	padding-left: 0;
+	padding-right: 1.5rem;
+}
+
+/* List styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce li,
+.editor-styles-wrapper li {
+	margin-bottom: 0;
+}
+
+/* Code styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce code {
+	background: transparent;
+}
+
+/* Caption styles */
+
+[class^="wp-block-"] figcaption {
+	color: inherit;
+	font-size: 16px;
+	font-style: italic;
+}
+
+[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
+	border-bottom: 1px solid #f3f3f3;
+	margin-top: 0.25em;
+	padding-bottom: 0.25em;
+}
+
+.wp-block:not([data-align="full"]) [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
+	text-align: left;
+}
+
+.rtl .wp-block:not([data-align="full"]) [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
+	text-align: right;
+}
+
+
+/* Definition List styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce dt {
+	font-weight: bold;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce dd {
+	margin-left: 1.5em;
+	margin-right: 1.5em;
+}
+
+/* Pre styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce pre {
+	border: 1px solid #f3f3f3;
+	color: #7a7c84;
+	font-family: Inconsolata, monospace;
+	font-size: 16px;
+	padding: 1.5em;
+}
+
+@media (min-width: 768px) {
+	.wp-block-freeform.block-library-rich-text__tinymce pre {
+		font-size: 20px;
+	}
+}
+
+/* Code, etc styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce code,
+.wp-block-freeform.block-library-rich-text__tinymce kbd,
+.wp-block-freeform.block-library-rich-text__tinymce tt,
+.wp-block-freeform.block-library-rich-text__tinymce var {
+	background: #f3f3f3;
+	font-family: Inconsolata, monospace;
+	font-size: inherit;
+	padding: 0 0.25em;
+}
+
+/* Mark & Ins styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce mark,
+.wp-block-freeform.block-library-rich-text__tinymce ins {
+	background: #3e69dc;
+	color: #fff;
+	padding: 0 0.25em;
+	text-decoration: none;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+	font-size: 5em;
+	margin-top: 0.15em;
+}
+
+/* Quote */
+
+.wp-block-quote:not(.is-large):not(.is-style-large),
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	border: 0 solid #3e69dc;
+	border-left-width: 2px;
+	color: inherit;
+	font-style: italic;
+	line-height: 1.5;
+	margin: 0 0 1.5rem;
+	padding-left: 1.5rem;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large) p {
+	font-size: 20px;
+}
+
+.editor-styles-wrapper .wp-block-quote.is-large p,
+.editor-styles-wrapper .wp-block-quote.is-style-large p {
+	font-size: 26px;
+}
+
+.wp-block-quote .wp-block-quote__citation {
+	color: #2c313f;
+	font-style: italic;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large) .wp-block-quote__citation {
+	font-size: 20px;
+}
+
+.wp-block-quote.is-large .wp-block-quote__citation,
+.wp-block-quote.is-style-large .wp-block-quote__citation {
+	font-size: 26px
+}
+
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large),
+.rtl .wp-block-quote.is-large,
+.rtl .wp-block-quote.is-style-large {
+	border-left-width: 0;
+	border-right-width: 2px;
+	padding-left: 0;
+	padding-right: 1.5rem;
+}
+
+.rtl .wp-block-quote .wp-block-quote__citation {
+	text-align: right;
+}
+
+@media (min-width: 768px) {
+	.wp-block-quote:not(.is-large):not(.is-style-large) p {
+		font-size: 25px;
+	}
+
+	.editor-styles-wrapper .wp-block-quote.is-large p,
+	.editor-styles-wrapper .wp-block-quote.is-style-large p {
+		font-size: 32px;
+	}
+
+	.wp-block-quote:not(.is-large):not(.is-style-large) .wp-block-quote__citation {
+		font-size: 26px;
+	}
+
+	.wp-block-quote.is-large .wp-block-quote__citation,
+	.wp-block-quote.is-style-large .wp-block-quote__citation {
+		font-size: 26px
+	}
+}
+
+/* Cover */
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-image-text,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image .wp-block-cover-text,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image h2,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-image-text,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover .wp-block-cover-text,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover h2 {
+	font-size: 1.5em;
+}
+
+/* File */
+
+.wp-block-file__textlink {
+	color: #2c313f;
+	text-decoration: underline;
+}
+
+.wp-block-file .wp-block-file__button,
+.wp-block-file .wp-block-file__button:visited {
+	background: #3e69dc;
+	border: 0;
+	border-radius: 5em;
+	color: #fff;
+	font-size: 13px;
+	font-size: 0.8125rem;
+	font-weight: bold;
+	letter-spacing: 0.0625em;
+	line-height: 1.3847;
+	padding: 0.5625rem 1.5em;
+	text-transform: uppercase;
+}
+
+.wp-block-file .wp-block-file__button:hover,
+.wp-block-file .wp-block-file__button:focus {
+	background: #2c313f;
+	outline: none;
+}
+
+@media (min-width: 768px) {
+	.wp-block-file .wp-block-file__button,
+	.wp-block-file .wp-block-file__button:visited {
+		font-size: 16px;
+	}
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse pre {
+	color: #7a7c84;
+	font-style: italic;
+}
+
+/* Code */
+
+.wp-block-code {
+	border: 1px solid #f3f3f3;
+	border-radius: 0;
+	padding: 1.5em;
+	position: relative;
+}
+
+.wp-block-code .editor-plain-text {
+	background: transparent;
+	color: #7a7c84;
+	font-family: Inconsolata, monospace;
+	font-size: 16px;
+}
+
+@media (min-width: 768px) {
+	.wp-block-code .editor-plain-text {
+		font-size: 20px;
+	}
+}
+
+/* Preformatted */
+
+.wp-block-preformatted {
+	border: 1px solid #f3f3f3;
+	border-radius: 0;
+	padding: 1.5em;
+	position: relative;
+}
+
+.wp-block-preformatted pre {
+	background: transparent;
+	color: #7a7c84;
+	font-family: Inconsolata, monospace;
+	font-size: 16px;
+}
+
+@media (min-width: 768px) {
+	.wp-block-preformatted pre {
+		font-size: 20px;
+	}
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+	border: 0;
+	padding-left: 0;
+	padding-right: 0;
+}
+
+.wp-block-pullquote blockquote {
+	color: #7a7c84;
+	font-style: italic;
+}
+
+.wp-block-pullquote__citation {
+	font-style: italic;
+	text-transform: none;
+}
+
+.wp-block-pullquote.alignleft blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
+.wp-block-pullquote.alignright blockquote > .block-library-pullquote__content .editor-rich-text__tinymce[data-is-empty="true"]::before,
+.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
+.wp-block-pullquote.alignright blockquote > .editor-rich-text p,
+.wp-block-pullquote__citation{
+	font-size: 28px;
+}
+
+/* Table */
+
+.wp-block-table th,
+.wp-block-table td {
+	border-color: #f3f3f3;
+}
+
+.wp-block-table__cell-content {
+	padding: 0.1em 0.25em;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Buttons */
+
+.wp-block-button .wp-block-button__link {
+	background: #3e69dc;
+	border: 0;
+	border-radius: 5em;
+	color: #fff;
+	font-size: 13px;
+	font-size: 0.8125rem;
+	font-weight: bold;
+	letter-spacing: 0.0625em;
+	line-height: 1.3847;
+	padding: 0.5625rem 1.5em;
+	text-transform: uppercase;
+}
+
+.wp-block-button__link:hover,
+.wp-block-button__link:focus {
+	background: #2c313f;
+	outline: none;
+}
+
+@media (min-width: 768px) {
+	.wp-block-button .wp-block-button__link {
+		font-size: 16px;
+	}
+}
+
+/* Separator */
+
+.wp-block-separator {
+	border-color: #f3f3f3;
+	border-width: 1px;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/* Categories, Latest Posts & Archives */
+
+[data-align="center"] .wp-block-categories ul,
+[data-align="center"] .wp-block-latest-posts ul,
+[data-align="center"] .wp-block-archives ul {
+	list-style-position: inside;
+}
+
+/* Latest Comments */
+
+.editor-styles-wrapper .wp-block-latest-comments {
+	padding-left: 0;
+	padding-right: 0;
+}
+
+.wp-block-latest-comments__comment {
+	font-size: inherit;
+}
+
+.wp-block-latest-comments__comment-date {
+	font-size: 80%;
+}

+ 50 - 0
shoreditch/functions.php

@@ -78,6 +78,41 @@ function shoreditch_setup() {
 	 * See: https://wordpress.org/plugins/eventbrite-api/
 	 */
 	add_theme_support( 'eventbrite' );
+
+	// Add support for responsive embeds.
+	add_theme_support( 'responsive-embeds' );
+
+	// Add support for full and wide align images.
+	add_theme_support( 'align-wide' );
+
+	// Add support for custom color scheme.
+	add_theme_support( 'editor-color-palette', array(
+		array(
+			'name'  => esc_html__( 'Blue', 'shoreditch' ),
+			'slug'  => 'blue',
+			'color' => '#3e69dc',
+		),
+		array(
+			'name'  => esc_html__( 'Dark Gray', 'shoreditch' ),
+			'slug'  => 'dark-gray',
+			'color' => '#2c313f',
+		),
+		array(
+			'name'  => esc_html__( 'Medium Gray', 'shoreditch' ),
+			'slug'  => 'medium-gray',
+			'color' => '#7a7c84',
+		),
+		array(
+			'name'  => esc_html__( 'Light Gray', 'shoreditch' ),
+			'slug'  => 'light-gray',
+			'color' => '#f3f3f3',
+		),
+		array(
+			'name'  => esc_html__( 'White', 'shoreditch' ),
+			'slug'  => 'white',
+			'color' => '#fff',
+		),
+	) );
 }
 endif;
 add_action( 'after_setup_theme', 'shoreditch_setup' );
@@ -181,6 +216,9 @@ function shoreditch_scripts() {
 
 	wp_enqueue_style( 'shoreditch-style', get_stylesheet_uri() );
 
+	// Block stylesheets
+	wp_enqueue_style( 'shoreditch-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'shoreditch-style' ), '20181018' );
+
 	wp_enqueue_script( 'shoreditch-back-top', get_template_directory_uri() . '/js/back-top.js', array(), '20120206', true );
 
 	wp_enqueue_script( 'shoreditch-skip-link-focus-fix', get_template_directory_uri() . '/js/skip-link-focus-fix.js', array(), '20130115', true );
@@ -206,6 +244,18 @@ function shoreditch_scripts() {
 }
 add_action( 'wp_enqueue_scripts', 'shoreditch_scripts' );
 
+/**
+ * Enqueue editor styles for Gutenberg
+ */
+function shoreditch_block_editor_styles() {
+	// Block styles.
+	wp_enqueue_style( 'shoreditch-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
+
+	// Font styles.
+	wp_enqueue_style( 'shoreditch-fonts', shoreditch_fonts_url(), array(), null );
+}
+add_action( 'enqueue_block_editor_assets', 'shoreditch_block_editor_styles' );
+
 /**
  * Implement the Custom Header feature.
  */

+ 7 - 0
shoreditch/inc/extras.php

@@ -36,6 +36,13 @@ function shoreditch_body_classes( $classes ) {
 		$classes[] = 'no-sidebar';
 	}
 
+	// Adds a class of no-sidebar specifically to be used for Gutenberg styles, without interfering with the above.
+	if ( ( ! is_page_template( 'panel-page.php' ) && ! is_page_template( 'full-width-page.php' ) )
+		&& ( ( ( is_front_page() && is_home() ) || is_singular() || is_archive() )
+		&& ! is_active_sidebar( 'sidebar-1' ) ) ) {
+		$classes[] = 'can-align-wide';
+	}
+
 	return $classes;
 }
 add_filter( 'body_class', 'shoreditch_body_classes' );