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

Use default sass function to lighten colors #3331

Merged
merged 2 commits into from
Sep 12, 2019

Conversation

mfrecchiami
Copy link
Contributor

Noticed that the custom sass @function very-light doesn't work
properly and this fact is generating display issues, both in tables
with actions, and in components such as Taxonomies.

The issue

Schermata 2019-08-23 alle 11 22 12 (1)

Screenshot from 2019-09-10 16_01_37

Resolved issue

Schermata 2019-09-11 alle 14 47 35

Schermata 2019-09-11 alle 14 47 15

Noticed that the custom sass `@function very-light` doesn't work
properly and this fact is generating display issues, both in tables
with actions, and in components such as Taxonomies.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

Absolutely. Can we remove the very-light function as well, or is this from Compass?

@mfrecchiami
Copy link
Contributor Author

Hi @tvdeyen !
The very-light function is a custom function:
https://github.com/solidusio/solidus/blob/master/backend/app/assets/stylesheets/spree/backend/globals/_functions.scss

so actually we could remove it 👍

@tvdeyen
Copy link
Member

tvdeyen commented Sep 11, 2019

Dang, then we should @deprecate it first.

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Great work @mfrecchiami, I think this would be preferable even if very-light was working as expected!

Copy link
Contributor

@jacobherrington jacobherrington left a comment

Choose a reason for hiding this comment

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

Oops, forgot to click Approve 😉

@mfrecchiami mfrecchiami force-pushed the mfrecchiami/quick-fix-bg-actions branch from f859354 to 9873d5d Compare September 12, 2019 11:12
@kennyadsl
Copy link
Member

Thanks @mfrecchiami !!

@kennyadsl kennyadsl merged commit c2eae3a into solidusio:master Sep 12, 2019
@kennyadsl kennyadsl deleted the mfrecchiami/quick-fix-bg-actions branch September 12, 2019 14:05
@tvdeyen
Copy link
Member

tvdeyen commented Nov 4, 2019

We probably have to release a fixed supported versions with a locked sassc version. We had some issues with lighten colors in Solidus 2.6 and above with sassc 2.2.1. Locking it to 2.0.1 helped.

@kennyadsl
Copy link
Member

@tvdeyen this fix has been released in Solidus 2.6, if I recall correctly. What is the problem exactly?

@tvdeyen
Copy link
Member

tvdeyen commented Nov 4, 2019

@kennyadsl due to changes in Sassc in the lighten function if you have a custom theme that sets new values for $color-x variables all the colors are too dark. Thats why in this change https://github.com/solidusio/solidus/pull/3331/files#diff-c48fd398d057bc5e3c809c376edd3ad9 all the color values have been taken by 5. We could override every scss file that has very-light in it and replace it with lighten and take the vallue by 5, but this is meh. We locked the sassc version in our code base to fix this, but we probably should lock the version in solidus_backend as well to help other stores as well. WDYT?

@kennyadsl
Copy link
Member

Got it but I'm not sure since this lock would only be needed if someone has custom css that overrides the default Solidus admin theme but this will not allow using most recent Sassc versions to who is not using a custom theme, right?

We support changing admin colors but if the "unsupported" custom code is inside user applications, that's probably the best place where the lock is needed.

@kennyadsl
Copy link
Member

I mean, we are also printing a deprecation warning for that function, is it working?

@tvdeyen
Copy link
Member

tvdeyen commented Nov 4, 2019

We support changing admin colors but if the "unsupported" custom code is inside user applications, that's probably the best place where the lock is needed.

@kennyadsl it is not unsupported code in our custom code. It is incompatible code inside of solidus_backend.

@tvdeyen
Copy link
Member

tvdeyen commented Nov 4, 2019

Solidus backend makes use of the very-light function that is not working anymore in sassc 2.2. And if you replace it with lighten you have to take the value by 5 like @mfrecchiami did in this PR. But this fix has not been backported.

@kennyadsl
Copy link
Member

Ah, I thought it was backported. I'd go with backporting this fix, then.

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.

5 participants