Skip to content

Commit

Permalink
Fix #966
Browse files Browse the repository at this point in the history
  • Loading branch information
leongersen committed Apr 24, 2019
1 parent d45b28c commit f73551d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion documentation/more.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@

<p>If your styling system doesn't match the convention in noUiSlider, you can use the <code>cssPrefix</code> and <code>cssClasses</code> options to reconfigure the markup.</p>

<p>noUiSlider listens to events on the <code>.noUi-base</code> element. To add padding on the <code>.noUi-target</code> element and contain handles within the slider width, <code>.noUi-base</code> needs to be extended. This can be done using CSS <code>:before</code> and <code>:after</code> pseudo-elements. An example is included to the right.</p>
<p>When adding padding to <code>.noUi-target</code>, you'll notice the <code>.noUi-connect</code> elements don't fill the slider width. This can be fixed by increasing the size of <code>.noUi-connects</code>. An example is included to the right.</p>
</div>

<div class="side">
Expand Down
17 changes: 3 additions & 14 deletions documentation/more/padding.css
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
.noUi-target {
padding: 0 17px;
}
.noUi-base:before,
.noUi-base:after {
width: 17px;
content: "";
position: absolute;
top: 0;
height: 100%;
display: block;
}
.noUi-base:before {
left: -17px;
}
.noUi-base:after {
left: 100%;
.noUi-connects {
margin: 0 -17px;
width: calc(100% + 34px);
}

0 comments on commit f73551d

Please sign in to comment.