-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyle.css
178 lines (137 loc) · 2.8 KB
/
style.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP&display=swap");
:root {
--suit-bg-color: #b30000;
--suit-bg-color: #187318;
--suit-bg-color: #0d32e1;
--field-bg-color: #387d38;
}
body {
margin: 0;
width: 100vw;
height: 100vh;
background-color: var(--field-bg-color);
}
.field-container {
display: flex;
justify-content: center;
}
.field {
/* display: grid;
grid-template-columns: repeat(7, 1fr);
grid-template-rows: repeat(3, 1fr);
grid-column-gap: 0px;
grid-row-gap: 0px; */
display: inline-flex;
flex-direction: column;
gap: 64px;
padding-top: 20px;
}
.field__top {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.decks {
/* position: absolute;
left: 10px;
top: 10px; */
display: inline-flex;
gap: 8px;
}
.piles {
/* position: absolute;
left: 10px;
top: 240px; */
display: inline-flex;
gap: 8px;
}
.suits {
/* position: absolute;
left: 364px;
top: 10px; */
display: inline-flex;
gap: 8px;
}
.holder {
display: grid;
width: 110px;
height: 170px;
border-radius: 5px;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 0.2);
box-shadow: inset 2px 2px 4px 0px rgba(0, 0, 0, 0.45);
background-color: #00000012;
/* default? */
grid-template-rows: repeat(20, 45px);
}
/* todo: use this new approach for stacking cards in pile */
.decks .holder {
grid-template-rows: repeat(24, 2px);
}
.suits .holder {
grid-template-rows: repeat(13, 3px);
}
.piles .holder {
grid-template-rows: repeat(20, 45px);
}
.holder > .card {
position: initial;
z-index: initial !important;
}
.card {
position: absolute;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 110px;
height: 170px;
box-sizing: border-box;
border: 1px solid black;
border-radius: 5px;
user-select: none;
background-color: white;
font-family: "Noto Sans JP", sans-serif;
/* to prevent rotated text to fail with z-index */
transform-style: preserve-3d;
}
*[hidden] {
display: none;
}
.card[data-suit="h"],
.card[data-suit="d"] {
color: red;
}
.card[data-suit="s"],
.card[data-suit="c"] {
color: black;
}
.card.card_closed {
border: 1px solid black;
box-shadow: inset 0px 0px 0px 1px #dcdcdc, inset 0px 0px 0px 4px white;
background-color: var(--suit-bg-color);
background-image: url(card_suit_pattern_white.png);
background-repeat: repeat;
}
.card.card_closed > * {
display: none;
}
.card > * {
pointer-events: none;
}
.card__corner-top-left,
.card__corner-bottom-right {
padding: 8px 4px;
text-orientation: upright;
writing-mode: vertical-lr;
}
.card__corner-top-left {
align-self: flex-start;
}
.card__center {
font-size: 40px;
}
.card__corner-bottom-right {
align-self: flex-end;
transform: rotate(180deg);
}