Created
March 13, 2014 04:49
-
-
Save a-musing-moose/9522032 to your computer and use it in GitHub Desktop.
Oscar RTL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "oscar/base.html" %} | |
{% block body_id %}{% if LANGUAGE_BIDI %}bidi-rtl{% else %}bidi-ltr{% endif %}{% endblock %} | |
{% block extrastyles %} | |
<link rel="stylesheet" type="text/css" href="{% static "project/css/site-rtl.css" %}" /> | |
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Styles for bidi-rtl right to left language dashboard overrides */ | |
/* | |
Please see http://css-tricks.com/almanac/properties/d/direction/ for text | |
direction. As seen this only affects page elements that are inline or | |
inline-block and won't affect page elements that are floats, block or table | |
elements. For these elements this style sheet is designed to override floats | |
and text-aligns from left to right. | |
Language CSS hook from <body> ID #bidi-rtl (right to left). This is not ideal, | |
body class would be better or element attribute dir="rtl", but body class is | |
currently used on many dashboard templates. | |
*/ | |
/* Right to Left */ | |
#bidi-rtl, | |
#bidi-rtl .table { | |
direction: rtl; | |
} | |
/* Reverse floats */ | |
#bidi-rtl .pull-left, | |
#bidi-rtl .navbar-primary .nav, | |
#bidi-rtl .navbar .nav > li, | |
#bidi-rtl .navbar-accounts .navbar-inner .brand, | |
#bidi-rtl .upload-image li, | |
#bidi-rtl .row-fluid [class*="span"], | |
#bidi-rtl .radio input[type="radio"], | |
#bidi-rtl .checkbox input[type="checkbox"], | |
#bidi-rtl .nav-tabs>li, | |
#bidi-rtl .nav-pills>li, | |
#bidi-rtl .form-horizontal .control-label { | |
float:right; | |
} | |
#bidi-rtl .pull-right { | |
float:left; | |
} | |
/* Text align */ | |
#bidi-rtl .table-header, | |
#bidi-rtl caption, | |
#bidi-rtl .table th, | |
#bidi-rtl .table td, | |
#bidi-rtl .form-horizontal .control-label, | |
#bidi-rtl .form-stacked .control-label { | |
text-align: right; | |
} | |
/* Spans are now floating right, so lets also change the margins */ | |
#bidi-rtl .row-fluid [class*="span"], | |
#bidi-rtl .row-fluid [class*="span"]:first-child { | |
margin-left: 0; | |
} | |
#bidi-rtl .row-fluid [class*="span"] { | |
margin-right: 2.564102564102564%; | |
} | |
#bidi-rtl .row-fluid [class*="span"]:first-child { | |
margin-right: 0; | |
} | |
/* Spans in tables and inputs */ | |
#bidi-rtl .row-fluid th[class*="span"], | |
#bidi-rtl .row-fluid td[class*="span"], | |
#bidi-rtl .row-fluid input[type="text"][class*="span"] { | |
float:none; | |
margin:0; | |
} | |
/* Radio and checkboxes */ | |
#bidi-rtl .radio, | |
#bidi-rtl .checkbox { | |
padding-left: 0; | |
padding-right: 18px; | |
} | |
#bidi-rtl .radio input[type="radio"], | |
#bidi-rtl .checkbox input[type="checkbox"] { | |
margin-left: 0; | |
margin-right: -18px; | |
} | |
/* Form actions */ | |
#bidi-rtl .well .form-actions, | |
#bidi-rtl .tabbable.dashboard .tab-content .form-actions { | |
left: auto; | |
right: -19px; | |
} | |
/* Form horizontal */ | |
#bidi-rtl .form-horizontal .controls { | |
margin-right: 180px; | |
margin-left:0; | |
} | |
/* The affixed side panels used on the product edit and offer pages */ | |
#bidi-rtl .bs-docs-sidenav > .active > a:before, .bs-docs-sidenav > .active > span:before { | |
border-right:11px solid #ccc; | |
border-left: 0; | |
right: auto; | |
left:-10px; | |
} | |
#bidi-rtl .bs-docs-sidenav > .active > a:after, .bs-docs-sidenav > .active > span:after { | |
border-right:10px solid #f1faff; | |
border-left: 0; | |
right: auto; | |
left:-9px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Styles for bidi-rtl right to left language dashboard overrides */ | |
/* | |
Please see http://css-tricks.com/almanac/properties/d/direction/ for text | |
direction. As seen this only affects page elements that are inline or | |
inline-block and won't affect page elements that are floats, block or table | |
elements. For these elements this style sheet is designed to override floats | |
and text-aligns from left to right. | |
Language CSS hook from <body> ID #bidi-rtl (right to left). This is not ideal, | |
body class would be better or element attribute dir="rtl", but body class is | |
currently used on many dashboard templates. | |
*/ | |
/* Right to Left */ | |
#bidi-rtl, | |
#bidi-rtl .table { | |
direction: rtl; | |
} | |
/* Reverse floats */ | |
#bidi-rtl .pull-left, | |
#bidi-rtl .navbar-primary .nav, | |
#bidi-rtl .navbar.primary .nav, | |
#bidi-rtl .navbar .nav > li, | |
#bidi-rtl .navbar-accounts .navbar-inner .brand, | |
#bidi-rtl .upload-image li, | |
#bidi-rtl .row-fluid [class*="span"], | |
#bidi-rtl .radio input[type="radio"], | |
#bidi-rtl .checkbox input[type="checkbox"], | |
#bidi-rtl .nav-tabs>li, | |
#bidi-rtl .nav-pills>li, | |
#bidi-rtl .form-horizontal .control-label { | |
float:right; | |
} | |
#bidi-rtl .pull-right, | |
#bidi-rtl .dropdown-submenu > a:after { | |
float:left; | |
} | |
#bidi-rtl .nav-stacked > li { | |
float:none; | |
} | |
/* For general lists swapping the margin sides */ | |
#bidi-rtl ul, #bidi-rtl ol { | |
margin-left: 0; | |
margin-right:25px; | |
} | |
#bidi-rtl .nav, | |
#bidi-rtl .breadcrumb, | |
#bidi-rtl .unstyled, | |
#bidi-rtl ul.row-fluid, | |
#bidi-rtl ol.row-fluid, | |
#bidi-rtl .dropdown-menu { | |
margin-right: 0; | |
} | |
/* For general dl dd dt */ | |
#bidi-rtl dd { | |
margin-left: 0; | |
margin-right: 10px; | |
} | |
/* Dropdown nav postions */ | |
#bidi-rtl .dropdown-menu { | |
left: auto; | |
right: 0; | |
} | |
#bidi-rtl .dropdown-menu.pull-right { | |
left: 0; | |
right: auto; | |
} | |
#bidi-rtl .navbar > li > .dropdown-menu:after, | |
#bidi-rtl .navbar .nav > li > .dropdown-menu:after { | |
left: auto; | |
right: 13px; | |
} | |
#bidi-rtl .navbar > li > .dropdown-menu .dropdown-menu, | |
#bidi-rtl .navbar .nav > li > .dropdown-menu .dropdown-menu { | |
left: auto; | |
right: 100%; | |
margin-left: 0; | |
margin-right: -1px; | |
-webkit-border-radius: 6px 0 6px 6px; | |
-moz-border-radius: 6px 0 6px 6px; | |
border-radius: 6px 0 6px 6px; | |
} | |
#bidi-rtl .dropdown-submenu > a:after { | |
border-width: 0; | |
border-top: 5px solid transparent; | |
border-bottom: 5px solid transparent; | |
border-right:5px solid #cccccc | |
} | |
/* Button groups */ | |
#bidi-rtl .btn-group > .btn:last-child, | |
#bidi-rtl .btn-group > .dropdown-toggle { | |
-webkit-border-top-right-radius: 0; | |
-moz-border-radius-topright: 0; | |
border-top-right-radius: 0; | |
-webkit-border-bottom-right-radius: 0; | |
-moz-border-radius-bottomright: 0; | |
border-bottom-right-radius: 0; | |
-webkit-border-top-left-radius: 4px; | |
-moz-border-radius-topleft: 4px; | |
border-top-left-radius: 4px; | |
-webkit-border-bottom-left-radius: 4px; | |
-moz-border-radius-bottomleft: 4px; | |
border-bottom-left-radius: 4px; | |
} | |
#bidi-rtl .btn-group > .btn:first-child { | |
margin-left: 0; | |
-webkit-border-top-left-radius: 0; | |
-moz-border-radius-topleft: 0; | |
border-top-left-radius: 0; | |
-webkit-border-bottom-left-radius: 0; | |
-moz-border-radius-bottomleft: 0; | |
border-bottom-left-radius: 0; | |
-webkit-border-top-right-radius: 4px; | |
-moz-border-radius-topright: 4px; | |
border-top-right-radius: 4px; | |
-webkit-border-bottom-right-radius: 4px; | |
-moz-border-radius-bottomright: 4px; | |
border-bottom-right-radius: 4px; | |
} | |
/* Basket dropdown */ | |
#bidi-rtl .basket-mini .btn-group { | |
margin-left: 0; | |
margin-right: 10px; | |
} | |
/* Text align */ | |
#bidi-rtl .table-header, | |
#bidi-rtl caption, | |
#bidi-rtl .table th, | |
#bidi-rtl .table td, | |
#bidi-rtl .form-horizontal .control-label, | |
#bidi-rtl .form-stacked .control-label { | |
text-align: right; | |
} | |
#bidi-rtl .modal-footer { | |
text-align: left; | |
} | |
/* Spans are now floating right, so lets also change the margins */ | |
#bidi-rtl .row-fluid [class*="span"], | |
#bidi-rtl .row-fluid [class*="span"]:first-child { | |
margin-left: 0; | |
} | |
/* This varries on media querry, so may need extending further */ | |
#bidi-rtl .row-fluid [class*="span"] { | |
margin-right: 2.127659574468085%; | |
} | |
#bidi-rtl .row-fluid [class*="span"]:first-child { | |
margin-right: 0; | |
} | |
/* Spans in tables and inputs */ | |
#bidi-rtl .row-fluid th[class*="span"], | |
#bidi-rtl .row-fluid td[class*="span"], | |
#bidi-rtl .row-fluid input[type="text"][class*="span"] { | |
float:none; | |
margin:0; | |
} | |
/* Radio and checkboxes */ | |
#bidi-rtl .radio, | |
#bidi-rtl .checkbox { | |
padding-left: 0; | |
padding-right: 18px; | |
} | |
#bidi-rtl .radio input[type="radio"], | |
#bidi-rtl .checkbox input[type="checkbox"] { | |
margin-left: 0; | |
margin-right: -18px; | |
} | |
/* Form actions */ | |
#bidi-rtl .well .form-actions, | |
#bidi-rtl .tabbable.dashboard .tab-content .form-actions { | |
left: auto; | |
right: -19px; | |
} | |
/* Form horizontal */ | |
#bidi-rtl .form-horizontal .controls { | |
margin-right: 180px; | |
margin-left:0; | |
} | |
/* Basket */ | |
#bidi-rtl a[href="/checkout/paypal/redirect/"] { | |
float:right; | |
} | |
/* Fancypages */ | |
#bidi-rtl .block-move-delete { | |
right: auto; | |
left: 0; | |
} | |
#bidi-rtl .fp-btn-group > .fp-btn:first-child { | |
-webkit-border-top-right-radius: 4px; | |
-moz-border-radius-topright: 4px; | |
border-top-right-radius: 4px; | |
-webkit-border-bottom-right-radius: 4px; | |
-moz-border-radius-bottomright: 4px; | |
border-bottom-right-radius: 4px; | |
} | |
#bidi-rtl .fp-btn-group > .fp-btn:last-child, | |
#bidi-rtl .fp-btn-group > .dropdown-toggle { | |
-webkit-border-top-right-radius: 0; | |
-moz-border-radius-topright: 0; | |
border-top-right-radius: 0; | |
-webkit-border-bottom-right-radius: 0; | |
-moz-border-radius-bottomright: 0; | |
border-bottom-right-radius: 0; | |
-webkit-border-top-left-radius: 4px; | |
-moz-border-radius-topleft: 4px; | |
border-top-left-radius: 4px; | |
-webkit-border-bottom-left-radius: 4px; | |
-moz-border-radius-bottomleft: 4px; | |
border-bottom-left-radius: 4px; | |
} | |
#bidi-rtl .fp-btn-group + .fp-btn-group { | |
margin-left: 0; | |
margin-right: 5px; | |
} | |
#bidi-rtl .fp-btn-group + .fp-btn-group > .fp-btn:first-child { | |
-webkit-border-top-left-radius: 0; | |
-moz-border-radius-topleft: 0; | |
border-top-left-radius: 0; | |
-webkit-border-bottom-left-radius: 0; | |
-moz-border-radius-bottomleft: 0; | |
border-bottom-left-radius: 0; | |
} | |
#bidi-rtl .fp-nav-tabs > li { | |
float:right!important; | |
} | |
/* Modal close */ | |
#bidi-rtl .fp-close, button.fp-close, | |
#bidi-rtl .close { | |
float:left; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment