User tests: Successful: Unsuccessful:
Pull Request for PR #35639 .
This PR could be merged into [4.1-dev] as well.
The fontawesome icon library haven't marked their $fa-fw-width
variable with !default
, see #17482 which uses (20em / 16)
expression which is deprecated in dart-sass 2.0 and also largely reported in the fontawesome issues.
Other changes in this PR also address other dart-sass issues, but we don't replace for instance 24 / 16
with math.div(24, 16)
as recommended by the compiler, but with 24 * 0.0625
(which is the result of 1/16) and the reason for that is the libsass compiler still largely used and this approach is also widely adopted. I suspect scssPhp also might not have math
implemented.
See this PR in fontawesome for more info. Briefly, Bootstrap core devs also continue to support libsass, so should we.
Check SASS compiler output. You should see all SCSS compiled. If the npm build is green, there is no need to test anything else.
The SCSS compiler just won't do division via the /
(forward slash) operator, the build will simply fail
https://ci.joomla.org/joomla/joomla-cms/47599
All SCSS files compiled successful.
No.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) NPM Change |
Labels |
Added:
?
NPM Resource Changed
|
Category | Administration Templates (admin) NPM Change | ⇒ | Administration Templates (admin) NPM Change Repository |
Category | Administration Templates (admin) NPM Change Repository | ⇒ | Administration Templates (admin) NPM Change Repository Installation |
Category | Administration Templates (admin) NPM Change Repository Installation | ⇒ | Administration Templates (admin) NPM Change Repository Installation Front End Templates (site) |
I tried to test this but in order to do so I need to be able to replicate the problem that this is fixing.
I have been unable to replicate the problem
@brianteeman it may be impossible to replicate the issue right now. The stylelint-scss
basically doesn't pick on this issue, because it's more of a warning for deprecated SCSS and the build might fail once in a while, depending on when and how SASS compiler (dart-sass
based) "feels" the warning should kick in.
I can try to write a step-by-step guide on how you might replicate the problem, but once "sass": "^1.32.12",
goes to "sass": "^2.0.0",
this will be 100% a problem for anyone trying to contribute to Joomla.
16px
-> 17px
, commit and see if NPM build is successful16px
-> 16pe
, using a wrong unit for the value, commit and see if NPM build is successfulI think that for a minor SCSS consistency can pass through the stylelint-scss
but can trigger an entire cascade of warnings that simply stop the build process.
@brianteeman https://sass-lang.com/documentation/breaking-changes/slash-div
It's quite possible you're running an older version of dart-sass, so try an npm i
to update.
npm i
doesnt do an update it has to be either npm i sass
or npm update
- weird
Now that I have updates sass to 1.42.1 I can see the problem. However this PR does not completely resolve the issue and there are still deprecated notices.
Some of them might be coming from BS core
No you still have / issues to fix from fontawesome which this PR doesnt fix AND issues in core templates. Do you want the full log of all the issues
Let's see the build test results here first.
EDIT: go ahead.
@brianteeman the build passed it seems, do you have any issue?
The build is passing because it is NOT using the upgraded sass that produces the issues.
You need to include the package-lock for the build to test with the upgraded sass (I think)
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(20em, 16)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ $fa-fw-width: (20em / 16);
│ ^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_variables.scss 12:25 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 5:9 @import
build\media_source\system\scss\joomla-fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(4em, 3)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ font-size: (4em / 3);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 6:15 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
build\media_source\system\scss\joomla-fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(3em, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
7 │ line-height: (3em / 4);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 7:17 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
build\media_source\system\scss\joomla-fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($fa-li-width * 5, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ margin-left: $fa-li-width * 5/4;
│ ^^^^^^^^^^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_list.scss 6:16 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 10:9 @import
build\media_source\system\scss\joomla-fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($switcher-width - 6, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
96 │ width: ($switcher-width - 6) / 2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
build\media_source\system\scss\fields\switcher.scss 96:10 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($switcher-width, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
103 │ left: ($switcher-width / 2) - 1;
│ ^^^^^^^^^^^^^^^^^^^
╵
build\media_source\system\scss\fields\switcher.scss 103:10 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
87 │ padding: $cassiopeia-grid-gutter/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_global.scss 87:14 @import
templates\cassiopeia\scss\template.scss 15:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
10 │ padding: $cassiopeia-grid-gutter/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_back-to-top.scss 10:12 @import
templates\cassiopeia\scss\template.scss 17:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ padding: 2.5rem ($cassiopeia-grid-gutter/2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_footer.scss 12:22 @import
templates\cassiopeia\scss\template.scss 19:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
15 │ padding: ($cassiopeia-grid-gutter / 2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_header.scss 15:15 @import
templates\cassiopeia\scss\template.scss 22:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
20 │ margin-top: $cassiopeia-grid-gutter / 2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_header.scss 20:17 @import
templates\cassiopeia\scss\template.scss 22:9 root stylesheet
WARNING: 9 repetitive deprecation warnings omitted.
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
87 │ padding: $cassiopeia-grid-gutter/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_global.scss 87:14 @import
templates\cassiopeia\scss\template.scss 15:9 @import
templates\cassiopeia\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
10 │ padding: $cassiopeia-grid-gutter/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_back-to-top.scss 10:12 @import
templates\cassiopeia\scss\template.scss 17:9 @import
templates\cassiopeia\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ padding: 2.5rem ($cassiopeia-grid-gutter/2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_footer.scss 12:22 @import
templates\cassiopeia\scss\template.scss 19:9 @import
templates\cassiopeia\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
15 │ padding: ($cassiopeia-grid-gutter / 2);
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_header.scss 15:15 @import
templates\cassiopeia\scss\template.scss 22:9 @import
templates\cassiopeia\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($cassiopeia-grid-gutter, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
20 │ margin-top: $cassiopeia-grid-gutter / 2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
templates\cassiopeia\scss\blocks\_header.scss 20:17 @import
templates\cassiopeia\scss\template.scss 22:9 @import
templates\cassiopeia\scss\template-rtl.scss 1:9 root stylesheet
WARNING: 9 repetitive deprecation warnings omitted.
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(-$choices-button-offset, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
129 │ margin-right: -$choices-button-offset/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
media\vendor\choicesjs\scss\choices.scss 129:19 @import
templates\cassiopeia\scss\vendor\choicesjs\choices.scss 6:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(-$choices-button-offset, 2)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
129 │ margin-right: -$choices-button-offset/2;
│ ^^^^^^^^^^^^^^^^^^^^^^^^^
╵
node_modules\choices.js\src\styles\choices.scss 129:19 @import
administrator\templates\atum\scss\vendor\choicesjs\choices.scss 13:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(20em, 16)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ $fa-fw-width: (20em / 16);
│ ^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_variables.scss 12:25 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 5:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(4em, 3)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ font-size: (4em / 3);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 6:15 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(3em, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
7 │ line-height: (3em / 4);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 7:17 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($fa-li-width * 5, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ margin-left: $fa-li-width * 5/4;
│ ^^^^^^^^^^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_list.scss 6:16 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 10:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(20em, 16)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ $fa-fw-width: (20em / 16);
│ ^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_variables.scss 12:25 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 5:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 @import
installation\template\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(4em, 3)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ font-size: (4em / 3);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 6:15 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 @import
installation\template\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(3em, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
7 │ line-height: (3em / 4);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 7:17 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 @import
installation\template\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($fa-li-width * 5, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ margin-left: $fa-li-width * 5/4;
│ ^^^^^^^^^^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_list.scss 6:16 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 10:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 @import
installation\template\scss\template-rtl.scss 1:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(20em, 16)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
12 │ $fa-fw-width: (20em / 16);
│ ^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_variables.scss 12:25 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 5:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(4em, 3)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ font-size: (4em / 3);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 6:15 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div(3em, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
7 │ line-height: (3em / 4);
│ ^^^^^^^
╵
media\vendor\fontawesome-free\scss\_larger.scss 7:17 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 8:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 root stylesheet
DEPRECATION WARNING: Using / for division is deprecated and will be removed in Dart Sass 2.0.0.
Recommendation: math.div($fa-li-width * 5, 4)
More info and automated migrator: https://sass-lang.com/d/slash-div
╷
6 │ margin-left: $fa-li-width * 5/4;
│ ^^^^^^^^^^^^^^^^^^
╵
media\vendor\fontawesome-free\scss\_list.scss 6:16 @import
media\vendor\fontawesome-free\scss\fontawesome.scss 10:9 @import
administrator\templates\atum\scss\vendor\fontawesome-free\fontawesome.scss 7:9 @import
installation\template\scss\template.scss 9:9 root stylesheet
Category | Administration Templates (admin) NPM Change Repository Installation Front End Templates (site) | ⇒ | Unit Tests Repository Administration com_content com_tags com_users Language & Strings Modules Templates (admin) NPM Change Front End |
I've re-based my branch and that happened. I hope it's ok..
EDIT: I've reverted that change.
Labels |
Added:
?
Language Change
|
Category | Administration Templates (admin) NPM Change Repository Front End Unit Tests com_content com_tags com_users Language & Strings Modules | ⇒ | Administration Templates (admin) NPM Change Repository Installation Front End Templates (site) |
Labels |
Removed:
?
Language Change
|
@brianteeman @dgrammatiko what's up with this appveyor issue?
I'm tempted to sit on the FA Fix until they fix upstream (it is 1.5 months out which is a bit annoying per FortAwesome/Font-Awesome#18371 ) - but saves us overriding warnings for the sake of it. Obviously the rest of the fixes are good.
Well thanks for someone finally say anything. Cheers
The math.div issue can be resolved locally by applying (and fiddling with) the recommendations in the article mentioned earlier (https://sass-lang.com/documentation/breaking-changes/slash-div), even the fontawesome-free issue.
Obviously though, one has to wait for the official update.
You never did - that message is related to who can merge the file into core.
Not true, if changes after my PR would have been into less than 3 files, I could resolve conflicts. I used to do that for the package-lock.json for the color-picker PR. Both resolve cases are for you to resolve.
@thednp @brianteeman @chmst I could rebase this PR for 4.1 but are you willing to test it so it could be finally merged?
@dgrammatiko I took a look at doing it but the 8 files here are only a small number of the ones that need updating
@brianteeman you mean there are still deprecation notices after applying these changes?
Deleted my post as its the same thing I posted earlier and I think it might have been my fault
actually no idea. The error report AFTER my version of this pr is the same as #35648 (comment) from september
@dgrammatiko IDK man, I'm out of touch with this lately. I would say go ahead and if you get more deprecation notice, have a look at my changes and apply same methods.
This pull request has automatically rebased to 4.2-dev.
This was already fixed with another pr
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-06-27 16:30:30 |
Closed_By | ⇒ | Quy | |
Labels |
Added:
Conflicting Files
?
Removed: ? |
@brianteeman I've completed the PR for [4.0-dev] it should be a valid build. After this merge, the same changes are required for [4.1-dev] asap. I've updated the description. Please let me know if this PR needs anything.