mirror of
https://github.com/fooflington/selfdefined.git
synced 2025-06-10 21:01:41 +00:00
Style fixes (#144)
* change "title__thicc" classname to "title--thicc" to reflect BEM naming convention * fix indentation in index.njk * add vertical spacing between homepage sections * convert ".help" class to ".box__list" class CSS classes generally shouldn't be related to content * remove duplicate code for .page * change auto-grid class to "auto-fit", from "auto-fill" This reduces unused negative space on screens between 800-1200px wide * use proper BEM practice - block, then modifier class * refactor .flag styles to be more BEM * add BEM block-level class to h1 * refactor box__list to simply "list" * It will be its own component rather than element of the "box" block * Remove duplicate (older) thicc styles from _header.scss * rename .title--thicc to .thicc-headline to be more consistent with other "headline" heading classes * rename another .title--thicc -> .thicc-headline * refactor CSS selector from adjacent to class * refactor the whole header to separate grid layout and typography * remove unneeded grid style * it's not a grid item * remove sub-headline typography from _header.scss and add it to _typography.scss * remove horizontal margin from box below tablet size * noticed that the .box class, which is already squished on 320px wide screens, is more squished because of its margins. * allow headings to wrap if necessary noticed that headings (e.g. "development and build") were blowing out the grid on small screens and causing horizontal scroll * rename subtitle to "sub-headline" * convert <section> to <header> makes more semantic sense for a screen-reader, since this really is the header of the document. * discard heading wrapper element in favour of having just the heading element Co-authored-by: Oscar <ovlb@users.noreply.github.com>
This commit is contained in:
@ -10,7 +10,7 @@
|
||||
display: grid;
|
||||
grid-gap: var(--l-gap);
|
||||
grid-template-columns: repeat(
|
||||
auto-fill,
|
||||
auto-fit,
|
||||
minmax(var(--auto-grid-min-size), 1fr)
|
||||
);
|
||||
}
|
||||
@ -51,23 +51,16 @@
|
||||
grid-template-columns: 1fr 4fr;
|
||||
}
|
||||
|
||||
.page {
|
||||
align-items: start;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
|
||||
& > * {
|
||||
grid-column: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.box {
|
||||
background: black;
|
||||
color: white;
|
||||
grid-column: span 2;
|
||||
height: auto;
|
||||
margin: 1rem 0.5rem;
|
||||
margin: 1rem 0;
|
||||
padding: 1rem;
|
||||
@media (min-width: #{pxToRem(768)}) {
|
||||
margin: 1rem 0.5rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
@ -78,3 +71,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list {
|
||||
margin: 1rem 0;
|
||||
li {
|
||||
margin: 0.75rem 0;
|
||||
}
|
||||
a {
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
@ -1,44 +1,15 @@
|
||||
.title__thicc {
|
||||
// a sensible base font size
|
||||
font-size: 3rem;
|
||||
line-height: 0.75;
|
||||
margin: 0.5rem 0rem;
|
||||
padding: 0;
|
||||
// transform: rotateZ(90deg);
|
||||
// margin: 13rem -7rem;
|
||||
}
|
||||
|
||||
@media (min-width: 51rem) and (min-height: #{pxToRem(400)}) {
|
||||
// a dramatic font size
|
||||
.title__thicc {
|
||||
font-size: 12vh;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 51rem) and (min-height: #{pxToRem(850)}) {
|
||||
// cap the max-height of the title
|
||||
// at the same size that 12vh computes to
|
||||
// when the viewport is 850px high
|
||||
.title__thicc {
|
||||
font-size: 6.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: #{pxToRem(800)}) {
|
||||
.title__thicc {
|
||||
grid-column: 1 / 3;
|
||||
}
|
||||
|
||||
.title__thicc + p {
|
||||
grid-column: 1 / 2;
|
||||
}
|
||||
}
|
||||
|
||||
.sub-headline {
|
||||
font-size: 1.25rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.summary {
|
||||
grid-column: span 2;
|
||||
}
|
||||
|
||||
|
||||
@media (min-width: 800px) {
|
||||
.introduction {
|
||||
&__title {
|
||||
grid-column: 1 / 3;
|
||||
}
|
||||
&__body {
|
||||
grid-column: 1 / 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user