]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
Add mixin to restore old behavior
authorJames Fenwick <j.fenwick@me.com>
Wed, 1 Nov 2017 12:36:15 +0000 (12:36 +0000)
committerJames Fenwick <j.fenwick@me.com>
Wed, 1 Nov 2017 12:36:15 +0000 (12:36 +0000)
scss/typography/_base.scss
scss/typography/_helpers.scss

index 20e5f0656f49dc73f1a19bc0c88553bf8f15a1ce..fc04a1514540ce3a533070134a8702b850a51651 100644 (file)
@@ -215,18 +215,10 @@ $blockquote-padding: rem-calc(9 20 0 19) !default;
 /// @type List
 $blockquote-border: 1px solid $medium-gray !default;
 
-/// Font size for `<cite>` elements.
-/// @type Number
-$cite-font-size: rem-calc(13) !default;
-
 /// Text color for `<cite>` elements.
 /// @type Color
 $cite-color: $dark-gray !default;
 
-/// Pseudo content for `<cite>` elements.
-/// @type String
-$cite-pseudo-content: '\2014 \0020' !default;
-
 /// Font family for `<kbd>` elements.
 /// @type String | List
 $keystroke-font: $font-family-monospace !default;
@@ -458,12 +450,7 @@ $abbr-underline: 1px dotted $black !default;
 
     // Citations
     cite {
-      display: block;
-      font-size: $cite-font-size;
-
-      &:before {
-        content: $cite-pseudo-content;
-      }
+      @include block-citation;
     }
   }
 
index f34ac03ac4c1b7077c845411d7aa9c4afbacd86f..7f05f0d651a6c82a2727a176a29668542f06eb12 100644 (file)
@@ -6,6 +6,15 @@
 /// @group typography-helpers
 ////
 
+
+/// Font size for `<cite>` elements.
+/// @type Number
+$cite-font-size: rem-calc(13) !default;
+
+/// Pseudo content for `<cite>` elements.
+/// @type String
+$cite-pseudo-content: '\2014 \0020' !default;
+
 /// Default font size for lead paragraphs.
 /// @type Number
 $lead-font-size: $global-font-size * 1.25 !default;
@@ -78,3 +87,13 @@ $stat-font-size: 2.5rem !default;
     }
   }
 }
+
+@mixin block-citation {
+  // Use to restore the block version of cite elements
+  display: block;
+  font-size: $cite-font-size;
+
+  &:before {
+    content: $cite-pseudo-content;
+  }
+}