Skip to content

Instantly share code, notes, and snippets.

@itsdavidmorgan
Last active January 5, 2020 18:59
Show Gist options
  • Save itsdavidmorgan/505e17fe42dea51ab530273db3c5b553 to your computer and use it in GitHub Desktop.
Save itsdavidmorgan/505e17fe42dea51ab530273db3c5b553 to your computer and use it in GitHub Desktop.
Back-end Styles For Gutenberg Content Editor
/************************************************
Gutenberg Editor
************************************************/
.block-editor .wp-block {
max-width: 760px;
}
.block-editor .wp-block[data-align="wide"] {
max-width: 920px;
}
.block-editor .wp-block[data-align="full"] {
max-width: none;
}
/* Body */
.editor-rich-text,
.editor-styles-wrapper {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 1rem;
line-height: 1.65;
}
.block-editor .editor-styles-wrapper h1,
.block-editor .editor-styles-wrapper h2,
.block-editor .editor-styles-wrapper h3,
.block-editor .editor-styles-wrapper h4,
.block-editor .editor-styles-wrapper h5,
.block-editor .editor-styles-wrapper h6,
.editor-post-title__block .editor-post-title__input {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-weight: 500;
line-height: 1.1;
word-wrap: break-word;
}
.editor-post-title__block .editor-post-title__input {
text-align: center;
}
.block-editor .editor-styles-wrapper h1,
.editor-post-title__block .editor-post-title__input {
font-size: 2.6rem;
}
.block-editor .editor-styles-wrapper h2 {
font-size: 2.2rem;
}
.block-editor .editor-styles-wrapper h3 {
font-size: 1.8rem;
}
.block-editor .editor-styles-wrapper h4 {
font-size: 1.4em;
}
.block-editor .editor-styles-wrapper h5 {
font-size: 1.2em;;
}
.block-editor .editor-styles-wrapper h6 {
font-size: 0.9rem;
font-weight: 600;
letter-spacing: 2px;
text-transform: uppercase;
}
.editor-styles-wrapper .wp-block-code code,
.editor-styles-wrapper .wp-block-preformatted pre {
color: #666666;
font-family: Courier, sans-serif;
line-height: 1.4;
margin: 24px 0px;
padding: 12px;
border: 2px solid rgba(0, 0, 0, 0.24);
box-shadow: inset 0px 0px 6px rgba(0, 0, 0, 0.12);
box-sizing: border-box;
border-radius: 3px;
}
/* Blockquotes */
blockquote.wp-block-quote {
margin: 32px 0px;
padding: 12px 18px;
border-left: 2px solid rgba(0, 0, 0, 0.12);
}
blockquote.wp-block-quote:not(.is-large):not(.is-style-large) {
padding-left: 18px;
border-left: 2px solid rgba(0, 0, 0, 0.12);
}
blockquote.wp-block-quote p {
font-size: 130%;
line-height: 1.5;
}
blockquote.wp-block-quote cite,
blockquote.wp-block-quote footer,
blockquote.wp-block-quote .wp-block-quote__citation {
display: block;
color: rgba(0, 0, 0, 0.4);
font-size: 0.85rem;
margin-top: 12px;
}
blockquote.wp-block-quote cite::before,
blockquote.wp-block-quote footer::before,
blockquote.wp-block-quote .wp-block-quote__citation::before {
content: '— '
}
/* Tables */
table,
table.wp-block-table {
width: 100%;
text-align: left;
margin: 32px 0px;
padding: 0px;
box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.08);
border: 3px solid rgba(0, 0, 0, 0.12);
border-spacing: 0;
border-radius: 4px;
}
table p,
table form,
table ul,
table li {
margin: 6px 0px;
padding: 0px;
}
table thead,
table tfoot,
table.wp-block-table thead,
table.wp-block-table tfoot {
border: 1px solid #dddddd;
border: 1px solid rgba(0, 0, 0, 0.12);
}
table tbody tr:nth-child(odd) {
background: rgba(0, 0, 0, 0.04);
}
table th,
table.wp-block-table th {
font-size: 1.1rem;
text-transform: uppercase;
margin: 0px;
padding: 12px;
border-top: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: none;
border-left: none;
border-right: none;
box-sizing: border-box;
}
table td,
table.wp-block-table td {
padding: 12px;
margin: 0px;
border-top: 1px solid rgba(0, 0, 0, 0.12);
border-bottom: none;
border-left: none;
border-right: none;
box-sizing: border-box;
}
table.wp-block-table.is-style-stripes {
border-collapse: collapse;
}
table.wp-block-table.is-style-stripes td {
border-top: 1px solid #dddddd;
border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.wp-block-table__cell-content {
padding: 0px;
}
/* Buttons */
.editor-styles-wrapper .wp-block-button .wp-block-button__link {
display: inline-block;
background-color: #3399cc;
color: #cccccc;
color: rgba(255, 255, 255, .7);
font-style: normal;
font-size: 0.9rem;
font-weight: 500;
text-transform: uppercase;
text-decoration: none;
text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.12);
line-height: 1.2;
letter-spacing: 1px;
padding: 12px 24px;
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 0.12);
box-sizing: border-box;
box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.24);
-webkit-appearance: none;
}
.editor-styles-wrapper .wp-block-button .wp-block-button__link:hover {
background-color: #006699;
color: #ffffff;
font-style: normal;
font-size: 0.9rem;
text-transform: uppercase;
text-decoration: none;
text-shadow: 1px 1px 0px rgba(0, 0, 0, 0.12);
line-height: 1.2;
letter-spacing: 1px;
padding: 12px 24px;
border: 1px solid rgba(0, 0, 0, 0.12);
box-shadow: inset 0px 3px 2px rgba(0, 0, 0, 0.24);
cursor: pointer;
}
/* Theme Styles */
.wp-block-image {
max-width: none;
margin: 0px auto;
padding: 0px;
}
.wp-block-embed {
margin-left: auto;
margin-right: auto;
}
.wp-block-gallery .blocks-gallery-item {
padding: 0px;
}
.wp-block-gallery .blocks-gallery-image {
margin-left: 0px;
margin-right: 0px;
}
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
box-sizing: border-box;
}
.wp-block-cover.alignfull,
.wp-block-cover-image.alignfull {
margin-top: 0px;
margin-bottom: 0px;
}
.wp-block-cover h2 {
padding: 0px;
}
.wp-block-cover.alignfull .wp-block-cover__inner-container,
.wp-block-cover.alignwide .wp-block-cover__inner-container {
position: relative;
top: 0;
width: 100%;
max-width: 880px;
margin: 0px auto;
transition: all 1s ease-in-out;
transition-delay: 0.5s;
z-index: 7;
}
.wp-block-button {
position: relative;
text-align: center;
box-sizing: border-box;
margin: 0px;
}
.wp-block-button.alignwide a {
display: block;
position: relative;
}
.wp-block-audio {
margin-left: 0px;
margin-right: 0px;
}
.wp-block-audio audio {
width: 100%;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment