Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making .outputTooltip class on slider themable #540

Merged
merged 1 commit into from
Apr 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/slider/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class SliderBase<P extends SliderProperties = SliderProperties> extends T
}

return v('output', {
classes: [ this.theme(css.output), outputIsTooltip ? fixedCss.outputTooltip : null ],
classes: this.theme([css.output, outputIsTooltip ? css.outputTooltip : null]),
for: this._widgetId,
styles: outputStyles,
tabIndex: -1 /* needed so Edge doesn't select the element while tabbing through */
Expand Down
6 changes: 0 additions & 6 deletions src/slider/styles/slider.m.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@
position: absolute;
}

.outputTooltip {
left: 2.5em;
position: absolute;
top: 2.5em;
}

/* Make native input invisible */
.nativeInput {
appearance: none;
Expand Down
1 change: 0 additions & 1 deletion src/slider/styles/slider.m.css.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ export const inputWrapperFixed: string;
export const fillFixed: string;
export const trackFixed: string;
export const thumbFixed: string;
export const outputTooltip: string;
export const nativeInput: string;
4 changes: 2 additions & 2 deletions src/slider/tests/unit/Slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const expected = function(label = false, tooltip = false, overrides = {}, child
})
]),
v('output', {
classes: [ css.output, tooltip ? fixedCss.outputTooltip : null ],
classes: [ css.output, tooltip ? css.outputTooltip : null ],
for: '',
tabIndex: -1,
styles: progress !== '0%' ? { left: progress } : {}
Expand Down Expand Up @@ -276,7 +276,7 @@ registerSuite('Slider', {
})
]),
v('output', {
classes: [ css.output, fixedCss.outputTooltip ],
classes: [ css.output, css.outputTooltip ],
for: '',
styles: { top: '80%' },
tabIndex: -1
Expand Down
6 changes: 6 additions & 0 deletions src/theme/slider.m.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

.root { }

.outputTooltip {
left: 2.5em;
position: absolute;
top: 2.5em;
}

/* vertical slider */
.vertical .input,
.vertical .track {
Expand Down
1 change: 1 addition & 0 deletions src/theme/slider.m.css.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const root: string;
export const outputTooltip: string;
export const vertical: string;
export const input: string;
export const track: string;
Expand Down