Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide margins to Latest Posts excerpts #15760

Merged

Conversation

kjellr
Copy link
Contributor

@kjellr kjellr commented May 21, 2019

Addresses part of #15722.

#14627 added the option for users to display post excerpts and full content to posts within the Latest Posts block. It did not include any styles for that content. This means that excerpts will generally bump up against each other like so:

gutenberg test_wp-admin_post php_post=1 action=edit (2)

This PR adds some top and bottom margin to the excerpt to prevent this visual issue:

gutenberg test_wp-admin_post php_post=1 action=edit (3)

The style is entered into editor.scss so that it's visible in the editor, and to themes that opt-in to opinionated styles. If there's an appetite for it, this could alternatively be included in style.scss instead, so that the margin is supplied by default in all themes. I'm all for that, but figured we can have a discussion here first.

@kjellr
Copy link
Contributor Author

kjellr commented May 21, 2019

Oh, also: It's worth noting that the styles in this PR will not be picked up in the front end today, even if the theme opts into the opinionated styles. That's because the classname for the excerpt is different between the front and back end. More details in #15758.

@jasmussen
Copy link
Contributor

Nice.

Screenshot 2019-05-22 at 09 31 57

First off, I wonder if #15758 should be fixed first, it feels like this one would matter more if that one lands first. And similarly if/when that happens, perhaps these styles are more appropriate in style.scss or theme.scss?

@kjellr
Copy link
Contributor Author

kjellr commented May 22, 2019

First off, I wonder if #15758 should be fixed first, it feels like this one would matter more if that one lands first. And similarly if/when that happens, perhaps these styles are more appropriate in style.scss or theme.scss?

Yep, #15758 has been merged in, so I think we're all good there.

I've moved these to style.css in 1c996c7. I think this is the right place for it personally — It's easy to override, and without the margin it appears broken.

Copy link
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

I'm personally 👍👍 on this.

@kjellr
Copy link
Contributor Author

kjellr commented May 22, 2019

Cool, thanks. I'll merge this in for now then. 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Latest Posts Affects the Latest Posts Block Needs Design Feedback Needs general design feedback.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants