Fix image size handling in Twenty Ten. props lancewillett, iandstewart, see #14303 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15609 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ca725961c5
commit
b85b71ee83
|
@ -1,15 +1,13 @@
|
|||
/*
|
||||
Theme Name: Twenty Ten
|
||||
*/
|
||||
/*
|
||||
Used to style the TinyMCE editor.
|
||||
Description: Used to style the TinyMCE editor.
|
||||
*/
|
||||
html .mceContentBody {
|
||||
max-width:640px;
|
||||
max-width: 640px;
|
||||
}
|
||||
* {
|
||||
font-family: Georgia, "Bitstream Charter", serif;
|
||||
color: #444;
|
||||
font-family: Georgia, "Bitstream Charter", serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
p,
|
||||
|
@ -40,10 +38,10 @@ body, input, textarea {
|
|||
}
|
||||
hr {
|
||||
background-color: #e7e7e7;
|
||||
border:0;
|
||||
border: 0;
|
||||
clear: both;
|
||||
height: 1px;
|
||||
margin-bottom: 18px;
|
||||
clear:both;
|
||||
}
|
||||
/* Text elements */
|
||||
p {
|
||||
|
@ -58,22 +56,22 @@ ol {
|
|||
margin: 0 0 18px 1.5em;
|
||||
}
|
||||
ol ol {
|
||||
list-style:upper-alpha;
|
||||
list-style: upper-alpha;
|
||||
}
|
||||
ol ol ol {
|
||||
list-style:lower-roman;
|
||||
list-style: lower-roman;
|
||||
}
|
||||
ol ol ol ol {
|
||||
list-style:lower-alpha;
|
||||
list-style: lower-alpha;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
dl {
|
||||
margin:0 0 24px 0;
|
||||
margin: 0 0 24px 0;
|
||||
}
|
||||
dt {
|
||||
font-weight: bold;
|
||||
|
@ -82,20 +80,20 @@ dd {
|
|||
margin-bottom: 18px;
|
||||
}
|
||||
strong {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
}
|
||||
cite,
|
||||
em,
|
||||
i {
|
||||
font-style: italic;
|
||||
border: none;
|
||||
font-style: italic;
|
||||
}
|
||||
big {
|
||||
font-size: 131.25%;
|
||||
}
|
||||
ins {
|
||||
background: #ffffcc;
|
||||
background: #ffc;
|
||||
border: none;
|
||||
color: #333;
|
||||
}
|
||||
|
@ -129,11 +127,11 @@ ins {
|
|||
}
|
||||
sup,
|
||||
sub {
|
||||
font-size: 10px;
|
||||
height: 0;
|
||||
line-height: 1;
|
||||
vertical-align: baseline;
|
||||
position: relative;
|
||||
font-size: 10px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
sup {
|
||||
bottom: 1ex;
|
||||
|
@ -142,10 +140,10 @@ sub {
|
|||
top: .5ex;
|
||||
}
|
||||
a:link {
|
||||
color:#0066cc;
|
||||
color: #06c;
|
||||
}
|
||||
a:visited {
|
||||
color:#743399;
|
||||
color: #743399;
|
||||
}
|
||||
a:active,
|
||||
a:hover {
|
||||
|
@ -157,13 +155,13 @@ ol,
|
|||
dd,
|
||||
pre,
|
||||
hr {
|
||||
margin-bottom:24px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
ul ul,
|
||||
ol ol,
|
||||
ul ol,
|
||||
ol ul {
|
||||
margin-bottom:0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
pre,
|
||||
kbd,
|
||||
|
@ -188,9 +186,9 @@ h4,
|
|||
h5,
|
||||
h6 {
|
||||
color: #000;
|
||||
margin: 0 0 20px 0;
|
||||
line-height: 1.5em;
|
||||
font-weight: normal;
|
||||
line-height: 1.5em;
|
||||
margin: 0 0 20px 0;
|
||||
}
|
||||
h1 {
|
||||
font-size: 2.4em;
|
||||
|
@ -212,11 +210,11 @@ h6 {
|
|||
}
|
||||
table {
|
||||
border: 1px solid #e7e7e7 !important;
|
||||
text-align: left;
|
||||
margin: 0 -1px 24px 0;
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin: 0 -1px 24px 0;
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
}
|
||||
tr th,
|
||||
thead th {
|
||||
|
@ -232,11 +230,15 @@ tr td {
|
|||
border-top: 1px solid #e7e7e7 !important;
|
||||
padding: 6px 24px;
|
||||
}
|
||||
|
||||
|
||||
img {
|
||||
margin: 0;
|
||||
max-width: 640px;
|
||||
}
|
||||
img.size-auto,
|
||||
img.size-large,
|
||||
img.size-full,
|
||||
img.size-medium {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
.alignleft,
|
||||
img.alignleft {
|
||||
|
@ -265,18 +267,19 @@ img.aligncenter {
|
|||
margin-bottom: 12px;
|
||||
}
|
||||
.wp-caption {
|
||||
border: none;
|
||||
background: #f1f1f1;
|
||||
border: none;
|
||||
-khtml-border-radius: 0;
|
||||
-moz-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
margin-bottom: 20px;
|
||||
max-width: 632px !important; /* prevent too-wide images from breaking layout */
|
||||
padding: 4px;
|
||||
-moz-border-radius: 0;
|
||||
-khtml-border-radius: 0;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.wp-caption img {
|
||||
margin: 5px;
|
||||
|
@ -285,5 +288,5 @@ img.aligncenter {
|
|||
margin: 0 0 4px;
|
||||
}
|
||||
.wp-smiley {
|
||||
margin:0;
|
||||
margin: 0;
|
||||
}
|
|
@ -4,7 +4,7 @@ Theme URI: http://wordpress.org/
|
|||
Description: The 2010 theme for WordPress is stylish, customizable, simple, and readable -- make it yours with a custom menu, header image, and background. Twenty Ten supports six widgetized areas (two in the sidebar, four in the footer) and featured images (thumbnails for gallery posts and custom header images for posts and pages). It includes stylesheets for print and the admin Visual Editor, special styles for posts in the "Asides" and "Gallery" categories, and has an optional one-column page template that removes the sidebar.
|
||||
Author: the WordPress team
|
||||
Version: 1.1
|
||||
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
|
||||
Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style, custom-menu
|
||||
*/
|
||||
|
||||
|
||||
|
@ -761,86 +761,91 @@ body.page .edit-link {
|
|||
/* =Images
|
||||
-------------------------------------------------------------- */
|
||||
|
||||
#content img {
|
||||
margin: 0;
|
||||
height: auto;
|
||||
max-width: 640px;
|
||||
width: auto;
|
||||
/*
|
||||
Resize images to fit the main content area.
|
||||
- Applies only to images uploaded via WordPress by targeting size-* classes.
|
||||
- Other images will be left alone. Use "size-auto" class to apply to other images.
|
||||
*/
|
||||
img.size-auto,
|
||||
img.size-full,
|
||||
img.size-large,
|
||||
img.size-medium,
|
||||
.attachment img {
|
||||
max-width: 100%; /* When images are too wide for containing element, force them to fit. */
|
||||
height: auto; /* Override height to match resized width for correct aspect ratio. */
|
||||
}
|
||||
#content .attachment img {
|
||||
max-width: 900px;
|
||||
}
|
||||
#content .alignleft,
|
||||
#content img.alignleft {
|
||||
.alignleft,
|
||||
img.alignleft {
|
||||
display: inline;
|
||||
float: left;
|
||||
margin-right: 24px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
#content .alignright,
|
||||
#content img.alignright {
|
||||
.alignright,
|
||||
img.alignright {
|
||||
display: inline;
|
||||
float: right;
|
||||
margin-left: 24px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
#content .aligncenter,
|
||||
#content img.aligncenter {
|
||||
.aligncenter,
|
||||
img.aligncenter {
|
||||
clear: both;
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
#content img.alignleft,
|
||||
#content img.alignright,
|
||||
#content img.aligncenter {
|
||||
img.alignleft,
|
||||
img.alignright,
|
||||
img.aligncenter {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
#content .wp-caption {
|
||||
.wp-caption {
|
||||
background: #f1f1f1;
|
||||
line-height: 18px;
|
||||
margin-bottom: 20px;
|
||||
max-width: 632px !important; /* prevent too-wide images from breaking layout */
|
||||
padding: 4px;
|
||||
text-align: center;
|
||||
}
|
||||
#content .wp-caption img {
|
||||
.wp-caption img {
|
||||
margin: 5px 5px 0;
|
||||
}
|
||||
#content .wp-caption p.wp-caption-text {
|
||||
.wp-caption p.wp-caption-text {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
margin: 5px;
|
||||
}
|
||||
#content .wp-smiley {
|
||||
.wp-smiley {
|
||||
margin: 0;
|
||||
}
|
||||
#content .gallery {
|
||||
.gallery {
|
||||
margin: 0 auto 18px;
|
||||
}
|
||||
#content .gallery .gallery-item {
|
||||
.gallery .gallery-item {
|
||||
float: left;
|
||||
margin-top: 0;
|
||||
text-align: center;
|
||||
width: 33%;
|
||||
}
|
||||
#content .gallery img {
|
||||
.gallery img {
|
||||
border: 2px solid #cfcfcf;
|
||||
}
|
||||
#content .gallery .gallery-caption {
|
||||
.gallery .gallery-caption {
|
||||
color: #888;
|
||||
font-size: 12px;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
#content .gallery dl {
|
||||
.gallery dl {
|
||||
margin: 0;
|
||||
}
|
||||
#content .gallery img {
|
||||
.gallery img {
|
||||
border: 10px solid #f1f1f1;
|
||||
}
|
||||
#content .gallery br+br {
|
||||
.gallery br+br {
|
||||
display: none;
|
||||
}
|
||||
#content .attachment img { /* single attachment images should be centered */
|
||||
#content .attachment img {/* single attachment images should be centered */
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue