function clearFix(parent) {
    var _ref;
    if (parent === void 0) {
      parent = '&';
    }
    var pseudoSelector = parent + "::after";
    return _ref = {}, _ref[pseudoSelector] = {
      clear: 'both',
      content: '""',
      display: 'table'
    }, _ref;
  }
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'
}