mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-03 09:21:03 +01:00
d30ab8fc85
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Sixteen. These are the specific changes made to this theme: - Add `blocks.css`, to style blocks on the front end, to make sure they match the theme’s existing HTML element styles. - Add `editor-blocks.css` to style blocks in the editor, to make sure they match the theme’s existing HTML element styles. - Add theme support for `editor-styles`, to pull the existing editor stylesheet into the new editor. - Add theme support for `wp-block-styles`, to load the default block styles on the front end. - Add theme support for `editor-color-palette`, to load a color palette based on the theme’s color scheme into the block-based editor. Props laurelfulford, davidkennedy. Merges [43799] to trunk. Fixes #45044. Built from https://develop.svn.wordpress.org/trunk@44147 git-svn-id: http://core.svn.wordpress.org/trunk@43977 1a063a9b-81f0-0310-95a4-ce76da25c4cd
371 lines
6.5 KiB
CSS
371 lines
6.5 KiB
CSS
/*
|
|
Theme Name: Twenty Sixteen
|
|
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 {
|
|
color: #686868;
|
|
font-style: italic;
|
|
line-height: 1.6153846154;
|
|
padding-top: 0.5384615385em;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
2.0 Blocks - Common Blocks
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Paragraph */
|
|
|
|
p.has-drop-cap:not(:focus)::first-letter {
|
|
font-size: 5em;
|
|
}
|
|
|
|
/* Gallery */
|
|
|
|
.wp-block-gallery {
|
|
margin-bottom: 1.75em;
|
|
}
|
|
|
|
/* Quote */
|
|
|
|
.wp-block-quote:not(.is-large):not(.is-style-large).alignleft,
|
|
.wp-block-quote:not(.is-large):not(.is-style-large).alignright {
|
|
border-left: none;
|
|
padding-left: 0;
|
|
}
|
|
|
|
.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignleft,
|
|
.rtl .wp-block-quote:not(.is-large):not(.is-style-large).alignright {
|
|
border-right: none;
|
|
padding-right: 0;
|
|
}
|
|
|
|
.wp-block-quote cite {
|
|
color: #1a1a1a;
|
|
display: block;
|
|
font-size: 16px;
|
|
font-size: 1rem;
|
|
line-height: 1.75;
|
|
}
|
|
|
|
.wp-block-quote cite:before {
|
|
content: "\2014\00a0";
|
|
}
|
|
|
|
/* Audio */
|
|
|
|
.wp-block-audio audio {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
/* File */
|
|
|
|
.wp-block-file .wp-block-file__button {
|
|
background: #1a1a1a;
|
|
border: 0;
|
|
border-radius: 2px;
|
|
color: #fff;
|
|
font-family: Montserrat, "Helvetica Neue", sans-serif;
|
|
font-weight: 700;
|
|
letter-spacing: 0.046875em;
|
|
line-height: 1;
|
|
padding: 0.84375em 0.875em 0.78125em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.wp-block-file .wp-block-file__button:hover,
|
|
.wp-block-file .wp-block-file__button:focus {
|
|
background: #007acc;
|
|
}
|
|
|
|
.wp-block-file .wp-block-file__button:focus {
|
|
outline: thin dotted;
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
.rtl .wp-block-file * + .wp-block-file__button {
|
|
margin-left: 0.75em;
|
|
margin-right: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
3.0 Blocks - Formatting Blocks
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Code */
|
|
|
|
.wp-block-code {
|
|
border: 0;
|
|
font-family: Inconsolata, monospace;
|
|
font-size: 16px;
|
|
font-size: 1rem;
|
|
line-height: 1.75;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Pullquote */
|
|
|
|
.wp-block-pullquote {
|
|
border-width: 4px;
|
|
}
|
|
|
|
.wp-block-pullquote blockquote {
|
|
border-left: 0;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.rtl .wp-block-pullquote blockquote {
|
|
border-right: 0;
|
|
}
|
|
|
|
.wp-block-pullquote p {
|
|
color: #686868;
|
|
font-size: 19px;
|
|
font-size: 1.1875rem;
|
|
}
|
|
|
|
.wp-block-pullquote cite {
|
|
color: #1a1a1a;
|
|
display: block;
|
|
font-size: 16px;
|
|
font-size: 1rem;
|
|
font-style: none;
|
|
line-height: 1.75;
|
|
text-transform: none;
|
|
}
|
|
|
|
.wp-block-pullquote cite:before {
|
|
content: "\2014\00a0";
|
|
}
|
|
|
|
/* Table */
|
|
|
|
.wp-block-table,
|
|
.wp-block-table th,
|
|
.wp-block-table td {
|
|
border: 1px solid #d1d1d1;
|
|
}
|
|
|
|
.wp-block-table {
|
|
border-collapse: separate;
|
|
border-spacing: 0;
|
|
border-width: 1px 0 0 1px;
|
|
margin: 0 0 1.75em;
|
|
table-layout: fixed;
|
|
width: 100%;
|
|
}
|
|
|
|
.wp-block-table th,
|
|
.wp-block-table td {
|
|
font-weight: normal;
|
|
padding: 0.4375em;
|
|
text-align: left;
|
|
}
|
|
|
|
.wp-block-table th {
|
|
border-width: 0 1px 1px 0;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.wp-block-table td {
|
|
border-width: 0 1px 1px 0;
|
|
}
|
|
|
|
.rtl .wp-block-table th,
|
|
.rtl .wp-block-table td {
|
|
text-align: right;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
4.0 Blocks - Layout Elements
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Buttons */
|
|
|
|
.wp-block-button .wp-block-button__link {
|
|
background: #1a1a1a;
|
|
border: 0;
|
|
border-radius: 2px;
|
|
color: #fff;
|
|
font-family: Montserrat, "Helvetica Neue", sans-serif;
|
|
font-weight: 700;
|
|
letter-spacing: 0.046875em;
|
|
line-height: 1;
|
|
padding: 0.84375em 0.875em 0.78125em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.wp-block-button .wp-block-button__link:hover,
|
|
.wp-block-button .wp-block-button__link:focus {
|
|
background: #007acc;
|
|
}
|
|
|
|
.wp-block-button .wp-block-button__link:focus {
|
|
outline: thin dotted;
|
|
outline-offset: -4px;
|
|
}
|
|
|
|
/* Seperator */
|
|
|
|
hr.wp-block-separator {
|
|
border: 0;
|
|
}
|
|
|
|
.wp-block-separator {
|
|
margin-left: auto;
|
|
margin-right: auto;
|
|
max-width: 100px;
|
|
}
|
|
|
|
.wp-block-separator.is-style-wide {
|
|
max-width: 100%;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
5.0 Blocks - Widget Blocks
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Latest Comments */
|
|
|
|
.wp-block-latest-comments__comment-meta a {
|
|
box-shadow: none;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-date {
|
|
color: #686868;
|
|
font-family: Montserrat, "Helvetica Neue", sans-serif;
|
|
font-size: 13px;
|
|
font-size: 0.8125rem;
|
|
line-height: 1.6153846154;
|
|
}
|
|
|
|
.wp-block-latest-comments .wp-block-latest-comments__comment {
|
|
border-top: 1px solid #d1d1d1;
|
|
margin-bottom: 0;
|
|
padding: 1.75em 0;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-excerpt p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
6.0 Blocks - Colors
|
|
--------------------------------------------------------------*/
|
|
|
|
.has-dark-gray-color {
|
|
color: #1a1a1a;
|
|
}
|
|
|
|
.has-dark-gray-background-color {
|
|
background-color: #1a1a1a;
|
|
}
|
|
|
|
.has-medium-gray-color {
|
|
color: #686868;
|
|
}
|
|
|
|
.has-medium-gray-background-color {
|
|
background-color: #686868;
|
|
}
|
|
|
|
.has-light-gray-color {
|
|
color: #e5e5e5;
|
|
}
|
|
|
|
.has-light-gray-background-color {
|
|
background-color: #e5e5e5;
|
|
}
|
|
|
|
.has-white-color {
|
|
color: #fff;
|
|
}
|
|
|
|
.has-white-background-color {
|
|
background-color: #fff;
|
|
}
|
|
|
|
.has-blue-gray-color {
|
|
color: #4d545c;
|
|
}
|
|
|
|
.has-blue-gray-background-color {
|
|
background-color: #4d545c;
|
|
}
|
|
|
|
.has-bright-blue-color {
|
|
color: #007acc;
|
|
}
|
|
|
|
.has-bright-blue-background-color {
|
|
background-color: #007acc;
|
|
}
|
|
|
|
.has-light-blue-color {
|
|
color: #9adffd;
|
|
}
|
|
|
|
.has-light-blue-background-color {
|
|
background-color: #9adffd;
|
|
}
|
|
|
|
.has-dark-brown-color {
|
|
color: #402b30;
|
|
}
|
|
|
|
.has-dark-brown-background-color {
|
|
background-color: #402b30;
|
|
}
|
|
|
|
.has-medium-brown-color {
|
|
color: #774e24;
|
|
}
|
|
|
|
.has-medium-brown-background-color {
|
|
background-color: #774e24;
|
|
}
|
|
|
|
.has-dark-red-color {
|
|
color: #640c1f;
|
|
}
|
|
|
|
.has-dark-red-background-color {
|
|
background-color: #640c1f;
|
|
}
|
|
|
|
.has-bright-red-color {
|
|
color: #ff675f;
|
|
}
|
|
|
|
.has-bright-red-background-color {
|
|
background-color: #ff675f;
|
|
}
|
|
|
|
.has-yellow-color {
|
|
color: #ffef8e;
|
|
}
|
|
|
|
.has-yellow-background-color {
|
|
background-color: #ffef8e;
|
|
}
|