Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: support for "special values" for all utilities #1167

Closed
UltraCakeBakery opened this issue Jun 25, 2022 · 0 comments · Fixed by #1170
Closed

Feature request: support for "special values" for all utilities #1167

UltraCakeBakery opened this issue Jun 25, 2022 · 0 comments · Fixed by #1170

Comments

@UltraCakeBakery
Copy link
Contributor

UltraCakeBakery commented Jun 25, 2022

It appears to be that "special values" (aka keywords) like inherit are considered "arbitrary values" for utility classes like rounded.
I use the inherit keyword quite often and would like to not have to wrap inherit in [] like: rounded-[inherit]. This goes for all utilities, not just rounded.

I use the Svelte and UnoCSS's mini + attributify preset. Svelte does not like []$@% characters in attribute names, so whenever I need an arbitrary value for a utility I have to use a class instead of an boolean attribute, like I in this snippet:

{ #each types as type }
	<div relative first:rounded-t last:rounded-b mb--1px>
		<input type="radio" name="type" id="type-{type}" value={type} absolute z-0 class="top-1/2 left-4 -translate-y-1/2 next:checked:border-$primary-color next:checked:z-1" />
		<label for="type-{type}" relative block p-3 pl-12 gap-3 border border-light-300 class="rounded-[inherit]">
			{type.replaceAll('-', ' ')}
		</label>
	</div>
{ /each }

I considered making an PR, but do not know where to start since every utility value is interpreted/handled differently. Maybe some more active contributors/maintainers can add this quicker than I can.

@UltraCakeBakery UltraCakeBakery changed the title Support for "special values" for all utilities Feature request: support for "special values" for all utilities Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant