Replies: 1 comment
-
For a slider supporting a single range: <div class="k-slider k-slider-horizontal">
<a class="k-button k-button-decrease">
<span class="k-icon k-i-arrow-w"></span>
</a>
<div class="k-slider-track-wrap">
<ul class="k-reset k-slider-items">
<li class="k-tick k-tick-large">
<span class="k-label">0</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-label">25</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-label">50</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-label">75</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-label">100</span>
</li>
</ul>
<div class="k-slider-track">
<div class="k-slider-selection"></div>
<!-- start drag handle is for ranges -->
<a href="#" class="k-draghandle k-draghandle-start"></a>
<a href="#" class="k-draghandle k-draghandle-end"></a>
</div>
</div>
<a class="k-button k-button-increase">
<span class="k-icon k-i-arrow-e"></span>
</a>
</div> The above rendering is already implemented for Blazor. It uses flexbox and css vars, so it's no IE 11 compatible, but is compatible with the current rendering. However, my ideal rendering is the following, and it differs significantly: <div class="k-slider k-slider-horizontal">
<a class="k-button ..." data-action="increase">
<span class="k-icon k-i-arrow-w"></span>
</a>
<div class="k-slider-track-wrap">
<ul class="k-slider-ticks">
<li class="k-tick k-tick-large">
<span class="k-tick-label">0</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-tick-label">25</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-tick-label">50</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-tick-label">75</span>
</li>
<li class="k-tick"></li>
<li class="k-tick k-tick-large">
<span class="k-tick-label">100</span>
</li>
</ul>
<div class="k-slider-track">
<div class="k-slider-range">
<!-- start thumb is for ranges -->
<a href="#" class="k-slider-thumb k-slider-thumb-start"></a>
<a href="#" class="k-slider-thumb k-slider-thumb-end"></a>
</div>
<!-- more ranges here -->
</div>
</div>
<a class="k-button ..." data-action="decrease">
<span class="k-icon k-i-arrow-e"></span>
</a>
</div> What are the changes?
That approach will be breaking not only because of the rendering changes, but because it will use custom properties (css variables) to position the ranges by default. In other words the instead of modifying the nested markup, we could have: <!-- single range, one thumb -->
<div class="k-slider k-slider-horizontal" style="--kendo-slider-value: 10">...</div>
<!-- single range, two thumbs -->
<div class="k-slider k-slider-horizontal" style="--kendo-slider-start: 5; --kendo-slider-end: 25">...</div>
<!-- multiple ranges -->
<div class="k-slider k-slider-horizontal">
<div class="k-slider-range" style="--kendo-slider-range-start: 1; --kendo-slider-range-end: 15"></div>
<!-- more ranges here -->
</div> In the very distant future, when browsers support <div class="k-slider k-slider-horizontal" data-value="10">...</div>
<!-- single range, two thumbs -->
<div class="k-slider k-slider-horizontal" data-start="5" data-end="25">...</div>
<!-- multiple ranges -->
<div class="k-slider k-slider-horizontal">
<div class="k-slider-range" data-range-start="1" data-range-end="15"></div>
<!-- more ranges here -->
</div> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Reason
React
Angular
Requirements
These requirements should fit to Slider and RangeSlider. Loggin them as a single enhancement due to usage of same rendering.
k-state-default
presense as a class of the sliderComponent structure
Beta Was this translation helpful? Give feedback.
All reactions