-
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
Darkmode – Avatar 👤 #9257
Darkmode – Avatar 👤 #9257
Conversation
Size Change: -10.4 kB (-1%) Total Size: 1.41 MB
ℹ️ View Unchanged
|
748a4d9
to
d58f54a
Compare
dd13d46
to
6ad6a66
Compare
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.
Can see there's been a refactor to take format
out of <Avatar>
into a wrapper instead, though feel this makes it slightly tricky to see the changes on GitHub.
Main thing though is this naming convention stuff as I feel it's best to be consistent whatever we do - do you have strong opinions? Could take it to the team
dotcom-rendering/src/palette.ts
Outdated
'--background-avatar': { | ||
light: backgroundAvatarLight, | ||
dark: backgroundAvatarDark, | ||
}, | ||
'--background-article': { | ||
light: backgroundArticleLight, | ||
dark: backgroundArticleDark, | ||
}, |
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.
the examples for headline have a different naming convention to these: --background-avatar
vs --avatar-background
.
I think I prefer the original style ie. --avatar-background
but maybe we should confirm as a team which way we want to go. Having a mixture is a bit confusing
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 followed the pattern established in AR of splitting specific colour functions by type such as “text”, “background”, “line”, etc.
I can see that as this approach is not nested, it may be more accurate to organise things by themes such as “star”, “avatar”, “card”, etc.
Emoji react:
- 🎉 type (what we did in AR / DCR previously)
- 🚀 themes (what you’re suggesting @cemms1 & @sophie-macmillan, and is growing on me)
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 I hadn't really thought about how to best organise all of the colours! I was mainly pointing out the naming convention. Feel like we might need a discussion about organising the palette functions in the not-too-distant-future as it's gonna get big!
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.
Naming ≈ Organising 😉
This is a necessity! |
6ad6a66
to
c2ac125
Compare
c2ac125
to
7d445ee
Compare
439769c
to
321b824
Compare
6723632
to
4e2e075
Compare
6d5b97e
to
7d96ead
Compare
d5e0afb
to
db63046
Compare
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.
From the chromatic diffs it looks like the introduction of FormatBoundary
has broken the card styling. They should be full height, but the additional div has broken that!
bb71816
to
85dad4a
Compare
85dad4a
to
b6059ec
Compare
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.
Changes addressed thanks!
simplified via the use of the new CSS var palette
Rich links may not share the same format as the article that they are on, so we need to override the CSS custom properties when there is an Avatar, e.g. on Opinion pieces.
currently unused
link to relevant issue
ensure that all descendant elements are styled correctly
this ensures that this component does not break existing layouts. For more information, see: https://developer.mozilla.org/en-US/docs/Web/CSS/display-box#contents Support is good, accessibility issues do not impact this `div` element: https://caniuse.com/css-display-contents
b6059ec
to
1bb1e19
Compare
What does this change?
Avatar.tsx
decidePalette
’sbackground.avatar
Why?
Closes #9238
Screenshots