Skip to content

Commit

Permalink
fix: deprecation warning for division in scss
Browse files Browse the repository at this point in the history
Deprecation Warning: Using / for division outside of calc() is
deprecated and will be removed in Dart Sass 2.0.0.

Recommendation: math.div($header-height, 1.5) or calc($header-height / 1.5)

More info and automated migrator: https://sass-lang.com/d/slash-div
  • Loading branch information
jeffreytse committed Oct 7, 2024
1 parent 25e15cf commit bbbd1e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _sass/misc/article-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
.post-menu-content {
ul {
border-left: 1px solid #e9ecef;
$indent: #{$base-font-size / 4};
$indent: calc($base-font-size / 4);
$active-bgcolor: #ecebec;

@for $i from 2 to 7 {
Expand Down
6 changes: 3 additions & 3 deletions _sass/yat/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: #{$spacing-unit / 2};
margin-bottom: calc($spacing-unit / 2);
}


Expand Down Expand Up @@ -128,7 +128,7 @@ a {
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: #{$spacing-unit / 2};
padding-left: calc($spacing-unit / 2);
@include relative-font-size(1.125);
letter-spacing: -1px;
font-style: italic;
Expand Down Expand Up @@ -222,7 +222,7 @@ table {
}

th, td {
padding: #{$spacing-unit / 3} #{$spacing-unit / 2};
padding: calc($spacing-unit / 3) calc($spacing-unit / 2);
}

th {
Expand Down
4 changes: 2 additions & 2 deletions _sass/yat/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ html {

.site-favicon {
display: inline-block;
height: #{$header-height / 1.5};
height: calc($header-height / 1.5);
margin-right: 5px;
}
}
Expand Down Expand Up @@ -695,7 +695,7 @@ html {
}

@include media-query($on-palm) {
height: #{$banner-height / 1.5};
height: calc($banner-height / 1.5);
}
}

Expand Down

0 comments on commit bbbd1e4

Please sign in to comment.