3 |*| Core elements: Sizing and padding
9 font-family: sans-serif;
24 |*| Overall page layout
26 |*| Assumes: Top-level div with id="page" for all content
30 /* Mobile-first: At small sized we have a white background and use the
31 * entire screen width for the page (so the background color of the
32 * body is not visible anywhere). */
34 background-color: #333738;
38 background-color: white;
41 /* For a small screen (in either width or height) change the
42 * background of the body element to white so the application always
43 * appears as if it is "full screen".
45 @media screen and (max-width: 500px) and (max-height: 860px) {
47 background-color: white;
51 /* We never let the page content get larger than a large fixed width.
53 * And when the screen is wide enough, we can afford some "wasted"
54 * space on either side of the page content. This starts at 0 for a
55 * 620px wide page up to 50px on either side for a 720px wide page.
57 * Wider than that and we start to see the background on either side
58 * of the page content.
61 box-sizing: border-box;
71 @media screen and (min-width: 620px) and (max-width: 720px) {
73 padding-left: calc(1em + (100% - 620px)/2);
74 padding-right: calc(1em + (100% - 620px)/2);
78 @media screen and (min-width: 720px) {
80 padding-left: calc(1em + 50px);
81 padding-right: calc(1em + 50px);
85 /* The calculations for height are different. We don't have any
86 * vertical centering, so instead we have only some fixed padding on
87 * the top. Then, the margin which allows the background to be visible
88 * on the top and bottom starts appearing at a viewport height of 648
89 * and tops out at a size of 36px.
96 @media screen and (min-height: 648px) and (max-height: 720px) {
98 margin-top: calc((100vh - 648px)/2);
99 margin-bottom: calc((100vh - 648px)/2);
103 @media screen and (min-height: 720px) {
112 |*| Responsive form layout
118 * Within the form, fields can be placed in <div> elements with
119 * class "form-field". Each can also have an additional class of one
120 * of "small", "medium", or "large". These classes will be used to
121 * select either a 1- or 2-column layout for each row depending on the
122 * width of the screen.
124 * Expected layout is as follows:
126 * "large" rows: 1-column on all devices
128 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
129 * 1-column on small display (phones)
131 * "small" rows: 2-column on all devices
133 * Finally, a class of either "left" or "right" will select which
134 * column the field should appear in for fields that end up in 2
140 grid-template-columns: 1fr 1fr;
141 grid-column-gap: 1em;
144 .form-field.small.left,.form-field.medium.left {
145 grid-column-start: 1;
148 .form-field.small.right,.form-field.medium.right {
149 grid-column-start: 2;
153 grid-column-start: 1;
154 grid-column-end: span 2;
157 /* For a narrow screen, use a single-column for medium form fields. */
158 @media screen and (max-width: 600px) {
159 .form-field.medium.left,.form-field.medium.right {
160 grid-column-start: 1;
161 grid-column-end: span 2
167 |*| Styling for form input fields
176 box-sizing: border-box;
180 border: 1px solid #287789;
185 border: 2px solid #44c7ef;
189 display: inline-block;
191 background-color: #287789;
198 padding-bottom: 0.25em;
203 transform: translateY(-1px);
204 background-color: #44c7ef;
217 |*| Styling for a message area
221 /* Default message severity is "info" but can be overriden. */
224 background-color: #44c7ef;
227 margin-bottom: 0.5em;
234 background-color: #44c7ef;
238 background-color: #ffa92a;
242 background-color: #f56257