Skip to content

Commit 265a7fb

Browse files
authored
Added major and minor tick marks
1 parent c480272 commit 265a7fb

File tree

1 file changed

+63
-7
lines changed

1 file changed

+63
-7
lines changed

RShiny/lessons/css/css_sliderInput.md

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ Jump to the following sections:
2121
- [Slider Bar](#slider-bar)
2222
- [Filled Portion of the Bar](#filled-portion-of-the-bar)
2323
- [Text on the Tick Marks](#text-on-the-tick-marks)
24+
- [Major Tick Marks](#major-tick-marks)
25+
- [Minor Tick Marks](#minor-tick-marks)
2426

2527
Things to add:
2628
- Make a figure to show Slider Handle with Range
27-
- .irs-grid-pol
28-
- .irs-grid-pol.small
2929

3030
## Slider Label
3131

@@ -333,7 +333,7 @@ An example CSS entry for the value of the slider handle is below:
333333
| `box-shadow` | The shadow of the value box ([reference](css_input_option_reference.md#box-shadow)) |
334334
| `text-shadow` | The shadow of the text within the value box ([reference](css_input_option_reference.md#text-shadow)) |
335335

336-
# Slider Bar
336+
## Slider Bar
337337

338338
An example CSS entry for the value of the filled portion of the bar is below:
339339

@@ -359,7 +359,7 @@ An example CSS entry for the value of the filled portion of the bar is below:
359359
| `opacity` | Opacity of the value box ([reference](css_input_option_reference.md#opacity)) |
360360
| `box-shadow` | The shadow of the value box ([reference](css_input_option_reference.md#box-shadow)) |
361361

362-
# Filled Portion of the Bar
362+
## Filled Portion of the Bar
363363

364364
An example CSS entry for the value of the filled portion of the bar is below:
365365

@@ -385,9 +385,9 @@ An example CSS entry for the value of the filled portion of the bar is below:
385385
| `opacity` | Opacity of the value box ([reference](css_input_option_reference.md#opacity)) |
386386
| `box-shadow` | The shadow of the value box ([reference](css_input_option_reference.md#box-shadow)) |
387387

388-
# Text on the Tick Marks
388+
## Text on the Tick Marks
389389

390-
## Control across all of the text on tick marks
390+
### Control across all of the text on tick marks
391391

392392
An example CSS entry for the value of the filled portion of the bar is below:
393393

@@ -431,7 +431,7 @@ An example CSS entry for the value of the filled portion of the bar is below:
431431
| `box-shadow` | The shadow of the slider minimum ([reference](css_input_option_reference.md#box-shadow)) |
432432
| `text-shadow` | The shadow of the text within the slider minimum ([reference](css_input_option_reference.md#text-shadow)) |
433433

434-
## Control over specific text on the tick marks
434+
### Control over specific text on the tick marks
435435

436436
If you would like to have finer control over the text on the tick mark and assign different CSS input for different text you can modify the CSS entry to be:
437437

@@ -459,6 +459,62 @@ And if you wantd to modify the fourth text element then you would use:
459459

460460
> NOTE: Remember the indexing is zero-indexed!
461461
462+
## Major Tick Marks
463+
464+
An example CSS entry for the values of the major tick marks is below:
465+
466+
```
467+
.irs--shiny .irs-grid-pol:not(.small){
468+
height: 15px;
469+
width: 4px;
470+
background-color: green;
471+
border-color: pink;
472+
border-radius: 3px;
473+
border-style: solid;
474+
border-width: 1px;
475+
opacity: 80%;
476+
}
477+
478+
| Argument | Note |
479+
|----------|------|
480+
| `height` | Height of the major tick mark ([reference](css_input_option_reference.md#height)) |
481+
| `width` | Width of the major tick mark ([reference](css_input_option_reference.md#width)) |
482+
| `background-color` | The color for the major tick mark ([reference](css_input_option_reference.md#background-color)) |
483+
| `border-color` | Color of the border ([reference](css_input_option_reference.md#border-color)) |
484+
| `border-radius` | How curved the radius of the corners of tick mark are ([reference](css_input_option_reference.md#border-radius)) |
485+
| `border-style` | Style of the border ([reference](css_input_option_reference.md#border-style)) |
486+
| `border-width` | Width of the border ([reference](css_input_option_reference.md#border-width)) |
487+
| `opacity` | Opacity of the major tick marks ([reference](css_input_option_reference.md#opacity)) |
488+
```
489+
490+
## Minor Tick Marks
491+
492+
An example CSS entry for the values of the major tick marks is below:
493+
494+
```
495+
.irs--shiny .irs-grid-pol.small{
496+
height: 10px;
497+
width: 5px;
498+
background-color: blue;
499+
border-color: red;
500+
border-radius: 4px;
501+
border-style: dotted;
502+
border-width: 2px;
503+
opacity: 90%;
504+
}
505+
506+
| Argument | Note |
507+
|----------|------|
508+
| `height` | Height of the minor tick mark ([reference](css_input_option_reference.md#height)) |
509+
| `width` | Width of the minor tick mark ([reference](css_input_option_reference.md#width)) |
510+
| `background-color` | The color for the minor tick mark ([reference](css_input_option_reference.md#background-color)) |
511+
| `border-color` | Color of the border ([reference](css_input_option_reference.md#border-color)) |
512+
| `border-radius` | How curved the radius of the corners of tick mark are ([reference](css_input_option_reference.md#border-radius)) |
513+
| `border-style` | Style of the border ([reference](css_input_option_reference.md#border-style)) |
514+
| `border-width` | Width of the border ([reference](css_input_option_reference.md#border-width)) |
515+
| `opacity` | Opacity of the minor tick marks ([reference](css_input_option_reference.md#opacity)) |
516+
```
517+
462518
---
463519

464520
[Back to Table of Contents](table_of_contents.md)

0 commit comments

Comments
 (0)