You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all: thank you for your very helpful tool! Highly appreciated!
I only switched to pug yesterday (coming from ejs, all in a webpack context), but so far I am very happy with it. I only observe one thing that I would like to mention, and maybe you find a moment to share your opinion on that.
I use html pre-processors mainly to develop an initial webpage layout that will later be implemented in a CMS (TYPO3, the templates there are called "Fluid templates"). That means I have to rebuild the templates again in the CMS, which is ok by me, since lots of things are simply copy and paste.
Now, with pug however, that changes a bit, especially when in comes to classes and using tailwind. When converting html to pug, html2pug extracts css in dot notation, except where it encounters tailwindcss specials like md:w-1/2 or similar. Then the converter creates a class attribute, which is great.
But eventually I end up with 2 ways of css notation in the new pug file, which look like this, e.g.:
@rowild, I added a new feature. Here you go.
Close the issue if it's okay.
dimensi
changed the title
[QUESTION / FEATURE PROPOSAL?] "Inline" all classes to better work with tailwindcss
[FEATURE] "Inline" all classes to better work with tailwindcss
May 10, 2020
Hi!
first of all: thank you for your very helpful tool! Highly appreciated!
I only switched to pug yesterday (coming from ejs, all in a webpack context), but so far I am very happy with it. I only observe one thing that I would like to mention, and maybe you find a moment to share your opinion on that.
I use html pre-processors mainly to develop an initial webpage layout that will later be implemented in a CMS (TYPO3, the templates there are called "Fluid templates"). That means I have to rebuild the templates again in the CMS, which is ok by me, since lots of things are simply copy and paste.
Now, with pug however, that changes a bit, especially when in comes to classes and using tailwind. When converting html to pug,
html2pug
extracts css in dot notation, except where it encounters tailwindcss specials likemd:w-1/2
or similar. Then the converter creates a class attribute, which is great.But eventually I end up with 2 ways of css notation in the new pug file, which look like this, e.g.:
It would be way simpler to have everything in the class attribute like this:
That would make it easier to copy classes over to another template system, and, IMO, it is also easier to read in the editor.
I wonder if it would be possible to have a configuration option available? E.g.:
Would love to know your opinion about that! Thank you!
The text was updated successfully, but these errors were encountered: