Skip to content

Commit

Permalink
feat: fake a tooltip with CSS pseudo-element
Browse files Browse the repository at this point in the history
  • Loading branch information
mpleroux committed Sep 10, 2024
1 parent 27f6e54 commit 18ab31c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions es-ds-components/components/es-slider.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,22 @@ const model = defineModel<number>();
outline: none;
}
}
// "tooltip"
:deep(.slider-handle::before) {
align-items: center;
background-color: variables.$blue-600;
border-radius: 50%;
bottom: 100%;
box-shadow: 0 1px 6px 0 rgba(34, 38, 51, 0.25);
color: variables.$white;
content: attr(aria-valuenow);
display: flex;
font-weight: variables.$font-weight-boldest;
height: 52px;
justify-content: center;
padding-bottom: 2px;
position: absolute;
width: 52px;
}
</style>

0 comments on commit 18ab31c

Please sign in to comment.