From 7ff2865c51de36696281e70136f66663fa13461e Mon Sep 17 00:00:00 2001 From: lgersen Date: Sun, 29 Oct 2023 15:43:50 +0100 Subject: [PATCH] Show how to style handles to not overlap #1259 --- documentation/examples-content/styling.php | 9 +++++++++ documentation/examples/styling-no-overlap.css | 6 ++++++ documentation/examples/styling.js | 11 +++++++++++ 3 files changed, 26 insertions(+) create mode 100644 documentation/examples/styling-no-overlap.css diff --git a/documentation/examples-content/styling.php b/documentation/examples-content/styling.php index 319f8310..38c302f6 100644 --- a/documentation/examples-content/styling.php +++ b/documentation/examples-content/styling.php @@ -19,6 +19,8 @@
Fit handles within slider
+ Don't overlap handles +
Rounded styling
Square styling @@ -32,10 +34,17 @@

 <div id="slider"></div>
 <div id="slider-fit"></div>
+<div id="slider-no-overlap"></div>
 <div class="slider-styled" id="slider-round"></div>
 <div class="slider-styled" id="slider-square"></div>
 
+
Don't overlap handles
+ +
+ +
+
Fit handles withing the slider
diff --git a/documentation/examples/styling-no-overlap.css b/documentation/examples/styling-no-overlap.css new file mode 100644 index 00000000..7facbfbf --- /dev/null +++ b/documentation/examples/styling-no-overlap.css @@ -0,0 +1,6 @@ +#slider-no-overlap .noUi-handle-lower { + right: 0; +} +#slider-no-overlap .noUi-handle-upper { + right: -34px; +} diff --git a/documentation/examples/styling.js b/documentation/examples/styling.js index caeb00a2..91f14fc4 100644 --- a/documentation/examples/styling.js +++ b/documentation/examples/styling.js @@ -9,6 +9,17 @@ noUiSlider.create(slider, { } }); +var sliderNoOverlap = document.getElementById('slider-no-overlap'); + +noUiSlider.create(sliderNoOverlap, { + start: [50, 50], + connect: true, + range: { + 'min': 0, + 'max': 100 + } +}); + var sliderFit = document.getElementById('slider-fit'); noUiSlider.create(sliderFit, {