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);
64 /* Don't underline links in headers */
66 text-decoration: none;
75 list-style-type: disc;
80 color: var(--accent-color);
83 color: var(--accent-color);
85 @media (hover:hover) {
87 color: var(--accent-color-bright);
91 color: var(--accent-color-bright);
96 |*| Overall page layout
98 |*| Assumes: Top-level div with id="page" for all content
102 /* Mobile-first: At small sized we have a white background and use the
103 * entire screen width for the page (so the background color of the
104 * body is not visible anywhere). */
106 background-color: var(--outside-page-bg-color);
110 background-color: var(--text-bg-color);
113 /* For a small screen (in either width or height) change the
114 * background of the body element to white so the application always
115 * appears as if it is "full screen".
117 @media screen and (max-width: 500px) and (max-height: 860px) {
119 background-color: var(--text-bg-color);
123 /* We never let the page content get larger than a large fixed width.
125 * And when the screen is wide enough, we can afford some "wasted"
126 * space on either side of the page content, (up to --page-max-pad).
128 * Note: This --page-max-width-padded for the page includes the
129 * padding so the actual content is only ever as wide as
132 * Wider than that and we start to see the background on either side
133 * of the page content.
136 max-width: var(--page-max-width-padded);
145 @media screen and (min-width: var(--page-max-width)) and (max-width: var(--page-max-width-padded)) {
147 padding-left: calc(1em + (100% - var(--page-max-width))/2);
148 padding-right: calc(1em + (100% - var(--page-pax-width))/2);
152 @media screen and (min-width: var(--page-pax-width-padded)) {
154 padding-left: calc(1em + var(--page-max-pad));
155 padding-right: calc(1em + var(--page-max-pad));
159 /* The calculations for height are different. We don't have any
160 * vertical centering, so instead we have only some fixed padding on
161 * the top. Then, the margin which allows the background to be visible
162 * on the top and bottom starts appearing at a viewport height of 648
163 * and tops out at a size of 36px.
170 @media screen and (min-height: 648px) and (max-height: 720px) {
172 margin-top: calc((100vh - 648px)/2);
173 margin-bottom: calc((100vh - 648px)/2);
177 @media screen and (min-height: 720px) {
186 |*| Responsive form layout
192 * Within the form, fields can be placed in <div> elements with
193 * class "form-field". Each can also have an additional class of one
194 * of "small", "medium", or "large". These classes will be used to
195 * select either a 1- or 2-column layout for each row depending on the
196 * width of the screen.
198 * Expected layout is as follows:
200 * "large" rows: 1-column on all devices
202 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
203 * 1-column on small display (phones)
205 * "small" rows: 2-column on all devices
207 * Finally, a class of either "left" or "right" will select which
208 * column the field should appear in for fields that end up in 2
214 grid-template-columns: 1fr 1fr;
215 grid-column-gap: 1em;
218 .form-field.small.left,.form-field.medium.left {
219 grid-column-start: 1;
222 .form-field.small.right,.form-field.medium.right {
223 grid-column-start: 2;
227 grid-column-start: 1;
228 grid-column-end: span 2;
231 /* For a narrow screen, use a single-column for medium form fields. */
232 @media screen and (max-width: 600px) {
233 .form-field.medium.left,.form-field.medium.right {
234 grid-column-start: 1;
235 grid-column-end: span 2
241 |*| Styling for form input fields
250 box-sizing: border-box;
255 border: 1px solid var(--accent-color);
260 border: 2px solid var(--accent-color-bright);
264 display: inline-block;
266 background-color: var(--accent-color);
268 color: var(--text-fg-on-accent);
273 padding-bottom: 0.25em;
284 @media (hover:hover) {
286 transform: translateY(-1px);
287 background-color: var(--accent-color-bright);
301 |*| Styling for a message area
305 /* Default message severity is "info" but can be overriden. */
308 background-color: var(--accent-color-bright);
311 margin-bottom: 0.5em;
318 background-color: var(--accent-color-bright);
322 background-color: var(--warning-color);
326 background-color: var(--danger-color);
339 @media (hover:hover) {
341 color: var(--danger-color-dark);
347 |*| Game-specific markup
351 .game-id, .players-header {