summaryrefslogtreecommitdiffstats
path: root/browser/components/shopping/content/shopping-container.css
blob: 709a53ac8ba1367c2252c3ba05273fc89de48aac (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* 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/. */

:host {
  --shopping-close-button-size: var(--button-min-height);
  --shopping-header-font-size: 1.3rem;
}

#shopping-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

#header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background-color: var(--shopping-header-background);
  box-sizing: border-box;
  padding-block: 16px 8px;
  padding-inline: 16px 8px;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 2;
}

#shopping-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

#shopping-header-title {
  font-size: var(--shopping-header-font-size);
  font-weight: var(--font-weight-bold);
  margin: 0;
}

.shopping-header-overflow {
  box-shadow: 0 1px 2px 0 rgba(58, 57, 68, 0.20);
}

#beta-marker {
  font-size: var(--font-size-small);
  font-weight: var(--font-weight);
  padding: 2px 4px;
  margin: 0;
  line-height: 150%;
  text-transform: uppercase;
  color: var(--icon-color);
  border: 1px solid var(--icon-color);
  border-radius: var(--border-radius-small);
}

#close-button {
  min-width: var(--shopping-close-button-size);
  min-height: var(--shopping-close-button-size);
  -moz-context-properties: fill;
  fill: currentColor;
  background-image: url("chrome://global/skin/icons/close.svg");
  background-repeat: no-repeat;
  background-position: center;
  margin-inline-end: 0;

  @media not (prefers-contrast) {
    color: var(--icon-color);
  }
}

#content {
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 0 16px 16px;
}

#content:focus-visible {
  outline-offset: -2px;
}

.loading-box {
  box-shadow: none;
  border: none;
  background: var(--in-content-button-background);
  margin-block: 1rem;
}

.loading-box.small {
  height: 2.67rem;
}

.loading-box.medium {
  height: 5.34rem;
}

.loading-box.large {
  height: 12.8rem;
}

.loading-box:nth-child(odd) {
  background-color: var(--in-content-button-background);
}

.loading-box:nth-child(even) {
  background-color: var(--in-content-button-background-hover);
}

@media not (prefers-reduced-motion) {
  .animate > .loading-box {
    animation-name: fade-in;
    animation-direction: alternate;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
  }

  /* First box + every 4th box, fifth box + every 4th box */
  .loading-box:nth-child(4n-3) {
    animation-delay: -1s;
  }

  /* Second box + every 4th box, sixth box + every 4th box */
  .loading-box:nth-child(4n-2) {
    animation-delay: 0s;
  }

  /* Third box + every 4th box */
  .loading-box:nth-child(4n-1) {
    animation-delay: -1.5s;
  }

  /* Fourth box + every 4th box */
  .loading-box:nth-child(4n) {
    animation-delay: -0.5s;
  }

  @keyframes fade-in {
   from {
     opacity: .25;
   }
   to {
     opacity: 1;
   }
 }
}