@layer wp-ui { @layer utilities, components, compositions, overrides; @layer components { .root { --_wp-ui-switch-control-switch-height: var(--wpds-dimension-size-2xs); --_wp-ui-switch-control-label-line-height: max(var(--_wp-ui-switch-control-switch-height), var(--wpds-typography-line-height-xs)); } .switch-wrapper { display: flex; align-items: center; /* Size the wrapper to one label line so the switch centers on the first line. */ height: 1lh; line-height: var(--_wp-ui-switch-control-label-line-height); overflow: visible; } .label { --wp-ui-field-label-line-height: var(--_wp-ui-switch-control-label-line-height); } .root:not(:has(.switch[data-disabled])) .label { cursor: var(--wpds-cursor-control); } } }