mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-28 10:29:25 +00:00
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Seventeen. 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. Props laurelfulford, ianbelanger, crunnells, davidkennedy. Merges [43800] to trunk. Fixes #45045. Built from https://develop.svn.wordpress.org/trunk@44148 git-svn-id: http://core.svn.wordpress.org/trunk@43978 1a063a9b-81f0-0310-95a4-ce76da25c4cd
276 lines
5.3 KiB
CSS
276 lines
5.3 KiB
CSS
/*
|
|
Theme Name: Twenty Seventeen
|
|
Description: Used to style Gutenberg Blocks.
|
|
*/
|
|
|
|
/*--------------------------------------------------------------
|
|
>>> TABLE OF CONTENTS:
|
|
----------------------------------------------------------------
|
|
1.0 Blocks - Common Blocks
|
|
2.0 Blocks - Formatting
|
|
3.0 Blocks - Layout Elements
|
|
4.0 Blocks - Widgets
|
|
--------------------------------------------------------------*/
|
|
|
|
/*--------------------------------------------------------------
|
|
1.0 General Block Styles
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Captions */
|
|
|
|
[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
|
|
font-style: italic;
|
|
margin-bottom: 1.5em;
|
|
text-align: left;
|
|
}
|
|
|
|
.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
|
|
text-align: right;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
2.0 Blocks - Common Blocks
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Paragraph */
|
|
|
|
p.has-drop-cap:not(:focus)::first-letter {
|
|
font-size: 5em;
|
|
margin-top: 0.075em;
|
|
}
|
|
|
|
/* Image */
|
|
|
|
.wp-block-image {
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
.wp-block-image figure {
|
|
margin-bottom: 0;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.wp-block-image figure.alignleft {
|
|
margin-right: 1.5em;
|
|
}
|
|
|
|
.wp-block-image figure.alignright {
|
|
margin-left: 1.5em;
|
|
}
|
|
|
|
/* Gallery */
|
|
|
|
.wp-block-gallery {
|
|
margin-bottom: 1.5em;
|
|
}
|
|
|
|
.wp-block-gallery figcaption {
|
|
font-style: italic;
|
|
}
|
|
|
|
.wp-block-gallery.aligncenter {
|
|
display: flex;
|
|
margin: 0 -8px;
|
|
}
|
|
|
|
/* Quote */
|
|
|
|
.wp-block-quote:not(.is-large):not(.is-style-large) {
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.wp-block-quote.alignleft p:last-of-type,
|
|
.wp-block-quote.alignright p:last-of-type {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.wp-block-quote cite {
|
|
color: inherit;
|
|
font-size: inherit;
|
|
}
|
|
|
|
/* Audio */
|
|
|
|
.wp-block-audio audio {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Cover Image */
|
|
|
|
.wp-block-cover-image.alignright,
|
|
.wp-block-cover-image.alignleft,
|
|
.wp-block-cover-image.aligncenter {
|
|
display: flex;
|
|
}
|
|
|
|
/* File */
|
|
|
|
.wp-block-file .wp-block-file__button {
|
|
background-color: #222;
|
|
-webkit-border-radius: 2px;
|
|
border-radius: 2px;
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
color: #fff;
|
|
display: inline-block;
|
|
font-size: 14px;
|
|
font-size: 0.875rem;
|
|
font-weight: 800;
|
|
margin-top: 2em;
|
|
padding: 0.7em 2em;
|
|
-webkit-transition: background-color 0.2s ease-in-out;
|
|
transition: background-color 0.2s ease-in-out;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.wp-block-file .wp-block-file__button:hover,
|
|
.wp-block-file .wp-block-file__button:focus {
|
|
background-color: #767676;
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
3.0 Blocks - Formatting
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Code */
|
|
|
|
.wp-block-code {
|
|
background: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Pullquote */
|
|
|
|
.wp-block-pullquote {
|
|
border: 0;
|
|
}
|
|
|
|
.wp-block-pullquote__citation,
|
|
.wp-block-pullquote cite {
|
|
font-size: inherit;
|
|
text-transform: none;
|
|
}
|
|
|
|
/* Table */
|
|
|
|
.wp-block-table thead th {
|
|
border-bottom: 2px solid #bbb;
|
|
padding-bottom: 0.5em;
|
|
}
|
|
|
|
.wp-block-table tr {
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.wp-block-table th,
|
|
.wp-block-table td {
|
|
border: 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-color: #222;
|
|
-webkit-border-radius: 2px;
|
|
border-radius: 2px;
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
color: #fff;
|
|
display: inline-block;
|
|
font-size: 14px;
|
|
font-size: 0.875rem;
|
|
font-weight: 800;
|
|
line-height: 1.66;
|
|
margin-top: 2em;
|
|
padding: 0.7em 2em;
|
|
-webkit-transition: background-color 0.2s ease-in-out;
|
|
transition: background-color 0.2s ease-in-out;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.wp-block-button .wp-block-button__link:hover,
|
|
.wp-block-button .wp-block-button__link:focus {
|
|
background-color: #767676;
|
|
-webkit-box-shadow: none;
|
|
box-shadow: none;
|
|
}
|
|
|
|
/* Separator */
|
|
|
|
.wp-block-separator {
|
|
border: 0;
|
|
}
|
|
|
|
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
|
|
max-width: 100px;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
5.0 Blocks - Widgets
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Comments */
|
|
|
|
.wp-block-latest-comments article {
|
|
margin-bottom: 4em;
|
|
}
|
|
|
|
.blog:not(.has-sidebar) #primary .wp-block-latest-comments article,
|
|
.archive:not(.page-one-column):not(.has-sidebar) #primary .wp-block-latest-comments article,
|
|
.search:not(.has-sidebar) #primary .wp-block-latest-comments article {
|
|
float: none;
|
|
width: 100%;
|
|
}
|
|
|
|
.wp-block-latest-comments .avatar,
|
|
.wp-block-latest-comments__comment-avatar {
|
|
border-radius: 0;
|
|
}
|
|
|
|
.wp-block-latest-comments a {
|
|
-webkit-box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
|
|
box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
|
|
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-meta {
|
|
font-size: 16px;
|
|
font-size: 1rem;
|
|
margin-bottom: 0.4em;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-author,
|
|
.wp-block-latest-comments__comment-link {
|
|
font-weight: 700;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-date {
|
|
color: #767676;
|
|
font-size: 10px;
|
|
font-size: 0.625rem;
|
|
font-weight: 800;
|
|
letter-spacing: 0.1818em;
|
|
margin-top: 0.4em;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.editor-block-list__block .wp-block-latest-comments__comment-excerpt p {
|
|
font-size: 14px;
|
|
font-size: 0.875rem;
|
|
}
|