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: get classes by name #30

Closed
ewhicher opened this issue Apr 19, 2022 · 2 comments
Closed

Feature request: get classes by name #30

ewhicher opened this issue Apr 19, 2022 · 2 comments

Comments

@ewhicher
Copy link

ewhicher commented Apr 19, 2022

Just an idea, but it would be great to be able to get the classes individually, for example let's say you have this in your config:

'default' => [
    'h1' => 'headline',
    'a'  => 'link',
    'p' => 'paragraph',
],

If we could then use a tag to extract just the h1 classes, something like:
<h1 class="{{ classify:h1 }}">Heading</h1>

I'm using tailwind, so to have classify.php as my 'source of truth' for all type styles would be super handy.

@simonerd
Copy link
Member

I hope you haven't been waiting for this, but we eventually implemented this feature by adding a classify tag (essentially as proposed). You'll find more information in the (updated) readme.

@ewhicher
Copy link
Author

I wouldn't say I was waiting on it, but am very glad it's here. Thanks 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants