123456789101112131415161718192021222324252627282930313233343536373839 |
- "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;
|