Etch component
Review Card 1
A review with its quote, author, source and star rating. Screen readers read the rating as one label, such as "5 out of 5 stars".
Documentation
A review: the quote, the author with a photo, name and role, the source and a star rating.
How to use it
- Set Quote, then the Author group: Image, Name, Role and an optional Link. It's a MAC Author 1 inside.
- Source says where the review comes from, such as "Google". The Rating group's Rating takes 0 to 5. Leave either one empty to hide it.
- The source sits in the card's top right corner. The bottom right corner is a CSS recipe, below. Try it in the preview's Styles tab, then paste it in the site's
mainstylesheet.
Good to know
- The source sits over the card's corner, on a light background, with its corners rounded like the card's. Keep it short, such as the site's name.
- The quote marks come from CSS, so don't type them in the quote.
- The rating shows first but comes last in the markup, so screen readers hear the quote first. It's read as one label, such as "5 out of 5 stars".
--mac-review-card-1-star-sizesets the stars' size.
CSS recipes
The source's outer corner and the opposite one follow the card's radius, --card-radius. A recipe changes every Review Card 1 on the site, those in MAC Reviews 1 too. Paste it in the site's main stylesheet, which Etch prints after the components' styles.
The source at the bottom
For cards that lead with the stars alone, the source in the card's bottom right corner, across from the author.
/* Review Card 1's source in the bottom right corner */
.mac-review-card-1 .mac-review-card-1__source {
inset-block: auto 0;
border-radius: var(--card-radius) 0 var(--card-radius) 0;
}