Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adjust margin styling
  • Loading branch information
jameskoster committed Jul 26, 2024
commit 18af5024ed3dc21a2dd500ab98e4ff27626ac45a
10 changes: 6 additions & 4 deletions packages/edit-site/src/components/page-templates/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@
}
}

.dataviews-view-table {
.page-templates-description {
margin-bottom: $grid-unit-10;
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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;
	}
}

Copy link
Contributor Author

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.

}
}

.page-templates-description {
display: block;
max-width: 50em;
text-wrap: balance; // Fallback for Safari
text-wrap: pretty;

&.is-viewtype-table {
margin-bottom: $grid-unit-10;
}
}

.edit-site-page-templates {
Expand Down