summaryrefslogtreecommitdiff
path: root/addons/mass_mailing/static/src/less
diff options
context:
space:
mode:
authorqsm-odoo <qsm@odoo.com>2017-10-31 12:42:23 +0100
committerqsm-odoo <qsm@odoo.com>2018-01-08 13:54:25 +0100
commit2303dcb2a9547c0a1cb2a176ff2fb398a9752b2d (patch)
tree97648b8873e8dc9552cbfd98186eac0f0fd7da71 /addons/mass_mailing/static/src/less
parentf68d33b6a59fc041d5bbb5fa44755c52537bea03 (diff)
[IMP] web_editor, *: change height/margin system to padding system
* web, website, mass_mailing Before this commit, the editor allowed defining the margin of some elements and the height of some elements. There were three main problems with this system: 1) When an user dragged the arrow, he often expected to change the size of the element while he was in fact changing the margin 2) When changing the margin, you increase the space between two elements but with a white space (while most users want a space with the same color of the block they are resizing = padding) 3) When changing the height, the user was able to hide snippet parts and the height was not consistent accross screen sizes Now, the only thing you can edit is padding. There is only one arrow for each direction, which allows increasing spacing and consistent dimension at the same time. The only feature that is lost with this change is the ability to control vertical alignement of colored columns. This is not a problem as colored columns are rare in our current snippets and there still have the possibility to add margin classes by hand if necessary (there are also plans to control vertical alignement another way). Note: margin classes are kept for compatibility.
Diffstat (limited to 'addons/mass_mailing/static/src/less')
-rw-r--r--addons/mass_mailing/static/src/less/themes/theme_default.less34
1 files changed, 7 insertions, 27 deletions
diff --git a/addons/mass_mailing/static/src/less/themes/theme_default.less b/addons/mass_mailing/static/src/less/themes/theme_default.less
index cfd1264e0c7..0c7510928f5 100644
--- a/addons/mass_mailing/static/src/less/themes/theme_default.less
+++ b/addons/mass_mailing/static/src/less/themes/theme_default.less
@@ -322,31 +322,11 @@
}
}
-// ===== Margins on td (replaced by paddings) =====
-.o-paddings-all(@factor: 1) {
- .o-paddings(128, @factor);
- .o-paddings(96, @factor);
- .o-paddings(92, @factor);
- .o-paddings(64, @factor);
- .o-paddings(48, @factor);
- .o-paddings(32, @factor);
- .o-paddings(24, @factor);
- .o-paddings(16, @factor);
- .o-paddings(8, @factor);
- .o-paddings(4, @factor);
- .o-paddings(0, @factor);
+// Compatibility: mb/mt classes on <td/> elements were interpreted as paddings
+// instead of margins before the introduction of pb/pt classes. As thoses mb/mt
+// classes may remain on clients' templates, <td/> are forced to 0 margin to
+// be sure (normally <td/> should not consider margin properties but some mail
+// clients might make the mistake to do so).
+td[class*="mb"], td[class*="mt"] {
+ margin: 0!important;
}
-.o-paddings(@name, @factor: 1) {
- .o-paddings-define(@name, @factor * @name);
-}
-.o-paddings-define(@name, @size: @name) {
- td.mt@{name} {
- margin-top: auto!important;
- padding-top: ~"@{size}px"!important;
- }
- td.mb@{name} {
- margin-bottom: auto!important;
- padding-bottom: ~"@{size}px"!important;
- }
-}
-.o-paddings-all();