mj-style-inline implementation#11
Conversation
|
First of all, thank you for dedicating your time for this feature. I was planning to add the css selector support with a custom implementation, directly in the html parser (jfiveparse), as I think it would be the more correct place for it. As it is, I don't think I'll merge the PR right now, I'll ask you to wait a little bit longer, so you can integrate your changes when I release the updated html5 parser with css selector support. I guess you have given me a good reason to do the css selector support right now :P. Btw, I've noticed that most of the added classes are public, I would prefer if the exposed API to the end user would be way more limited -> I prefer package visibility if possible (see https://javadoc.io/doc/ch.digitalfondue.mjml4j/mjml4j/latest/ch.digitalfondue.mjml4j/ch/digitalfondue/mjml4j/package-summary.html , there is basically nothing exposed :)) |
|
Indeed it makes more sense to add it to JFiveParse like JSoup does. It was more of a challenge for me to see if I could pull it off. But the css inline support would be more than welcome though. |
Btw, as I never used this feature, is there a specific use case which the non inline version does not work? |
|
I once needed it in the past with a complicated mail layout using many tables in tables. But nowadays clients are getting better and better, and maybe it's becoming obsolete. But still the html generated by mjml also contains a lot of inline css. |
|
good to know. Implementing the css-selector will also unlock mj-html-attributes, so I guess it's worth a try :) |
This PR adds support for the inline attribute of the
mj-styletag. To achieve this a css-selector was needed, so I based most of the code to to that on the jericho-selector project.