// Copyright (c) 2024 Xu Shaohua <shaohua@biofan.org>. All rights reserved.
// Use of this source is governed by Lesser General Public License
// that can be found in the LICENSE file.
/* Styles for FormControlLabel */
// Styles applied to the root element.
.ZuFormControlLabel-root {
display: inline-flex;
align-items: center;
margin-left: -11px;
margin-right: 16px; // used for row presentation of radio/checkbox
cursor: pointer;
// For correct alignment with the text.
vertical-align: middle;
-webkit-tap-highlight-color: transparent;
&.ZuFormControlLabel-disabled {
cursor: default;
}
// Styles applied to the root element if labelPlacement="start".
&.ZuFormControlLabel-labelPlacementStart {
flex-direction: row-reverse;
margin-left: 16px; // used for row presentation of radio/checkbox
margin-right: -11px;
}
// Styles applied to the root element if labelPlacement="top".
&.ZuFormControlLabel-labelPlacementTop {
flex-direction: column-reverse;
margin-left: 16px;
}
// Styles applied to the root element if labelPlacement="bottom".
&.ZuFormControlLabel-labelPlacementBottom {
flex-direction: column;
margin-left: 16px;
}
}
// State class applied to the root element if disabled={true}.
.ZuFormControlLabel-disabled {
}
// Styles applied to the labels Typography component.
.ZuFormControlLabel-label {
&.ZuFormControlLabel-disabled {
color: $zu-palette-text-disabled;
}
}
// State class applied to the root element if error={true}.
.ZuFormControlLabel-error {
}
// State class applied to the root element if required={true}.
.ZuFormControlLabel-required {
}
// Styles applied to the asterisk element.
.ZuFormControlLabel-asterisk {
&.ZuFormControlLabel-error {
color: $zu-palette-error-main;
}
}