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

Prefix CSS classes by mj- #1620

Closed
hteumeuleu opened this issue Jun 17, 2019 · 2 comments
Closed

Prefix CSS classes by mj- #1620

hteumeuleu opened this issue Jun 17, 2019 · 2 comments

Comments

@hteumeuleu
Copy link

Certain classes generated by MJML are prefixed by mj- (like .mj-column-per-100, .mj-menu-checkbox, …). But some others are not:

  • table.full-width-mobile
  • td.full-width-mobile
  • .outlook-group-fix

There's probably more, but these are the few I found inspecting the code generated by the Black Friday template. Using mj- prefix everywhere would help make the generated code more clear towards the purpose of these class. (For example, to differentiate between a class generated by MJML for its own purpose versus a class used to target an email client.) So ideally, the previous classes should read:

  • table.mj-full-width-mobile
  • td.mj-full-width-mobile
  • .mj-outlook-group-fix
@kmcb777
Copy link
Collaborator

kmcb777 commented Jun 19, 2019

@iRyusa for this one, should we wait for next major version ? 4.5 ?
can be breaking changes if someone used these classes in their css selector

@iRyusa
Copy link
Member

iRyusa commented Jun 20, 2019

We might need to check on mj-style content if we find those classes and add a warning ?

But yep, I agree that we should wait for 4.5 before changing this. 👍 for consistency

kmcb777 added a commit that referenced this issue Sep 12, 2019
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

3 participants