[FIX] theme_*: remove duplicate and conflicting classes

When default snippets have been updated to rely on color presets ([1]),
some themes were not adapted accordingly.
This also happened whenever paddings of base blocks were modified.
Because of this there are elements in themes for which some classes are
applied several times, and some where classes are not removed before
adding a contradicting one.

This commit adjusts the classes so that themes neither:
- produce snippets with duplicated classes
- produce snippets with contradicting classes (e.g. two different
bottom paddings on the same element)

This commit also fixes a typo from [2] which was the source of
duplicate classes.

[1]: https://github.com/odoo/odoo/commit/5953c4df6b9c08519f64a65c1cf5d5558d59f7d4
[2]: https://github.com/odoo/design-themes/commit/299d504df31bf179775eec1d37e71605c3637460#diff-86c142838104de06e89f629c51cf791464538dc8899e6a3f00c24f69638db409R34

task-3562147

X-original-commit: f3da06dc68
Part-of: odoo/design-themes#744
This commit is contained in:
Benoit Socias
2023-10-23 14:43:38 +02:00
parent de9d56190e
commit 76e9cbcdb6
44 changed files with 70 additions and 99 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
<template id="s_numbers" inherit_id="website.s_numbers">
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc5 pt80 pb80" remove="o_cc2 pt32 pb32" separator=" "/>
<attribute name="class" add="o_cc5 pt80 pb80" remove="o_cc2 pt24 pb24" separator=" "/>
</xpath>
</template>
@@ -5,7 +5,7 @@
<!-- Section -->
<xpath expr="//section" position="attributes">
<attribute name="style"/>
<attribute name="class" add="s_parallax parallax s_parallax_is_fixed o_cc o_cc5 pt120 pb104" remove="pt48 pb32" separator=" "/>
<attribute name="class" add="parallax s_parallax_is_fixed o_cc o_cc5 pt120 pb104" remove="pt48 pb32" separator=" "/>
<attribute name="data-scroll-background-ratio">1</attribute>
</xpath>
<xpath expr="//*[hasclass('container')]" position="before">
@@ -12,9 +12,6 @@
<attribute name="class" add="pt120 pb120" remove="pt80 pb80" separator=" "/>
<attribute name="style">background-image: none;</attribute>
</xpath>
<xpath expr="//blockquote[1]" position="attributes">
<attribute name="class" add="mx-auto" remove="me-auto" separator=" "/>
</xpath>
<xpath expr="//p[1]" position="replace" mode="inner">
Cosy and friendly, good atmosphere and super food. Especially the spiced fruit crumble.
</xpath>