Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] theme_*: fix s_big_number wrong gradient implementation #930

Draft
wants to merge 1 commit into
base: 18.0
Choose a base branch
from

Conversation

chgo-odoo
Copy link

@chgo-odoo chgo-odoo commented Sep 22, 2024

*: anelusia, artists, avantgarde, aviato, beauty, bewise, monglia, vehicle

This PR 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 PR fixes the issue by using the right implementation with CSS variables.

task-4202371

@robodoo
Copy link
Collaborator

robodoo commented Sep 22, 2024

Pull request status dashboard

Copy link
Contributor

@stefanorigano stefanorigano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @chgo-odoo .
One remark for theme_anelusia, ok the rest 👍

theme_anelusia/views/snippets/s_big_number.xml Outdated Show resolved Hide resolved
@chgo-odoo chgo-odoo force-pushed the master-fix-s_big_number-gradient-chgo branch from bce7e21 to 57c25bc Compare September 22, 2024 18:46
@chgo-odoo chgo-odoo marked this pull request as ready for review September 22, 2024 18:47
@chgo-odoo
Copy link
Author

Thanks @stefanorigano, change done !

Marked this as ready for review as the diff was only about a suggestion

Copy link
Contributor

@stefanorigano stefanorigano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One remark in the code.

Also, PR's description ( odoo/odoo#180983 as well):

  • Typo: "This commit" -> "This pull request"
  • List linked PRs at end of the description, not in the middle ;)

Thanks

theme_anelusia/views/snippets/s_big_number.xml Outdated Show resolved Hide resolved
@chgo-odoo chgo-odoo force-pushed the master-fix-s_big_number-gradient-chgo branch from 57c25bc to f0ee2e9 Compare September 22, 2024 19:02
Copy link
Contributor

@stefanorigano stefanorigano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

note: some themes untouched by this PR totally remove the 'text-gradient" effect. I'm wondering if it's the right approach. Anyhow, adding them back would be out of scope for this PR.. the fix it's ok 👍

Thanks!

@chgo-odoo chgo-odoo marked this pull request as draft September 27, 2024 12:48
@chgo-odoo chgo-odoo changed the base branch from master to 18.0 September 28, 2024 09:55
*: 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
@chgo-odoo chgo-odoo force-pushed the master-fix-s_big_number-gradient-chgo branch from f0ee2e9 to a745281 Compare September 28, 2024 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants