Browse Source

Begin adding necessary files and functions to Libretto for Gberg support.

Caroline Moore 6 years ago
parent
commit
7612133a96
3 changed files with 1345 additions and 0 deletions
  1. 526 0
      libretto/css/blocks.css
  2. 752 0
      libretto/css/editor-blocks.css
  3. 67 0
      libretto/functions.php

+ 526 - 0
libretto/css/blocks.css

@@ -0,0 +1,526 @@
+/*
+Theme Name: Libretto
+Description: Used to style Gutenberg Blocks.
+*/
+
+/*--------------------------------------------------------------
+>>> TABLE OF CONTENTS:
+----------------------------------------------------------------
+1.0 General Block Styles
+2.0 Blocks - Common Blocks
+3.0 Blocks - Formatting
+4.0 Blocks - Layout Elements
+5.0 Blocks - Widgets
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+/*--------------------------------------------------------------
+1.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Captions */
+
+[class^="wp-block-"] figcaption {
+	font-style: italic;
+	text-align: center;
+}
+
+/*--------------------------------------------------------------
+2.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+p.has-drop-cap:not(:focus)::first-letter {
+	font-size: 130px;
+}
+
+/* Images */
+
+.wp-block-cover,
+.wp-block-cover.alignleft,
+.wp-block-cover.alignright,
+.wp-block-cover.aligncenter {
+	display: flex;
+}
+
+/* Full Width */
+.no-sidebar .alignfull {
+	width: 100vw;
+	max-width: 100vw;
+	margin-left: 0;
+	margin-right: 0;
+	position: relative;
+	left: 50%;
+	transform: translateX( -50% );
+}
+
+.no-sidebar .wp-block-columns.alignfull,
+.no-sidebar .wp-block-latest-comments.alignfull,
+.no-sidebar .wp-block-categories.alignfull,
+.no-sidebar .wp-block-archives.alignfull,
+.no-sidebar .wp-block-latest-posts.alignfull,
+.no-sidebar .wp-block-file.alignfull {
+	padding-left: 1.6em;
+	padding-right: 1.6em;
+}
+
+.no-sidebar .wp-block-table.alignfull {
+	margin-left: .8em;
+	margin-right: .8em;
+}
+
+.no-sidebar .wp-block-embed.is-type-video.alignfull iframe {
+	width: 100% !important;
+	height: 100% !important;
+}
+
+.rtl.no-sidebar .alignfull {
+	left: auto;
+	right: 50%;
+	transform: translateX(50%);
+}
+
+/* Wide Width */
+
+@media (min-width: 1024px) {
+	.no-sidebar .alignwide {
+		width: 120%;
+		max-width: 120%;
+		margin-left: -10%;
+		margin-right: -10%;
+		position: relative;
+	}
+
+	.no-sidebar .wp-block-embed.is-type-video.alignwide iframe {
+		width: 100% !important;
+		height: 100% !important;
+	}
+}
+
+/* Gallery */
+
+.wp-block-gallery {
+	margin-bottom: 1.6em;
+	margin-left: auto;
+}
+
+.rtl .wp-block-gallery:not(.alignfull):not(.alignwide) {
+	margin-right: auto;
+}
+
+/* Quote */
+
+.wp-block-quote {
+	font-size: 26px;
+	font-style: normal;
+	font-weight: bold;
+	margin: 0 1.6em 1.6em;
+	padding: 0;
+}
+
+.wp-block-quote,
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+	font-style: normal;
+}
+
+.wp-block-quote.alignleft {
+	margin-right: 1.6em;
+}
+
+.wp-block-quote.alignright {
+	margin-left: 1.6em;
+}
+
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignleft,
+.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignright {
+}
+
+.wp-block-quote cite {
+	font-style: italic;
+}
+
+.wp-block-quote.is-large cite,
+.wp-block-quote.is-large footer,
+.wp-block-quote.is-style-large cite,
+.wp-block-quote.is-style-large footer {
+	font-style: italic;
+	font-size: inherit;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	margin: 0 .8em .8em;
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large,
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+	font-size: 32px;
+}
+
+.wp-block-quote.is-large p,
+.wp-block-quote.is-style-large p {
+	margin-bottom: .8em;
+}
+
+.rtl .wp-block-quote {
+	border: 0;
+}
+
+/* Audio */
+
+.wp-block-audio audio {
+	display: block;
+	width: 100%;
+}
+
+/* File */
+
+.wp-block-file {
+	margin: 1.6em 0;
+}
+
+.wp-block-file a.wp-block-file__button,
+.wp-block-file a.wp-block-file__button:visited {
+	border: 2px solid;
+	border-color: #6636cc;
+	border-radius: 10px;
+	background: transparent;
+	box-shadow: none;
+	color: #6636cc;
+	font-weight: bold;
+	font-size: 16px;
+	font-size: 1rem;
+	letter-spacing: 1px;
+	line-height: 1;
+	padding: 0.8em 1.6em 0.8em;
+	text-shadow: none;
+	text-decoration: none;
+	text-transform: uppercase;
+	transition: 0.3s;
+}
+
+.wp-block-file a.wp-block-file__button:hover,
+.wp-block-file a.wp-block-file__button:focus {
+	border-color: #85cc36;
+	box-shadow: none;
+	color: #85cc36;
+}
+
+.rtl .wp-block-file a.wp-block-file__button {
+	margin-left: .8em;
+	margin-right: 0;
+}
+
+
+/*--------------------------------------------------------------
+3.0 Blocks - Formatting Blocks
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse {
+	background: transparent;
+	color: inherit;
+	font-family: inherit;
+	font-size: inherit;
+	line-height: inherit;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 0;
+}
+
+/* Code */
+
+.wp-block-code {
+	background: rgba(0, 0, 0, 0.02);
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	font-size: 15px;
+	line-height: 1.6;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 1.6em;
+}
+
+/* Pullquote */
+
+.wp-block-pullquote {
+	margin: 0;
+	padding: 0;
+	border: 0;
+}
+
+.wp-block-pullquote blockquote {
+	border-top: 2px solid currentColor;
+	border-bottom: 2px solid currentColor;
+	font-style: italic;
+	font-size: 24px;
+	margin: 0 0 1.6em;
+	padding: .8em 0;
+}
+
+.wp-block-pullquote cite {
+	font-size: 18px;
+	font-style: normal;
+}
+
+.wp-block-pullquote.alignleft p,
+.wp-block-pullquote.alignright p {
+	font-size: 24px;
+}
+
+.wp-block-pullquote.alignleft {
+	margin-right: 1.6em;
+}
+
+.wp-block-pullquote.alignright {
+	margin-left: 1.6em;
+}
+
+.wp-block-pullquote.alignfull blockquote {
+	padding-left: 1.6em;
+	padding-right: 1.6em;
+}
+
+.rtl .wp-block-pullquote {
+}
+
+.wp-block-pullquote p {
+	margin: 0 0 .8em;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Buttons */
+
+.wp-block-button .wp-block-button__link {
+	border: 2px solid currentColor;
+	border-radius: 10px;
+	box-shadow: none;
+	font-weight: bold;
+	font-size: 16px;
+	font-size: 1rem;
+	letter-spacing: 1px;
+	line-height: 1;
+	padding: 0.8em 1.6em 0.8em;
+	text-shadow: none;
+	text-decoration: none;
+	text-transform: uppercase;
+	transition: 0.3s;
+}
+
+.wp-block-button .wp-block-button__link:active,
+.wp-block-button .wp-block-button__link:hover,
+.wp-block-button .wp-block-button__link:focus {
+	box-shadow: none;
+}
+
+.wp-block-button__link:not(.has-background) {
+	background: transparent;
+}
+
+.wp-block-button__link:not(.has-text-color) {
+	color: #6636cc;
+	border-color: #6636cc;
+}
+
+.wp-block-button__link:not(.has-text-color):active,
+.wp-block-button__link:not(.has-text-color):focus,
+.wp-block-button__link:not(.has-text-color):hover {
+	border-color: #85cc36;
+	color: #85cc36;
+}
+
+.wp-block-button__link:not(.has-background):active,
+.wp-block-button__link:not(.has-background):focus,
+.wp-block-button__link:not(.has-background):hover {
+	background: transparent;
+}
+
+/* Seperator */
+
+hr.wp-block-separator {
+	border: 0;
+}
+
+.wp-block-separator {
+	background-color: #dddddd;
+	border: 0;
+	height: 1px;
+	margin-bottom: 1.6em;
+	max-width: 100px;
+}
+
+.wp-block-separator.is-style-wide {
+	max-width: 100%;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Widget Blocks
+--------------------------------------------------------------*/
+
+/* Categories */
+
+.wp-block-categories.aligncenter {
+	margin-left: 1.6em;
+	margin-right: 1.6em;
+	text-align: center;
+}
+
+.wp-block-categories-list.alignleft {
+	margin-left: 1.6em;
+}
+
+/* Latest Comments */
+
+.wp-block-latest-comments {
+	margin-left: 0;
+	margin-right: 0;
+}
+
+.editor-block-list__block .wp-block-latest-comments__comment-meta a {
+	box-shadow: none;
+	font-weight: 700;
+	text-decoration: none;
+}
+
+.wp-block-latest-comments__comment-date {
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+	border-top: 1px solid #dddddd;
+	margin-bottom: 0;
+	padding: .8em 0;
+}
+
+.wp-block-latest-comments__comment-excerpt p:last-child {
+	margin-bottom: 0;
+}
+
+.rtl .wp-block-latest-posts {
+	margin-left: 0;
+	margin-right: 0;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Colors
+--------------------------------------------------------------*/
+
+.has-medium-gray-color,
+.has-medium-gray-color:hover,
+.has-medium-gray-color:focus,
+.has-medium-gray-color:active {
+	color: #999;
+}
+
+.has-medium-gray-background-color,
+.has-medium-gray-background-color:hover,
+.has-medium-gray-background-color:focus,
+.has-medium-gray-background-color:active {
+	background-color: #999;
+}
+
+.has-light-gray-color,
+.has-light-gray-color:hover,
+.has-light-gray-color:focus,
+.has-light-gray-color:active {
+	color: #ddd;
+}
+
+.has-light-gray-background-color,
+.has-light-gray-background-color:hover,
+.has-light-gray-background-color:focus,
+.has-light-gray-background-color:active {
+	background-color: #ddd;
+}
+
+.has-white-color,
+.has-white-color:hover,
+.has-white-color:focus,
+.has-white-color:active {
+	color: #fff;
+}
+
+.has-white-background-color,
+.has-white-background-color:hover,
+.has-white-background-color:focus,
+.has-white-background-color:active {
+	background-color: #fff;
+}
+
+.has-purple-color,
+.has-purple-color:hover,
+.has-purple-color:focus,
+.has-purple-color:active {
+	color: #6636cc;
+}
+
+.has-purple-background-color,
+.has-purple-background-color:hover,
+.has-purple-background-color:focus,
+.has-purple-background-color:active {
+	background-color: #6636cc;
+}
+
+.has-dark-purple-color,
+.has-dark-purple-color:hover,
+.has-dark-purple-color:focus,
+.has-dark-purple-color:active {
+	color: #471e9e;
+}
+
+.has-dark-purple-background-color,
+.has-dark-purple-background-color:hover,
+.has-dark-purple-background-color:focus,
+.has-dark-purple-background-color:active {
+	background-color: #471e9e;
+}
+
+.has-green-color,
+.has-green-color:hover,
+.has-green-color:focus,
+.has-green-color:active {
+	color: #85cc36;
+}
+
+.has-green-background-color,
+.has-green-background-color:hover,
+.has-green-background-color:focus,
+.has-green-background-color:active {
+	background-color: #85cc36;
+}
+
+.has-dark-green-color,
+.has-dark-green-color:hover,
+.has-dark-green-color:focus,
+.has-dark-green-color:active {
+	color: #609d1b;
+}
+
+.has-dark-green-background-color,
+.has-dark-green-background-color:hover,
+.has-dark-green-background-color:focus,
+.has-dark-green-background-color:active {
+	background-color: #609d1b;
+}
+
+.has-black-color,
+.has-black-color:hover,
+.has-black-color:focus,
+.has-black-color:active {
+	color: #333;
+}
+
+.has-black-background-color,
+.has-black-background-color:hover,
+.has-black-background-color:focus,
+.has-black-background-color:active {
+	background-color: #333;
+}

+ 752 - 0
libretto/css/editor-blocks.css

@@ -0,0 +1,752 @@
+/*
+ * Theme Name: Libretto
+ * Description: Gutenberg Block Editor Styles
+ */
+
+/*--------------------------------------------------------------
+>>> 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:not(.wp-block-cover-text),
+.editor-default-block-appender input[type="text"].editor-default-block-appender__content {
+	color: #333;
+	font-family: Karla, sans-serif;
+	font-size: 16px;
+	line-height: 1.6;
+}
+
+.alignleft {
+	display: inline;
+	float: left;
+	margin: .8em 1.6em .8em 0;
+}
+
+.alignright {
+	display: inline;
+	float: right;
+	margin: .8em 0 .8em 1.6em;
+}
+
+.aligncenter {
+	margin-left: auto;
+	margin-right: auto;
+}
+
+.wp-block-columns.alignfull,
+.wp-block-latest-comments.alignfull,
+.editor-block-list__block[data-align="full"] .wp-block-file {
+	padding-left: 1.6em;
+	padding-right: 1.6em;
+}
+
+.editor-block-list__block[data-align="full"] table.wp-block-table {
+	margin-left: .8em;
+	margin-right: .8em;
+}
+
+/* Title */
+
+.editor-post-title__block .editor-post-title__input {
+	clear: both;
+	font-weight: bold;
+	font-family: Karla, sans-serif;
+	text-transform: uppercase;
+}
+
+/* Headings */
+
+.edit-post-visual-editor h1,
+.edit-post-visual-editor h2,
+.edit-post-visual-editor h3,
+.edit-post-visual-editor h4,
+.edit-post-visual-editor h5,
+.edit-post-visual-editor h6 {
+	clear: both;
+	font-weight: bold;
+	font-family: Karla, sans-serif;
+	text-transform: uppercase;
+}
+
+.edit-post-visual-editor h1 {
+	font-size: 32px;
+}
+
+.edit-post-visual-editor h2 {
+	font-size: 30px;
+}
+
+.edit-post-visual-editor h3 {
+	font-size: 26px;
+}
+
+.edit-post-visual-editor h4 {
+	font-size: 18px;
+}
+
+.edit-post-visual-editor h5 {
+	font-size: 16px;
+}
+
+.edit-post-visual-editor h6 {
+	font-size: 14px;
+}
+
+@media screen and (min-width: 768px) {
+	.edit-post-visual-editor h1 {
+		font-size: 42px;
+	}
+
+	.edit-post-visual-editor h2 {
+		font-size: 32px;
+	}
+
+	.edit-post-visual-editor h3 {
+		font-size: 30px;
+	}
+
+	.edit-post-visual-editor h4 {
+		font-size: 26px;
+	}
+
+	.edit-post-visual-editor h5 {
+		font-size: 20px;
+	}
+
+	.edit-post-visual-editor h6 {
+		font-size: 16px;
+	}
+}
+
+/* Paragraphs */
+
+.edit-post-visual-editor p {
+	margin: .8em 0;
+}
+
+.edit-post-visual-editor blockquote p {
+	margin: .8em 0;
+}
+
+/* Images */
+
+.wp-block-image figcaption {
+	font-style: italic;
+	text-align: center;
+}
+
+/*--------------------------------------------------------------
+2.0 General Block Styles
+--------------------------------------------------------------*/
+
+/* Main column width */
+
+.wp-block {
+	max-width: 715px; /* 685px + 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: #6636cc;
+	font-weight: bold;
+	text-decoration: none;
+	transition: 0.3s;
+}
+
+.edit-post-visual-editor a:hover,
+.edit-post-visual-editor a:focus,
+.edit-post-visual-editor a:active,
+.editor-block-list__block a:hover,
+.editor-block-list__block a:focus,
+.editor-block-list__block a:active,
+.wp-block-freeform.block-library-rich-text__tinymce a:hover,
+.wp-block-freeform.block-library-rich-text__tinymce a:focus,
+.wp-block-freeform.block-library-rich-text__tinymce a:active {
+	color: #85cc36;
+}
+
+/* List styles */
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul,
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol.editor-rich-text__tinymce {
+	margin: 0 0 1.6em 1.6em;
+	padding: 0;
+}
+
+.block-library-list .editor-rich-text__tinymce {
+	margin: 0;
+	padding: 0;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery),
+.editor-block-list__block ul:not(.wp-block-gallery),
+.block-library-list ul {
+	list-style: disc;
+}
+
+.edit-post-visual-editor ol,
+.editor-block-list__block ol,
+.block-library-list ol.editor-rich-text__tinymce {
+	list-style: decimal;
+}
+
+.edit-post-visual-editor ul:not(.wp-block-gallery) li > ul,
+.editor-block-list__block ul:not(.wp-block-gallery) li > ul,
+.block-library-list li > ul,
+.edit-post-visual-editor li > ol,
+.editor-block-list__block li > ol,
+.block-library-list li > ol {
+	margin-bottom: 0;
+	margin-left: 1.6em;
+}
+
+.rtl .edit-post-visual-editor ul:not(.wp-block-gallery),
+.rtl .editor-block-list__block ul:not(.wp-block-gallery),
+.rtl .block-library-list ul,
+.rtl .edit-post-visual-editor ol,
+.rtl .editor-block-list__block ol,
+.rtl .block-library-list ol.editor-rich-text__tinymce {
+	margin-left: 0;
+	margin-right: 1.6em;
+	padding: 0;
+}
+
+/* Captions */
+
+[class^="wp-block-"] figcaption {
+	text-align: center;
+	font-style: italic;
+}
+
+/*--------------------------------------------------------------
+3.0 Blocks - Common Blocks
+--------------------------------------------------------------*/
+
+/* Paragraph */
+
+.wp-block-paragraph.has-drop-cap:not(:focus)::first-letter {
+	font-size: 130px;
+}
+
+/* Quote */
+
+.editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large) {
+	margin: 0 1.6em;
+	border: 0;
+	padding: 0;
+}
+
+.editor-block-list__block .wp-block-quote {
+	font-size: 26px;
+	font-style: normal;
+	font-weight: bold;
+	margin: 0 1.6em 1.6em;
+}
+
+.edit-post-visual-editor .editor-block-list__block blockquote p:not(.wp-block-cover-text) {
+	font-size: 26px;
+}
+
+.editor-block-list__block .wp-block-quote__citation {
+	font-style: italic;
+	font-size: inherit;
+	color: inherit;
+}
+
+.rtl .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large) {
+}
+
+.rtl .editor-block-list__block .wp-block-quote {
+}
+
+.editor-block-list__block .wp-block-quote em,
+.editor-block-list__block .wp-block-quote i {
+	font-style: normal;
+}
+
+.editor-block-list__block .wp-block-quote > :last-child {
+	margin-bottom: 0;
+}
+
+.editor-block-list__block .wp-block-quote.alignleft {
+	margin: .8em 1.6em .8em 0;
+}
+
+.editor-block-list__block .wp-block-quote.alignright {
+	margin: .8em 0 .8em 1.6em;
+}
+
+.editor-block-list__block .wp-block-quote.aligncenter {
+	margin-bottom: .8em;
+}
+
+.rtl .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large).alignleft,
+.rtl .editor-block-list__block .wp-block-quote:not(.is-large):not(.is-style-large).alignright  {
+}
+
+.wp-block-quote.is-large,
+.wp-block-quote.is-style-large {
+	font-size: 32px;
+	font-style: normal;
+	margin: 0 .8em .8em;
+	padding: 0;
+}
+
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large,
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large,
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-large p,
+.edit-post-visual-editor .editor-block-list__block .wp-block-quote.is-style-large p {
+	font-size: 32px;
+}
+
+.editor-block-list__block .wp-block-quote.is-large p,
+.editor-block-list__block .wp-block-quote.is-style-large p {
+	margin-bottom: .4em;
+	font-style: normal;
+}
+
+/* Audio */
+
+/* Cover Images */
+
+/* File */
+
+.wp-block-file .wp-block-file__button {
+	border: 2px solid;
+	border-color: #6636cc;
+	border-radius: 10px;
+	background: transparent;
+	box-shadow: none;
+	color: #6636cc;
+	font-weight: bold;
+	font-size: 16px;
+	font-size: 1rem;
+	letter-spacing: 1px;
+	line-height: 1;
+	padding: 0.8em 1.6em 0.8em;
+	text-shadow: none;
+	text-decoration: none;
+	text-transform: uppercase;
+	transition: 0.3s;
+}
+
+.wp-block-file .wp-block-file__button:hover,
+.wp-block-file .wp-block-file__button:focus {
+	border-color: #85cc36;
+	box-shadow: none;
+	color: #85cc36;
+}
+
+/*--------------------------------------------------------------
+4.0 Blocks - Formatting
+--------------------------------------------------------------*/
+
+/* Verse */
+
+.wp-block-verse pre {
+	background: transparent;
+	color: inherit;
+	font-family: inherit;
+	font-size: inherit;
+	line-height: inherit;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 0;
+}
+
+/* Code */
+
+.wp-block-code {
+	background: rgba(0, 0, 0, 0.02);
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	font-size: 15px;
+	font-size: 0.9375rem;
+	line-height: 1.6;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 1.6em;
+}
+
+.wp-block-code textarea {
+	background: transparent;
+}
+
+/* Classic */
+
+.wp-block-freeform.block-library-rich-text__tinymce address {
+	margin-top: 0.8em; 
+	margin-bottom: 0.8em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce ol {
+	list-style: decimal;
+	margin-left: 3em;
+	padding: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce li > ol {
+	margin-left: 1.6em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	border: 0;
+	font-size: 26px;
+	font-style: normal;
+	font-weight: bold;
+	margin: 0 1.6em 1.6em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote p {
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote > :last-child {
+	margin-bottom: 0;
+}
+
+.editor-block-list__block .wp-block-freeform.block-library-rich-text__tinymce blockquote:not(.alignleft):not(.alignright) {
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce blockquote cite {
+	font-style: italic;
+	text-transform: none;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote {
+	margin-right: 0;
+	padding-left: 0;
+	padding-right: 1.6em;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce .alignleft {
+	float: left;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce .alignright {
+	float: right;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignleft {
+	margin: .8em 1.6em .8em 0;
+}
+
+.rtl .wp-block-freeform.block-library-rich-text__tinymce blockquote.alignright {
+	margin: .8em 0 .8em 1.6em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h1,
+.wp-block-freeform.block-library-rich-text__tinymce h2,
+.wp-block-freeform.block-library-rich-text__tinymce h3,
+.wp-block-freeform.block-library-rich-text__tinymce h4,
+.wp-block-freeform.block-library-rich-text__tinymce h5,
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+	clear: both;
+	font-weight: bold;
+	font-family: Karla, sans-serif;
+	text-transform: uppercase;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h1 {
+	font-size: 32px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h2 {
+	font-size: 30px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h3 {
+	font-size: 26px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h4 {
+	font-size: 18px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h5 {
+	font-size: 16px;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce h6 {
+	font-size: 14px;
+}
+
+@media screen and (min-width: 768px) {
+	.wp-block-freeform.block-library-rich-text__tinymce h1 {
+		font-size: 42px;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce h2 {
+		font-size: 32px;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce h3 {
+		font-size: 30px;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce h4 {
+		font-size: 26px;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce h5 {
+		font-size: 20px;
+	}
+
+	.wp-block-freeform.block-library-rich-text__tinymce h6 {
+		font-size: 16px;
+	}
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce pre {
+	background: rgba(0, 0, 0, 0.02);
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	font-size: 15px;
+	font-size: 0.9375rem;
+	line-height: 1.6;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 1.6em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table {
+	background-color: rgba(0, 0, 0, 0.02);
+	width: 100%;
+	margin: 0 0 1.6em;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce .alternate {
+	background: transparent;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table td {
+	padding: 8px 5px;
+	border: 0;
+}
+
+.wp-block-freeform.block-library-rich-text__tinymce table th {
+	padding: 8px 5px;
+	font-weight: bold;
+	text-align: center;
+}
+
+/* Preformatted */
+
+.editor-block-list__block .wp-block-preformatted pre {
+	background: rgba(0, 0, 0, 0.02);
+	font-family: "Courier 10 Pitch", Courier, monospace;
+	font-size: 15px;
+	font-size: 0.9375rem;
+	line-height: 1.6;
+	margin-bottom: 1.6em;
+	max-width: 100%;
+	overflow: auto;
+	padding: 1.6em;
+}
+
+/* Pullquote */
+
+.editor-block-list__block .wp-block-pullquote blockquote {
+	margin: 0;
+	padding: 0;
+	border: 0;
+}
+
+.edit-post-visual-editor .wp-block-pullquote p:not(.wp-block-cover-text) {
+	font-size: 24px;
+}
+
+.wp-block-pullquote {
+	border-top: 2px solid currentColor;
+	border-bottom: 2px solid currentColor;
+	font-style: italic;
+	font-size: 24px;
+	font-weight: bold;
+	margin: 0 0 1.6em;
+	padding: .8em 0;
+}
+
+.wp-block-pullquote blockquote {
+	font-size: 24px;
+}
+
+.wp-block-pullquote.alignfull blockquote {
+	padding-left: 1.6em;
+	padding-right: 1.6em;
+}
+
+.wp-block-pullquote.alignleft {
+	margin-right: 1.6em;
+}
+
+.wp-block-pullquote.alignright {
+	margin-left: 1.6em;
+}
+
+.wp-block-pullquote blockquote > .editor-rich-text p {
+	font-size: 24px;
+	margin-bottom: .8em;
+}
+
+.wp-block-pullquote.alignleft blockquote > .editor-rich-text p,
+.wp-block-pullquote.alignright blockquote > .editor-rich-text p {
+	font-size: 24px;
+}
+
+.wp-block-pullquote__citation,
+.wp-block-pullquote cite,
+.wp-block-pullquote footer {
+	font-style: normal;
+	font-size: 18px;
+	text-transform: none;
+}
+
+/* Table */
+
+.editor-block-list__block .wp-block-table__cell-content {
+	padding: 0;
+}
+
+.editor-block-list__block table.wp-block-table {
+	background-color: rgba(0, 0, 0, 0.02);
+	width: 100%;
+	margin: 0 0 1.6em;
+}
+
+.editor-block-list__block table.wp-block-table td {
+	border: 0;
+	padding: 8px 5px;
+}
+
+.editor-block-list__block table.wp-block-table th {
+	border: 0;
+	padding: 8px 5px;
+	font-weight: bold;
+	text-align: center;
+}
+
+/*--------------------------------------------------------------
+5.0 Blocks - Layout Elements
+--------------------------------------------------------------*/
+
+/* Buttons */
+.wp-block-button .wp-block-button__link {
+	border: 2px solid currentColor;
+	border-radius: 10px;
+	box-shadow: none;
+	font-weight: bold;
+	font-size: 16px;
+	font-size: 1rem;
+	letter-spacing: 1px;
+	line-height: 1;
+	padding: 0.8em 1.6em 0.8em;
+	text-shadow: none;
+	text-decoration: none;
+	text-transform: uppercase;
+	transition: 0.3s;
+}
+
+.wp-block-button .wp-block-button__link:active,
+.wp-block-button .wp-block-button__link:hover,
+.wp-block-button .wp-block-button__link:focus {
+	box-shadow: none;
+}
+
+.wp-block-button__link:not(.has-background) {
+	background: transparent;
+}
+
+.wp-block-button__link:not(.has-text-color) {
+	color: #6636cc;
+	border-color: #6636cc;
+}
+
+.wp-block-button__link:not(.has-text-color):active,
+.wp-block-button__link:not(.has-text-color):focus,
+.wp-block-button__link:not(.has-text-color):hover {
+	border-color: #85cc36;
+	color: #85cc36;
+}
+
+.wp-block-button__link:not(.has-background):active,
+.wp-block-button__link:not(.has-background):focus,
+.wp-block-button__link:not(.has-background):hover {
+	background: transparent;
+}
+
+/* Separator */
+
+.wp-block-separator {
+	background-color: #ddd;
+	border: 0;
+	height: 1px;
+	margin-bottom: 1.6em;
+}
+
+
+.wp-block-separator.is-style-wide {
+	max-width: 100%;
+}
+
+/*--------------------------------------------------------------
+6.0 Blocks - Widgets
+--------------------------------------------------------------*/
+
+/* Categories */
+
+.editor-block-list__block[data-align=right] .wp-block-categories__list,
+.editor-block-list__block[data-align=left] .wp-block-categories__list {
+	padding: 0;
+}
+
+/* Latest Comments */
+
+.editor-block-list__block .wp-block-latest-comments__comment-meta a {
+	box-shadow: none;
+	font-weight: 700;
+	text-decoration: none;
+}
+
+.wp-block-latest-comments .wp-block-latest-comments__comment {
+	border-top: 1px solid #ddd;
+	margin-bottom: 0;
+	padding: .8em 0;
+}
+
+.rtl ol.wp-block-latest-comments {
+	margin-right: 0;
+}
+
+.wp-block-latest-comments__comment-excerpt p:last-child {
+	margin-bottom: 0;
+}
+
+/* Latest Posts */
+
+.edit-post-visual-editor .wp-block-latest-posts.is-grid {
+	list-style: none;
+	margin-left: 0;
+	margin-right: 0;
+}
+
+.edit-post-visual-editor .wp-block-latest-posts.is-grid li {
+	margin-bottom: 1em;
+}

+ 67 - 0
libretto/functions.php

@@ -50,6 +50,60 @@ if ( ! function_exists( 'libretto_setup' ) ) :
 		add_image_size( 'libretto-oversized', 900, 600, false );
 		add_image_size( 'libretto-fullpage', 1600, 1000, false );
 
+		// Add support for responsive embeds.
+		add_theme_support( 'responsive-embeds' );
+
+	 	/**
+		 * Gutenberg wide and full images support
+		 */
+		add_theme_support( 'align-wide' );
+
+	 	// Add custom colors to Gutenberg
+		add_theme_support(
+			'editor-color-palette', array(
+				array(
+					'name'  => esc_html__( 'Black', 'libretto' ),
+					'slug' => 'black',
+					'color' => '#333333',
+				),
+				array(
+					'name'  => esc_html__( 'Medium Gray', 'libretto' ),
+					'slug' => 'medium-gray',
+					'color' => '#999999',
+				),
+				array(
+					'name'  => esc_html__( 'Light Gray', 'libretto' ),
+					'slug' => 'light-gray',
+					'color' => '#dddddd',
+				),
+				array(
+					'name'  => esc_html__( 'White', 'libretto' ),
+					'slug' => 'white',
+					'color' => '#ffffff',
+				),
+				array(
+					'name'  => esc_html__( 'Purple', 'libretto' ),
+					'slug' => 'purple',
+					'color' => '#6636cc',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Purple', 'libretto' ),
+					'slug' => 'dark-purple',
+					'color' => '#471e9e',
+				),
+				array(
+					'name'  => esc_html__( 'Green', 'libretto' ),
+					'slug' => 'green',
+					'color' => '#85cc36',
+				),
+				array(
+					'name'  => esc_html__( 'Dark Green', 'libretto' ),
+					'slug' => 'dark-green',
+					'color' => '#609d1b',
+				),
+			)
+		);
+
 		/**
 		 * This theme uses wp_nav_menu() in two locations:
 		 * one at the top of the page, and one for social media links in the footer
@@ -205,6 +259,9 @@ function libretto_scripts() {
 	wp_enqueue_style( 'libretto-style', get_stylesheet_uri() );
 	wp_enqueue_script( 'libretto-script', get_template_directory_uri().'/js/libretto.js', array( 'jquery' ), '20140331' );
 
+	// Gutenberg styles
+	wp_enqueue_style( 'libretto-blocks', get_template_directory_uri() . '/css/blocks.css' );
+
 	// Fonts
 	wp_enqueue_style( 'libretto-fonts', libretto_fonts_url(), array(), null );
 	wp_enqueue_style( 'libretto-custom-icons', get_template_directory_uri().'/icons/icons.css', array(), null );
@@ -221,6 +278,16 @@ function libretto_scripts() {
 }
 add_action( 'wp_enqueue_scripts', 'libretto_scripts' );
 
+/**
+ * Gutenberg Editor Styles
+ */
+function libretto_editor_styles() {
+	wp_enqueue_style( 'libretto-editor-block-style', get_template_directory_uri() . '/css/editor-blocks.css' );
+	wp_enqueue_style( 'libretto-fonts', libretto_fonts_url(), array(), null );
+}
+add_action( 'enqueue_block_editor_assets', 'libretto_editor_styles' );
+
+
 /**
  * Create a reusable array of available sidebars.
  * Used in sidebar.php and in inc/jetpack.php to adjust footer area according to usage.