Skip to content

Commit feddbf9

Browse files
JoaoFerreira-FrontEndIonitronbrandyscarney
authored
fix(range): update tokens usage, and add pressed state (#30601)
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 new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - improve tokens usage; - increase white space to 44px square; ## 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. --> - [Basic](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/basic?ionic:theme=ionic) - [States](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/states?ionic:theme=ionic) - [Custom](https://ionic-framework-git-rou-12075-ionic1.vercel.app/src/components/range/test/custom?ionic:theme=ionic) --------- Co-authored-by: ionitron <[email protected]> Co-authored-by: Brandy Smith <[email protected]>
1 parent 8361fd2 commit feddbf9

16 files changed

+22
-7
lines changed

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

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66

77
:host {
88
--knob-border-radius: #{globals.$ion-border-radius-full};
9-
--knob-background: #{globals.$ion-primitives-base-white};
9+
--knob-background: #{globals.$ion-bg-input-default};
1010
--knob-box-shadow: none;
1111
--knob-size: #{globals.$ion-scale-600};
12-
--knob-handle-size: #{globals.$ion-scale-1000};
12+
--knob-handle-size: #{globals.$ion-scale-1100};
1313
--bar-height: #{globals.$ion-scale-200};
14-
--bar-background: #{globals.$ion-primitives-neutral-100};
14+
--bar-background: #{globals.$ion-bg-neutral-subtle-default};
1515
--bar-background-active: #{globals.ion-color(primary, base)};
1616
--bar-border-radius: #{globals.$ion-border-radius-400};
17-
--height: #{globals.$ion-scale-1000};
17+
--height: #{globals.$ion-scale-1100};
1818

1919
@include globals.typography(globals.$ion-body-md-regular);
2020

@@ -75,7 +75,7 @@
7575
@include margin(null, null, calc(globals.$ion-space-200 + globals.$ion-font-size-300), null);
7676
}
7777

78-
.range-bar-active {
78+
.range-bar.range-bar-active {
7979
bottom: 0;
8080

8181
width: auto;
@@ -115,6 +115,8 @@
115115

116116
background: transparent;
117117

118+
color: globals.$ion-text-default;
119+
118120
font-size: globals.$ion-font-size-300;
119121

120122
text-align: center;
@@ -123,7 +125,7 @@
123125
.range-knob {
124126
border-width: globals.$ion-border-size-025;
125127
border-style: globals.$ion-border-style-solid;
126-
border-color: globals.ion-color(primary, base);
128+
border-color: globals.$ion-border-primary;
127129
box-sizing: border-box;
128130
}
129131

@@ -134,7 +136,13 @@
134136
// icons need to receive the same opacity.
135137

136138
:host(.range-disabled) {
137-
opacity: 0.3;
139+
--bar-background: #{globals.$ion-bg-neutral-subtle-default};
140+
141+
.range-knob {
142+
border-color: globals.$ion-border-input-default;
143+
144+
background: globals.$ion-bg-input-disabled;
145+
}
138146
}
139147

140148
// Range Label Placement - Start
@@ -207,3 +215,10 @@
207215
.range-knob-handle.ion-focused .range-knob {
208216
@include globals.focused-state();
209217
}
218+
219+
// Range Pressed
220+
// ----------------------------------------------------------------
221+
.range-knob-handle.ion-activated .range-knob,
222+
.range-knob-handle.range-knob-pressed .range-knob {
223+
background: globals.$ion-bg-input-press;
224+
}
-21 Bytes
Loading
54 Bytes
Loading
31 Bytes
Loading
-18 Bytes
Loading
50 Bytes
Loading
26 Bytes
Loading
-29 Bytes
Loading
54 Bytes
Loading
58 Bytes
Loading

0 commit comments

Comments
 (0)