Skip to content

Commit 62a87d6

Browse files
bso-odooxlu-odoo
authored andcommitted
[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]: odoo/odoo@5953c4d [2]: odoo@299d504#diff-86c142838104de06e89f629c51cf791464538dc8899e6a3f00c24f69638db409R34 task-3562147 X-original-commit: f3da06d Part-of: odoo#744
1 parent ac5de24 commit 62a87d6

File tree

44 files changed

+70
-99
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+70
-99
lines changed

theme_anelusia/views/snippets/s_call_to_action.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,6 @@
3434
<xpath expr="(//p)[2]" position="attributes">
3535
<attribute name="style">text-align: center;</attribute>
3636
</xpath>
37-
<xpath expr="//a[hasclass('btn')]" position="attributes">
38-
<attribute name="class" add="btn-lg" separator=" "/>
39-
</xpath>
4037
<xpath expr="//a[hasclass('btn')]/t" position="replace" mode="inner">
4138
Discover it
4239
</xpath>

theme_anelusia/views/snippets/s_company_team.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template id="s_company_team" inherit_id="website.s_company_team">
55
<!-- Section -->
66
<xpath expr="section" position="attributes">
7-
<attribute name="class" add="pt64 pb64" remove="pt48 pb24" separator=" "/>
7+
<attribute name="class" add="pt64 pb64" remove="pt48 pb48" separator=" "/>
88
</xpath>
99

1010
<!-- Team #01 -->

theme_artists/views/snippets/s_carousel.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
<!-- Carousel-item #03 -->
4444
<xpath expr="//div[hasclass('carousel-item')][3]" position="attributes">
45-
<attribute name="class" add="o_cc o_cc5 pt152 pb152" remove="pb112 pt112" separator=" "/>
45+
<attribute name="class" add="o_cc o_cc5 pt152 pb152" remove="pb128 pt128" separator=" "/>
4646
</xpath>
4747
<!-- Shape & filter -->
4848
<xpath expr="//div[hasclass('carousel-item')][3]//div[hasclass('container')]" position="before">

theme_artists/views/snippets/s_comparisons.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</xpath>
2929
<!-- Card #3 -->
3030
<xpath expr="(//div[hasclass('card')])[3]" position="attributes">
31-
<attribute name="class" add="bg-o-color-1" remove="bg-secondary" separator=" "/>
31+
<attribute name="class" add="bg-o-color-1" remove="bg-o-color-2" separator=" "/>
3232
</xpath>
3333
<!-- Card #3 - Button -->
3434
<xpath expr="(//a[hasclass('btn')])[3]" position="attributes">

theme_artists/views/snippets/s_features.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
</xpath>
1414
<!-- Feature #01 - Icon -->
1515
<xpath expr="//i" position="attributes">
16-
<attribute name="class" add="bg-o-color-5" remove="bg-primary" separator=" "/>
16+
<attribute name="class" add="bg-o-color-5" remove="bg-o-color-1" separator=" "/>
1717
</xpath>
1818
<!-- Feature #03 - Icon -->
1919
<xpath expr="(//i)[3]" position="attributes">
20-
<attribute name="class" add="bg-o-color-5" remove="bg-secondary" separator=" "/>
20+
<attribute name="class" add="bg-o-color-5" remove="bg-o-color-2" separator=" "/>
2121
</xpath>
2222
</template>
2323

theme_artists/views/snippets/s_features_grid.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
<attribute name="class" add="rounded" remove="rounded-circle" separator=" "/>
1818
</xpath>
1919
<xpath expr="(//i)[4]" position="attributes">
20-
<attribute name="class" add="bg-o-color-1" remove="bg-secondary" separator=" "/>
20+
<attribute name="class" add="bg-o-color-1" remove="bg-o-color-2" separator=" "/>
2121
</xpath>
2222
<xpath expr="(//i)[5]" position="attributes">
23-
<attribute name="class" add="bg-o-color-1" remove="bg-secondary" separator=" "/>
23+
<attribute name="class" add="bg-o-color-1" remove="bg-o-color-2" separator=" "/>
2424
</xpath>
2525
<xpath expr="(//i)[6]" position="attributes">
26-
<attribute name="class" add="bg-o-color-1" remove="bg-secondary" separator=" "/>
26+
<attribute name="class" add="bg-o-color-1" remove="bg-o-color-2" separator=" "/>
2727
</xpath>
2828
</template>
2929

theme_artists/views/snippets/s_process_steps.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
</xpath>
99
<!-- Icons -->
1010
<xpath expr="//i" position="attributes">
11-
<attribute name="class" add="bg-o-color-5" remove="bg-primary" separator=" "/>
11+
<attribute name="class" add="bg-o-color-5" remove="bg-o-color-1" separator=" "/>
1212
</xpath>
1313
<xpath expr="(//i)[3]" position="attributes">
14-
<attribute name="class" add="bg-o-color-5" remove="bg-secondary" separator=" "/>
14+
<attribute name="class" add="bg-o-color-5" remove="bg-o-color-2" separator=" "/>
1515
</xpath>
1616
<xpath expr="(//i)[4]" position="attributes">
1717
<attribute name="class" add="bg-o-color-5" remove="bg-o-color-3" separator=" "/>

theme_artists/views/snippets/s_three_columns.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template id="s_three_columns" inherit_id="website.s_three_columns">
55
<!-- Section -->
66
<xpath expr="//section" position="attributes">
7-
<attribute name="class" add="o_cc4 o_colored_level" remove="o_cc2" separator=" "/>
7+
<attribute name="class" add="o_cc4" remove="o_cc2" separator=" "/>
88
</xpath>
99
<!-- Column #1 -->
1010
<xpath expr="//div[hasclass('card')]" position="attributes">

theme_avantgarde/views/customizations.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
<template id="s_call_to_action" inherit_id="website.s_call_to_action" name="Avantgarde s_call_to_action">
165165

166166
<xpath expr="//section" position="attributes">
167-
<attribute name="class" add="o_cc o_cc3 o_half_screen_height pt0" remove="pt48" separator=" "/>
167+
<attribute name="class" add="o_half_screen_height pt0" remove="pt48" separator=" "/>
168168
</xpath>
169169
<xpath expr="//h3" position="replace">
170170
<h3 style="text-align: right;"><b>Since 1992</b> creating around the world.</h3>
@@ -184,9 +184,6 @@
184184
<xpath expr="//div[hasclass('col-lg-4')]/p" position="attributes">
185185
<attribute name="style" add="text-align: left;" remove="text-align: right;" separator=";"/>
186186
</xpath>
187-
<xpath expr="//a[hasclass('btn')]" position="attributes">
188-
<attribute name="class" add="btn-lg" separator=" "/>
189-
</xpath>
190187
</template>
191188

192189
<template id="configurator_s_call_to_action" inherit_id="website.configurator_s_call_to_action" name="Avantgarde s_call_to_action">

theme_beauty/views/snippets/s_company_team.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<template id="s_company_team" inherit_id="website.s_company_team">
55
<!-- Section -->
66
<xpath expr="//section" position="attributes">
7-
<attribute name="class" add="o_cc o_cc4 pt80 pb80" separator=" "/>
7+
<attribute name="class" add="o_cc o_cc4 pt80 pb80" remove="pb48 pt48" separator=" "/>
88
</xpath>
99
<!-- Titles -->
1010
<xpath expr="(//div[hasclass('col-lg-8')])[1]/h4" position="replace" mode="inner">

0 commit comments

Comments
 (0)