You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							43 lines
						
					
					
						
							707 B
						
					
					
				
			
		
		
	
	
							43 lines
						
					
					
						
							707 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; |