@use 'sass:list';

// @see  CSS_Variables::get_root()
$root: ':root';

$selectors_margin_vertical: (
	'p',
	'ol', 'ul', 'dl',
	'hr',
	'form',
	'blockquote',
	'table',
	'figure',
	'iframe',
	'address',
	'details',
	'pre',
	'.gallery',
	'.wp-block-gallery:not(.has-nested-images)',
);

	@if false == $is_editor {
		$selectors_margin_vertical: list.append( $selectors_margin_vertical, (
			'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
			'fieldset',
		) );
	}

// @see  Customize\Styles::get_selector()
// @see  custom/_button.scss
$selectors_button: (

	// Default WordPress button selectors:
	'.wp-element-button',
	'.wp-block-button__link',

	// Navigation toggle buttons:
	'.wp-block-navigation__responsive-container-open',
	'.wp-block-navigation__responsive-container-close',
	'.wp-block-navigation-overlay-close',

	// Other buttons:
	'.button',
	'.wp-block-file__button',
	'.page-numbers:not(.current,.dots)',
	'.post-page-numbers:not(.current,.dots)',
	'.wp-block-query-pagination-previous',
	'.wp-block-query-pagination-next',
	'.wp-block-comments-pagination-previous',
	'.wp-block-comments-pagination-next',
	'.wp-block-post-comments-form input[type=submit]',
	// '.wp-block-search .wp-block-search__button',

	// `form` selector is required to prevent styling MEJS buttons, for example.
	'form :where(button,[type="button"],[type="reset"],[type="submit"]):not([class*="wp-block-"])',

	// Buttons from Block Styles:
	'.is-style-buttons-inline a',

	// @extend %button_outline:
	'.is-style-read-more-outline .wp-block-post-excerpt__more-link',
	'.wp-block-tag-cloud.is-style-outline .tag-cloud-link',
);

// @see  color_classes()
// @see  _tools/_mixin-color-classes.scss
$selectors_button_colors: (
	'.wp-element-button', // This takes care of Button block and also Search block button.
);

// Helpers:

	$selectors_input_text_inline: ();
	@each $input_type in (
		email
		number
		password
		search
		tel
		text
		url
	) {
		$selectors_input_text_inline: list.append( $selectors_input_text_inline, '[type="#{$input_type}"]', $separator: comma );
	}
