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

feat(preset-tagify): new preset #1010

Merged
merged 10 commits into from May 29, 2022
Merged

feat(preset-tagify): new preset #1010

merged 10 commits into from May 29, 2022

Conversation

zojize
Copy link
Contributor

@zojize zojize commented May 27, 2022

Preset Tagify

closes #1004

Features

  • Tagified unocss rules
  • Prefixed HTML tags
  • Extra CSS properties

Brainstorm

Tagify + Attributify

<!-- instead of writing this -->
<flex class="flex-col"> </flex>
<!-- maybe we could do -->
<flex col> </flex>

which would generate

flex { display: flex; }
flex [row=""] { flex-flow: column; }

not sure how to do this with a regex only extractor

Todos

  • mention a11y In readme, since this is technically not good sementic HTML practice.

@netlify
Copy link

netlify bot commented May 27, 2022

Deploy Preview for unocss ready!

Name Link
🔨 Latest commit 98abe69
🔍 Latest deploy log https://app.netlify.com/sites/unocss/deploys/6292cc7fd48f4b0008d1c0fd
😎 Deploy Preview https://deploy-preview-1010--unocss.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@antfu antfu marked this pull request as ready for review May 29, 2022 01:29
@antfu antfu self-requested a review as a code owner May 29, 2022 01:29

## License

MIT License &copy; 2022-PRESENT [Jeff Zou](https://github.com/zojize)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zojize I have added your credit here. I will merge this for now, feel free to send another PR if you'd like to adjust this part. Thanks!

@antfu antfu changed the title feat: preset-tagify feat(preset-tagify): new preset May 29, 2022
@antfu antfu merged commit 896dad3 into unocss:main May 29, 2022
@antfu
Copy link
Member

antfu commented May 29, 2022

Merge and ship for now. I like the idea of using the tag name as the prefix, let's iterate that for later.

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 this pull request may close these issues.

[Proposal]: Extractor Specific escape Function & Specify Extractor Name(s) in RuleMeta
3 participants