-
Notifications
You must be signed in to change notification settings - Fork 30
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
Media card alignment #13040
Media card alignment #13040
Conversation
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
Size Change: +41 B (0%) Total Size: 942 kB ℹ️ View Unchanged
|
@@ -450,9 +453,9 @@ export const Card = ({ | |||
- * Media cards have contrasting background colours. We add additional | |||
* padding to these cards to keep the text readable. | |||
- */ | |||
const hasBackgroundColour = isMediaCard(format); | |||
const isMediaCard = isAMediaCard(format); |
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.
This is a better name for this var 👍 I lazily left it alone as it clashed with the method name.
@@ -7,7 +7,7 @@ import { | |||
} from '@guardian/source/foundations'; | |||
import { Hide, Link } from '@guardian/source/react-components'; | |||
import { ArticleDesign, type ArticleFormat } from '../../lib/articleFormat'; | |||
import { isMediaCard } from '../../lib/cardHelpers'; | |||
import { isMediaCard as isAMediaCard } from '../../lib/cardHelpers'; |
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.
Yeah, think I prefer this to what you had earlier (where isAMediaCard
was the const declared on line 456) 👍
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.
Looking through the chromatic diffs they seem good to me, so 👍
Seen on PROD (merged by @abeddow91 15 minutes and 3 seconds ago) Please check your changes! |
What does this change?
Updates the alignment of cards in beta containers if they are media cards. If they are, the image should always be at the top and the headline should always be inner.
Why?
This is as per designs.
Screenshots