Skip to content

Commit

Permalink
fix(slider): add less visually effectacious style to the slider outpu…
Browse files Browse the repository at this point in the history
…t when editable
  • Loading branch information
Westbrook committed Nov 11, 2022
1 parent 643fcff commit 8702294
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/slider/src/slider.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,16 @@ sp-field-label {
}

:host([editable]) output {
opacity: 0;
border: 0;
clip: rect(0, 0, 0, 0);
clip-path: inset(50%);
height: 1px;
margin: 0 -1px -1px 0;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
}

:host([disabled]) {
Expand Down
18 changes: 18 additions & 0 deletions packages/slider/stories/slider.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,24 @@ export const Quiet = (args: StoryArgs = {}): TemplateResult => {
`;
};

export const inPopover = (args: StoryArgs = {}): TemplateResult => {
return html`
<sp-popover open dialog style="min-width: 0">
<sp-slider
editable
hide-stepper
quiet
value="5"
step="0.5"
min="0"
max="20"
label="Intensity"
...=${spreadProps(args)}
></sp-slider>
</sp-popover>
`;
};

export const Indeterminate = (args: StoryArgs = {}): TemplateResult => {
return html`
<div style="width: 500px; margin: 12px 20px;">
Expand Down

0 comments on commit 8702294

Please # to comment.