css3 - Sass Variable in CSS calc() function -
i'm trying use calc()
function in sass stylesheet, i'm having issues. here's code:
$body_padding: 50px body padding-top: $body_padding height: calc(100% - $body_padding)
if use literal 50px
instead of body_padding
variable, want. however, when switch variable, output:
body { padding-top: 50px; height: calc(100% - $body_padding); }
how can sass recognize needs replace variable within calc
function?
interpolate:
body height: calc(100% - #{$body_padding})
for case, border-box suffice:
body box-sizing: border-box height: 100% padding-top: $body_padding
Comments
Post a Comment