Lay out the publishing forms in one column on phones.
Below 600px: labels above full-width inputs, 44px touch targets, 16px text, and the tabs on the top border of the story box.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
input {
|
||||
font-family: "Noto Sans", "Verdana", sans-serif;
|
||||
}
|
||||
input[type=checkbox] {
|
||||
accent-color: #006633;
|
||||
}
|
||||
#main .grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(75px, 125px) auto;
|
||||
@@ -178,3 +181,148 @@ ul.error-box li {
|
||||
position:relative;
|
||||
top:0.6em;
|
||||
}
|
||||
|
||||
/*
|
||||
* Phones: one column, with each label above its input. The inputs, the
|
||||
* editor and the image box take the full width, the controls are at
|
||||
* least 44px high for fingers, and the text is at least 16px, so that
|
||||
* iOS does not zoom in when an input gets the focus.
|
||||
*/
|
||||
@media (max-width: 600px) {
|
||||
#main .grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
#main .grid > * {
|
||||
min-width: 0;
|
||||
}
|
||||
#main .grid > .leftcolumn {
|
||||
display: none;
|
||||
}
|
||||
#main .grid > label {
|
||||
width: auto;
|
||||
margin-top: 14px;
|
||||
padding-right: 0;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
}
|
||||
#main .grid > .rightcolumn {
|
||||
margin-top: 4px;
|
||||
align-self: stretch;
|
||||
}
|
||||
/* The star of a required field goes inside the right end of the input,
|
||||
so that all the inputs have the same width */
|
||||
#main .grid > .rightcolumn:has(.required) {
|
||||
position: relative;
|
||||
}
|
||||
#main .grid .rightcolumn > input:has(+ .required) {
|
||||
padding-right: 30px;
|
||||
}
|
||||
#main .grid .rightcolumn > .required {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 12px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
#main .grid .rightcolumn > input {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
width: auto;
|
||||
min-height: 44px;
|
||||
padding: 8px 12px;
|
||||
font-size: 16px;
|
||||
}
|
||||
#main .grid .rightcolumn input#remember,
|
||||
#main .grid #hidden {
|
||||
flex: none;
|
||||
width: 24px;
|
||||
min-height: 24px;
|
||||
height: 24px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
#main .grid > div.note {
|
||||
margin-top: 4px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* The Text and Image tabs sit in a row on the top border of the story
|
||||
box, as they touch its left border on a wide screen. They start after
|
||||
its round corner. */
|
||||
#main .tabs {
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
gap: 6px;
|
||||
padding-top: 18px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
#main .tab {
|
||||
min-height: 44px;
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 10px 18px;
|
||||
border-radius: 8px 8px 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
#main .counter {
|
||||
margin: 0 0 6px auto;
|
||||
padding-right: 0;
|
||||
}
|
||||
#main .grid > .textarea {
|
||||
width: 100%;
|
||||
margin-top: 0;
|
||||
}
|
||||
#main .grid .textarea .note {
|
||||
margin-top: 6px;
|
||||
text-align: left;
|
||||
}
|
||||
#main .grid #textparent {
|
||||
min-height: 0;
|
||||
}
|
||||
#uploadparent {
|
||||
height: auto;
|
||||
min-height: 200px;
|
||||
}
|
||||
#main .grid #uploadparent {
|
||||
min-height: 200px;
|
||||
}
|
||||
#uploadparent input[type=file] {
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
min-height: 44px;
|
||||
font-size: 16px;
|
||||
}
|
||||
#uploadparent input[type=file]::file-selector-button {
|
||||
min-height: 44px;
|
||||
margin-right: 10px;
|
||||
padding: 8px 16px;
|
||||
border: 1px solid #006633;
|
||||
border-radius: 6px;
|
||||
background-color: #ffffff;
|
||||
color: #006633;
|
||||
font: bold 16px "Noto Sans", "Verdana", sans-serif;
|
||||
}
|
||||
|
||||
#main .grid div.g-recaptcha {
|
||||
grid-column: auto;
|
||||
margin: 18px 0 0;
|
||||
}
|
||||
|
||||
#main .submission {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 18px;
|
||||
}
|
||||
#main .submission button {
|
||||
min-height: 44px;
|
||||
margin: 0;
|
||||
padding: 8px 20px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
ul.error-box {
|
||||
padding: 10px 16px 10px 20px;
|
||||
}
|
||||
ul.error-box li {
|
||||
margin: 4px 0 4px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user