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

[Varya] Refine quote and pullquote block styles #32

Merged
merged 12 commits into from
Apr 3, 2020
Merged

Conversation

jffng
Copy link
Contributor

@jffng jffng commented Mar 31, 2020

This PR adjusts the quote and pullquote block styles to match the design comps.

Before
Screen Shot 2020-03-31 at 2 05 02 PM

After
Screen Shot 2020-03-31 at 2 04 42 PM

--pullquote--color-border: var(--global--color-foreground);
--pullquote--font-size: var(--heading--font-size-h2);
--pullquote--font-style: italic;
--pullquote--line-height: var(--global--line-height-heading);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added two variables here, not entirely sure if they're necessary.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, I like the line-height variable. The italic one might be useful too, but just need to be careful that it doesn’t interfere with any inline-italic rules set by the users (which may be a problem already).

@@ -35,7 +35,7 @@
/* Line Height */
--global--line-height-base: 1;
--global--line-height-body: 1.7;
--global--line-height-heading: 1.125;
--global--line-height-heading: 1.3;
Copy link
Contributor Author

@jffng jffng Mar 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I adjusted the value of this global variable to match the H1 - H3 line height from the comps.

The line heights for the headings overall need to be revisited in a follow-up PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coool. Makes sense 👍

@jffng jffng requested review from allancole and kjellr March 31, 2020 18:11
@kjellr
Copy link
Contributor

kjellr commented Mar 31, 2020

Any chance we can adjust the top and bottom margins here so that they appear about the same as the left/right margins on the block?

Screen Shot 2020-03-31 at 3 11 54 PM

I think that's because of the line height of the quote, but we should be able to compensate for it somehow.

Copy link
Contributor

@kjellr kjellr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start! A few changes though:


Right-aligned block quotes lose the border treatment:

Screen Shot 2020-04-01 at 10 32 16 AM


In the editor, most of these do not match their front-end appearance. We should always make sure to sync these up whenever we make changes to one or the other:

Screen Shot 2020-04-01 at 10 42 34 AM

Screen Shot 2020-04-01 at 10 33 02 AM


Also, the spacing in all these cases is a little more than I think we need. The left padding here is 2x the global spacing base. Let's reduce that to 1x:

Screen Shot 2020-04-01 at 10 36 03 AM

And for this pullquote variation, the all-around padding is currently 3x the spacing base. Let's reduce that to 2x.

Screen Shot 2020-04-01 at 10 41 37 AM

@jffng
Copy link
Contributor Author

jffng commented Apr 1, 2020

I made the following changes:

  • Removed the border and padding on right-aligned quote blocks:

Screen Shot 2020-04-01 at 4 12 13 PM

  • Refined the alignwide and alignfull treatments on the pullquote block:

Screen Shot 2020-04-01 at 4 13 43 PM

  • Matched the editor styles and front-end styles for those variations

Copy link
Collaborator

@allancole allancole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good just have one question/comment before decide on merging this one :-)

line-height: var(--global--line-height-h3);
font-size: var(--quote--font-size-large);
font-style: normal;
line-height: 1.6;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does line-height need to be connected to a variable here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be.

I connected it to --global--line-height-body, which is 1.7 even though the comps suggest 1.6 for this specific element.

We can revisit this after #37.

@jffng
Copy link
Contributor Author

jffng commented Apr 2, 2020

Right-aligned block quotes lose the border treatment:

@kjellr I may have misinterpreted this feedback. Are the right-aligned block quotes supposed to retain a right border?

@kjellr
Copy link
Contributor

kjellr commented Apr 2, 2020

I may have misinterpreted this feedback. Are the right-aligned block quotes supposed to retain a right border?

Yep! Sorry that wasn't clear. They should retain the single-pixel red border, just have it swapped over to the right side.

@jffng
Copy link
Contributor Author

jffng commented Apr 2, 2020

Cool, I restored the right aligned border. This is ready for another review.

@jffng jffng requested a review from kjellr April 2, 2020 21:28
@kjellr
Copy link
Contributor

kjellr commented Apr 3, 2020

Looks good! I noticed a very minor bug: font sizes for the citations should be --global--font-size-xs instead of --global--font-size-sm. I've made that change, and will merge this in. 👍

@kjellr kjellr merged commit e869a7b into master Apr 3, 2020
@kjellr kjellr deleted the update/quote-styles branch April 3, 2020 01:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants