UNPKG

polished

Version:

A lightweight toolset for writing styles in Javascript.

39 lines (38 loc) 703 B
"use strict"; exports.__esModule = true; exports["default"] = clearFix; /** * CSS to contain a float (credit to CSSMojo). * * @example * // Styles as object usage * const styles = { * ...clearFix(), * } * * // styled-components usage * const div = styled.div` * ${clearFix()} * ` * * // CSS as JS Output * * '&::after': { * 'clear': 'both', * 'content': '""', * 'display': 'table' * } */ function clearFix(parent) { var _ref; if (parent === void 0) { parent = '&'; } var pseudoSelector = parent + "::after"; return _ref = {}, _ref[pseudoSelector] = { clear: 'both', content: '""', display: 'table' }, _ref; } module.exports = exports.default;