Skip to Content
How-to guidesDevelopmentStyle custom controls without layer conflicts

Style custom controls without layer conflicts

Audience: Developers.

Use this guide when adding custom page controls or theme content. You need access to the relevant component or stylesheet.

Choose a layer

  1. Identify the control’s purpose in the layer-token reference.
  2. Use the named CSS variable for that purpose.
  3. Keep badges and decorative details inside an isolated component.
  4. Test the control with navigation, dropdowns, and more than one open dialog.
  5. Test the same behavior at each relevant breakpoint.

A custom sticky page control can use:

.page-action { position: fixed; z-index: var(--layer-sticky); }

Do not copy numeric layer values or raise a complete page to correct one overlapping element. Do not use 9999, negative offsets, or arbitrary increases as corrections. If overlap occurs, examine the intended role and owning component first.

Use supplied dropdowns and dialogs

Use the supplied controls. Do not assign z-index values to their panels. The application assigns dialog order and keeps dropdowns within the dialog that owns them. When the newer dialog closes, the previous interaction becomes available again.

Choose a selection control

Use native selection for simple choices with one value. Use supplied custom selection controls for search, multiple selections, or detailed options. Neither requires special layer changes.

Inspect themes

Open dropdowns from sections with different branding. Confirm that each dropdown retains the theme of the control that opened it. See interface layers for stacking and native picker behavior.

Last updated on