/**
 * Mixins
 */

@use "variables" as *;

/**
 * WordPress core's look for a disabled field
 *
 * Gutenberg's `TextControl` keeps a disabled field white, because its component styles
 * override core's `forms.css` `input:disabled` rule, so a disabled field reads as editable.
 * Include this in a rule that selects the disabled field.
 *
 * @param {boolean} $important Whether to mark each declaration `!important`, for a selector
 *                             that cannot otherwise outrank Gutenberg's component styles.
 */
@mixin disabled-field($important: false) {
	$flag: if($important, !important, null);

	background: $background-color--gray $flag;
	border-color: $border-color $flag;
	box-shadow: none $flag;
	color: $border-color--darker $flag;
}
