[css-properties-values-api] named parameters in custom values

Dear Houdarlings,

my chums and I at Wix are working on a pre-processor that extends CSS [1]
and we want to pass named parameters in a custom value, like this:

.root {
   -st-mixin:
       --Theme(
           color1 green,
           color2 red
       )

     display: flex;
  }


 We're somewhat uncomfortable with assigning "color1" with the value
"green" with only a space between them. It feels like we should use some
other assigment marker, such a colon similar to SASS [2]:

 .root {
   -st-mixin:
       --Theme(
           color1:green,
           color2:red
       )

   display: flex;
  }

 or, more weirdly, with an equals sign:

  .root {
   -st-mixin:
       --Theme(
           color1=green,
           color2=red
       )

   display: flex;
  }


 We're designing our APIs to be as close as possible to CSS, and to adhere
to its syntax so that devtools don't show errors.

 Has something like this been discussed with regards to the CSS Proprties
and Values spec, so we can use the same syntax and thereby future-proof our
project?

 Hang loose and stay groovy

 [1] https://stylable.io
 [2] http://vanseodesign.com/css/custom-sass-functions/#keywordarguments

-- 
Bruce Lawson
www.brucelawson.co.uk
www.twitter.com/brucel

Received on Monday, 18 December 2017 15:07:11 UTC