Skip to content

Commit

Permalink
Responsive layout was awful
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-preston committed Jul 4, 2024
1 parent 1c1a6af commit 92d760a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 22 deletions.
4 changes: 2 additions & 2 deletions style/_display.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ img {
}

hr {
margin-top: 2lh;
margin-bottom: 2lh;
margin-top: 1lh;
margin-bottom: 1lh;
}
20 changes: 20 additions & 0 deletions style/_front-page.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
h1 span, p.tag-line span {
display: inline-block;
}

.front-page h1 {
margin-top: 1em;
}

#cover-pic {
margin-top: 1lh;
margin-bottom: 1lh;

& img {
max-height: 70vh;
max-width: 35vw;
width: auto;
margin-left: auto;
margin-right: auto;
}
}
7 changes: 0 additions & 7 deletions style/_index.css

This file was deleted.

18 changes: 6 additions & 12 deletions style/_section_article_aside.css
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@
section {
display: grid;
gap: 1em;
grid-template-columns: repeat(auto-fit, minmax(max(45vw, 30em), 1fr));

& article {
max-width: max(45vw, 30em)
}

&.front-page {
grid-template-columns: repeat(
auto-fit,
minmax(max(45vw, 23em), 1fr)
);
row-gap: 5lh;
}

&:not(.front-page) {
grid-template-columns: repeat(
auto-fit,
minmax(max(45vw, 30em), 1fr)
);
margin-bottom: 2lh;

> article {
max-width: max(45vw, 30em);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion style/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import "./_colours.css";
@import "./_text.css";
@import "./_display.css";
@import "./_index.css";
@import "./_front-page.css";
@import "./_section_article_aside.css";
@import "./_code.css";

0 comments on commit 92d760a

Please sign in to comment.