Open zeroedin opened 1 month ago
@coreyvickery @marionnegp let us know your thoughts here.
maybe better to make it a provider then
Maybe better to make it a provider then
This was my original thought see comment on the merged PR
Doing so has some inherent problems noted in a super quick test of implementation of adding the provider.
As it stands we two overlapping backgrounds.
rh-card
or rh-surface
etc)Here is my best ascii text representation of current state
| parent context
| | host (context w/ provider)
| | | image background
| | | | play button
| | caption text
|
Currently, the caption exists on the parent context but inside the host. So just adding a provider here then will set the caption text color incorrectly. Definitely will have to refactor the way it renders so we can provide support to this.
Can see this issue currently here: https://deploy-preview-1567--red-hat-design-system.netlify.app/elements/video-embed/demo/color-context/
we're in charge of the caption, right? can't we just set a palette background on the host?
because this has to do with images and art direction, we should consider <rh-picture>
as a solution and maybe kick this to cubone
In a dark parent context,
<rh-video-embed>
may be slotted with a 'light' background placeholder image. The dark context set by this parent would cause the<rh-button>
in the shadow root ofrh-video-embed
to adjust its context and display a light play button over top of the light background image.Because the background image sets another layer over the dark background set by the parent context this could cause color contrast issues with low sighted users identifying the play button on this image.
Example:
Possible solutions: