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 820px wide page.
57 * Note: This 820px width for the page includes the padding so the
58 * actual content is only ever as wide as 720px.
60 * Wider than that and we start to see the background on either side
61 * of the page content.
64 box-sizing: border-box;
74 @media screen and (min-width: 620px) and (max-width: 820px) {
76 padding-left: calc(1em + (100% - 820px)/2);
77 padding-right: calc(1em + (100% - 820px)/2);
81 @media screen and (min-width: 820px) {
83 padding-left: calc(1em + 50px);
84 padding-right: calc(1em + 50px);
88 /* The calculations for height are different. We don't have any
89 * vertical centering, so instead we have only some fixed padding on
90 * the top. Then, the margin which allows the background to be visible
91 * on the top and bottom starts appearing at a viewport height of 648
92 * and tops out at a size of 36px.
99 @media screen and (min-height: 648px) and (max-height: 720px) {
101 margin-top: calc((100vh - 648px)/2);
102 margin-bottom: calc((100vh - 648px)/2);
106 @media screen and (min-height: 720px) {
115 |*| Responsive form layout
121 * Within the form, fields can be placed in <div> elements with
122 * class "form-field". Each can also have an additional class of one
123 * of "small", "medium", or "large". These classes will be used to
124 * select either a 1- or 2-column layout for each row depending on the
125 * width of the screen.
127 * Expected layout is as follows:
129 * "large" rows: 1-column on all devices
131 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
132 * 1-column on small display (phones)
134 * "small" rows: 2-column on all devices
136 * Finally, a class of either "left" or "right" will select which
137 * column the field should appear in for fields that end up in 2
143 grid-template-columns: 1fr 1fr;
144 grid-column-gap: 1em;
147 .form-field.small.left,.form-field.medium.left {
148 grid-column-start: 1;
151 .form-field.small.right,.form-field.medium.right {
152 grid-column-start: 2;
156 grid-column-start: 1;
157 grid-column-end: span 2;
160 /* For a narrow screen, use a single-column for medium form fields. */
161 @media screen and (max-width: 600px) {
162 .form-field.medium.left,.form-field.medium.right {
163 grid-column-start: 1;
164 grid-column-end: span 2
170 |*| Styling for form input fields
179 box-sizing: border-box;
183 border: 1px solid #287789;
188 border: 2px solid #44c7ef;
192 display: inline-block;
194 background-color: #287789;
201 padding-bottom: 0.25em;
206 transform: translateY(-1px);
207 background-color: #44c7ef;
220 |*| Styling for a message area
224 /* Default message severity is "info" but can be overriden. */
227 background-color: #44c7ef;
230 margin-bottom: 0.5em;
237 background-color: #44c7ef;
241 background-color: #ffa92a;
245 background-color: #f56257