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

card styles #468

Merged
merged 2 commits into from
Jan 9, 2024
Merged

card styles #468

merged 2 commits into from
Jan 9, 2024

Conversation

mbostock
Copy link
Member

@mbostock mbostock commented Jan 9, 2024

Extracts the card class from the grid styles such that you can choose or not to apply the “card” style to grid elements. Also adds h2 and h3 styles within cards that can be used to apply a card title and subtitle; these styles are designed to match Plot’s convention.

Screenshot 2024-01-09 at 9 45 03 AM

@mbostock mbostock requested a review from Fil January 9, 2024 17:45
Comment on lines +20 to +26
.grid > * > p:first-child {
margin-top: 0;
}

.grid > * > p:last-child {
margin-bottom: 0;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

I would prefer margin-trim here

.grid > * {
  margin-trim: block;
}

but it’s only supported in Safari so far.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Fil Fil mentioned this pull request Jan 9, 2024
@mbostock mbostock merged commit 245d01f into main Jan 9, 2024
2 checks passed
@mbostock mbostock deleted the mbostock/card branch January 9, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants