feat(rtl): add sass var $include-rtl

This commit is contained in:
Adam Bradley
2016-01-01 22:34:57 -06:00
parent da986a5fb0
commit f38ad4a7d2
3 changed files with 29 additions and 0 deletions

View File

@@ -220,3 +220,17 @@ ion-item-divider {
ion-item-sliding {
background-color: $item-ios-sliding-content-bg;
}
// iOS item right-to-left
// --------------------------------------------------
@if $include-rtl {
@at-root {
.rtl.ios {
// todo
}
}
}

View File

@@ -5,3 +5,7 @@
// Global Mixins
@import "util/mixins";
// Global include-rtl
$include-rtl: true !default;

View File

@@ -34,6 +34,11 @@
if (location.href.indexOf('cordova=true') > -1) {
window.cordova = {};
}
if (location.href.indexOf('rtl=true') > -1) {
document.dir = 'rtl';
} else {
document.dir = 'ltr';
}
</script>
<style>
@@ -88,6 +93,12 @@
</ion-app>
<script>
if (document.dir === 'rtl') {
document.body.classList.add('rtl');
} else {
document.body.classList.remove('rtl');
}
System.import('index.js').then(function(m) {}, console.error.bind(console));
console.timeEnd('script init');
</script>