pure-styled-components
Version:
Styled Component design system based on Pure CSS for React/Preact
39 lines (31 loc) • 7.09 kB
JavaScript
function _templateObject() {
var data = _taggedTemplateLiteral(["\n /**\n * Normalize.css\n */\n\n html {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n }\n body {\n margin: 0;\n }\n main {\n display: block;\n }\n h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n pre {\n font-family: monospace, monospace;\n font-size: 1em;\n }\n a {\n background-color: transparent;\n }\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp {\n font-family: monospace, monospace;\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n img {\n border-style: none;\n }\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n button,\n input {\n overflow: visible;\n }\n button,\n select {\n text-transform: none;\n }\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"] {\n -webkit-appearance: button;\n }\n button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n button:-moz-focusring,\n [type=\"button\"]:-moz-focusring,\n [type=\"reset\"]:-moz-focusring,\n [type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n }\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n progress {\n vertical-align: baseline;\n }\n textarea {\n overflow: auto;\n }\n [type=\"checkbox\"],\n [type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n }\n [type=\"number\"]::-webkit-inner-spin-button,\n [type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n }\n [type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n [type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n details {\n display: block;\n }\n summary {\n display: list-item;\n }\n template {\n display: none;\n }\n [hidden] {\n display: none;\n }\n\n /**\n * Always hide an element when it has the `hidden` HTML attribute.\n */\n .hidden,\n [hidden] {\n display: none !important;\n }\n\n /**\n * Add this class to an image to make it fit within it's fluid parent wrapper while maintaining\n * aspect ratio.\n */\n .pure-img {\n max-width: 100%;\n height: auto;\n display: block;\n }\n"], ["\n /**\n * Normalize.css\n */\n\n html {\n line-height: 1.15;\n -webkit-text-size-adjust: 100%;\n }\n body {\n margin: 0;\n }\n main {\n display: block;\n }\n h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n hr {\n box-sizing: content-box;\n height: 0;\n overflow: visible;\n }\n pre {\n font-family: monospace, monospace;\n font-size: 1em;\n }\n a {\n background-color: transparent;\n }\n abbr[title] {\n border-bottom: none;\n text-decoration: underline;\n text-decoration: underline dotted;\n }\n b,\n strong {\n font-weight: bolder;\n }\n code,\n kbd,\n samp {\n font-family: monospace, monospace;\n font-size: 1em;\n }\n small {\n font-size: 80%;\n }\n sub,\n sup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n }\n sub {\n bottom: -0.25em;\n }\n sup {\n top: -0.5em;\n }\n img {\n border-style: none;\n }\n button,\n input,\n optgroup,\n select,\n textarea {\n font-family: inherit;\n font-size: 100%;\n line-height: 1.15;\n margin: 0;\n }\n button,\n input {\n overflow: visible;\n }\n button,\n select {\n text-transform: none;\n }\n button,\n [type=\"button\"],\n [type=\"reset\"],\n [type=\"submit\"] {\n -webkit-appearance: button;\n }\n button::-moz-focus-inner,\n [type=\"button\"]::-moz-focus-inner,\n [type=\"reset\"]::-moz-focus-inner,\n [type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n }\n button:-moz-focusring,\n [type=\"button\"]:-moz-focusring,\n [type=\"reset\"]:-moz-focusring,\n [type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n }\n fieldset {\n padding: 0.35em 0.75em 0.625em;\n }\n legend {\n box-sizing: border-box;\n color: inherit;\n display: table;\n max-width: 100%;\n padding: 0;\n white-space: normal;\n }\n progress {\n vertical-align: baseline;\n }\n textarea {\n overflow: auto;\n }\n [type=\"checkbox\"],\n [type=\"radio\"] {\n box-sizing: border-box;\n padding: 0;\n }\n [type=\"number\"]::-webkit-inner-spin-button,\n [type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n }\n [type=\"search\"] {\n -webkit-appearance: textfield;\n outline-offset: -2px;\n }\n [type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n ::-webkit-file-upload-button {\n -webkit-appearance: button;\n font: inherit;\n }\n details {\n display: block;\n }\n summary {\n display: list-item;\n }\n template {\n display: none;\n }\n [hidden] {\n display: none;\n }\n\n /**\n * Always hide an element when it has the \\`hidden\\` HTML attribute.\n */\n .hidden,\n [hidden] {\n display: none !important;\n }\n\n /**\n * Add this class to an image to make it fit within it's fluid parent wrapper while maintaining\n * aspect ratio.\n */\n .pure-img {\n max-width: 100%;\n height: auto;\n display: block;\n }\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
import React from "react";
import PropTypes from "prop-types";
import styled from "styled-components";
function Wrapper(_ref) {
var children = _ref.children;
return React.createElement(React.Fragment, null, children);
}
/**
* Optional wrapper for the entire app to provide CSS normalization
* and extra rules that Pure adds on top of Normalize.css
*
* @param {*} { children }
*/
var Base = styled(Wrapper)(_templateObject());
Base.propTypes = {
/**
* Child components (array or single element)
*/
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
};
/** @component */
export default Base;
//# sourceMappingURL=Base.js.map