From 286f16b92c546b96e1aadfb8cae409c34f036087 Mon Sep 17 00:00:00 2001 From: Mark Otto Date: Fri, 12 Jun 2020 14:26:37 -0700 Subject: [PATCH] v5: Redo blockquote attributions (#30814) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * v5: Redo blockquote attributions - Renames -small-* variables to -footer-* - Updates blockquote demos with attribution to place it outside the blockquote with a figure wrapper * Updated class name * docs(examples): refactor blockquotes in masonry example Co-authored-by: Gaƫl Poupard Co-authored-by: XhmikosR --- scss/_type.scss | 13 +++-- scss/_variables.scss | 5 +- site/content/docs/5.0/content/reboot.md | 2 +- site/content/docs/5.0/content/typography.md | 40 +++++++++------ .../docs/5.0/examples/masonry/index.html | 50 +++++++++---------- 5 files changed, 64 insertions(+), 46 deletions(-) diff --git a/scss/_type.scss b/scss/_type.scss index efa2c81552..b2d524ca14 100644 --- a/scss/_type.scss +++ b/scss/_type.scss @@ -84,14 +84,19 @@ // Blockquotes .blockquote { - margin-bottom: $spacer; + margin-bottom: $blockquote-margin-y; @include font-size($blockquote-font-size); + + > :last-child { + margin-bottom: 0; + } } .blockquote-footer { - display: block; - @include font-size($blockquote-small-font-size); - color: $blockquote-small-color; + margin-top: -$blockquote-margin-y; + margin-bottom: $blockquote-margin-y; + @include font-size($blockquote-footer-font-size); + color: $blockquote-footer-color; &::before { content: "\2014\00A0"; // em dash, nbsp diff --git a/scss/_variables.scss b/scss/_variables.scss index 2af7461a00..2e0d0cef67 100644 --- a/scss/_variables.scss +++ b/scss/_variables.scss @@ -447,9 +447,10 @@ $text-muted: $gray-600 !default; $initialism-font-size: $small-font-size !default; -$blockquote-small-color: $gray-600 !default; -$blockquote-small-font-size: $small-font-size !default; +$blockquote-margin-y: $spacer !default; $blockquote-font-size: $font-size-base * 1.25 !default; +$blockquote-footer-color: $gray-600 !default; +$blockquote-footer-font-size: $small-font-size !default; $hr-margin-y: $spacer !default; $hr-color: inherit !default; diff --git a/site/content/docs/5.0/content/reboot.md b/site/content/docs/5.0/content/reboot.md index e9f6dac1af..2af0045740 100644 --- a/site/content/docs/5.0/content/reboot.md +++ b/site/content/docs/5.0/content/reboot.md @@ -397,8 +397,8 @@ The default `margin` on blockquotes is `1em 40px`, so we reset that to `0 0 1rem

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

-
Someone famous in Source Title
+

Someone famous in Source Title

### Inline elements diff --git a/site/content/docs/5.0/content/typography.md b/site/content/docs/5.0/content/typography.md index 0bbe54c427..0ae59b4cda 100644 --- a/site/content/docs/5.0/content/typography.md +++ b/site/content/docs/5.0/content/typography.md @@ -188,19 +188,23 @@ For quoting blocks of content from another source within your document. Wrap `}}
-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

+

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

{{< /example >}} ### Naming a source -Add a `