Skip to content

Commit

Permalink
fix(audio-player): change slider knob design- visible on hover/focus …
Browse files Browse the repository at this point in the history
…only (VIV-1990) (#2090)
  • Loading branch information
rachelbt authored Feb 2, 2025
1 parent 04d4c58 commit b1b19c4
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion libs/components/src/lib/audio-player/audio-player.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
align-items: center;
padding: 8px;
color: var(#{constants.$vvd-color-canvas-text});
gap: 16px;
gap: 8px;
inline-size: 100%;
user-select: none;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ function renderSlider(context: VividElementDefinitionContext) {
max="100"
ariaValuetext="${(x) => formatTime(x.currentTime)}"
connotation="${(x) => x.connotation}"
?disabled="${(x) => x.disabled || !x.duration}">
?disabled="${(x) => x.disabled || !x.duration}"
internal-part>
</${sliderTag}>`;
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions libs/components/src/lib/slider/slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -255,3 +255,29 @@ $track-thickness: 2px;
color: var(#{constants.$vvd-color-canvas-text});
font: var(#{constants.$vvd-typography-base-bold});
}

/* Customize for Audio-Player */
/* stylelint-disable */
:host([internal-part]) {
.thumb-container {
opacity: 0;
transition: opacity 0.2s ease;
}
.control {
&.horizontal {
.track {
top: 16px;
block-size: 4px;
overflow: hidden;
}
}

&:hover,
&:focus {
.thumb-container {
opacity: 1;
}
}
}
}
/* stylelint-enable */

0 comments on commit b1b19c4

Please sign in to comment.