From 34a31bf8c0e0c9769b6897627935f420706d1faa Mon Sep 17 00:00:00 2001 From: Charlotte Payne Date: Tue, 8 Feb 2022 16:49:33 +0000 Subject: [PATCH] Use relative fonts + spacing in live blog posts * For legacy reasons, Origami output typography and spacing in px by default. They provide these flags to over ride this and out put rems. * When `true`, the user will be able to modify their font size using browser settings on FT.com * Reference: https://github.com/Financial-Times/origami/blob/813c8e46d9e6e423fad3a1322d043edc6422cd69/components/o-typography/src/scss/_variables.scss#L5-L12 --- components/x-live-blog-post/src/LiveBlogPost.scss | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/x-live-blog-post/src/LiveBlogPost.scss b/components/x-live-blog-post/src/LiveBlogPost.scss index 62731fec6..c2dfc280f 100644 --- a/components/x-live-blog-post/src/LiveBlogPost.scss +++ b/components/x-live-blog-post/src/LiveBlogPost.scss @@ -2,6 +2,11 @@ @import 'o-spacing/main'; @import 'o-colors/main'; +// Use relative units (rem) not px when outputting typographic and spacing styles. +// For legacy reasons, these default to `false` and Origami outputs px units. +$o-typography-relative-units: true; +$o-spacing-relative-units : true; + .live-blog-post { border-bottom: 1px solid oColorsByName('black-20'); margin-top: oSpacingByName('s8'); @@ -96,7 +101,7 @@ cursor: pointer; } -.live-blog-post:first-child .live-blog-post-controls__back-to-top-link, +.live-blog-post:first-child .live-blog-post-controls__back-to-top-link, .live-blog-post:first-child .live-blog-post-controls__back-to-top-button { display: none; -} \ No newline at end of file +}