Merge pull request #320 from Automattic/karuna-add-gutenberg-support

Karuna: Add Gutenberg styles and support to theme.
This commit is contained in:
Laurel 2018-11-07 10:18:22 -08:00 committed by GitHub
commit 7b479c8c55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1397 additions and 0 deletions

563
karuna/blocks.css Normal file
View file

@ -0,0 +1,563 @@
/*
Theme Name: Karuna
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
--------------------------------------------------------------*/
/* Alignments */
#page {
overflow-x: hidden; /* prevents slight side-scroll with full aligned images. */
}
/* 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-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;
}
}
/* Captions */
[class^="wp-block-"] figcaption {
font-size: inherit;
font-style: italic;
text-align: center;
}
[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
color: inherit;
}
/*--------------------------------------------------------------
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;
}
/* 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;
}
/* Video */
.wp-block-video.alignfull video {
width: 100%;
}
/*--------------------------------------------------------------
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;
}
.wp-block-pullquote p {
margin: 0 0 .8em;
}
/* Table */
.no-sidebar .wp-block-table.alignfull {
margin-left: .8em;
margin-right: .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;
}
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
max-width: 100px;
}
.wp-block-separator.is-style-wide {
max-width: 100%;
}
/* Media & Text */
.wp-block-media-text {
margin-bottom: 1.6em;
}
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*--------------------------------------------------------------
5.0 Blocks - Widget Blocks
--------------------------------------------------------------*/
/* 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;
text-align: center;
}
/* Categories */
.wp-block-categories.aligncenter {
margin-left: 1.6em;
margin-right: 1.6em;
}
.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 .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;
}
/* Latest Posts */
.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;
}

768
karuna/editor-blocks.css Normal file
View file

@ -0,0 +1,768 @@
/*
* Theme Name: Karuna
* 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;
}
@media screen and (min-width: 768px) {
.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 {
font-size: 18px;
}
}
/* 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;
}
/*--------------------------------------------------------------
2.0 General Block Styles
--------------------------------------------------------------*/
/* Main column width */
.wp-block {
max-width: 715px; /* 685px + 30px to account for padding */
}
/* Alignments */
.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;
}
/* 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 {
font-size: inherit;
font-style: italic;
text-align: center;
}
[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
color: inherit;
}
/* Definition List styles */
.wp-block-freeform.block-library-rich-text__tinymce dt {
font-weight: bold;
}
/*--------------------------------------------------------------
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;
}
/* File */
.wp-block-file__textlink {
color: #6636cc;
font-weight: bold;
}
.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);
border: 0;
border-radius: 0;
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: 1.1px; /* To work around odd issue in Firefox */
margin-bottom: 1.6em;
}
/*--------------------------------------------------------------
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;
}
/* 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;
}

View file

@ -35,6 +35,60 @@ function karuna_setup() {
*/
add_theme_support( 'title-tag' );
// 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', 'karuna' ),
'slug' => 'black',
'color' => '#333333',
),
array(
'name' => esc_html__( 'Medium Gray', 'karuna' ),
'slug' => 'medium-gray',
'color' => '#999999',
),
array(
'name' => esc_html__( 'Light Gray', 'karuna' ),
'slug' => 'light-gray',
'color' => '#dddddd',
),
array(
'name' => esc_html__( 'White', 'karuna' ),
'slug' => 'white',
'color' => '#ffffff',
),
array(
'name' => esc_html__( 'Purple', 'karuna' ),
'slug' => 'purple',
'color' => '#6636cc',
),
array(
'name' => esc_html__( 'Dark Purple', 'karuna' ),
'slug' => 'dark-purple',
'color' => '#471e9e',
),
array(
'name' => esc_html__( 'Green', 'karuna' ),
'slug' => 'green',
'color' => '#85cc36',
),
array(
'name' => esc_html__( 'Dark Green', 'karuna' ),
'slug' => 'dark-green',
'color' => '#609d1b',
),
)
);
/*
* Enable support for Post Thumbnails on posts and pages.
*
@ -235,6 +289,9 @@ function karuna_fonts_url() {
function karuna_scripts() {
wp_enqueue_style( 'karuna-style', get_stylesheet_uri() );
// Gutenberg styles
wp_enqueue_style( 'karuna-blocks', get_template_directory_uri() . '/blocks.css' );
wp_enqueue_style( 'karuna-fonts', karuna_fonts_url(), array(), null );
wp_enqueue_style( 'genericons', get_template_directory_uri() . '/assets/fonts/genericons/genericons.css', array(), '3.4.1' );
@ -251,6 +308,15 @@ function karuna_scripts() {
}
add_action( 'wp_enqueue_scripts', 'karuna_scripts' );
/**
* Gutenberg Editor Styles
*/
function karuna_editor_styles() {
wp_enqueue_style( 'karuna-editor-block-style', get_template_directory_uri() . '/editor-blocks.css' );
wp_enqueue_style( 'karuna-fonts', karuna_fonts_url(), array(), null );
}
add_action( 'enqueue_block_editor_assets', 'karuna_editor_styles' );
/**
* Replaces "[...]" (appended to automatically generated excerpts) with ... and a 'Continue reading' link.
* @return string 'Continue reading' link prepended with an ellipsis.