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

Deprecated mixed declarations #2267

Merged
merged 6 commits into from
Jul 9, 2024
Merged

Deprecated mixed declarations #2267

merged 6 commits into from
Jul 9, 2024

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Jun 19, 2024

@nex3 nex3 marked this pull request as ready for review June 20, 2024 21:38
Copy link
Member

@jathak jathak left a comment

Choose a reason for hiding this comment

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

This needs a changelog entry and the sass_api major version should be bumped.

@nex3
Copy link
Contributor Author

nex3 commented Jul 9, 2024

Dartdoc seems to be failing due to dart-lang/dartdoc#3818

@nex3 nex3 changed the title Deprecated mixed declarations and implement @nest Deprecated mixed declarations Jul 9, 2024
@nex3 nex3 merged commit 7203d65 into main Jul 9, 2024
34 checks passed
@nex3 nex3 deleted the interleaved-decls branch July 9, 2024 21:31
@stefanv
Copy link

stefanv commented Aug 14, 2024

Confusingly, the page linked to in the warning gives an example that, due CSS specificity rules, renders the same under old and new behaviors. Do we have examples of where new behavior creates differences?

@nex3
Copy link
Contributor Author

nex3 commented Aug 16, 2024

Yes, any example where the nested rule doesn't affect specificity:

.example {
  color: red;

  @media screen {
    font-weight: bold;
  }

  font-weight: normal;
}

wonda-tea-coffee added a commit to wonda-tea-coffee/activeadmin_addons that referenced this pull request Aug 20, 2024
The following deprecation warning was addressed.

```
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

    ╷
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
9   │       margin-bottom: 5px;
    │       ^^^^^^^^^^^^^^^^^^ declaration
    ╵
    vendor/bundle/gems/activeadmin_addons-1.10.1/app/assets/stylesheets/activeadmin_addons/inputs/date-ti
me-picker-filter.scss 9:5  @import
(snip)
```

This warning is due to the following change in dart-sass.
sass/dart-sass#2267
wonda-tea-coffee added a commit to wonda-tea-coffee/activeadmin_addons that referenced this pull request Aug 20, 2024
The following deprecation warning was addressed.

```
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

    ╷
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
9   │       margin-bottom: 5px;
    │       ^^^^^^^^^^^^^^^^^^ declaration
    ╵
    vendor/bundle/gems/activeadmin_addons-1.10.1/app/assets/stylesheets/activeadmin_addons/inputs/date-ti
me-picker-filter.scss 9:5  @import
(snip)
```

This warning is due to the following change in dart-sass.
sass/dart-sass#2267
rjherrera pushed a commit to wonda-tea-coffee/activeadmin_addons that referenced this pull request Sep 10, 2024
The following deprecation warning was addressed.

```
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

    ╷
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
5   │ ┌     label {
6   │ │       display: none;
7   │ │     }
    │ └─── nested rule
... │
9   │       margin-bottom: 5px;
    │       ^^^^^^^^^^^^^^^^^^ declaration
    ╵
    vendor/bundle/gems/activeadmin_addons-1.10.1/app/assets/stylesheets/activeadmin_addons/inputs/date-ti
me-picker-filter.scss 9:5  @import
(snip)
```

This warning is due to the following change in dart-sass.
sass/dart-sass#2267
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