Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
Varya: Improve line-height support heirachy so that it accepts line-h…
Browse files Browse the repository at this point in the history
…eight customization without impacting other line-heights in the system.
  • Loading branch information
allancole committed Apr 8, 2020
1 parent 78f0534 commit a605f20
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 12 deletions.
4 changes: 4 additions & 0 deletions varya/assets/css/style-editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@ dt {
color: currentColor;
}

p {
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

p.has-background {
padding: var(--global--spacing-unit);
}
Expand Down
12 changes: 6 additions & 6 deletions varya/assets/sass/blocks/heading/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,35 @@ h6, .h6 {
h1, .h1 {
font-size: var(--heading--font-size-h1);
letter-spacing: var(--heading--letter-spacing-h1);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h2, .h2 {
font-size: var(--heading--font-size-h2);
letter-spacing: var(--heading--letter-spacing-h2);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h3, .h3 {
font-size: var(--heading--font-size-h3);
letter-spacing: var(--heading--letter-spacing-h3);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h4, .h4 {
font-size: var(--heading--font-size-h4);
letter-spacing: var(--heading--letter-spacing-h4);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h5, .h5 {
font-size: var(--heading--font-size-h5);
letter-spacing: var(--heading--letter-spacing-h5);
line-height: var(--global--line-height-body);
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

h6, .h6 {
font-size: var(--heading--font-size-h6);
letter-spacing: var(--heading--letter-spacing-h6);
line-height: var(--global--line-height-body);
line-height: var(--wp--typography--line-height, --global--line-height-body);
}
2 changes: 2 additions & 0 deletions varya/assets/sass/blocks/paragraph/_editor.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
p {
line-height: var(--wp--typography--line-height, --global--line-height-body);

&.has-background {
padding: var(--global--spacing-unit);

Expand Down
3 changes: 3 additions & 0 deletions varya/assets/sass/blocks/paragraph/_style.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
p {

line-height: var(--wp--typography--line-height, --global--line-height-body);

// inherits general font style set at <body>
&.has-background {
padding: var(--global--spacing-unit);
Expand Down
4 changes: 4 additions & 0 deletions varya/style-rtl.css
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,10 @@ dd {
}
}

p {
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

p.has-background {
padding: var(--global--spacing-unit);
}
Expand Down
16 changes: 10 additions & 6 deletions varya/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1798,37 +1798,37 @@ h6 strong, .h6 strong {
h1, .h1 {
font-size: var(--heading--font-size-h1);
letter-spacing: var(--heading--letter-spacing-h1);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h2, .h2 {
font-size: var(--heading--font-size-h2);
letter-spacing: var(--heading--letter-spacing-h2);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h3, .h3 {
font-size: var(--heading--font-size-h3);
letter-spacing: var(--heading--letter-spacing-h3);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h4, .h4 {
font-size: var(--heading--font-size-h4);
letter-spacing: var(--heading--letter-spacing-h4);
line-height: var(--heading--line-height);
line-height: var(--wp--typography--line-height, --heading--line-height);
}

h5, .h5 {
font-size: var(--heading--font-size-h5);
letter-spacing: var(--heading--letter-spacing-h5);
line-height: var(--global--line-height-body);
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

h6, .h6 {
font-size: var(--heading--font-size-h6);
letter-spacing: var(--heading--letter-spacing-h6);
line-height: var(--global--line-height-body);
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

.wp-block-image {
Expand Down Expand Up @@ -2123,6 +2123,10 @@ dd {
}
}

p {
line-height: var(--wp--typography--line-height, --global--line-height-body);
}

p.has-background {
padding: var(--global--spacing-unit);
}
Expand Down

0 comments on commit a605f20

Please sign in to comment.