terribleMia’s avatarterribleMia’s Twitter Archive—№ 7,188

    1. …in reply to @marktnoonan
      marktnoonan hankchizljaw eleven_ty We do a mix of - Allow YAML data & nunjucks to set variables inline - Allow pages to import custom/additional stylesheets from YAML
  1. …in reply to @TerribleMia
    marktnoonan hankchizljaw eleven_ty The filter for turning a dictionary into a style attribute value: const styles = (dict) => { const map = Object.keys(dict).map((prop) => { const val = dict[prop]; return val ? ${prop}:${val}; : ''; }); return map.reduce((all, one) => ${all}${one}, ''); };