summaryrefslogtreecommitdiffstats
path: root/toolkit/components/normandy/skin/shared/Heartbeat.css
blob: fdf5f1b75cb89916c1e5f1626a54951d440ec9fa (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/* Notification overrides for Heartbeat UI */

@keyframes pulse-onshow {
  0% {
    opacity: 0;
    transform: scale(1);
  }

  25% {
    opacity: 1;
    transform: scale(1.1);
  }

  50% {
    transform: scale(1);
  }

  75% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes pulse-twice {
  0% {
    transform: scale(1.1);
  }

  50% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

.messageImage.heartbeat {
  /* Needed for the animation to not get clipped when pulsing. */
  margin-inline: 8px;
}

.messageImage.heartbeat.pulse-onshow {
  animation-duration: 1.5s;
  animation-iteration-count: 1;
  animation-name: pulse-onshow;
  animation-timing-function: cubic-bezier(0.7, 1.8, 0.9, 1.1);
}

.messageImage.heartbeat.pulse-twice {
  animation-duration: 1s;
  animation-iteration-count: 2;
  animation-name: pulse-twice;
  animation-timing-function: linear;
}

/* Learn More link styles */
.heartbeat > hbox > .text-link {
  margin-inline-start: 0 !important;
}

.heartbeat > hbox > .text-link:hover {
  text-decoration: none !important;
}

/* Heartbeat UI Rating Star Classes */
#star-rating-container {
  display: flex;
  margin-bottom: 4px;
}

#star-rating-container > #star5 {
  order: 5;
}

#star-rating-container > #star4 {
  order: 4;
}

#star-rating-container > #star3 {
  order: 3;
}

#star-rating-container > #star2 {
  order: 2;
}

#star-rating-container > .star-x {
  background: url("resource://normandy/skin/shared/heartbeat-star-off.svg");
  cursor: pointer;
  height: 16px;
  margin-inline-end: 4px !important; /* Overrides the margin-inline-end for all platforms defined in the .plain class */
  width: 16px;
}

#star-rating-container > .star-x:hover,
#star-rating-container > .star-x:hover ~ .star-x {
  background: url("resource://normandy/skin/shared/heartbeat-star-lit.svg");
}