From 941403694a011eccfee3530942ed86ba8bb5a3ab Mon Sep 17 00:00:00 2001 From: Bashu Naimi-Roy Date: Thu, 28 May 2020 04:01:04 -0400 Subject: [PATCH] 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
to
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 --- .../components/table-of-content-item.njk | 4 +- .../_includes/components/table-of-content.njk | 2 +- 11ty/_includes/layouts/documentation.njk | 2 +- 11ty/index.njk | 42 ++++++++------- assets/css/base.scss | 1 + assets/css/base/_helpers.scss | 7 --- assets/css/base/_typography.scss | 30 +++++------ assets/css/components/_flag.scss | 37 ++++++------- assets/css/layouts/_homepage.scss | 7 +++ assets/css/structures/_grid.scss | 27 +++++----- assets/css/structures/_header.scss | 53 +++++-------------- 11 files changed, 88 insertions(+), 124 deletions(-) create mode 100644 assets/css/layouts/_homepage.scss diff --git a/11ty/_includes/components/table-of-content-item.njk b/11ty/_includes/components/table-of-content-item.njk index 7d20b6fb..6397eca0 100644 --- a/11ty/_includes/components/table-of-content-item.njk +++ b/11ty/_includes/components/table-of-content-item.njk @@ -4,12 +4,12 @@ definition.data.flag and definition.data.flag.text and (definition.data.flag.level == 'avoid') -%} - {{ definition.data.flag.text }} + {{ definition.data.flag.text }} {%- elseif definition.data.flag and definition.data.flag.text and (definition.data.flag.level == 'warning') -%} - {{ definition.data.flag.text }} + {{ definition.data.flag.text }} {% endif %} {%- if definition.data.sub_terms -%}
    diff --git a/11ty/_includes/components/table-of-content.njk b/11ty/_includes/components/table-of-content.njk index 313ea547..bb1b265a 100644 --- a/11ty/_includes/components/table-of-content.njk +++ b/11ty/_includes/components/table-of-content.njk @@ -1,4 +1,4 @@ -
    +

    Terms