-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update template description in table layout #63942
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -7 B (0%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left just two small suggestions but look good to me 👍
@@ -51,8 +51,17 @@ | |||
} | |||
} | |||
|
|||
.dataviews-view-table { | |||
.page-templates-description { | |||
margin-bottom: $grid-unit-10; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be simpler to move this style here. I think the selector .page-templates-description
is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we do this then the margin will also be applied in Grid and List layouts, which we do not want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's true. How about the following? It may be a matter of preference.
.page-templates-description {
max-width: 50em;
text-wrap: balance; // Fallback for Safari
text-wrap: pretty;
.dataviews-view-table & {
margin-bottom: $grid-unit-10;
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh sure, I always forget about that selector.
LGTM 👍 |
What?
Updates some styling details relating to template descriptions in table layout.
Why?
Improves legibility. Currently descriptions will fill the cell which makes the text troublesome to read on large screens.
How?
max-width
to.page-templates-description
.$maximum-text-width
var in_variables.scss
for this purpose as it will likely have applications elsewhere. cc @WordPress/gutenberg-components for thoughts on that.text-wrap: pretty
to take care of typographical widows..page-templates-description
in table layout to centrally align the title + description in the cell.Testing Instructions
Before
After