How to set scss rules for all components which have 'alt confirm' in 'ui' property?

Dear colleagues,

please help, if somebody knows how to do it.

Say, i have to style the components, which have both 'alt' and 'confirm' ui, in a special way (custom background, custom color).
The task contains conditions - not to use css classes for it, and not to use custom UIs (like ui: 'alt confirm custom-ui-which-sets-the-style').