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

Plugins development #11

Closed
Awilum opened this issue Sep 12, 2021 · 2 comments
Closed

Plugins development #11

Awilum opened this issue Sep 12, 2021 · 2 comments

Comments

@Awilum
Copy link
Contributor

Awilum commented Sep 12, 2021

Hello!

I can't find any examples of Plugins Development for ASMCSS as it is for Tailwind CSS.
For e.g. how should I develop and include such kind of plugin https://github.com/tailwindlabs/tailwindcss-line-clamp for ASMCSS? via separated js file ? js bundle ? css with mixin?

How to do this in the right way?

@msarca
Copy link
Member

msarca commented Sep 12, 2021

There is no need to create plugins and other complicated setups for such a simple task. You can easily achieve this by creating a mixin.

<style>
:root {
    --line-clamp--mixin: "overflow:hidden; display:-webkit-box; box-orient:vertical; line-clamp:${0=1}";
}
</style>

Now you can use the newly created mixin.

<div x-style="w:120px; ^line-clamp:4">
    Any veggie can belong on your menu, so choose what you love and use the rest for future meals and snacks you can enjoy in flavorful ways.
</div>

box-orient and line-clamp are supported starting with the newly released v0.5.0 version of AssemblerCSS. This version also brings users the ability to register new assembler properties.

@Awilum
Copy link
Contributor Author

Awilum commented Sep 12, 2021

Okey, what about a little bit more complex things?
btw: I have create this plugin/mixin: https://github.com/Awilum/asmcss-mixin-w

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

No branches or pull requests

2 participants