-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Fix form SCSS variables no longer being defined in the outermost scope, so no longer being accessible #7341
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gigorok thanks
@javierjulio , hello, what do you think about this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They don't need to be moved, just marked with a !default
at the end which the form variables don't have. The gradient variables do have it already though. Are you sure you can't override those gradient variables currently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at this PR and I think it's correct.
I believe the issue is that since #6922, these variables are only defined under a @media screen
scope, so they no longer work when accessed from active_admin_datepicker outside of any scopes:
If the variables are moved to _variables.scss
, they are again defined outside of any @media
scope as they used to (because that file gets imported from the top level), so the issue gets fixed. This explains why also the alternative fix of wrapping rules in active_admin_datepicker
under a @media
scope also works.
@deivid-rodriguez yep. you are right. I'm going to fix |
Alright, so if I understand correctly, this is actually fixing two issues:
Correct? |
Correct. After merging of this PR |
Alright, this looks good to me. Only nitpick would be if you would mind to split both changes into two separate commits, and explain each of them on its own commit message. |
@javierjulio We have confirmed that you were right that gradient variables were fine, and that |
Done. Please, check it up. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
As far as I understand, the addition of !default
is not necessary for active_admin_datetimepicker
because:
- Variables are not overridden, just used.
- Even if they were overridden, they are overridden after the default values are set, so
!default
would have no effect.
That said, the change keeps consistency with all the other variables in _variables.scss
, so it seems good!
Thanks @gigorok and @javierjulio! ❤️ |
Uh oh!
There was an error while loading. Please reload this page.