// Fylgja (https://fylgja.dev)
// Licensed under MIT Open Source

@use "props" as *;

$use-mq: true !default;

.sr-only:where(:not(:focus, :focus-within)) {
	--_show: initial;
	position: var(--_show, absolute);
	block-size: var(--_show, 1px);
	inline-size: var(--_show, 1px);
	overflow: var(--_show, hidden);
	clip-path: var(--_show, inset(50%));
}

@mixin mq-utils($name) {
	.#{$name}\:sr-only {
		--_show: initial;
	}

	.#{$name}\:not-sr-only {
		--_show: /* */;
	}
}

@if $use-mq {
	@include for-mq using ($name) {
		@include mq-utils($name);
	}
}
