diff --git a/lib/compile.js b/lib/compile.js index 9b53208..29e7c10 100644 --- a/lib/compile.js +++ b/lib/compile.js @@ -76,8 +76,21 @@ var compile = { } else if (/fontWeight/.test(property)) { if (/^(normal|bold|[1-9]00)$/.test(value)) { obj[property] = '"' + value + '"'; - } else if (/^['|"](normal|bold|[1-9]00)['|"]$/.test(value)) { - obj[property] = value; + } else if (/^['|"]?(normal|bold|[1-9]00)['|"]?$/.test(value)) { + obj[property] = value + ''; + } else if (/^['|"]?(bolder|lighter|initial|inherit|unset)['|"]?$/.test(value)) { + switch (value) { + case 'bolder': + obj[property] = '900'; + atom.notifications.addInfo('`bolder` value set to `900`') + break; + case 'lighter': + obj[property] = '200'; + atom.notifications.addInfo('`lighter` value set to `200`') + break; + default: + atom.notifications.addWarning('`' + value + '` value was not set') + } } else { throw new Error('fontWeight value in ["normal", "bold", "100", "200", "300", "400", "500", "600", "700", "800", "900"]'); }