UNPKG

suomifi-ui-components

Version:
35 lines (31 loc) 1.75 kB
'use strict'; var tslib = require('tslib'); var styled = require('styled-components'); var normalize = require('./normalize.js'); var common = styled.css(templateObject_1 || (templateObject_1 = tslib.__makeTemplateObject(["\n margin: 0;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n font: 100% inherit;\n line-height: 1;\n text-align: left;\n text-decoration: none;\n vertical-align: baseline;\n color: inherit;\n background: none;\n cursor: inherit;\n\n ::before,\n ::after {\n box-sizing: border-box;\n }\n"], ["\n margin: 0;\n padding: 0;\n border: 0;\n box-sizing: border-box;\n font: 100% inherit;\n line-height: 1;\n text-align: left;\n text-decoration: none;\n vertical-align: baseline;\n color: inherit;\n background: none;\n cursor: inherit;\n\n ::before,\n ::after {\n box-sizing: border-box;\n }\n"]))); var resets = { normalize: normalize.normalize, common: common }; var selectorDeclaration = function selectorDeclaration(selector, styles) { return "&".concat(selector, " {\n ").concat(styles, "\n }"); }; var selectorsAndCss = function selectorsAndCss(selector) { var styles = !!normalize.normalize && normalize.normalize[selector]; return !!styles ? selectorDeclaration(selector, styles) : ''; }; var resetWithSelectors = function resetWithSelectors(selectors) { if (Array.isArray(selectors) && selectors.length > 0) { return "\n ".concat(selectors.map(function (s) { return selectorsAndCss(s); }).join(''), "\n "); } if (typeof selectors === 'string') { return selectorsAndCss(selectors); } return ''; }; var templateObject_1; exports.resetWithSelectors = resetWithSelectors; exports.resets = resets; //# sourceMappingURL=index.js.map