Skip to content

Commit c1128dd

Browse files
feat(range): updating the range pin to always be visible when enabled for ionic theme (#29988)
Issue number: internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? The ion-range pin is only shown we the range is being dragged for all themes. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - This PR updates the range pin so that it is alway visible when it is enabled for the ionic theme. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent 175dc92 commit c1128dd

File tree

4 files changed

+3
-18
lines changed

4 files changed

+3
-18
lines changed

core/src/components/range/range.ionic.scss

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
* overlapping the range. The buffer is added to the
6464
* bottom of the range label instead of the host.
6565
*/
66-
@include padding(calc(globals.$ion-space-200 + globals.dynamic-font(12px)), null, null, null);
66+
@include padding(calc(globals.$ion-space-100 + globals.$ion-scale-600), null, null, null);
6767
}
6868

6969
:host(.range-has-pin.range-label-placement-stacked) .label-text-wrapper {
@@ -107,12 +107,11 @@
107107
}
108108

109109
.range-pin {
110-
@include transform(translate3d(0, 100%, 0), scale(0.01));
111-
@include padding(globals.$ion-space-200, globals.$ion-space-200, globals.$ion-space-200, globals.$ion-space-200);
110+
@include padding(null, null, globals.$ion-space-100, null);
112111

113112
min-width: globals.$ion-scale-700;
114113

115-
transition: transform 120ms ease;
114+
transform: translate3d(0, calc(-100%), 0);
116115

117116
background: transparent;
118117

@@ -128,20 +127,6 @@
128127
box-sizing: border-box;
129128
}
130129

131-
/**
132-
* The -100% ensures the pin sits on top
133-
* of the range-knob-handle container.
134-
* We apply 11px so that the pin
135-
* text is closer to the knob inside of the container.
136-
* We also apply the 11px here instead of using "top"
137-
* otherwise the pin text will translate below the knob
138-
* when the text is scaled.
139-
*/
140-
.range-knob-pressed .range-pin,
141-
.range-knob-handle.ion-focused .range-pin {
142-
transform: translate3d(0, calc(-100% + 11px), 0) scale(1);
143-
}
144-
145130
// Ionic Range: Disabled (based on iOS Range)
146131
// --------------------------------------------------
147132
// When the range is disabled, the entire range,
38 Bytes
Loading
102 Bytes
Loading
36 Bytes
Loading

0 commit comments

Comments
 (0)