aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/molecules/tooltip/tooltip.module.scss
blob: 557d9c7e6a890b723044512a29734ec90aed01db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@use "../../../styles/abstracts/functions" as fun;
@use "../../../styles/abstracts/mixins" as mix;
@use "../../../styles/abstracts/variables" as var;

.btn {
  margin-right: var(--spacing-xs);
}

.tooltip {
  position: absolute;
  z-index: 10;
  font-size: var(--font-size-sm);
  transition: all 0.75s ease-in-out 0s;

  @media screen and (max-height: #{var.get-breakpoint("2xs")}) {
    width: calc(97.5vw - var(--spacing-md));
    right: 0;
  }

  &--down {
    top: calc(100% + var(--spacing-xs));
    transform-origin: top;
  }

  &--up {
    bottom: calc(100% + var(--spacing-2xs));
    transform-origin: bottom;
  }

  &--hidden {
    flex: 0 0 0;
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
  }

  &--visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
  }
}

.heading {
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  height: 100%;
  margin-left: calc(var(--spacing-xs) * -1.1);
  font-size: var(--font-size-sm);
}

.icon {
  align-self: stretch;
  margin-right: var(--spacing-xs);
  background: var(--color-primary-dark);
  border: fun.convert-px(1) solid var(--color-primary-dark);
  box-shadow: fun.convert-px(1) fun.convert-px(1) 0 0 var(--color-shadow);

  :global {
    path {
      fill: var(--color-fg-inverted);
      margin-inline: var(--spacing-2xs);
    }
  }
}