suankularb-wittayalai-school / sk-components

A design system for all Suankularb applications
https://sk-components-demo.mysk.school
0 stars 1 forks source link

Parent component of Dialog sometimes override adapted colors #113

Open SiravitPhokeed opened 1 year ago

SiravitPhokeed commented 1 year ago

Describe the bug Some components when placed inside Dialog will have new colors, set by the Dialog. For example, an outlined Text Field's label will gain the surface-3 color from Dialog. However, when a Dialog is placed inside another component that also sets the label color (which is a relatively common use case), that component sometimes wins. The Dialog color should always win here.

To reproduce Steps to reproduce the behavior:

  1. Create a Filled Card
  2. Put a Dialog inside the Filled Card
  3. Put an outlined Text Field inside the Dialog
  4. See the surface-variant background color on the Text Field’s label instead of surface-3

Expected behavior The colors adapted for Dialog should always win.

Browser Edge 112.0.1722.39