Make WordPress Core

Changeset 27763


Ignore:
Timestamp:
03/27/2014 12:05:22 AM (13 years ago)
Author:
lancewillett
Message:

Twenty Thirteen and Fourteen: implement HTML5 markup for galleries (see #26697) and captions (see #26642). Props obenland, closes #27502.

Location:
trunk/src/wp-content/themes
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentyfourteen/css/editor-style.css

    r27641 r27763  
    390390}
    391391
     392.html5-captions .wp-caption {
     393        padding: 0;
     394}
     395
    392396.wp-caption.alignleft {
    393397        margin: 7px 14px 7px 0;
    394398}
    395399
     400.html5-captions .wp-caption.alignleft {
     401        margin-right: 24px;
     402}
     403
    396404.wp-caption.alignright {
    397405        margin: 7px 0 7px 14px;
     406}
     407
     408.wp-caption.alignright img,
     409.wp-caption.alignright .wp-caption-dd {
     410        padding-left: 10px;
     411}
     412
     413.html5-captions .wp-caption.alignright {
     414        margin-left: 24px;
     415}
     416
     417.html5-captions .wp-caption.alignright img,
     418.html5-captions .wp-caption.alignright .wp-caption-dd {
     419        padding: 0;
    398420}
    399421
  • trunk/src/wp-content/themes/twentyfourteen/functions.php

    r27627 r27763  
    9090         */
    9191        add_theme_support( 'html5', array(
    92                 'search-form', 'comment-form', 'comment-list',
     92                'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
    9393        ) );
    9494
  • trunk/src/wp-content/themes/twentyfourteen/style.css

    r27637 r27763  
    637637
    638638blockquote.alignleft,
     639figure.wp-caption.alignleft,
    639640img.alignleft {
    640641        margin: 7px 24px 7px 0;
    … …  
    646647
    647648blockquote.alignright,
     649figure.wp-caption.alignright,
    648650img.alignright {
    649651        margin: 7px 0 7px 24px;
    … …  
    695697        line-height: 1.5;
    696698        margin: 9px 0;
     699}
     700
     701div.wp-caption .wp-caption-text {
    697702        padding-right: 10px;
     703}
     704
     705div.wp-caption.alignright img[class*="wp-image-"],
     706div.wp-caption.alignright .wp-caption-text {
     707        padding-left: 10px;
     708        padding-right: 0;
    698709}
    699710
  • trunk/src/wp-content/themes/twentythirteen/css/editor-style.css

    r27638 r27763  
    345345}
    346346
     347.html5-captions .wp-caption {
     348        padding: 0;
     349}
     350
    347351.wp-caption.alignleft {
    348352        margin: 5px 10px 5px 0;
    349353}
    350354
     355.html5-captions .wp-caption.alignleft {
     356        margin-right: 20px;
     357}
     358
    351359.wp-caption.alignright {
    352360        margin: 5px 0 5px 10px;
     361}
     362
     363.wp-caption.alignright img,
     364.wp-caption.alignright .wp-caption-dd {
     365        padding-left: 10px;
     366}
     367
     368.html5-captions .wp-caption.alignright {
     369        margin-left: 20px;
     370}
     371
     372.html5-captions .wp-caption.alignright img,
     373.html5-captions .wp-caption.alignright .wp-caption-dd {
     374        padding: 0;
    353375}
    354376
  • trunk/src/wp-content/themes/twentythirteen/functions.php

    r27607 r27763  
    8282         * and comments to output valid HTML5.
    8383         */
    84         add_theme_support( 'html5', array( 'search-form', 'comment-form', 'comment-list' ) );
     84        add_theme_support( 'html5', array(
     85                'search-form', 'comment-form', 'comment-list', 'gallery', 'caption'
     86        ) );
    8587
    8688        /*
  • trunk/src/wp-content/themes/twentythirteen/style.css

    r27622 r27763  
    710710}
    711711
     712figure.wp-caption.alignleft,
    712713img.alignleft {
    713714        margin: 5px 20px 5px 0;
    … …  
    718719}
    719720
     721figure.wp-caption.alignright,
    720722img.alignright {
    721723        margin: 5px 0 5px 20px;
    … …  
    741743        font-style: italic;
    742744        font-weight: 300;
     745        margin: 0 0 24px;
     746}
     747
     748div.wp-caption.alignright img[class*="wp-image-"] {
     749        float: right;
     750}
     751
     752div.wp-caption.alignright .wp-caption-text {
     753        padding-left: 10px;
    743754}
    744755
Note: See TracChangeset for help on using the changeset viewer.