WordPress/wp-content/themes/twentyeleven/blocks.css
laurelfulford f89d4e6bb2 Twenty Eleven: Fix issues with theme's Gutenberg support.
A handful of issues were missed in Twenty Eleven's Gutenberg support, added in #45039. This commit includes the following fixes:

* Center text and bullets in list-based widget blocks when block itself is centered.
* Include non "image" variations of the Cover block classes `.wp-block-cover` and `.wp-block-cover-text` in the styles.
* Add spacing underneath the Media & Text block, but make sure final paragraph in the block doesn't add too much space.
* Simplify selectors used to set editor width to just `.wp-block`.
* Prevent margin from theme's editor-style.css from interfering with editor alignment. 

Props pento, davidakennedy.
Fixes #45239.


Built from https://develop.svn.wordpress.org/branches/5.0@43870


git-svn-id: http://core.svn.wordpress.org/branches/5.0@43699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-11-06 01:01:48 +00:00

399 lines
7.2 KiB
CSS

/*
Theme Name: Twenty Eleven
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
--------------------------------------------------------------*/
figure[class^="wp-block-"] {
margin-left: 0;
margin-right: 0;
}
/* Captions */
[class^="wp-block-"] figcaption {
font-family: Georgia, serif;
font-size: 12px;
}
[class^="wp-block-"]:not(.wp-block-gallery) figcaption {
color: #666;
margin-bottom: 1.625em;
max-width: 96%;
max-width: calc( 100% - 18px );
padding: 3px 0 5px 40px;
position: relative;
text-align: left;
}
[class^="wp-block-"]:not(.wp-block-gallery) figcaption:before {
color: #666;
content: '\2014';
font-size: 14px;
font-style: normal;
font-weight: bold;
margin-right: 5px;
position: absolute;
left: 10px;
top: 0;
}
.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption {
padding-left: 0;
padding-right: 40px;
text-align: right;
}
.rtl [class^="wp-block-"]:not(.wp-block-gallery) figcaption:before {
left: 0;
margin-left: 5px;
margin-right: 0;
right: 10px;
}
/*--------------------------------------------------------------
2.0 Blocks - Common Blocks
--------------------------------------------------------------*/
/* Paragraph */
p.has-drop-cap:not(:focus)::first-letter {
font-size: 5em;
margin-top: 0.1em;
}
/* Gallery */
.wp-block-gallery {
margin: 0 0 1.625em;
}
.wp-block-gallery .blocks-gallery-item figcaption {
margin-bottom: 0;
padding-left: 0;
padding-right: 0;
}
.wp-block-gallery .blocks-gallery-item img {
border: 0;
padding: 0;
}
/* Quote */
.wp-block-quote {
margin: 0 3em;
}
.wp-block-quote:not(.is-large):not(.is-style-large) {
border: 0;
padding-left: 0;
padding-right: 0;
}
.wp-block-quote.is-large p,
.wp-block-quote.is-style-large p {
font-size: 20px;
}
.wp-block-quote cite {
color: #666;
font: 12px "Helvetica Neue", Helvetica, Arial, sans-serif;
font-weight: 300;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.wp-block-quote.is-large cite,
.wp-block-quote.is-style-large cite {
font-size: 16px;
}
/* Audio */
.wp-block-audio audio {
display: block;
width: 100%;
}
/* Cover */
.wp-block-cover-image.aligncenter,
.wp-block-cover.aligncenter {
clear: both;
display: flex;
}
.wp-block-cover-image.alignleft,
.wp-block-cover.alignleft {
margin-right: 1.625em;
}
.wp-block-cover-image.alignright,
.wp-block-cover.alignright {
margin-left: 1.625em;
}
/* File */
.wp-block-file .wp-block-file__button {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #eee;
cursor: pointer;
font-size: 15px;
padding: 5px 22px;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.wp-block-file .wp-block-file__button:active {
background: #1982d1;
color: #bfddf3;
}
.rtl .wp-block-file * + .wp-block-file__button {
margin-left: 0.75em;
margin-right: 0;
}
/*--------------------------------------------------------------
3.0 Blocks - Formatting
--------------------------------------------------------------*/
/* Code */
.wp-block-code {
background-color: transparent;
border: 0;
padding: 0;
}
/* Pullquote */
.wp-block-pullquote__citation,
.wp-block-pullquote cite,
.wp-block-pullquote footer {
color: #141412;
}
.wp-block-pullquote.alignleft {
margin-right: 1.625em;
}
.wp-block-pullquote.alignright {
margin-left: 1.625em;
}
/* Table */
.wp-block-table {
border-bottom: 1px solid #ddd;
border-collapse: collapse;
border-spacing: 0;
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 #ddd;
padding: 6px 10px 6px 0;
}
/*--------------------------------------------------------------
4.0 Blocks - Layout Elements
--------------------------------------------------------------*/
/* Buttons */
.wp-block-button .wp-block-button__link {
background: #222;
border: none;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
box-shadow: 0px 1px 2px rgba(0,0,0,0.3);
color: #eee;
cursor: pointer;
font-size: 15px;
margin: 20px 0;
padding: 5px 22px;
text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
}
.wp-block-button .wp-block-button__link:active {
background: #1982d1;
color: #bfddf3;
}
/* Separator */
.wp-block-separator {
border: 0;
max-width: 100px;
}
.wp-block-separator.is-style-wide {
max-width: 100%;
}
/* Media & Text */
.wp-block-media-text {
margin-bottom: 1.625em;
}
.wp-block-media-text *:last-child {
margin-bottom: 0;
}
/*--------------------------------------------------------------
5.0 Blocks - Widgets
--------------------------------------------------------------*/
/* Archives, Categories & Latest Posts */
.wp-block-archives.aligncenter,
.wp-block-categories.aligncenter,
.wp-block-latest-posts.aligncenter {
list-style-position: inside;
margin-left: 2.5em;
text-align: center;
}
.rtl .wp-block-archives.aligncenter,
.rtl .wp-block-categories.aligncenter,
.rtl .wp-block-latest-posts.aligncenter {
margin-left: 0;
margin-right: 2.5em;
}
/* Latest Comments */
.wp-block-latest-comments {
margin: 0;
padding: 0;
}
.wp-block-latest-comments .avatar,
.wp-block-latest-comments__comment-avatar {
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0 1px 2px #ccc;
-moz-box-shadow: 0 1px 2px #ccc;
box-shadow: 0 1px 2px #ccc;
}
.wp-block-latest-comments__comment,
.wp-block-latest-comments__comment-excerpt,
.wp-block-latest-comments__comment-excerpt p {
font-size: 15px;
}
.wp-block-latest-comments__comment-excerpt p:last-child {
margin-bottom: 0;
}
.wp-block-latest-comments__comment-meta,
.wp-block-latest-comments__comment-date {
color: #666;
font-size: 12px;
line-height: 2.2em;
}
.wp-block-latest-comments__comment-meta a {
font-weight: bold;
}
.wp-block-latest-comments .wp-block-latest-comments__comment {
-moz-border-radius: 3px;
border-radius: 3px;
margin: 0 0 2.625em;
position: relative;
}
/* Latest Posts */
.wp-block-latest-posts.is-grid {
margin-left: 0;
margin-right: 0;
}
/*--------------------------------------------------------------
6.0 Blocks - Colors
--------------------------------------------------------------*/
.has-blue-color {
color: #1982d1;
}
.has-blue-background-color {
background-color: #1982d1;
}
.has-black-color {
color: #000;
}
.has-black-background-color {
background-color: #000;
}
.has-dark-gray-color {
color: #373737;
}
.has-dark-gray-background-color {
background-color: #373737;
}
.has-medium-gray-color {
color: #666;
}
.has-medium-gray-background-color {
background-color: #666;
}
.has-light-gray-color {
color: #e2e2e2;
}
.has-light-gray-background-color {
background-color: #e2e2e2;
}
.has-white-color {
color: #fff;
}
.has-white-background-color {
background-color: #fff;
}