Is there a way to save the font size / line height in a Sass variable like this:
$font-normal: 14px/21px;
Using this ad, I get division , as described in the documentation. Is there a way to avoid separation?Note I am using scss syntax.
according to the SCSS link at http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#division_and_slash , which is what is expected. try adding it to the mix:
@mixin fontandline{ font: 14px/12px; }
then when you need to use it again just write it like this:
@include fontandline;
see http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins for more information.
EDIT: according to the latest documentation (see link above), the following code
p { $ font-size: 12px; $ line-height: 30px; font: # {$ font-size} / # {$ line-height}; }
should compile to
p { font: 12px / 30px; }
I use: $somevar: unquote("14px/17px");
$somevar: unquote("14px/17px");
Source: https://habr.com/ru/post/1310175/More articles:How can I bring something like author 200X with natbib in LaTeX? - latexStatic structure initialization with class elements - c ++Wait for the inline thread to complete before moving to the next method - javaWhat is the preferred way to read / write content from a URL in Java - javaRequest two different servers - sqlphp remove duplicates from an array - arraysHow can I evaluate the git-svn limit? - gitReading fragmented data from HttpEntity - javaHow, in general, can a web environment support a REST style? - language-agnosticSaving information in the input-output system - linux-kernelAll Articles