Skip to content

Commit badab73

Browse files
committed
Merge branch 'in0ni-fix-dir-rtl'
2 parents 8dc59e5 + df5a1c9 commit badab73

File tree

5 files changed

+23
-8
lines changed

5 files changed

+23
-8
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Timeline uses `webpack` for bundling, and uses the `webpack-dev-server` as part
2828

2929
### Building
3030

31-
In order to "compile" TimelineJS for use in other contexts, after following the instructions above, run the command `npm run dist`. This will populate a directory, `dist/` in the rool of your checked-out repository, with the javascript and CSS necessary to self-host TimelineJS.
31+
In order to "compile" TimelineJS for use in other contexts, after following the instructions above, run the command `npm run dist`. This will populate a directory, `dist/` in the root of your checked-out repository, with the javascript and CSS necessary to self-host TimelineJS.
3232

3333

3434
### Testing

src/js/slider/SlideNav.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class SlideNav {
114114
this._el.title = DOM.create("div", "tl-slidenav-title", this._el.content_container);
115115
this._el.description = DOM.create("div", "tl-slidenav-description", this._el.content_container);
116116

117-
this._el.icon.innerHTML = " "
117+
// this._el.icon.innerHTML = " "
118118

119119
this._update();
120120
}

src/less/Variables.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@
103103
@opacity-slide-nav-title: 15;
104104
@opacity-slide-nav-desc: 0;
105105
@opacity-slide-nav-desc-hover: 50;
106+
@width-slide-nav: 100px;
107+
@margin-slide-nav: 10px;
106108

107109
/* Animation
108110
================================================== */

src/less/slider/TL.SlideNav.less

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
font-weight: inherit;
2020

2121
.tl-slidenav-content-container {
22-
width:100px;
23-
position:absolute;
22+
width:@width-slide-nav;
2423
}
2524
.tl-slidenav-title, .tl-slidenav-description {
2625
//width:100%;
@@ -102,8 +101,8 @@
102101

103102
.tl-slidenav-next {
104103
text-align: right;
105-
margin-right:10px;
106-
right: 100px;
104+
margin-right:@margin-slide-nav;
105+
right: 0;
107106
.tl-slidenav-title, .tl-slidenav-description {
108107
margin-left:20px;
109108
}
@@ -116,7 +115,8 @@
116115
}
117116
.tl-slidenav-previous {
118117
text-align: left;
119-
margin-left:10px;
118+
left: 0;
119+
margin-left:@margin-slide-nav;
120120
.tl-slidenav-icon {
121121
margin-left: 0px;
122122
}
@@ -125,6 +125,18 @@
125125
}
126126
}
127127

128+
// Fixes usage of browsers default setting of `direction: rtl`
129+
[dir="rtl"] {
130+
.tl-slidenav-previous {
131+
direction: ltr;
132+
}
133+
.tl-slidenav-next {
134+
&:hover .tl-slidenav-icon {
135+
margin-right: -4px;
136+
}
137+
}
138+
}
139+
128140

129141

130142
/* NAVIGATION HOVER
@@ -162,7 +174,6 @@
162174
}
163175
.tl-skinny {
164176
.tl-slidenav-next {
165-
right: 32px;
166177
.tl-slidenav-icon {
167178
margin-left:32 - 24px;
168179
}

src/less/timenav/TL.TimeNav.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
//border-top: 1px solid #e3e3e3;
1313
//box-shadow: inset 10px 10px 5px 0px rgba(0,0,0,0.75);
1414
//.box-shadow(inset -7px 0px 7px rgba(0,0,0,.30));
15+
// fixes use of [dir="rtl"]
16+
direction: ltr;
1517

1618
.tl-timenav-line {
1719
position: absolute;

0 commit comments

Comments
 (0)