1 /* Because this is the only sizing that is sane, make it global. */
3 box-sizing: border-box;
8 |*| Properties for the page: colors, etc.
10 |*| This is intended to be the easiest section to edit
11 |*| some easy custom theming, (a custom color scheme, etc.).
16 /* Standard colors for text. */
17 --text-fg-color: #333738;
18 --text-fg-color-max-contrast: black;
19 --text-bg-color: white;
20 --outside-page-bg-color: #333738;
22 /* A little color to avoid a fully monochromatic theme. */
23 --accent-color: #287789;
24 --accent-color-bright: #44c7ef;
25 --text-fg-on-accent: white;
26 --text-fg-on-accent-bright: #333738;
28 /* Some colors intended to convey semnatics. */
29 --warning-color: #ffa92a;
30 --danger-color: #f56257;
31 --danger-color-dark: #bc2822;
34 --page-max-width: 720px;
36 --page-max-width-padded: calc(var(--page-max-width) + 2 * var(--page-max-pad));
41 |*| Core elements: Sizing, padding, and application of theme colors
47 font-family: sans-serif;
48 color: var(--text-fg-color-max-contrast);
52 color: var(--text-fg-color);
65 /* Don't underline links in headers */
67 text-decoration: none;
76 list-style-type: disc;
81 color: var(--accent-color);
84 color: var(--accent-color);
86 @media (hover:hover) {
88 color: var(--accent-color-bright);
92 color: var(--accent-color-bright);
101 |*| Overall page layout
103 |*| Assumes: Top-level div with id="page" for all content
107 /* Mobile-first: At small sized we have a white background and use the
108 * entire screen width for the page (so the background color of the
109 * body is not visible anywhere). */
111 background-color: var(--outside-page-bg-color);
115 background-color: var(--text-bg-color);
118 /* For a small screen (in either width or height) change the
119 * background of the body element to white so the application always
120 * appears as if it is "full screen".
122 @media screen and (max-width: 500px) and (max-height: 860px) {
124 background-color: var(--text-bg-color);
128 /* We never let the page content get larger than a large fixed width.
130 * And when the screen is wide enough, we can afford some "wasted"
131 * space on either side of the page content, (up to --page-max-pad).
133 * Note: This --page-max-width-padded for the page includes the
134 * padding so the actual content is only ever as wide as
137 * Wider than that and we start to see the background on either side
138 * of the page content.
141 max-width: var(--page-max-width-padded);
150 @media screen and (min-width: var(--page-max-width)) and (max-width: var(--page-max-width-padded)) {
152 padding-left: calc(1em + (100% - var(--page-max-width))/2);
153 padding-right: calc(1em + (100% - var(--page-pax-width))/2);
157 @media screen and (min-width: var(--page-pax-width-padded)) {
159 padding-left: calc(1em + var(--page-max-pad));
160 padding-right: calc(1em + var(--page-max-pad));
164 /* The calculations for height are different. We don't have any
165 * vertical centering, so instead we have only some fixed padding on
166 * the top. Then, the margin which allows the background to be visible
167 * on the top and bottom starts appearing at a viewport height of 648
168 * and tops out at a size of 36px.
175 @media screen and (min-height: 648px) and (max-height: 720px) {
177 margin-top: calc((100vh - 648px)/2);
178 margin-bottom: calc((100vh - 648px)/2);
182 @media screen and (min-height: 720px) {
191 |*| Responsive form layout
197 * Within the form, fields can be placed in <div> elements with
198 * class "form-field". Each can also have an additional class of one
199 * of "small", "medium", or "large". These classes will be used to
200 * select either a 1- or 2-column layout for each row depending on the
201 * width of the screen.
203 * Expected layout is as follows:
205 * "large" rows: 1-column on all devices
207 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
208 * 1-column on small display (phones)
210 * "small" rows: 2-column on all devices
212 * Finally, a class of either "left" or "right" will select which
213 * column the field should appear in for fields that end up in 2
219 grid-template-columns: 1fr 1fr;
220 grid-column-gap: 1em;
225 margin-bottom: 0.25em;
228 .form-field.small.left,.form-field.medium.left {
229 grid-column-start: 1;
232 .form-field.small.right,.form-field.medium.right {
233 grid-column-start: 2;
237 grid-column-start: 1;
238 grid-column-end: span 2;
241 /* For a narrow screen, use a single-column for medium form fields. */
242 @media screen and (max-width: 600px) {
243 .form-field.medium.left,.form-field.medium.right {
244 grid-column-start: 1;
245 grid-column-end: span 2
251 |*| Styling for form input fields
260 box-sizing: border-box;
265 border: 1px solid var(--accent-color);
270 border: 2px solid var(--accent-color-bright);
274 display: inline-block;
276 background-color: var(--accent-color);
278 color: var(--text-fg-on-accent);
283 padding-bottom: 0.25em;
294 @media (hover:hover) {
296 transform: translateY(-1px);
297 background-color: var(--accent-color-bright);
311 |*| Styling for a message area
315 /* Default message severity is "info" but can be overriden. */
318 background-color: var(--accent-color-bright);
321 margin-bottom: 0.5em;
328 background-color: var(--accent-color-bright);
332 background-color: var(--warning-color);
336 background-color: var(--danger-color);
350 @media (hover:hover) {
358 |*| Game-specific markup
362 .game-id, .players-header {