mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-25 18:48:57 +01:00
cee266f5a7
This update adds styles and theme support related to the new block-based editor to enhance the experience of using it with Twenty Twelve. 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 ianbelanger, crunnells, laurelfulford, davidakennedy. Merges [43795] to trunk. Fixes #45040. Built from https://develop.svn.wordpress.org/trunk@44140 git-svn-id: http://core.svn.wordpress.org/trunk@43970 1a063a9b-81f0-0310-95a4-ce76da25c4cd
388 lines
8.7 KiB
CSS
388 lines
8.7 KiB
CSS
/*
|
|
Theme Name: Twenty Twelve
|
|
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: #757575;
|
|
font-size: 12px;
|
|
font-size: 0.857142857rem;
|
|
line-height: 2;
|
|
font-style: italic;
|
|
text-align: left;
|
|
}
|
|
|
|
[class^="wp-block-"].alignleft,
|
|
[class^="wp-block-"] .alignleft {
|
|
margin-right: 24px;
|
|
}
|
|
|
|
[class^="wp-block-"].alignright,
|
|
[class^="wp-block-"] .alignright {
|
|
margin-left: 24px;
|
|
}
|
|
|
|
.rtl [class^="wp-block-"] figcaption {
|
|
text-align: right;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
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:not(.aligncenter) {
|
|
line-height: 0;
|
|
margin: 0 1.714285714rem;
|
|
}
|
|
|
|
.wp-block-image figure.alignleft {
|
|
margin: 0.857142857rem 1.714285714rem 0.857142857rem 0;
|
|
}
|
|
|
|
.wp-block-image figure.alignright {
|
|
margin: 0.857142857rem 0 0.857142857rem 1.714285714rem;
|
|
}
|
|
|
|
.wp-block-image figcaption {
|
|
padding-top: 0.75em;
|
|
}
|
|
|
|
[class^="wp-block-"].alignleft,
|
|
[class^="wp-block-"] .alignleft,
|
|
[class^="wp-block-"].alignright,
|
|
[class^="wp-block-"] .alignright {
|
|
|
|
}
|
|
|
|
/* Gallery */
|
|
|
|
.wp-block-gallery {
|
|
margin-bottom: 24px;
|
|
margin-bottom: 1.714285714rem;
|
|
}
|
|
|
|
.wp-block-gallery .blocks-gallery-image figcaption,
|
|
.wp-block-gallery .blocks-gallery-item figcaption {
|
|
left: 0;
|
|
right: 0;
|
|
text-align: center;
|
|
width: auto;
|
|
}
|
|
|
|
/* Quote */
|
|
|
|
.wp-block-quote:not(.is-large):not(.is-style-large) {
|
|
border: 0;
|
|
padding: 1.714285714rem;
|
|
padding: 24px;
|
|
}
|
|
|
|
.wp-block-quote {
|
|
padding: 1.714285714rem;
|
|
padding: 24px;
|
|
}
|
|
|
|
.wp-block-quote cite {
|
|
color: inherit;
|
|
font-size: inherit;
|
|
font-style: italic;
|
|
}
|
|
|
|
.wp-block-quote.is-large p,
|
|
.wp-block-quote.is-style-large p {
|
|
font-size: 20px;
|
|
}
|
|
|
|
/* Audio */
|
|
|
|
.wp-block-audio audio {
|
|
display: block;
|
|
margin-bottom: 1.714285714rem;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Cover Image */
|
|
|
|
.wp-block-cover-image.aligncenter {
|
|
display: flex;
|
|
}
|
|
|
|
/* File */
|
|
|
|
.wp-block-file .wp-block-file__button {
|
|
background-color: #e6e6e6;
|
|
background-repeat: repeat-x;
|
|
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
border: 1px solid #d2d2d2;
|
|
border-radius: 3px;
|
|
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
|
|
color: #7c7c7c;
|
|
font-family: inherit;
|
|
font-size: 11px;
|
|
font-size: 0.785714286rem;
|
|
font-weight: normal;
|
|
line-height: 1.428571429;
|
|
padding: 6px 10px;
|
|
padding: 0.428571429rem 0.714285714rem;
|
|
}
|
|
|
|
.wp-block-file .wp-block-file__button:hover,
|
|
.wp-block-file .wp-block-file__button:focus {
|
|
background-color: #ebebeb;
|
|
background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-repeat: repeat-x;
|
|
color: #5e5e5e;
|
|
}
|
|
|
|
.wp-block-file .wp-block-file__button:focus {
|
|
background-color: #e1e1e1;
|
|
background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -o-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-repeat: repeat-x;
|
|
border-color: transparent;
|
|
box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4;
|
|
color: #757575;
|
|
}
|
|
|
|
.rtl .wp-block-file * + .wp-block-file__button {
|
|
margin-left: 0.75em;
|
|
margin-right: 0;
|
|
}
|
|
|
|
/* Video */
|
|
|
|
.wp-block-video video:not(:last-child) {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
3.0 Blocks - Formatting
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Code */
|
|
|
|
pre.wp-block-code {
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Pullquote */
|
|
|
|
.wp-block-pullquote__citation,
|
|
.wp-block-pullquote cite,
|
|
.wp-block-pullquote footer {
|
|
font-size: 14px;
|
|
text-transform: none;
|
|
}
|
|
|
|
/* Table */
|
|
|
|
.wp-block-table {
|
|
border-bottom: 1px solid #ededed;
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
font-size: 14px;
|
|
line-height: 2;
|
|
margin: 0 0 20px;
|
|
width: 100%;
|
|
}
|
|
|
|
.wp-block-table th {
|
|
border: 0;
|
|
font-weight: bold;
|
|
padding: 6px 10px 6px 0;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.wp-block-table td {
|
|
border: 0;
|
|
border-top: 1px solid #ededed;
|
|
padding: 6px 10px 6px 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
4.0 Blocks - Layout Elements
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Buttons */
|
|
|
|
.wp-block-button .wp-block-button__link,
|
|
.wp-block-button .wp-block-button__link:visited {
|
|
background-color: #e6e6e6;
|
|
background-repeat: repeat-x;
|
|
background-image: -moz-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -ms-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -webkit-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: -o-linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
background-image: linear-gradient(top, #f4f4f4, #e6e6e6);
|
|
border: 1px solid #d2d2d2;
|
|
border-radius: 3px;
|
|
box-shadow: 0 1px 2px rgba(64, 64, 64, 0.1);
|
|
color: #7c7c7c;
|
|
font-family: inherit;
|
|
font-size: 11px;
|
|
font-size: 0.785714286rem;
|
|
font-weight: normal;
|
|
line-height: 1.428571429;
|
|
padding: 6px 10px;
|
|
padding: 0.428571429rem 0.714285714rem;
|
|
}
|
|
|
|
.wp-block-button .wp-block-button__link:hover,
|
|
.wp-block-button .wp-block-button__link:focus {
|
|
background-color: #ebebeb;
|
|
background-image: -moz-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -ms-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -webkit-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: -o-linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-image: linear-gradient(top, #f9f9f9, #ebebeb);
|
|
background-repeat: repeat-x;
|
|
color: #5e5e5e;
|
|
}
|
|
|
|
.wp-block-button .wp-block-button__link:active {
|
|
background-color: #e1e1e1;
|
|
background-image: -moz-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -ms-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -webkit-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: -o-linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-image: linear-gradient(top, #ebebeb, #e1e1e1);
|
|
background-repeat: repeat-x;
|
|
border-color: transparent;
|
|
box-shadow: inset 0 0 8px 2px #c6c6c6, 0 1px 0 0 #f4f4f4;
|
|
color: #757575;
|
|
}
|
|
|
|
/* Separator */
|
|
|
|
.wp-block-separator {
|
|
border: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
5.0 Blocks - Widgets
|
|
--------------------------------------------------------------*/
|
|
|
|
/* Latest Comments */
|
|
|
|
.wp-block-latest-comments {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
.wp-block-latest-comments .avatar,
|
|
.wp-block-latest-comments__comment-avatar {
|
|
border-radius: 0;
|
|
box-shadow: none;
|
|
}
|
|
|
|
.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,
|
|
.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta {
|
|
margin-left: 60px;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment,
|
|
.wp-block-latest-comments__comment-excerpt,
|
|
.wp-block-latest-comments__comment-excerpt p {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-excerpt p:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.wp-block-latest-comments__comment-date {
|
|
color: #5e5e5e;
|
|
}
|
|
|
|
.wp-block-latest-comments .wp-block-latest-comments__comment {
|
|
margin: 0;
|
|
padding: 24px 0;
|
|
padding: 1.714285714rem 0 0;
|
|
}
|
|
|
|
.wp-block-latest-comments article {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
/*--------------------------------------------------------------
|
|
6.0 Blocks - Colors
|
|
--------------------------------------------------------------*/
|
|
|
|
.has-blue-color {
|
|
color: #21759b;
|
|
}
|
|
|
|
.has-blue-background-color {
|
|
background-color: #21759b;
|
|
}
|
|
|
|
.has-dark-gray-color {
|
|
color: #373737;
|
|
}
|
|
|
|
.has-dark-gray-background-color {
|
|
background-color: #373737;
|
|
}
|
|
|
|
.has-medium-gray-color {
|
|
color: #9f9f9f;
|
|
}
|
|
|
|
.has-medium-gray-background-color {
|
|
background-color: #9f9f9f;
|
|
}
|
|
|
|
.has-light-gray-color {
|
|
color: #e6e6e6;
|
|
}
|
|
|
|
.has-light-gray-background-color {
|
|
background-color: #e6e6e6;
|
|
}
|
|
|
|
.has-white-color {
|
|
color: #fff;
|
|
}
|
|
|
|
.has-white-background-color {
|
|
background-color: #fff;
|
|
}
|