Skip to content

Commit

Permalink
[7.0] Reset heading and p tags to EUI font reset (#33717)
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos authored Mar 23, 2019
1 parent 56352b2 commit 6249987
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
21 changes: 18 additions & 3 deletions src/legacy/server/sass/build.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions src/legacy/ui/public/styles/_styling_constants.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';

0 comments on commit 6249987

Please sign in to comment.