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;
69 @media screen and (min-width: 620px) and (max-width: 720px) {
71 padding-left: calc((100% - 620px)/2);
72 padding-right: calc((100% - 620px)/2);
76 @media screen and (min-width: 720px) {
83 /* The calculations for height are different. We don't have any
84 * vertical centering, so instead we have only some fixed padding on
85 * the top. Then, the margin which allows the background to be visible
86 * on the top and bottom starts appearing at a viewport height of 648
87 * and tops out at a size of 36px.
94 @media screen and (min-height: 648px) and (max-height: 720px) {
96 margin-top: calc((100vh - 648px)/2);
97 margin-bottom: calc((100vh - 648px)/2);
101 @media screen and (min-height: 720px) {
110 |*| Responsive form layout
116 * Within the form, fields can be placed in <div> elements with
117 * class "form-field". Each can also have an additional class of one
118 * of "small", "medium", or "large". These classes will be used to
119 * select either a 1- or 2-column layout for each row depending on the
120 * width of the screen.
122 * Expected layout is as follows:
124 * "large" rows: 1-column on all devices
126 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
127 * 1-column on small display (phones)
129 * "small" rows: 2-column on all devices
131 * Finally, a class of either "left" or "right" will select which
132 * column the field should appear in for fields that end up in 2
138 grid-template-columns: 49% 49%;
142 .form-field.small.left,.form-field.medium.left {
143 grid-column-start: 1;
146 .form-field.small.right,.form-field.medium.right {
147 grid-column-start: 2;
151 grid-column-start: 1;
152 grid-column-end: span 2;
155 /* For a narrow screen, use a single-column for medium form fields. */
156 @media screen and (max-width: 600px) {
157 .form-field.medium.left,.form-field.medium.right {
158 grid-column-start: 1;
159 grid-column-end: span 2