mirror of
https://koodu.h-i.works/projects/thebadspace
synced 2025-05-06 14:41:02 -05:00
refactor: rework the search form with CSS Grid
This commit is contained in:
parent
04ac27ea04
commit
fed8748923
@ -18,38 +18,57 @@ section.start a.search-link {
|
||||
}
|
||||
|
||||
form.index-search-form {
|
||||
display: grid;
|
||||
grid-template-columns: auto max-content;
|
||||
gap: 15px;
|
||||
width: 80%;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
padding: 30px 0;
|
||||
}
|
||||
|
||||
form.index-search-form > input,
|
||||
form.index-search-form > button {
|
||||
display: block;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
form.index-search-form > input:focus {
|
||||
color: var(--white);
|
||||
}
|
||||
|
||||
form.index-search-form > input[type="text"] {
|
||||
width: 88%;
|
||||
height: 50px;
|
||||
font: 44px var(--base-type);
|
||||
}
|
||||
|
||||
form.index-search-form > input[type="hidden"] {
|
||||
/* This removes it from the grid calculations */
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
form.index-search-form > button {
|
||||
height: 60px;
|
||||
display: grid;
|
||||
grid-template-columns: auto;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
width: 60px;
|
||||
position: relative;
|
||||
top: 9px;
|
||||
right: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
form.index-search-form > button > svg {
|
||||
justify-self: center;
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
form.index-search-form > button > label {
|
||||
font-weight: 500;
|
||||
top: 15px;
|
||||
position: relative;
|
||||
font-size: 1.5em;
|
||||
form.index-search-form > button > span {
|
||||
display: none;
|
||||
margin-top: 3px;
|
||||
font-weight: 500;
|
||||
font-size: 1.5em;
|
||||
}
|
||||
|
||||
::placeholder {
|
||||
@ -89,33 +108,34 @@ table.index-meta td {
|
||||
|
||||
@media only screen and (max-width: 800px) {
|
||||
form.index-search-form > input[type="text"] {
|
||||
width: 85%;
|
||||
height: 50px;
|
||||
font: 34px var(--base-type);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 650px) {
|
||||
form.index-search-form > input[type="text"] {
|
||||
width: 80%;
|
||||
height: 50px;
|
||||
font: 34px var(--base-type);
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
form.index-search-form {
|
||||
grid-template-columns: auto;
|
||||
}
|
||||
form.index-search-form > input[type="text"] {
|
||||
width: 99%;
|
||||
height: 50px;
|
||||
font: 27px var(--base-type);
|
||||
}
|
||||
|
||||
form.index-search-form > input[type="text"],
|
||||
form.index-search-form > button {
|
||||
width: 99%;
|
||||
top: 15px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
form.index-search-form > button > label {
|
||||
display: inline;
|
||||
form.index-search-form > button {
|
||||
grid-template-columns: auto 60px;
|
||||
}
|
||||
|
||||
form.index-search-form > button span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user