Skip to content

Commit

Permalink
style: improve mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Jun 21, 2023
1 parent 20a2891 commit f2b57c9
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 6 deletions.
10 changes: 8 additions & 2 deletions src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,18 @@
}
h1 {
font-size: 2rem;
font-size: 1.5rem;
text-align: center;
margin: 0.15em 0;
margin: 0.3em 0;
white-space: nowrap;
}
@media (min-width: 350px) {
h1 {
font-size: 2rem;
}
}
@media (min-width: 450px) {
h1 {
font-size: 3rem;
Expand Down
22 changes: 19 additions & 3 deletions src/lib/components/Nav.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
div {
max-width: 40em;
padding: 0.5em 2em;
padding: 0.5em 1em;
display: flex;
flex: 1;
Expand All @@ -38,18 +38,34 @@
ul {
list-style: none;
display: flex;
justify-content: center;
width: 100%;
flex-direction: column;
justify-content: stretch;
align-items: center;
padding: 0;
gap: 0.5em;
}
li {
width: 100%;
}
@media (min-width: 450px) {
div {
padding: 0.5em 2em;
}
ul {
flex-direction: row;
}
}
a {
display: block;
background-color: rgb(227, 222, 213);
border: 0.25em solid rgb(216, 216, 216);
padding: 0.25em 0.5em;
min-width: 10ch;
min-width: 12ch;
text-decoration: none;
font-weight: 600;
text-align: center;
Expand Down
8 changes: 7 additions & 1 deletion src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,15 @@
div {
width: min(100%, 40em);
padding: 2em;
padding: 1em;
margin-top: 1em;
margin-bottom: 2em;
flex: 1;
}
@media (min-width: 450px) {
div {
padding: 2em;
}
}
</style>

0 comments on commit f2b57c9

Please sign in to comment.