3 |*| Properties for the page: colors, etc.
5 |*| This is intended to be the easiest section to edit
6 |*| some easy custom theming, (a custom color scheme, etc.).
11 /* Standard colors for text. */
12 --text-fg-color: #333738;
13 --text-fg-color-max-contrast: black;
14 --text-bg-color: white;
15 --outside-page-bg-color: #333738;
17 /* A little color to avoid a fully monochromatic theme. */
18 --accent-color: #287789;
19 --accent-color-bright: #44c7ef;
21 /* Some colors intended to convey semnatics. */
22 --warning-color: #ffa92a;
23 --danger-color: #f56257;
24 --danger-color-dark: #bc2822;
27 --page-max-width: 720px;
29 --page-max-width-padded: calc(var(--page-max-width) + 2 * var(--page-max-pad));
34 |*| Core elements: Sizing, padding, and application of theme colors
40 font-family: sans-serif;
41 color: var(--text-fg-color-max-contrast);
45 color: var(--text-fg-color);
57 /* Don't underline links in headers */
59 text-decoration: none;
68 list-style-type: disc;
73 color: var(--accent-color);
76 color: var(--accent-color);
79 color: var(--accent-color-bright);
82 color: var(--accent-color-bright);
87 |*| Overall page layout
89 |*| Assumes: Top-level div with id="page" for all content
93 /* Mobile-first: At small sized we have a white background and use the
94 * entire screen width for the page (so the background color of the
95 * body is not visible anywhere). */
97 background-color: var(--outside-page-bg-color);
101 background-color: var(--text-bg-color);
104 /* For a small screen (in either width or height) change the
105 * background of the body element to white so the application always
106 * appears as if it is "full screen".
108 @media screen and (max-width: 500px) and (max-height: 860px) {
110 background-color: var(--text-bg-color);
114 /* We never let the page content get larger than a large fixed width.
116 * And when the screen is wide enough, we can afford some "wasted"
117 * space on either side of the page content, (up to --page-max-pad).
119 * Note: This --page-max-width-padded for the page includes the
120 * padding so the actual content is only ever as wide as
123 * Wider than that and we start to see the background on either side
124 * of the page content.
127 box-sizing: border-box;
128 max-width: var(--page-max-width-padded);
137 @media screen and (min-width: var(--page-max-width)) and (max-width: var(--page-max-width-padded)) {
139 padding-left: calc(1em + (100% - var(--page-max-width))/2);
140 padding-right: calc(1em + (100% - var(--page-pax-width))/2);
144 @media screen and (min-width: var(--page-pax-width-padded)) {
146 padding-left: calc(1em + var(--page-max-pad));
147 padding-right: calc(1em + var(--page-max-pad));
151 /* The calculations for height are different. We don't have any
152 * vertical centering, so instead we have only some fixed padding on
153 * the top. Then, the margin which allows the background to be visible
154 * on the top and bottom starts appearing at a viewport height of 648
155 * and tops out at a size of 36px.
162 @media screen and (min-height: 648px) and (max-height: 720px) {
164 margin-top: calc((100vh - 648px)/2);
165 margin-bottom: calc((100vh - 648px)/2);
169 @media screen and (min-height: 720px) {
178 |*| Responsive form layout
184 * Within the form, fields can be placed in <div> elements with
185 * class "form-field". Each can also have an additional class of one
186 * of "small", "medium", or "large". These classes will be used to
187 * select either a 1- or 2-column layout for each row depending on the
188 * width of the screen.
190 * Expected layout is as follows:
192 * "large" rows: 1-column on all devices
194 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
195 * 1-column on small display (phones)
197 * "small" rows: 2-column on all devices
199 * Finally, a class of either "left" or "right" will select which
200 * column the field should appear in for fields that end up in 2
206 grid-template-columns: 1fr 1fr;
207 grid-column-gap: 1em;
210 .form-field.small.left,.form-field.medium.left {
211 grid-column-start: 1;
214 .form-field.small.right,.form-field.medium.right {
215 grid-column-start: 2;
219 grid-column-start: 1;
220 grid-column-end: span 2;
223 /* For a narrow screen, use a single-column for medium form fields. */
224 @media screen and (max-width: 600px) {
225 .form-field.medium.left,.form-field.medium.right {
226 grid-column-start: 1;
227 grid-column-end: span 2
233 |*| Styling for form input fields
242 box-sizing: border-box;
247 border: 1px solid var(--accent-color);
252 border: 2px solid var(--accent-color-bright);
256 display: inline-block;
258 background-color: var(--accent-color);
265 padding-bottom: 0.25em;
277 transform: translateY(-1px);
278 background-color: var(--accent-color-bright);
291 |*| Styling for a message area
295 /* Default message severity is "info" but can be overriden. */
298 background-color: var(--accent-color-bright);
301 margin-bottom: 0.5em;
308 background-color: var(--accent-color-bright);
312 background-color: var(--warning-color);
316 background-color: var(--danger-color);
330 color: var(--danger-color-dark);
335 |*| Game-specific markup
339 .game-id, .players-header {