Selaa lähdekoodia

Merge pull request #307 from Automattic/dyad-2-add-gutenberg-support

Dyad 2: Add Gutenberg support and styles
Laurel 6 vuotta sitten
vanhempi
commit
856702901c
3 muutettua tiedostoa jossa 974 lisäystä ja 0 poistoa
  1. 381 0
      dyad-2/css/blocks.css
  2. 528 0
      dyad-2/css/editor-blocks.css
  3. 65 0
      dyad-2/functions.php

+ 381 - 0
dyad-2/css/blocks.css

@@ -0,0 +1,381 @@
+/*
+Theme Name: Dyad 2
+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
+--------------------------------------------------------------*/
+
+.single .hentry {
+	overflow-x: hidden; /* prevents side-scrolling caused by use of vw */
+}
+
+.alignfull,
+.alignwide {
+	clear: both;
+}
+
+@media (min-width: 1000px) {
+	body:not(.has-post-thumbnail) .alignwide {
+		margin-left: -20%;
+		margin-right: -20%;
+		width: auto;
+	}
+}
+
+body:not(.has-post-thumbnail) .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. */
+
+body:not(.has-post-thumbnail) .wp-block-columns.alignfull,
+body:not(.has-post-thumbnail) .wp-block-audio.alignfull,
+body:not(.has-post-thumbnail) .wp-block-table.alignfull,
+body:not(.has-post-thumbnail) .wp-block-latest-comments.alignfull,
+body:not(.has-post-thumbnail) .wp-block-categories.alignfull,
+body:not(.has-post-thumbnail) .wp-block-latest-posts.alignfull {
+	margin-left: calc(50% - 48vw);
+	margin-right: calc(50% - 48vw);
+}
+
+/* Make sure video embeds actually fill the full available space. */
+
+.wp-block-embed.is-type-video.alignfull iframe {
+	height: 100% !important;
+	width: 100% !important;
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Captions */
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+	font-size: 5em;
+	margin-top: 0.1em;
+}
+
+/* Image */
+
+.wp-block-image {
+	margin-bottom: 0;
+	max-width: 1000%;
+}
+
+/* Gallery */
+
+.wp-block-gallery {
+	margin: 0 0 1.5em;
+}
+
+/* Quote */
+
+.wp-block-quote {
+	margin-bottom: 1.5em;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large) {
+	border-left: 3px solid #ddd;
+	margin-left: 1.5em;
+	padding-left: 1.5em;
+}
+
+.wp-block-quote p:not(:last-child) {
+	margin-bottom: 0;
+	padding-bottom: 0;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	border: 0;
+	padding-left: 1.5em;
+	padding-right: 1.5em;
+}
+
+.wp-block-quote.is-large cite,
+.wp-block-quote.is-style-large cite {
+	font-size: 80%;
+	text-align: inherit;
+}
+
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {
+	border-left: 0;
+	border-right: 3px solid #ddd;
+	margin-left: 0;
+	margin-right: 1.5em;
+	padding-left: 0;
+	padding-right: 1.5em;
+}
+
+/* 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 .wp-block-cover-text,
+.wp-block-cover-image .wp-block-cover-image-text {
+	font-size: 24px;
+}
+
+/* File */
+
+.wp-block-file a.wp-block-file__button {
+	background-color: #678db8;
+	border-color: #678db8;
+	border-radius: 0;
+	color: #fff;
+	font-size: 1.4rem;
+	letter-spacing: 0.1em;
+	padding: 1em;
+	text-transform: uppercase;
+}
+
+.wp-block-file a.wp-block-file__button:hover,
+.wp-block-file a.wp-block-file__button:focus {
+	background-color: #678db8;
+	opacity: 0.75;
+}
+
+.wp-block-file a.wp-block-file__button:active {
+	opacity: 0.9;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting Blocks
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse {
+	background: none;
+	color: #393d41;
+	font-family: "Noto Serif", Georgia, serif;
+	font-size: inherit;
+	font-style: italic;
+	padding: 0;
+}
+
+.wp-block-verse:before {
+	display: none;
+}
+
+/* Code */
+
+.wp-block-code {
+	border: 0;
+	color: #6a6c6e;
+	border-radius: 0;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+	border-color: #ddd;
+	margin-bottom: 1.5em;
+}
+
+.wp-block-pullquote blockquote {
+	border: 0;
+	margin: 0;
+	padding: 0;
+}
+
+.wp-block-pullquote cite {
+	color: #6c7781;
+	font-size: 13px;
+	text-transform: none;
+}
+
+/* Table */
+
+.wp-block-table td,
+.wp-block-table th {
+	border-color: #ddd;
+}
+
+body:not(.has-post-thumbnail) .wp-block-table.alignwide {
+	width: 960px; /* 700px + ( 20% * 2 ) */
+}
+
+
+body:not(.has-post-thumbnail) .wp-block-table.alignfull {
+	width: 96vw;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Buttons */
+
+.wp-block-button .wp-block-button__link {
+	background-color: #678db8;
+	border-color: #678db8;
+	border-radius: 0;
+	color: #fff;
+	font-size: 1.4rem;
+	letter-spacing: 0.1em;
+	padding: 1em;
+	text-transform: uppercase;
+}
+
+.wp-block-button .wp-block-button__link:hover,
+.wp-block-button .wp-block-button__link:focus {
+	opacity: 0.75;
+}
+
+.wp-block-button .wp-block-button__link:active {
+	opacity: 0.9;
+}
+
+/* Separator */
+
+.wp-block-separator {
+	border: 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widget Blocks
+--------------------------------------------------------------*/
+
+/* Archives, Categories & Latest Posts */
+
+.wp-block-archives.aligncenter,
+.wp-block-categories.aligncenter,
+.wp-block-latest-posts.aligncenter {
+	text-align: center;
+}
+
+/* Latest Posts */
+
+.wp-block-latest-posts.is-grid {
+	margin-left: 0;
+	margin-right: 0;
+}
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+	font-size: 17px;
+	margin-left: 0;
+	margin-right: 0;
+}
+
+.wp-block-latest-comments a {
+	text-decoration: none;
+}
+
+.wp-block-latest-comments__comment-date {
+	font-size: 15px;
+}
+
+.wp-block-latest-comments__comment-author,
+.wp-block-latest-comments__comment-link {
+	font-weight: 700;
+	text-decoration: none;
+}
+
+.wp-block-latest-comments__comment-excerpt p {
+	font-size: inherit;
+	margin: 0;
+}
+
+/*--------------------------------------------------------------
+7.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-bright-blue-color {
+	color: #678db8;
+}
+
+.has-bright-blue-background-color {
+	background-color: #678db8;
+}
+
+.has-yellow-color {
+	color: #e7ae01;
+}
+
+.has-yellow-background-color {
+	background-color: #e7ae01;
+}
+
+.has-light-gray-blue-color {
+	color: #abb7c3;
+}
+
+.has-light-gray-blue-background-color {
+	background-color: #abb7c3;
+}
+
+.has-medium-gray-color {
+	color: #6a6c6e;
+}
+
+.has-medium-gray-background-color {
+	background-color: #6a6c6e;
+}
+
+.has-dark-gray-color {
+	color: #1a1c1e;
+}
+
+.has-dark-gray-background-color {
+	background-color: #1a1c1e;
+}
+
+.has-dark-gray-blue-color {
+	color: #292c2f;
+}
+
+.has-dark-gray-blue-background-color {
+	background-color: #292c2f;
+}
+
+.has-white-color {
+	color: #fff;
+}
+
+.has-white-background-color {
+	background-color: #fff;
+}

+ 528 - 0
dyad-2/css/editor-blocks.css

@@ -0,0 +1,528 @@
+/*
+Theme Name: Dyad 2
+Description: Used to style Gutenberg Blocks in the editor.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Typography
+2.0 General Block Styles
+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,
+.edit-post-visual-editor .editor-block-list__block p,
+.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
+	font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+	font-size: 18px;
+}
+
+.edit-post-visual-editor .editor-block-list__block {
+	color: #6a6c6e;
+}
+
+.editor-post-title__block .editor-post-title__input {
+	color: #1a1c1e;
+	font-family: "Noto Serif", Georgia, serif;
+	font-size: 40px;
+}
+
+.edit-post-visual-editor .editor-block-list__block h1,
+.edit-post-visual-editor .editor-block-list__block h2,
+.edit-post-visual-editor .editor-block-list__block h3,
+.edit-post-visual-editor .editor-block-list__block h4 {
+	clear: both;
+	color: #1a1c1e;
+	font-family: "Noto Serif", Georgia, serif;
+}
+
+.edit-post-visual-editor .editor-block-list__block h5,
+.edit-post-visual-editor .editor-block-list__block h6 {
+	clear: both;
+	color: #1a1c1e;
+	font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+	letter-spacing: 0.1em;
+	text-transform: uppercase;
+}
+
+.wp-block-heading h1,
+.wp-block-freeform.block-library-rich-text__tinymce h1 {
+	font-size: 36px;
+}
+
+.wp-block-heading h2,
+.wp-block-freeform.block-library-rich-text__tinymce h2 {
+	font-size: 26px;
+}
+
+.wp-block-heading h3,
+.wp-block-freeform.block-library-rich-text__tinymce h3 {
+	font-size: 22px;
+}
+
+.wp-block-heading h4,
+.wp-block-freeform.block-library-rich-text__tinymce h4 {
+	font-size: 20px;
+}
+
+.wp-block-heading h5,
+.wp-block-freeform.block-library-rich-text__tinymce h5 {
+	font-size: 17px;
+}
+
+.wp-block-heading h6,
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+	font-size: 15px;
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Main content width */
+
+.wp-block {
+	max-width: 730px; /* 700px + 30px to account for padding */
+}
+
+.wp-block.alignwide,
+.wp-block.alignfull {
+	max-width: inherit;
+}
+
+[class^="wp-block-"] .wp-block {
+	max-width: 100%;
+}
+
+/* Alignments */
+
+.alignleft {
+	margin-right: 1.5em;
+}
+
+.alignright {
+	margin-left: 1.5em;
+}
+
+/* Link styles */
+
+.edit-post-visual-editor a,
+.editor-block-list__block a,
+.wp-block-freeform.block-library-rich-text__tinymce a {
+	color: #6a6c6e;
+}
+
+/* Paragraph styles */
+
+.edit-post-visual-editor .editor-block-list__block p {
+	margin-top: 0;
+}
+
+/* Quote styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border-left: 3px solid #ddd;
+	margin-left: 1.5em;
+	padding-left: 1.5em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote,
+.wp-block-freeform.block-library-rich-text__tinymce blockquote > p {
+	color: #393d41;
+	font-family: "Noto Serif", Georgia, serif;
+	font-size: 1.05em;
+	font-style: italic;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote cite {
+	color: #444;
+	font-family: "Lato", "Helvetica Neue", Helvetica, Arial, sans-serif;
+	font-size: 0.9em;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border-left: 0;
+	border-right: 3px solid #ddd;
+	margin-left: 0;
+	margin-right: 1.5em;
+	padding-left: 0;
+	padding-right: 1.5em;
+}
+
+/* Table styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce table {
+	border: 1px solid #ddd;
+	border-collapse: collapse;
+	border-spacing: 0;
+	line-height: 1.38;
+	margin: 0 0 1.62em;
+	width: 100%;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce td,
+.wp-block-freeform.block-library-rich-text__tinymce th {
+	border-bottom: 1px solid #ddd;
+	border-left: 1px solid #ddd;
+	padding: 10px 20px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce th {
+	font-size: 85%;
+	letter-spacing: 0.1em;
+	text-transform: uppercase;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce th,
+.wp-block-freeform.block-library-rich-text__tinymce tfoot td {
+	font-weight: 700;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce th:first-child,
+.wp-block-freeform.block-library-rich-text__tinymce td:first-child {
+	border-left: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce thead tr {
+	background: #eee;
+}
+
+/* Preformatted styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce pre {
+	background: #eee;
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	padding: 1.6em;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	position: relative;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce pre:before {
+	background-color: #e7ae01;
+	color: #ffffff;
+	content: "\f462";
+	font-family: "Genericons";
+	font-size: 18px;
+	height: 100%;
+	line-height: 1.62;
+	padding: 0 .19em;
+	position: absolute;
+	right: 0;
+	top: 0;
+	z-index: 2;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce pre:before {
+	left: 0;
+	right: auto;
+}
+
+/* Definition List styles */
+
+.wp-block-freeform.block-library-rich-text__tinymce dt {
+	font-weight: bold;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+	font-size: 5em;
+	margin-top: 0.1em;
+}
+
+/* Quote */
+
+.wp-block-quote {
+	margin-bottom: 1.5em;
+}
+
+.wp-block-quote:not(.is-large):not(.is-style-large) {
+	border-left: 3px solid #ddd;
+	margin-left: 1.5em;
+	padding-left: 1.5em;
+}
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote p {
+	color: #393d41;
+	font-family: "Noto Serif", Georgia, serif;
+	font-size: 1.05em;
+	font-style: italic;
+}
+
+.wp-block-quote p:not(:last-child) {
+	margin-bottom: 0;
+	padding-bottom: 0;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	border: 0;
+	padding-left: 1.5em;
+	padding-right: 1.5em;
+}
+
+.wp-block-quote.is-large p,
+.wp-block-quote.is-large-style p {
+	font-size: 24px;
+}
+
+.wp-block-quote.is-large cite,
+.wp-block-quote.is-style-large cite {
+	font-size: 80%;
+	text-align: inherit;
+}
+
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large) {
+	border-left: 0;
+	border-right: 3px solid #ddd;
+	margin-left: 0;
+	margin-right: 1.5em;
+	padding-left: 0;
+	padding-right: 1.5em;
+}
+
+/* Cover */
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover p,
+.edit-post-visual-editor .editor-block-list__block .wp-block-cover-image p {
+	font-size: 24px;
+}
+
+/* File */
+
+.wp-block-file .wp-block-file__textlink {
+	text-decoration: underline;
+}
+
+.wp-block-file .wp-block-file__button {
+	background-color: #678db8;
+	border-color: #678db8;
+	border-radius: 0;
+	color: #fff;
+	font-size: 14px;
+	letter-spacing: 0.1em;
+	padding: 1em;
+	text-transform: uppercase;
+}
+
+.wp-block-file .wp-block-file__button:hover,
+.wp-block-file .wp-block-file__button:focus {
+	background-color: #678db8;
+	opacity: 0.75;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse {
+	font-family: "Noto Serif", Georgia, serif;
+	font-size: inherit;
+	font-style: italic;
+}
+
+.wp-block-verse pre {
+	padding: 0;
+}
+
+/* Code */
+
+.wp-block-code {
+	background: #eee;
+	border: 0;
+	border-radius: 0;
+	font-family: "Lucida Console", Monaco, "Courier New", monospace;
+	font-size: 90%;
+	padding: 1.6em;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	position: relative;
+}
+
+.wp-block-code textarea {
+	background: transparent;
+	border: 0;
+}
+
+.wp-block-code:before {
+	background-color: #e7ae01;
+	color: #ffffff;
+	content: "\f462";
+	font-family: "Genericons";
+	font-size: 18px;
+	height: 100%;
+	line-height: 1.62;
+	padding: 0 .19em;
+	position: absolute;
+	right: 0;
+	top: 0;
+	z-index: 2;
+}
+
+.rtl .wp-block-code:before {
+	left: 0;
+	right: auto;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+	border-color: #ddd;
+	margin-bottom: 1.5em;
+}
+
+.wp-block-pullquote blockquote {
+	border: 0;
+	margin: 0;
+	padding: 0;
+}
+
+.wp-block-pullquote blockquote > .editor-rich-text p {
+	color: #393d41;
+	font-family: "Noto Serif", Georgia, serif;
+	font-style: italic;
+}
+
+.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
+.wp-block-pullquote.alignright blockquote > .editor-rich-text p {
+	font-size: 20px;
+}
+
+.wp-block-pullquote .wp-block-pullquote__citation {
+	color: #6c7781;
+	font-size: 13px;
+	text-transform: none;
+}
+
+/* Preformatted */
+
+.wp-block-preformatted {
+	background: #eee;
+	font-family: "Lucida Console", Monaco, "Courier New", monospace;
+	font-size: 90%;
+	padding: 1.6em;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	position: relative;
+}
+
+.wp-block-preformatted:before {
+	background-color: #e7ae01;
+	color: #ffffff;
+	content: "\f462";
+	font-family: "Genericons";
+	font-size: 18px;
+	height: 100%;
+	line-height: 1.62;
+	padding: 0 .19em;
+	position: absolute;
+	right: 0;
+	top: 0;
+	z-index: 2;
+}
+
+.rtl .wp-block-preformatted:before {
+	left: 0;
+	right: auto;
+}
+
+/* Table */
+
+.wp-block-table {
+	border: 1px solid #ddd;
+	border-collapse: collapse;
+	border-spacing: 0;
+	line-height: 1.38;
+	margin: 0 0 1.62em;
+	width: 100%;
+}
+
+.wp-block-table td,
+.wp-block-table th {
+	border-bottom: 1px solid;
+	border-left: 1px solid;
+	border-color: #ddd;
+	padding: 0;
+}
+
+.wp-block-table .wp-block-table__cell-content {
+	padding: 5px 10px;
+}
+
+.wp-block-table th {
+	font-size: 85%;
+	letter-spacing: 0.1em;
+	text-align: left;
+	text-transform: uppercase;
+}
+
+.wp-block-table th,
+.wp-block-table tfoot td {
+	font-weight: 700;
+}
+
+.wp-block-table th:first-child,
+.wp-block-table td:first-child {
+	border-left: 0;
+}
+
+.wp-block-table thead tr {
+	background: #eee;
+}
+
+.rtl .wp-block-table th {
+	text-align: right;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Button */
+
+.wp-block-button .wp-block-button__link {
+	background-color: #678db8;
+	border-color: #678db8;
+	border-radius: 0;
+	color: #fff;
+	font-size: 14px;
+	letter-spacing: 0.1em;
+	padding: 1em;
+	text-transform: uppercase;
+}
+
+.wp-block-button .wp-block-button__link:hover,
+.wp-block-button .wp-block-button__link:focus {
+	background-color: inherit;
+	opacity: 0.75;
+}
+
+/* Separator */
+
+.wp-block-separator {
+	background-color: #eee;
+	border: 0;
+	height: 1px;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/

+ 65 - 0
dyad-2/functions.php

@@ -83,6 +83,54 @@ if ( ! function_exists( 'dyad_2_setup' ) ) :
 			'caption',
 		) );
 
+		// Load default block styles.
+		add_theme_support( 'wp-block-styles' );
+
+		// Add support for full and wide align images.
+		add_theme_support( 'align-wide' );
+
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+		// Add support for custom color scheme.
+		add_theme_support( 'editor-color-palette', array(
+			array(
+				'name'  => esc_html__( 'Bright Blue', 'dyad-2' ),
+				'slug'  => 'bright-blue',
+				'color' => '#678db8',
+			),
+			array(
+				'name'  => esc_html__( 'Yellow', 'dyad-2' ),
+				'slug'  => 'yellow',
+				'color' => '#e7ae01',
+			),
+			array(
+				'name'  => esc_html__( 'Light Gray-Blue', 'dyad-2' ),
+				'slug'  => 'light-gray-blue',
+				'color' => '#abb7c3',
+			),
+			array(
+				'name'  => esc_html__( 'Medium Gray', 'dyad-2' ),
+				'slug'  => 'medium-gray',
+				'color' => '#6a6c6e',
+			),
+			array(
+				'name'  => esc_html__( 'Dark Gray', 'dyad-2' ),
+				'slug'  => 'dark-gray',
+				'color' => '#1a1c1e',
+			),
+			array(
+				'name'  => esc_html__( 'Dark Gray-Blue', 'dyad-2' ),
+				'slug'  => 'dark-gray-blue',
+				'color' => '#292c2f',
+			),
+			array(
+				'name'  => esc_html__( 'White', 'dyad-2' ),
+				'slug'  => 'white',
+				'color' => '#fff',
+			),
+		) );
+
 	}
 endif; // dyad_2_setup
 add_action( 'after_setup_theme', 'dyad_2_setup' );
@@ -258,10 +306,27 @@ function dyad_2_scripts() {
 
 	wp_enqueue_style( 'dyad-2-style', get_stylesheet_uri(), array( 'genericons' ) );
 
+	// Theme block stylesheet.
+	wp_enqueue_style( 'dyad-2-block-style', get_template_directory_uri() . '/css/blocks.css', array( 'dyad-2-style' ), '20181018' );
+
 	wp_enqueue_script( 'dyad-2-global', get_template_directory_uri() . '/js/global.js', array( 'jquery', 'masonry' ), '20151204', true );
 }
 add_action( 'wp_enqueue_scripts', 'dyad_2_scripts' );
 
+/**
+ * Enqueue editor styles for Gutenberg
+ *
+ */
+function dyad_2_block_editor_styles() {
+	// Block styles.
+	wp_enqueue_style( 'dyad-2-block-editor-style', get_template_directory_uri() . '/css/editor-blocks.css' );
+	// Add custom fonts.
+	wp_enqueue_style( 'dyad-2-fonts', dyad_2_fonts_url(), array(), null );
+	// Add Genericons.
+	wp_enqueue_style( 'genericons', get_template_directory_uri() . '/genericons/genericons.css', array(), '3.2' );
+}
+add_action( 'enqueue_block_editor_assets', 'dyad_2_block_editor_styles' );
+
 /**
  * Implement the Custom Header feature.
  */