You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The compete page on resources hub utilized custom River components. Those components have been switched out for React Brand in this PR. I noted some pain points in the process and creating this issue as a result. The primary paint point involved needing to override this css targeting the image:
This means the only way to override this rule is with !important
Potential Remedies
Change the stylelint specification (recommended)
Update the CSS to follow the stylelint
No className prop:
I believe River.Content & River.Visual should accept a className prop. This can be addressed in a PR for Suggested new default props #42 if you agree.
In conjunction with no className prop, only Text, Heading and Link are allowed in River.Content, so there isn't an option to include an internal wrapper to target (e.g. wrapper Header and Text in div).
Thoughts on align prop
What it does: Alignment of text content relative to the Visual position
How I would expect alignment to be handled: Order of props. e.g.
Convert the img and video default selector to a class name, which will enable normal overriding
On align prop, I agree it would feel like a more composable API, but there are reasons why it's this way. Having an align prop will help us infer reading direction for localisation. The DOM nodes themselves are also ordered using this mechanism. Also in a bid to 'sync' our React API to the Figma component, where we need to have an 'align' prop.
If this prop isn't causing major issues right now, I'd recommend we add it to the backlog as a separate Issue so we can circle back to it at the end of the quarter.
Context:
The compete page on resources hub utilized custom River components. Those components have been switched out for React Brand in this PR. I noted some pain points in the process and creating this issue as a result. The primary paint point involved needing to override this css targeting the image:
Issues:
Problem with CSS Specificity:
width: 100%
, etc.!important
Potential Remedies
No
className
prop:River.Content
&River.Visual
should accept aclassName
prop. This can be addressed in a PR for Suggested new default props #42 if you agree.className
prop, onlyText
,Heading
andLink
are allowed inRiver.Content
, so there isn't an option to include an internal wrapper to target (e.g. wrapperHeader
andText
indiv
).Thoughts on
align
propalign="left"
align="right"
center
prop.The text was updated successfully, but these errors were encountered: