[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 -4
View File
@@ -164,7 +164,7 @@
<template id="s_call_to_action" inherit_id="website.s_call_to_action" name="Avantgarde s_call_to_action">
<xpath expr="//section" position="attributes">
<attribute name="class" add="o_cc o_cc3 o_half_screen_height pt0" remove="pt48" separator=" "/>
<attribute name="class" add="o_half_screen_height pt0" remove="pt48" separator=" "/>
</xpath>
<xpath expr="//h3" position="replace">
<h3 style="text-align: right;"><b>Since 1992</b> creating around the world.</h3>
@@ -184,9 +184,6 @@
<xpath expr="//div[hasclass('col-lg-4')]/p" position="attributes">
<attribute name="style" add="text-align: left;" remove="text-align: right;" separator=";"/>
</xpath>
<xpath expr="//a[hasclass('btn')]" position="attributes">
<attribute name="class" add="btn-lg" separator=" "/>
</xpath>
</template>
<template id="configurator_s_call_to_action" inherit_id="website.configurator_s_call_to_action" name="Avantgarde s_call_to_action">