Skip to content

Commit

Permalink
Use multiplication instead of calc() if possible (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
yous committed Aug 30, 2023
1 parent 94146d9 commit 110f096
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions _sass/whiteglass.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ $on-laptop: 800px !default;
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: calc($spacing-unit / 2);
// padding-left: calc($spacing-unit / 2);
// padding-right: $spacing-unit * 0.5;
// padding-left: $spacing-unit * 0.5;
// }
// }
@mixin media-query($device) {
Expand Down
10 changes: 5 additions & 5 deletions _sass/whiteglass/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ h1, h2, h3, h4, h5, h6,
p, blockquote, pre,
ul, ol, dl, figure,
%vertical-rhythm {
margin-bottom: calc($spacing-unit / 2);
margin-bottom: $spacing-unit * 0.5;
}


Expand Down Expand Up @@ -127,7 +127,7 @@ a {
blockquote {
color: $grey-color;
border-left: 4px solid $grey-color-light;
padding-left: calc($spacing-unit / 2);
padding-left: $spacing-unit * 0.5;
font-size: 18px;
letter-spacing: -1px;
font-style: italic;
Expand All @@ -148,7 +148,7 @@ blockquote {
*/
hr {
height: 4px;
margin: calc($spacing-unit / 2) 0;
margin: $spacing-unit * 0.5 0;
border: 0;
background-color: $grey-color-light;
}
Expand Down Expand Up @@ -200,8 +200,8 @@ pre {
@include media-query($on-laptop) {
max-width: -webkit-calc(#{$content-width} - (#{$spacing-unit}));
max-width: calc(#{$content-width} - (#{$spacing-unit}));
padding-right: calc($spacing-unit / 2);
padding-left: calc($spacing-unit / 2);
padding-right: $spacing-unit * 0.5;
padding-left: $spacing-unit * 0.5;
}
}

Expand Down
2 changes: 1 addition & 1 deletion _sass/whiteglass/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
* Pagination
*/
.pagination {
padding: calc($spacing-unit / 2) 0;
padding: $spacing-unit * 0.5 0;
border-top: 1px solid $grey-color-light;
border-bottom: 1px solid $grey-color-light;
text-align: center;
Expand Down
4 changes: 2 additions & 2 deletions assets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ $on-laptop: 800px;
// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: calc($spacing-unit / 2);
// padding-left: calc($spacing-unit / 2);
// padding-right: $spacing-unit * 0.5;
// padding-left: $spacing-unit * 0.5;
// }
// }
@mixin media-query($device) {
Expand Down

0 comments on commit 110f096

Please sign in to comment.