Forum Discussion

snaffle's avatar
snaffle
Expert
7 years ago

Responsive variables - no suppor for REM or EM values

Working with responsive skins at the moment and we seen unable to use "rem" or "em" values in _variables.scss where we get the following error message:

 

skin didn't compile because there is a sass compilation error: problem loading skin: selectability,reason: Sass compilation for template 'selectability' failed: selectability/sass/_variables.scss:462: cannot add or subtract numbers with incompatible units

 

Is this a bug or has it been deliberately done this way for some reason.

 

No problem with adding them to _style.scss but it sure would be useful to be able to set them as variables.

  • snaffle

     

    You can use these values in the variable.scss file also.  But I assume there is the syntax error. Seems you are using a hyphen(-) between two keywords without quotes which will not be possible because of that will treated as a minus(-) symbol. Can you share those lines? 

    • snaffle's avatar
      snaffle
      Expert

      Hi VikasB,

       

      This is just the default variables.scss file - we haven't added anything, just changed existing values.

       

      Line 462 is where we are trying enter the rem's. By default it's as follows:

       

      $padding-xl-vertical:         40px;

       

      If that's the value it saves, but if I change it to:

       

      $padding-xl-vertical:         2rem;

       

      It won't compile in Studio and we get the error.

       

      Thanks

       

      Nathan

       

      • VikasB's avatar
        VikasB
        Boss

        snaffle

        The same line works perfectly for my instance. It is also rendering an unexpected error message but the value is getting saved. 

        https://prnt.sc/iorfzr

        I refreshed the page but the value was saved there. 

        https://prnt.sc/iorh3r
        I would suggest you contact to support team.