Calcite-components: Bug: Conflicting class names in scoped components

Created on 1 Jul 2021  路  4Comments  路  Source: Esri/calcite-components

Actual Behavior

The <div/> rendered inside of calcite-radio-button has a class of "container". This is a very common class name in many apps and may cause conflicting style declarations. This is the case in ArcGIS Monitor.

Can we change the class name to something more specific: "calcite-radio-button-container"?

Screen Shot 2021-07-01 at 9 27 22 AM

Updated by @jcfranco: This should namespace classes used by all scoped components:

  • calcite-inline-editable
  • calcite-input
  • calcite-label
  • calcite-radio-button

Relevant Info

_Version_: @esri/[email protected]

0 - new bug help wanted

Most helpful comment

@eriklharper more reason to make all of our components shadowed :D

All 4 comments

@eriklharper more reason to make all of our components shadowed :D

I'm surprised Stencil's scoped feature doesn't BEM-ify or randomize that class name. We can totally remove that classname and just target the div directly in the CSS as a fast fix.

This issue should tackle namespacing CSS classes used by all scoped components. Fortunately, there's only 4 at the moment. I've updated the description.

We'll tackle moving these to shadow DOM in a separate issue.

Maybe we can shadowDom them next sprint?

Was this page helpful?
0 / 5 - 0 ratings