<commit_before>////
/// Field
/// @group core-components
/// @author <NAME>
////


// Mixins
// ------

/// A mixin for styling input, select and textarea elements
/// @require {mixin} sl-textbox
/// @require {mixin} sl-extend-tags
/// @param {Number} $font-size [1em]
/// @param {Number | List} $padding [0]
/// @param {Number | List} $border-width [0]
/// @param {Number} $line-height [1]
/// @output
@mixin sl-field(
	$font-size: 1em,
	$padding: 0,
	$border-width: 0,
	$line-height: 1
) {
	@extend %sl-field !optional;

	box-sizing: border-box; // Fix for input[type="search"] elements as they force content-box sizing
	display: block;
	width: 100%;
	border-radius: 0;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;

	@include sl-extend-tags(input, select) {

		@include sl-textbox(
			$font-size,
			$padding,
			$border-width,
			$line-height,
			false
		);
	}

	@include sl-extend-tags(input) {
		line-height: normal;
	}
	
	// Ensures text doesn't get vertically clipped in select tags
	@include sl-extend-tags(select) {
		$t-padding: sl-shorthand($padding, 'top');
		$b-padding: sl-shorthand($padding, 'bottom');
		$l-padding: sl-shorthand($padding, 'left');
		$r-padding: sl-shorthand($padding, 'right');

		$min-v-padding: min($t-padding, $b-padding);

		@if $t-padding > $b-padding {
			$t-padding: $t-padding - $b-padding;
			$b-padding: 0;
		} @else {
			$b-padding: $b-padding - $t-padding;
			$t-padding: 0;
		}

		line-height: sl-sum($min-v-padding * 2, $line-height);<commit_msg>Can now use field mixin on any element type<commit_after>////
/// Field
/// @group core-components
/// @author <NAME>
////


// Mixins
// ------

/// A mixin for styling input, select and textarea elements
/// @require {mixin} sl-textbox
/// @require {mixin} sl-extend-tags
/// @param {Number} $font-size [1em]
/// @param {Number | List} $padding [0]
/// @param {Number | List} $border-width [0]
/// @param {Number} $line-height [1]
/// @output
@mixin sl-field(
	$font-size: 1em,
	$padding: 0,
	$border-width: 0,
	$line-height: 1
) {
	@extend %sl-field !optional;

	box-sizing: border-box; // Fix for input[type="search"] elements as they force content-box sizing
	display: block;
	width: 100%;
	border-radius: 0;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	
	@include sl-textbox(
		$font-size,
		$padding,
		$border-width,
		$line-height,
		false
	);

	@include sl-extend-tags(input) {
		line-height: normal;
	}
	
	// Ensures text doesn't get vertically clipped in select tags
	@include sl-extend-tags(select) {
		$t-padding: sl-shorthand($padding, 'top');
		$b-padding: sl-shorthand($padding, 'bottom');
		$l-padding: sl-shorthand($padding, 'left');
		$r-padding: sl-shorthand($padding, 'right');

		$min-v-padding: min($t-padding, $b-padding);

		@if $t-padding > $b-padding {
			$t-padding: $t-padding - $b-padding;
			$b-padding: 0;
		} @else {
			$b-padding: $b-padding - $t-padding;
			$t-padding: 0;
		}

		line-height: sl-sum($min-v-padding * 2, $line-height);
{'fraction_non_alphanumeric': 0.19774386197743862, 'fraction_numerical': 0.009953550099535502, 'mean_word_length': 3.1701244813278007, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3288877', 'n_tokens_mistral': 1243, 'n_tokens_neox': 1135, 'n_words': 274}