Skip to content

Commit

Permalink
[FIX] theme_*: fix s_big_number wrong gradient implementation
Browse files Browse the repository at this point in the history
*: anelusia, artists, avantgarde, aviato, beauty, bewise, monglia,
vehicle

This commit aims to fix a wrong implementation of gradients on the
`s_big_number` snippet within the context of the web editor.

Prior to this commit, the `s_big_number` snippet was using a gradient
composed of the right color, but being declared as `RGB` values.

While this is working as expected and looking like it uses the right
`--o-color-*`, it's indeed working with the specific color applied in
first place. If a user changes the color palette of the website, the
snippet will look terrible as it doesn't adapt to the new palette.

This commit fixes the issue by using the right implementation with CSS
variables.

task-4202371
  • Loading branch information
chgo-odoo committed Sep 22, 2024
1 parent 97683ee commit bce7e21
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion theme_anelusia/views/snippets/s_big_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 25%, rgb(222, 222, 222) 80%);">
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-4) 25%, var(--o-color-5) 90%);">
100+
</font>
</xpath>
Expand Down
2 changes: 1 addition & 1 deletion theme_artists/views/snippets/s_big_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath>
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(165, 78, 223) 8%, rgb(222, 222, 222) 80%);">
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 25%, var(--o-color-4) 90%);">
250+
</font>
</xpath>
Expand Down
2 changes: 1 addition & 1 deletion theme_avantgarde/views/customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@

<!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(56, 60, 214) 0%, rgb(255, 255, 255) 65%);">
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">
50+
</font>
</xpath>
Expand Down
2 changes: 1 addition & 1 deletion theme_aviato/views/snippets/s_big_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath>
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(244, 168, 26) 0%, rgb(222, 222, 222) 58%);">100+</font>
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">100+</font>
</xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner">
destinations available
Expand Down
2 changes: 1 addition & 1 deletion theme_beauty/views/snippets/s_big_number.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath>
<xpath expr="//h2/div" position="replace" mode="inner">
<font style="color: rgb(165, 35, 91);">200+</font>
<font style="color: var(--o-color-1)">200+</font>
</xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner">
happy customers
Expand Down
2 changes: 1 addition & 1 deletion theme_bewise/views/customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@

<!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 0%, rgb(222, 222, 222) 56%);">60+</font>
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 90%);">60+</font>
</xpath>
<xpath expr="//h2/following-sibling::div" position="replace" mode="inner">
academic programs available
Expand Down
2 changes: 1 addition & 1 deletion theme_monglia/views/customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@
<attribute name="style" add="font-size: 7.75rem;" remove="font-size: 10.75rem;" separator=";"/>
</xpath>
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(237, 7, 104) 0%, rgb(222, 222, 222) 59%);">
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-1) 0%, var(--o-color-4) 75%);">
250+
</font>
</xpath>
Expand Down
2 changes: 1 addition & 1 deletion theme_vehicle/views/customizations.xml
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@

<!-- Text -->
<xpath expr="//h2/div" position="replace" mode="inner">
<font class="text-gradient" style="background-image: linear-gradient(0deg, rgb(29, 32, 48) 0%, rgb(222, 222, 222) 49%);">
<font class="text-gradient" style="background-image: linear-gradient(0deg, var(--o-color-5) 0%, var(--o-color-4) 90%);">
87%
</font>
</xpath>
Expand Down

0 comments on commit bce7e21

Please sign in to comment.