jekyll / minima

Minima is a one-size-fits-all Jekyll theme for writers.
https://jekyll.github.io/minima/
MIT License
3.44k stars 3.64k forks source link

SCSS usage of `* 0.5` and `/ 2` #774

Closed vadimkantorov closed 9 months ago

vadimkantorov commented 9 months ago

Are they the same thing? Would be grateful for any hints :)

$spacing-unit * .5: https://github.com/jekyll/minima/blob/21b4274ec3c3fbd0b6c7f55bf72bc8b724aeeacb/_sass/minima/_layout.scss#L151

width: calc(50% - (#{$spacing-unit} / 2)): https://github.com/jekyll/minima/blob/21b4274ec3c3fbd0b6c7f55bf72bc8b724aeeacb/_sass/minima/_layout.scss#L156

If not, what is the reason for the syntax width: calc(50% - (#{$spacing-unit} / 2))? could it not be width: calc(50% - ($spacing-unit * .5)); or width: calc(50% - (#{$spacing-unit} * 0.5))

Thanks :)

SwitWu commented 9 months ago

* .5, * 0.5 and /2 are the same

vadimkantorov commented 9 months ago

thank you for the explanation! :)