-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Feature Request]: Add <Layer> to all Carbon containers that change the background-color to $layer #17943
Comments
Thank you for submitting a feature request. Your proposal is open and will soon be triaged by the Carbon team. |
Hi @wkeese, can you elaborate a bit more about this, i.e., would it provide any additional functionality apart from saving users from typing out |
It's like asking: why does Carbon's _tile.scss setting I would like Carbon to just work correctly out-of-the-box, rather than users having to tweak it. In other words, the answer to your question is "no", but it's a strange question, because everything @carbon/react does is to save users from typing out JS or markup. This is no different.
You're asking how users can get a non-standard coloring for the But why are those users contradicting IBM's designated styling for TextInputs? In other words, Carbon should be optimized for the common case. Basically, |
Hey @wkeese, would you be open to attending Carbon Office Hours? This change could have wider implications across the system and we want to make sure we understand this use-case. Thanks! |
Yeah to share some more context, adding For Tile and Tabs there are potential use cases where a Layer is not needed or desired. If we force a layer on these components, there's no way to opt out other than adding 2 more If the office hours discussion still lands on forcing a Layer in these components, we need to consider it's probably a breaking change. For ComposedModal we already had styles in place that made sure layer styles were correct for all the inputs, etc. but Tile and Tabs don't have that. Consumers who have already configured a |
That's really difficult for me, it's literally the middle of the night here.
Can you give some practical examples? The devil is in the details. I saw in https://react.carbondesignsystem.com/?path=/story/components-tile--expandable-with-interactive where the input has the same background as the tile, but (as I said above) it looks like a mistake to me, not a feature. |
The problem
Whenever we use a component like
<Tile>
we need to wrap<Layer>
around the Tile’s contents:This is because _tile.scss sets
background-color: $layer;
... and so you need the
<Layer>
to make child<TextInput>
etc. have a background that contrasts with the Tile's background.Otherwise it ends up looking like this:
The solution
Make Tile, ExpandableTile, and Tabs add Layer when they change the background color.
<Layer>
; that shouldn't be necessary.<Layer level={0}>
and<Layer>
builtin, so it's good.contained
attribute is on the<TabList>
component, but it affects how the<TabPanel>
components renders.Also need to update @carbon/ibm-products' Tearsheet and TearsheetNarrow, but that's a different bugdb.
Examples
Tile
Application/PAL
IKC
Business priority
None
Available extra resources
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: