Make WordPress Core

Changeset 15786


Ignore:
Timestamp:
10/13/2010 05:00:10 AM (14 years ago)
Author:
nacin
Message:

Fix image size handling in Twenty Ten. props lancewillett, iandstewart, fixes #14303 for 3.0.

Location:
branches/3.0/wp-content/themes/twentyten
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/wp-content/themes/twentyten/editor-style.css

    r15391 r15786  
    11/*
    22Theme Name: Twenty Ten
    3 */
    4 /*
    5 Used to style the TinyMCE editor.
     3Description: Used to style the TinyMCE editor.
    64*/
    75html .mceContentBody {
    8     max-width:640px;
     6    max-width: 640px;
    97}
    108* {
     9    color: #444;
    1110    font-family: Georgia, "Bitstream Charter", serif;
    12     color: #444;
    1311    line-height: 1.5;
    1412}
     
    4139hr {
    4240    background-color: #e7e7e7;
    43     border:0;
     41    border: 0;
     42    clear: both;
    4443    height: 1px;
    4544    margin-bottom: 18px;
    46     clear:both;
    4745}
    4846/* Text elements */
     
    5957}
    6058ol ol {
    61     list-style:upper-alpha;
     59    list-style: upper-alpha;
    6260}
    6361ol ol ol {
    64     list-style:lower-roman;
     62    list-style: lower-roman;
    6563}
    6664ol ol ol ol {
    67     list-style:lower-alpha;
     65    list-style: lower-alpha;
    6866}
    6967ul ul,
     
    7169ul ol,
    7270ol ul {
    73     margin-bottom:0;
     71    margin-bottom: 0;
    7472}
    7573dl {
    76     margin:0 0 24px 0;
     74    margin: 0 0 24px 0;
    7775}
    7876dt {
     
    8381}
    8482strong {
     83    color: #000;
    8584    font-weight: bold;
    86     color: #000;
    8785}
    8886cite,
    8987em,
    9088i {
     89    border: none;
    9190    font-style: italic;
    92     border: none;
    9391}
    9492big {
     
    9694}
    9795ins {
    98     background: #ffffcc;
     96    background: #ffc;
    9997    border: none;
    10098    color: #333;
     
    130128sup,
    131129sub {
     130    font-size: 10px;
    132131    height: 0;
    133132    line-height: 1;
     133    position: relative;
    134134    vertical-align: baseline;
    135     position: relative;
    136     font-size: 10px;
    137135}
    138136sup {
     
    143141}
    144142a:link {
    145     color:#0066cc;
     143    color: #06c;
    146144}
    147145a:visited {
    148     color:#743399;
     146    color: #743399;
    149147}
    150148a:active,
     
    158156pre,
    159157hr {
    160     margin-bottom:24px;
     158    margin-bottom: 24px;
    161159}
    162160ul ul,
     
    164162ul ol,
    165163ol ul {
    166     margin-bottom:0;
     164    margin-bottom: 0;
    167165}
    168166pre,
     
    189187h6 {
    190188    color: #000;
     189    font-weight: normal;
     190    line-height: 1.5em;
    191191    margin: 0 0 20px 0;
    192     line-height: 1.5em;
    193     font-weight: normal;
    194192}
    195193h1 {
     
    213211table {
    214212    border: 1px solid #e7e7e7 !important;
    215     text-align: left;
    216     margin: 0 -1px 24px 0;
    217     width: 100%;
    218213    border-collapse: collapse;
    219214    border-spacing: 0;
     215    margin: 0 -1px 24px 0;
     216    text-align: left;
     217    width: 100%;
    220218}
    221219tr th,
     
    233231    padding: 6px 24px;
    234232}
    235 
    236 
    237233img {
    238234    margin: 0;
    239     max-width: 640px;
     235}
     236img.size-auto,
     237img.size-large,
     238img.size-full,
     239img.size-medium {
     240    max-width: 100%;
     241    height: auto;
    240242}
    241243.alignleft,
     
    266268}
    267269.wp-caption {
     270    background: #f1f1f1;
    268271    border: none;
    269     background: #f1f1f1;
     272    -khtml-border-radius: 0;
     273    -moz-border-radius: 0;
     274    -webkit-border-radius: 0;
     275    border-radius: 0;
    270276    color: #888;
    271277    font-size: 12px;
    272278    line-height: 18px;
     279    margin-bottom: 20px;
     280    max-width: 632px !important; /* prevent too-wide images from breaking layout */
     281    padding: 4px;
    273282    text-align: center;
    274     margin-bottom: 20px;
    275     padding: 4px;
    276     -moz-border-radius: 0;
    277     -khtml-border-radius: 0;
    278     -webkit-border-radius: 0;
    279     border-radius: 0;
    280283}
    281284.wp-caption img {
     
    286289}
    287290.wp-smiley {
    288     margin:0;
    289 }
     291    margin: 0;
     292}
  • branches/3.0/wp-content/themes/twentyten/style.css

    r15785 r15786  
    55Author: the WordPress team
    66Version: 1.1
    7 Tags: black, blue, white, two-columns, fixed-width, custom-header, custom-background, threaded-comments, sticky-post, translation-ready, microformats, rtl-language-support, editor-style
     7Tags: 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
    88*/
    99
     
    763763-------------------------------------------------------------- */
    764764
    765 #content img {
    766     margin: 0;
    767     height: auto;
    768     max-width: 640px;
    769     width: auto;
    770 }
    771 #content .attachment img {
    772     max-width: 900px;
    773 }
    774 #content .alignleft,
    775 #content img.alignleft {
     765/*
     766Resize images to fit the main content area.
     767- Applies only to images uploaded via WordPress by targeting size-* classes.
     768- Other images will be left alone. Use "size-auto" class to apply to other images.
     769*/
     770img.size-auto,
     771img.size-full,
     772img.size-large,
     773img.size-medium,
     774.attachment img {
     775    max-width: 100%; /* When images are too wide for containing element, force them to fit. */
     776    height: auto; /* Override height to match resized width for correct aspect ratio. */
     777}
     778.alignleft,
     779img.alignleft {
    776780    display: inline;
    777781    float: left;
     
    779783    margin-top: 4px;
    780784}
    781 #content .alignright,
    782 #content img.alignright {
     785.alignright,
     786img.alignright {
    783787    display: inline;
    784788    float: right;
     
    786790    margin-top: 4px;
    787791}
    788 #content .aligncenter,
    789 #content img.aligncenter {
     792.aligncenter,
     793img.aligncenter {
    790794    clear: both;
    791795    display: block;
     
    793797    margin-right: auto;
    794798}
    795 #content img.alignleft,
    796 #content img.alignright,
    797 #content img.aligncenter {
     799img.alignleft,
     800img.alignright,
     801img.aligncenter {
    798802    margin-bottom: 12px;
    799803}
    800 #content .wp-caption {
     804.wp-caption {
    801805    background: #f1f1f1;
    802806    line-height: 18px;
    803807    margin-bottom: 20px;
     808    max-width: 632px !important; /* prevent too-wide images from breaking layout */
    804809    padding: 4px;
    805810    text-align: center;
    806811}
    807 #content .wp-caption img {
     812.wp-caption img {
    808813    margin: 5px 5px 0;
    809814}
    810 #content .wp-caption p.wp-caption-text {
     815.wp-caption p.wp-caption-text {
    811816    color: #888;
    812817    font-size: 12px;
    813818    margin: 5px;
    814819}
    815 #content .wp-smiley {
     820.wp-smiley {
    816821    margin: 0;
    817822}
    818 #content .gallery {
     823.gallery {
    819824    margin: 0 auto 18px;
    820825}
    821 #content .gallery .gallery-item {
     826.gallery .gallery-item {
    822827    float: left;
    823828    margin-top: 0;
     
    825830    width: 33%;
    826831}
    827 #content .gallery img {
     832.gallery img {
    828833    border: 2px solid #cfcfcf;
    829834}
    830 #content .gallery .gallery-caption {
     835.gallery .gallery-caption {
    831836    color: #888;
    832837    font-size: 12px;
    833838    margin: 0 0 12px;
    834839}
    835 #content .gallery dl {
     840.gallery dl {
    836841    margin: 0;
    837842}
    838 #content .gallery img {
     843.gallery img {
    839844    border: 10px solid #f1f1f1;
    840845}
    841 #content .gallery br+br {
     846.gallery br+br {
    842847    display: none;
    843848}
    844 #content .attachment img { /* single attachment images should be centered */
     849#content .attachment img {/* single attachment images should be centered */
    845850    display: block;
    846851    margin: 0 auto;
Note: See TracChangeset for help on using the changeset viewer.