mirror of
https://github.com/WordPress/WordPress.git
synced 2024-08-19 20:33:00 +02:00
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Ten. 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 nielslange, crunnells, laurelfulford, davidakennedy. Merges [43793] to trunk. Fixes #45038. Built from https://develop.svn.wordpress.org/trunk@44137 git-svn-id: http://core.svn.wordpress.org/trunk@43967 1a063a9b-81f0-0310-95a4-ce76da25c4cd
249 lines
4.3 KiB
CSS
249 lines
4.3 KiB
CSS
/*
|
|
Theme Name: Twenty Ten
|
|
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-"]:not(.wp-block-gallery) figcaption {
|
|
color: #777;
|
|
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
|
|
}
|
|
|
|
/* Alignments */
|
|
|
|
[class^="wp-block-"].alignleft,
|
|
[class^="wp-block-"] .alignleft {
|
|
margin-right: 24px;
|
|
}
|
|
|
|
[class^="wp-block-"].alignright,
|
|
[class^="wp-block-"] .alignright {
|
|
margin-left: 24px;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
2.0 Blocks - Common Blocks
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Paragraph */
|
|
|
|
p.has-drop-cap:not(:focus)::first-letter {
|
|
font-size: 5em;
|
|
margin-top: 0.1em;
|
|
}
|
|
|
|
/* Image */
|
|
|
|
.wp-block-image figure {
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.wp-block-image figcaption {
|
|
margin: -7px 0 20px;;
|
|
padding: 9px 9px 1.0em;
|
|
text-align: center;
|
|
}
|
|
|
|
.wp-block-image.alignfull,
|
|
.wp-block-image.alignfull img {
|
|
margin: 0;
|
|
}
|
|
|
|
/* Gallery */
|
|
|
|
.wp-block-gallery {
|
|
margin: 0 0 24px;
|
|
}
|
|
|
|
.wp-block-gallery .blocks-gallery-image figcaption,
|
|
.wp-block-gallery .blocks-gallery-item figcaption {
|
|
font-family: "Helvetica Neue", Arial, Helvetica, "Nimbus Sans L", sans-serif;
|
|
left: 0;
|
|
right: 0;
|
|
width: auto;
|
|
}
|
|
|
|
/* Quotes */
|
|
|
|
.wp-block-quote:not(.is-large):not(.is-style-large) {
|
|
border: none;
|
|
padding: 0 3em;
|
|
}
|
|
|
|
.wp-block-quote cite {
|
|
color: inherit;
|
|
font-size: inherit;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Audio */
|
|
|
|
.wp-block-audio {
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
.wp-block-audio audio {
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
/* File */
|
|
|
|
.rtl .wp-block-file * + .wp-block-file__button {
|
|
margin: 0 0 0 0.75em;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
3.0 Blocks - Formatting
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Code */
|
|
|
|
.wp-block-code {
|
|
background-color: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Pullquote */
|
|
|
|
.wp-block-pullquote p {
|
|
font-size: 1.5em;
|
|
}
|
|
|
|
.wp-block-pullquote__citation,
|
|
.wp-block-pullquote cite {
|
|
color: inherit;
|
|
font-size: inherit;
|
|
font-weight: 600;
|
|
text-transform: none;
|
|
}
|
|
|
|
/* Table */
|
|
|
|
.wp-block-table td,
|
|
.wp-block-table th {
|
|
border: none;
|
|
}
|
|
|
|
.wp-block-table td {
|
|
border-top: 1px solid #e7e7e7;
|
|
}
|
|
|
|
.wp-block-table tr:nth-child(odd) td {
|
|
background: #f2f7fc;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
4.0 Blocks - Layout Elements
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Columns */
|
|
|
|
.wp-block-columns {
|
|
margin: 0 -0.5em;
|
|
}
|
|
.wp-block-column {
|
|
margin: 0 0.5em;
|
|
}
|
|
|
|
/* Separator */
|
|
|
|
.wp-block-separator {
|
|
border: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
5.0 Blocks - Widgets
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Archives, Categories & Latest Posts */
|
|
|
|
.wp-block-archives.aligncenter,
|
|
.wp-block-categories.aligncenter,
|
|
.wp-block-latest-posts.aligncenter {
|
|
margin-left: 20px;
|
|
text-align: center;
|
|
}
|
|
|
|
.rtl .wp-block-archives.aligncenter,
|
|
.rtl .wp-block-categories.aligncenter,
|
|
.rtl .wp-block-latest-posts.aligncenter {
|
|
margin-left: 0;
|
|
margin-right: 20px;
|
|
}
|
|
|
|
/* Latest Comments */
|
|
|
|
.wp-block-latest-comments {
|
|
margin: 0 0 24px;
|
|
}
|
|
|
|
/* Latest Posts */
|
|
|
|
.wp-block-latest-posts.is-grid {
|
|
margin-left: 0;
|
|
margin-right: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
6.0 Blocks - Colors
|
|
--------------------------------------------------------------*/
|
|
|
|
.has-blue-color {
|
|
color: #0066cc;
|
|
}
|
|
|
|
.has-blue-background-color {
|
|
background-color: #0066cc;
|
|
}
|
|
|
|
.has-black-color {
|
|
color: #000;
|
|
}
|
|
|
|
.has-black-background-color {
|
|
background-color: #000;
|
|
}
|
|
|
|
.has-medium-gray-color {
|
|
color: #666;
|
|
}
|
|
|
|
.has-medium-gray-background-color {
|
|
background-color: #666;
|
|
}
|
|
|
|
.has-light-gray-color {
|
|
color: #f1f1f1;
|
|
}
|
|
|
|
.has-light-gray-background-color {
|
|
background-color: #f1f1f1;
|
|
}
|
|
|
|
.has-white-color {
|
|
color: #fff;
|
|
}
|
|
|
|
.has-white-background-color {
|
|
background-color: #fff;
|
|
}
|