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

is it possible to suggest Tailwind classes? #2

Open
vizardkill opened this issue Aug 19, 2022 · 4 comments
Open

is it possible to suggest Tailwind classes? #2

vizardkill opened this issue Aug 19, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@vizardkill
Copy link

Hello colleagues, I had a question, in case I wanted to suggest Tailwind classes, do I need to put all the classes offered by the library in the options part?, or is there an option so that I can automatically connect to the Tailwind library to import those listings?

@lexoyo
Copy link
Member

lexoyo commented Aug 20, 2022

Hello

That's a really cool idea!

For now the algorithm just browse all the pages and all the components to build the list of classes used in the website

So this will not show Tailwind classes untill you used them in the site already

To do what you suggest I will need to rewrite the algorithm and list all css classes available in the site. As soon as I have a moment I work on a symbols plugin, so If you have the skills let me know and I'll point out where exactly you can change the logic. Otherwise I will keep it in mind for later

@lexoyo lexoyo added the enhancement New feature or request label Aug 20, 2022
@vizardkill
Copy link
Author

I think it's great if you show me where I can make the adjustment.

It would be interesting to make a function that receives one or many css files that reads the name of the properties and then suggests them, maybe I can work on that to see how the experiment turns out

@lexoyo
Copy link
Member

lexoyo commented Sep 13, 2022

Sure that would be a great experiment

Here is where the array of css classes is built: https://github.com/lexoyo/grapesjs-ui-suggest-classes/blob/main/src/index.js#L53

I am wondering if there is a way to get all available css classes with grapesjs API

@lexoyo
Copy link
Member

lexoyo commented Jan 30, 2024

Hey @vizardkill did you try something ?
Have a nice day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants