-
Notifications
You must be signed in to change notification settings - Fork 33
Fix Sass deprecation warnings #2157
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
base: master
Are you sure you want to change the base?
Fix Sass deprecation warnings #2157
Conversation
...ages/ocs/dashboards/persistent-internal/capacity-breakdown-card/capacity-breakdown-card.scss
Outdated
Show resolved
Hide resolved
422757d
to
0ca79cf
Compare
@use '@patternfly/patternfly/sass-utilities/all' as pf; | ||
|
||
.odf-general-overview__grid { | ||
padding-left: shared.$pf-v5-global-gutter; | ||
padding-right: shared.$pf-v5-global-gutter; | ||
|
||
@media(min-width: shared.$pf-v5-global--breakpoint--xl) { | ||
@media(min-width: pf.$pf-v5-global--breakpoint--xl) { |
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.
@Soundarya189r this change is not needed: it works as it is.
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.
@Soundarya189r Then it means that your changes in packages/shared/src/styles/_vars.scss
are impacting here: if this variable is now exposed via PF utilities, then investigate if we can get rid of @use '@odf/shared/style.scss' as shared;
in this file.
@@ -1,4 +1,4 @@ | |||
@import '../../style.scss'; | |||
@use '../../style.scss' as *; |
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.
IIUC this statement is useless: either we @forward
(if the original intention was to expose those classes to the global namespace) or either we remove this statement (as we're not using any imported class/variable/mixin from that file).
@@ -1,4 +1,4 @@ | |||
@import '../../enroll-discovered-application.scss'; | |||
@use '../../enroll-discovered-application.scss' as *; |
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.
@@ -1,4 +1,4 @@ | |||
@import '../../enroll-discovered-application.scss'; | |||
@use '../../enroll-discovered-application.scss' as *; |
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.
@use '@odf/shared/styles/skeleton' as *; | ||
@use '@odf/shared/dashboards/capacity-card/capacity-card.scss' as *; |
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.
@@ -1,4 +1,4 @@ | |||
@import '@odf/shared/styles/skeleton'; | |||
@use '@odf/shared/styles/skeleton' as *; |
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.
The main intention of @use
is to use namespaces (rather than global namespace) to avoid potential collisions:
@use '@odf/shared/styles/skeleton' as *; | |
@use '@odf/shared/styles/skeleton' as sk; |
@@ -1,4 +1,4 @@ | |||
@import '@patternfly/patternfly/sass-utilities/colors'; | |||
@use '@patternfly/patternfly/sass-utilities/colors' as *; |
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.
@use '@patternfly/patternfly/sass-utilities/colors' as *; | |
@use '@patternfly/patternfly/sass-utilities/colors' as colors; |
@@ -1,4 +1,4 @@ | |||
@import '@patternfly/patternfly/sass-utilities/colors'; | |||
@use '@patternfly/patternfly/sass-utilities/colors' as *; |
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.
@use '@patternfly/patternfly/sass-utilities/colors' as *; | |
@use '@patternfly/patternfly/sass-utilities/colors' as colors; |
@@ -1,10 +1,11 @@ | |||
@import './../../style.scss'; | |||
@use './../../style.scss' as *; |
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.
If we find that $pf-v5-global-gutter
is already available in PF sass-utilities, the we don't need this import:
@use './../../style.scss' as *; |
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.
Can you confirm?
@@ -1,3 +1,6 @@ | |||
@use './vars' as vars; | |||
@use './mixin/break-word' as *; |
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.
@use './mixin/break-word' as *; | |
@use './mixin/break-word' as bw; |
@@ -1,3 +1,6 @@ | |||
@use './vars' as vars; | |||
@use './mixin/break-word' as *; |
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.
@use './mixin/break-word' as *; | |
@use './mixin/break-word' as bw; |
@@ -1,4 +1,4 @@ | |||
@import '@odf/shared/styles/skeleton'; | |||
@use '@odf/shared/styles/skeleton' as *; |
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.
@use '@odf/shared/styles/skeleton' as *; | |
@use '@odf/shared/styles/skeleton' as sk; |
@@ -1,4 +1,4 @@ | |||
@import '../../styles/skeleton'; | |||
@use '../../styles/skeleton' as *; |
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.
@use '../../styles/skeleton' as *; | |
@use '../../styles/skeleton' as sk; |
@@ -1,4 +1,4 @@ | |||
@import '../../styles/skeleton'; | |||
@use '../../styles/skeleton' as *; |
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.
@use '../../styles/skeleton' as *; | |
@use '../../styles/skeleton' as sk; |
@@ -1,4 +1,4 @@ | |||
@import '@patternfly/patternfly/sass-utilities/colors'; | |||
@use '@patternfly/patternfly/sass-utilities/colors' as *; |
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.
It seems we're not using any imported member here:
@use '@patternfly/patternfly/sass-utilities/colors' as *; |
@@ -1,4 +1,4 @@ | |||
@import '@odf/shared/styles/skeleton'; | |||
@use '@odf/shared/styles/skeleton' as *; |
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.
@use '@odf/shared/styles/skeleton' as *; | |
@use '@odf/shared/styles/skeleton' as sk; |
@Soundarya189r this PR needs rebase. |
0ca79cf
to
b3e553f
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Soundarya189r The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Soundarya189r: The following test failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Fixes: #1686
Fixes: #2153