From 62499873f39ba47cc371a10a69f6d129154dc06b Mon Sep 17 00:00:00 2001 From: Caroline Horn <549577+cchaos@users.noreply.github.com> Date: Sat, 23 Mar 2019 12:08:08 -0400 Subject: [PATCH] [7.0] Reset heading and p tags to EUI font reset (#33717) --- src/legacy/server/sass/build.test.js | 21 ++++++++++++++++--- .../ui/public/styles/_styling_constants.scss | 8 +++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/src/legacy/server/sass/build.test.js b/src/legacy/server/sass/build.test.js index 810b7cb44b917..5d78dad38eef2 100644 --- a/src/legacy/server/sass/build.test.js +++ b/src/legacy/server/sass/build.test.js @@ -47,7 +47,12 @@ it('builds light themed SASS', async () => { expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2')) .toMatchInlineSnapshot(` -"foo bar { +"h1, h2, h3, h4, h5, h6, p { + font-family: inherit; + font-weight: 400; + font-size: 16px; } + +foo bar { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -72,7 +77,12 @@ it('builds dark themed SASS', async () => { expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2')) .toMatchInlineSnapshot(` -"foo bar { +"h1, h2, h3, h4, h5, h6, p { + font-family: inherit; + font-weight: 400; + font-size: 16px; } + +foo bar { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -101,7 +111,12 @@ it('rewrites url imports', async () => { expect(readFileSync(targetPath, 'utf8').replace(/(\/\*# sourceMappingURL=).*( \*\/)/, '$1...$2')) .toMatchInlineSnapshot(` -"foo bar { +"h1, h2, h3, h4, h5, h6, p { + font-family: inherit; + font-weight: 400; + font-size: 16px; } + +foo bar { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; diff --git a/src/legacy/ui/public/styles/_styling_constants.scss b/src/legacy/ui/public/styles/_styling_constants.scss index 74fc54b410285..a3b83c1ea3950 100644 --- a/src/legacy/ui/public/styles/_styling_constants.scss +++ b/src/legacy/ui/public/styles/_styling_constants.scss @@ -8,4 +8,12 @@ @import '@elastic/eui/src/global_styling/variables/index'; @import '@elastic/eui/src/global_styling/mixins/index'; +// TEMP HACK FOR 7.0, will be fixed in EUI in 7.1+ +// Resets non EuiText headers font styles +h1, h2, h3, h4, h5, h6, p { + font-family: inherit; + font-weight: $euiFontWeightRegular; + font-size: $euiFontSize; +} + @import './mixins';