_Tooltip.scss 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @use "sass:color";
  2. @mixin tooltip() {
  3. .esri-tooltip {
  4. position: absolute;
  5. overflow: visible;
  6. width: fit-content;
  7. top: 0;
  8. left: 0;
  9. z-index: 1;
  10. &-content {
  11. position: relative;
  12. display: table;
  13. padding: $cap-spacing--half $side-spacing--half;
  14. background: color.change($background-color, $alpha: 0.8);
  15. backdrop-filter: blur(3px);
  16. box-shadow: 0 1px 2px rgb(0, 0, 0, 0.1);
  17. font-family: $font-family;
  18. font-size: $font-size--small;
  19. color: $font-color;
  20. }
  21. &-field {
  22. display: table-row;
  23. &__title,
  24. &__value {
  25. display: table-cell;
  26. padding: $cap-spacing--eighth 0;
  27. white-space: nowrap;
  28. }
  29. &__title {
  30. padding-inline-end: $side-spacing;
  31. }
  32. &__value {
  33. // Make numbers look nice as they change. See https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-numeric
  34. font-variant-numeric: tabular-nums;
  35. }
  36. }
  37. &-value-by-value {
  38. // Add some space between the left/right (e.g. width/height) values.
  39. span:nth-child(2) {
  40. margin-inline: $side-spacing--half;
  41. }
  42. }
  43. }
  44. }
  45. @if $include_Tooltip==true {
  46. @include tooltip();
  47. }