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

Sass >= 1.77.7 warnings #123

Open
tagliala opened this issue Jul 17, 2024 · 1 comment · May be fixed by #124
Open

Sass >= 1.77.7 warnings #123

tagliala opened this issue Jul 17, 2024 · 1 comment · May be fixed by #124
Labels

Comments

@tagliala
Copy link

⚠️ ArcticAdmin is a simple gem, if you found a bug, you can easily fix it and make a pull-request. 🙏 Thanks !

Describe the bug

There are warnings when compiling against Sass >= 1.77.7

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo
  2. Install Sass npm install -g sass@1.77.7 (# Or .8)
  3. npx sass src/scss/_main.scss
  4. See error

Expected behavior
No warnings

Actual behavior

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

   ┌──> src/scss/_buttons.scss
3  │     padding: 5px 8px;
   │     ^^^^^^^^^^^^^^^^ declaration
   ╵
   ┌──> src/scss/mixins/_buttons_mixins.scss
34 │ ┌   &:disabled {
35 │ │     background-color: $background-color;
36 │ │   }
   │ └─── nested rule
   ╵
    src/scss/_buttons.scss 3:3  @import
    src/scss/_main.scss 8:9     root stylesheet

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

   ┌──> src/scss/_buttons.scss
4  │     font-size: 16px;
   │     ^^^^^^^^^^^^^^^ declaration
   ╵
   ┌──> src/scss/mixins/_buttons_mixins.scss
34 │ ┌   &:disabled {
35 │ │     background-color: $background-color;
36 │ │   }
   │ └─── nested rule
   ╵
    src/scss/_buttons.scss 4:3  @import
    src/scss/_main.scss 8:9     root stylesheet

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

   ┌──> src/scss/components/_comments.scss
35 │           padding: 2px 9px;
   │           ^^^^^^^^^^^^^^^^ declaration
   ╵
   ┌──> src/scss/mixins/_buttons_mixins.scss
34 │ ┌   &:disabled {
35 │ │     background-color: $background-color;
36 │ │   }
   │ └─── nested rule
   ╵
    src/scss/components/_comments.scss 35:9  @import
    src/scss/_main.scss 12:9                 root stylesheet

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

   ┌──> src/scss/components/_comments.scss
36 │           font-size: 12px;
   │           ^^^^^^^^^^^^^^^ declaration
   ╵
   ┌──> src/scss/mixins/_buttons_mixins.scss
34 │ ┌   &:disabled {
35 │ │     background-color: $background-color;
36 │ │   }
   │ └─── nested rule
   ╵
    src/scss/components/_comments.scss 36:9  @import
    src/scss/_main.scss 12:9                 root stylesheet

Deprecation Warning: Sass's behavior for declarations that appear after nested
rules will be changing to match the behavior specified by CSS in an upcoming
version. To keep the existing behavior, move the declaration above the nested
rule. To opt into the new behavior, wrap the declaration in `& {}`.

More info: https://sass-lang.com/d/mixed-decls

   ┌──> src/scss/components/_comments.scss
37 │           float: right;
   │           ^^^^^^^^^^^^ declaration
   ╵
   ┌──> src/scss/mixins/_buttons_mixins.scss
34 │ ┌   &:disabled {
35 │ │     background-color: $background-color;
36 │ │   }
   │ └─── nested rule
   ╵
    src/scss/components/_comments.scss 37:9  @import
    src/scss/_main.scss 12:9                 root stylesheet

Warning: 31 repetitive deprecation warnings omitted.
Run in verbose mode to see all warnings.

Screenshots
n/a

Desktop (please complete the following information):
n/a

Smartphone (please complete the following information):
n/a

Gemfile
n/a

Additional context
Ref: twbs/bootstrap#40621

@tagliala tagliala added the bug label Jul 17, 2024
@tagliala
Copy link
Author

tagliala commented Jul 28, 2024

Approach:

  1. Compile with sass
  2. Run stylelint on both css files to sort properties
  3. Check differences
$ git diff --no-index main.css fix.css
diff --git a/main.css b/fix.css
index 99f4afcc6..d40084709 100644
--- a/main.css
+++ b/fix.css
@@ -302,8 +302,8 @@ hr {
   color: #fff;
   cursor: pointer;
   background-color: #4bacfe;
-  border: none;
   border: 0;
+  border: none;
   border-radius: 3px;
   transition: border .15s linear, color .15s linear, width .15s linear, background-color .15s linear;
 }
@@ -1807,8 +1807,8 @@ body.index .table_tools .batch_actions_selector {
 body.index .table_tools .dropdown_menu_button {
   position: relative;
   display: inline-block;
-  padding: 4px 8px;
   padding: 6px 25px 6px 10px;
+  padding: 4px 8px;
   color: #4bacfe;
   cursor: pointer;
   background-color: #fff;
  1. Use border: none; for uniformity
  2. There is a breaking change is in body.index .table_tools .dropdown_menu_button.

tagliala added a commit to tagliala/arctic_admin that referenced this issue Jul 28, 2024
- Use `border: none;` for uniformity and to prevent two rules to be
  added to `.ui-dialog .ui-button`

Close cprodhomme#123
tagliala added a commit to tagliala/arctic_admin that referenced this issue Jul 28, 2024
- Use `border: none;` for uniformity and to prevent two rules to be
  added to `.ui-dialog .ui-button`
- Fix `secondary-dropdown` mixin to preserve its padding

Close cprodhomme#123
@tagliala tagliala linked a pull request Jul 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant