-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.css
131 lines (123 loc) · 2.42 KB
/
main.css
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
:root {
--quantity-width: 3em;
--color-border: 1px solid hsl(from currentColor 0 0 32);
--gradient-red: linear-gradient(to right, #cb2d3e, #ef473a);
--gradient-green: linear-gradient(to right, #2e7d32, #43a047);
--gradient-blue: linear-gradient(to right, #1e88e5, #2196f3);
--gradient-yellow: linear-gradient(to right, #f9a825, #fbc02d);
--gradient-pink: linear-gradient(to right, #d66d75, #e29587);
--gradient-purple: linear-gradient(to right, #8e24aa, #ab47bc);
--gradient-orange: linear-gradient(to right, #f57c00, #ff9800);
}
body {
background-color: Canvas;
color: CanvasText;
color-scheme: light dark;
font-family: system-ui;
height: 100vh;
margin: 0;
display: flex;
}
main {
overflow-y: auto;
padding: 1em;
h1 {
margin-top: 0;
}
}
item-form {
display: block;
border-radius: 1em;
padding: 1em;
&::part(quantity) {
width: var(--quantity-width);
}
&::part(discounts) {
display: flex;
gap: 0.5em;
padding: 0;
list-style: none;
font-size: small;
}
&::part(discount) {
border: 1px solid currentColor;
border-radius: 1em;
padding: 0.25em 0.5em;
}
&::part(price) {
font-size: large;
}
&[data-id=red] {
background: var(--gradient-red);
}
&[data-id=green] {
background: var(--gradient-green);
}
&[data-id=blue] {
background: var(--gradient-blue);
}
&[data-id=yellow] {
background: var(--gradient-yellow);
}
&[data-id=pink] {
background: var(--gradient-pink);
}
&[data-id=purple] {
background: var(--gradient-purple);
}
&[data-id=orange] {
background: var(--gradient-orange);
}
}
aside {
padding: 1em;
h2 {
margin-top: 0;
}
}
order-form {
&::part(quantity) {
width: var(--quantity-width);
}
&::part(details) {
display: flex;
gap: .5em;
margin: 0;
border: var(--color-border);
border-radius: 1em;
}
&::part(member) {
width: 10ch;
}
&::part(table) {
border: var(--color-border);
border-spacing: .5em;
border-radius: 1em;
width: 100%;
max-width: 100%;
table-layout: auto;
margin: .5em 0;
text-align: left;
}
&::part(thead) {
font-size: smaller;
}
}
ul {
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
gap: 1em;
list-style: none;
}
@media screen and (orientation: landscape) {
body {
flex-direction: row;
}
}
@media screen and (orientation: portrait) {
body {
flex-direction: column;
}
}