Open jcheng5 opened 5 years ago
Looks good to me!
Link for understanding sass list spec (unnamed list): https://www.sitepoint.com/sass-reference/lists/
$list: ('foo', 'bar', 'baz');
Link for understanding sass map spec (named list): https://webdesign.tutsplus.com/tutorials/an-introduction-to-sass-maps-usage-and-examples--cms-22184
$map: (
key: value,
nextkey: nextvalue
);
... double check for brackets on grid
@jcheng5 should this change be done for the CRAN release?
It's really cool that
sass()
allows nested unnamed lists! I would like to make this work:This almost works now, but not if
use_theme
isFALSE
. This is because anywhere aNULL
is found, it turns into"null"
:My position is that the first
NULL
should render as empty string, and thelist(foo=NULL)
should render as$foo: null;
. The third entry should render as either$bar: (null);
or$bar: [null];
.Once you encounter a named list, the recursion shouldn't be via
as_sass
, but something else--as_sass_value
perhaps?NULL
""
"null"
as_sass
, collapse with"\n"
as_sass_value
, then create (bracketed?) Sass listas_sass_value
, turn into name/value pairsas_sass_value
, turn into Sass map