Make WordPress Core

Changeset 23643


Ignore:
Timestamp:
03/07/2013 05:57:16 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Thirteen: first pass at RTL CSS and JS support. Props DrewAPicture and maor, see #23550.

Location:
trunk/wp-content/themes/twentythirteen
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentythirteen/js/functions.js

    r23539 r23643  
    2222     */
    2323    var html          = $( 'html' ),
     24        body          = $( 'body' ),
    2425        navbar        = $( '#navbar' ),
    2526        navbarOffset  = -1,
    26         toolbarOffset = $( 'body' ).is( '.admin-bar' ) ? 28 : 0;
     27        toolbarOffset = body.is( '.admin-bar' ) ? 28 : 0;
    2728
    2829    $( window ).scroll( function() {
     
    9192     */
    9293    if ( $.isFunction( $.fn.masonry ) ) {
    93         var columnWidth = $( 'body' ).is( '.sidebar' ) ? 228 : 245;
     94        var columnWidth = body.is( '.sidebar' ) ? 228 : 245;
    9495
    9596        $( '#secondary .widget-area' ).masonry( {
    9697            itemSelector: '.widget',
    97             columnWidth:  columnWidth,
    98             gutterWidth:  20
     98            columnWidth: columnWidth,
     99            gutterWidth: 20,
     100            isRTL: body.is( 'rtl' ) ? true : false
    99101        } );
    100102    }
  • trunk/wp-content/themes/twentythirteen/rtl.css

    r23452 r23643  
    88*/
    99
    10 /* TODO */
     10/**
     11* Table of Contents:
     12*
     13* 4.0 - Header
     14* 4.2 - Navigation
     15* 5.0 - Content
     16* 5.2 - Entry Meta
     17* 5.4 - Galleries
     18* 5.7 - Post/Paging Navigation
     19* 5.8 - Author Bio
     20* 5.12 - Comments
     21* 6.0 - Sidebar
     22* 6.1 - Widgets
     23* 7.0 - Footer
     24* 8.0 - Media Queries
     25* ----------------------------------------------------------------------------
     26*/
     27
     28/**
     29* 4.0 Header
     30* ----------------------------------------------------------------------------
     31*/
     32
     33/**
     34* 4.1 Site Header
     35* ----------------------------------------------------------------------------
     36*/
     37
     38.site-description {
     39    font-style: normal;
     40}
     41
     42
     43/**
     44* 4.2 Navigation
     45* ----------------------------------------------------------------------------
     46*/
     47
     48/* Navbar */
     49div.nav-menu > ul {
     50    margin: 0;
     51    padding: 0;
     52}
     53
     54.main-navigation .searchform {
     55    left: 0;
     56    right: auto;
     57}
     58
     59.nav-menu .current_page_item > a,
     60.nav-menu .current_page_ancestor > a,
     61.nav-menu .current-menu-item > a,
     62.nav-menu .current-menu-ancestor > a {
     63    font-style: normal;
     64}
     65
     66
     67/**
     68* 5.0 Content
     69* ----------------------------------------------------------------------------
     70*/
     71
     72.sidebar .entry-header,
     73.sidebar .entry-content,
     74.sidebar .entry-summary,
     75.sidebar .entry-meta {
     76    max-width: 1040px;
     77    padding-right: 60px;
     78    padding-left: 376px;
     79}
     80
     81/**
     82* 5.2 Entry Meta
     83* ----------------------------------------------------------------------------
     84*/
     85
     86.entry-meta > span {
     87    display: inline-block;
     88    margin-right: 0;
     89    margin-left: 20px;
     90}
     91
     92.entry-meta > span:last-child {
     93    margin-right: auto;
     94    margin-left: 0;
     95}
     96
     97.comments-link a:before {
     98    float: right;
     99    margin-right: auto;
     100    margin-left: 2px;
     101}
     102
     103.categories-links a:first-child:before,
     104.edit-link a:before {
     105    float: right;
     106}
     107
     108/**
     109* 5.4 Galleries
     110* ----------------------------------------------------------------------------
     111*/
     112
     113.gallery-item {
     114    float: left;
     115    margin: 0 0 4px 4px;
     116}
     117
     118/**
     119* 5.6 Post Formats
     120* ----------------------------------------------------------------------------
     121*/
     122
     123/* Status */
     124.format-status .entry-content:before,
     125.format-status .entry-meta:before {
     126    left: auto;
     127    right: 10px;
     128}
     129
     130.format-status .entry-content p:first-child:before {
     131    left: auto;
     132    right: 4px;
     133}
     134
     135
     136/**
     137* 5.7 Post/Paging Navigation
     138* ----------------------------------------------------------------------------
     139*/
     140
     141.navigation .nav-previous {
     142    float: right;
     143}
     144
     145.navigation .nav-next {
     146    float: left;
     147}
     148
     149
     150/**
     151* 5.8 Author Bio
     152* ----------------------------------------------------------------------------
     153*/
     154
     155.author-info {
     156    text-align: right; /* gallery & video post formats */
     157}
     158
     159.author-avatar {
     160    float: right;
     161    margin: 0 0 30px 30px;
     162}
     163
     164/**
     165* 5.12 Comments
     166* ----------------------------------------------------------------------------
     167*/
     168
     169.sidebar .comments-title,
     170.sidebar .comment-list,
     171.sidebar #reply-title,
     172.sidebar .comment-navigation,
     173.sidebar #respond #commentform {
     174    padding-left: 376px;
     175    padding-right: 60px;
     176}
     177
     178#commentform label[for="author"],
     179#commentform label[for="email"],
     180#commentform label[for="url"],
     181#commentform label[for="comment"] {
     182    float: right;
     183}
     184
     185#reply-title {
     186    font-style: normal;
     187}
     188
     189/**
     190* 6.0 Sidebar
     191* ----------------------------------------------------------------------------
     192*/
     193
     194.site-main .widget-area {
     195    float: left;
     196}
     197
     198/**
     199* 6.1 Widgets
     200* ----------------------------------------------------------------------------
     201*/
     202
     203.widget .widget-title {
     204    font-style: normal;
     205}
     206
     207/**
     208* 7.0 Footer
     209* ----------------------------------------------------------------------------
     210*/
     211
     212.site-footer .widget {
     213    float: right;
     214    margin-right: 0;
     215    margin-left: 20px;
     216    text-align: right;
     217}
     218
     219.sidebar .site-footer .widget-area {
     220    left: auto;
     221    right: -158px;
     222}
     223
     224.site-info {
     225    text-align: right;
     226}
     227
     228/**
     229* 8.0 Media Queries
     230* ----------------------------------------------------------------------------
     231*/
     232
     233@media (max-width: 999px) {
     234    .sidebar .entry-header,
     235    .sidebar .entry-content,
     236    .sidebar .entry-summary,
     237    .sidebar .entry-meta,
     238    .sidebar .comment-list,
     239    .sidebar #reply-title,
     240    .sidebar .comment-navigation,
     241    .sidebar #respond #commentform,
     242    .sidebar .featured-gallery,
     243    .sidebar .post-navigation .nav-links,
     244    .author.sidebar .author-info,
     245    .sidebar .format-image .entry-content {
     246        max-width: 604px;
     247        padding-left: 0;
     248        padding-right: 0;
     249    }
     250
     251    .site-main .widget-area {
     252        margin: 0;
     253        float: none !important;
     254        width: 100%;
     255    }
     256
     257    .sidebar .site-footer .widget-area {
     258        left: auto;
     259        right: 0;
     260    }
     261}
     262
     263@media (max-width: 1069px) {
     264    .main-navigation .searchform {
     265        right: auto;
     266        left: 20px;
     267    }
     268}
Note: See TracChangeset for help on using the changeset viewer.