From 952a016807d6f594e46d8ddaf953428ab0efbd1d Mon Sep 17 00:00:00 2001 From: David Darnes Date: Wed, 24 Oct 2018 13:50:07 +0100 Subject: [PATCH] Improve presentation of Description Lists Thought the description list could benefit from some CSS Grid powers --- _sass/content.scss | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/_sass/content.scss b/_sass/content.scss index 27635bf..93b2708 100644 --- a/_sass/content.scss +++ b/_sass/content.scss @@ -5,8 +5,7 @@ .page-content { ul, - ol, - dl { + ol { padding-left: 1.5em; } @@ -64,4 +63,27 @@ h1:first-of-type { margin-top: 0.5em; } + + + dl { + display: grid; + grid-template-columns: max-content 1fr; + } + + dt, + dd { + margin: 0.25em 0; + } + + dt { + text-align: right; + &::after { + content: ":"; + } + } + + dd { + margin-left: 1em; + font-weight: 500; + } }