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 /* We never let the page content get larger than a large fixed width.
43 * And when the screen is wide enough, we can afford some "wasted"
44 * space on either side of the page content. This starts at 0 for a
45 * 620px wide page up to 50px on either side for a 720px wide page.
47 * Wider than that and we start to see the background on either side
48 * of the page content.
51 box-sizing: border-box;
59 @media screen and (min-width: 620px) and (max-width: 720px) {
61 padding-left: calc((100% - 620px)/2);
62 padding-right: calc((100% - 620px)/2);
66 @media screen and (min-width: 720px) {
73 /* The calculations for height are different. We don't have any
74 * vertical centering, so instead we have only some fixed padding on
75 * the top. Then, the margin which allows the background to be visible
76 * on the top and bottom starts appearing at a viewport height of 648
77 * and tops out at a size of 36px.
84 @media screen and (min-height: 648px) and (max-height: 720px) {
86 margin-top: calc((100vh - 648px)/2);
87 margin-bottom: calc((100vh - 648px)/2);
91 @media screen and (min-height: 720px) {
100 |*| Responsive form layout
106 * Within the form, fields can be placed in <div> elements with
107 * class "form-field". Each can also have an additional class of one
108 * of "small", "medium", or "large". These classes will be used to
109 * select either a 1- or 2-column layout for each row depending on the
110 * width of the screen.
112 * Expected layout is as follows:
114 * "large" rows: 1-column on all devices
116 * "medium" rows: 2-column on wide displays (laptop/desktop/tablet)
117 * 1-column on small display (phones)
119 * "small" rows: 2-column on all devices
121 * Finally, a class of either "left" or "right" will select which
122 * column the field should appear in for fields that end up in 2
128 grid-template-columns: 49% 49%;
132 .form-field.small.left,.form-field.medium.left {
133 grid-column-start: 1;
136 .form-field.small.right,.form-field.medium.right {
137 grid-column-start: 2;
141 grid-column-start: 1;
142 grid-column-end: span 2;
145 /* For a narrow screen, use a single-column for medium form fields. */
146 @media screen and (max-width: 600px) {
147 .form-field.medium.left,.form-field.medium.right {
148 grid-column-start: 1;
149 grid-column-end: span 2