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

Style the Latest Posts block to match the comps #153

Merged
merged 8 commits into from
Sep 28, 2020

Conversation

kjellr
Copy link
Collaborator

@kjellr kjellr commented Sep 25, 2020

Closes #76.

Implements the three Latest Posts block styles as described in #76 (comment).

The screenshots below really showcase how border doesn't work for multi-line links at the moment, but that's a separate issue. 😄

Still to do:

Default

gutenberg test_wp-admin_post php_post=1781 action=edit

Dividers

gutenberg test_wp-admin_post php_post=1783 action=edit

Borders

gutenberg test_wp-admin_post php_post=1790 action=edit

@kjellr kjellr added [Type] Enhancement New feature or request [Component] Default blocks Issues related to adjusting default blocks labels Sep 25, 2020
@kjellr kjellr self-assigned this Sep 25, 2020
@kjellr kjellr changed the title Update/latest posts block Style the Latest Posts block to match the comps Sep 25, 2020
@aristath
Copy link
Member

Overall this looks good to me. I only have 1 reservation... What happens if the post-author selects a dark background color? Would it not be simpler if the border-color was set to currentColor instead of #28303d? From what I can tell that is the color of the text anyway, so visually it wouldn't be any different, and would also account for dark backrounds with light text.

@carolinan
Copy link
Contributor

It is the color of the text by default, but isn't the purpose of using a CSS variable that these two can be set to two different colors?

@aristath
Copy link
Member

It is the color of the text by default, but isn't the purpose of using a CSS variable that these two can be set to two different colors?

Yes, I was just referring to some hardcoded instances of the #28303d color (without using css-variables) for borders in this PR 😄

@kjellr
Copy link
Collaborator Author

kjellr commented Sep 28, 2020

Yes, I was just referring to some hardcoded instances of the #28303d color (without using css-variables) for borders in this PR

I think that's just in the IE stylesheet. All the variables are converted to static values there.

@aristath
Copy link
Member

I think that's just in the IE stylesheet.

Ah you're absolutely right! I somehow missed that 👍

@kjellr
Copy link
Collaborator Author

kjellr commented Sep 28, 2020

  • Remove the right margin on the right-most items in the border version.

I've migrated this item over to be a Gutenberg fix, since it's something that happens by default everywhere: WordPress/gutenberg#25688

@melchoyce
Copy link
Contributor

Looking great so far 👍 Can we figure out a css masonry solution for tiling the Grid + Borders style, or use a flex property so each row of items is the same height?

@melchoyce
Copy link
Contributor

Actually it might just be that the last row's last item has extra padding or something? Anyone else seeing this?

image

@kjellr
Copy link
Collaborator Author

kjellr commented Sep 28, 2020

Can we figure out a css masonry solution for tiling the Grid + Borders style, or use a flex property so each row of items is the same height?

Yeah, I'm taking a look at that. I figured a simple flex-flow: column wrap; should take care of a masonry-like layout, but I forgot that'll only work with a height applied to the container. 🤔 Open to any ideas?

@kjellr
Copy link
Collaborator Author

kjellr commented Sep 28, 2020

Actually it might just be that the last row's last item has extra padding or something? Anyone else seeing this?

@melchoyce should be fixed in that last commit. If this fixes the issue for now and makes each row the same height, I'm happy pushing this for now and following up on the masonry layout later if we can figure it out.

Copy link
Contributor

@melchoyce melchoyce left a comment

Choose a reason for hiding this comment

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

Working on my end, too! Let's merge & iterate.

@melchoyce melchoyce merged commit 4d1de82 into trunk Sep 28, 2020
@kjellr kjellr deleted the update/latest-posts-block branch September 29, 2020 11:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Component] Default blocks Issues related to adjusting default blocks [Type] Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Latest Posts Block
4 participants