Skip to content

Commit 1bc90c6

Browse files
committed
Fix dart sass 2.0 division deprecations
The src/rails_admin/styles/base/theming.scss used division calculations which causes deprecation warnings with dart sass >= 2. The fontawesome-free version also has the same problem. Using calc() around the division math fixes the issue in theming.scss Upgrading fontawesome-free to the latest version fixies their issue
1 parent 1b3c2fe commit 1bc90c6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"dependencies": {
1717
"@babel/runtime": "^7.16.7",
18-
"@fortawesome/fontawesome-free": "^5.15.4",
18+
"@fortawesome/fontawesome-free": "^6.1.1",
1919
"@hotwired/turbo-rails": "^7.1.0",
2020
"@popperjs/core": "^2.11.0",
2121
"@rails/ujs": "^6.1.4-1",

src/rails_admin/styles/base/theming.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body.rails_admin {
1919

2020
img {
2121
position: absolute;
22-
top: ((40px - $avatar-size) / 2);
22+
top: calc((40px - $avatar-size) / 2);
2323

2424
& + span {
2525
margin-left: ($avatar-size + 5px);
@@ -33,14 +33,14 @@ body.rails_admin {
3333
padding: 0;
3434

3535
.dropdown-header {
36-
padding: ($grid-gutter-width / 2) ($grid-gutter-width / 2) 3px;
36+
padding: calc($grid-gutter-width / 2) calc($grid-gutter-width / 2) 3px;
3737
font-weight: bold;
3838
color: $gray-700;
3939
text-transform: uppercase;
4040
}
4141

4242
> li > a {
43-
padding: ($navbar-padding-y / 2) ($grid-gutter-width / 2);
43+
padding: calc($navbar-padding-y / 2) calc($grid-gutter-width / 2);
4444

4545
&.active {
4646
background-color: map-get($theme-colors, primary);

0 commit comments

Comments
 (0)