flow like the river
This commit is contained in:
commit
013fe673f3
42435 changed files with 5764238 additions and 0 deletions
35
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js.flow
generated
vendored
Executable file
35
VISUALIZACION/node_modules/polished/lib/mixins/clearFix.js.flow
generated
vendored
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
// @flow
|
||||
import type { Styles } from '../types/style'
|
||||
|
||||
/**
|
||||
* 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'
|
||||
* }
|
||||
*/
|
||||
export default function clearFix(parent?: string = '&'): Styles {
|
||||
const pseudoSelector = `${parent}::after`
|
||||
return {
|
||||
[pseudoSelector]: {
|
||||
clear: 'both',
|
||||
content: '""',
|
||||
display: 'table',
|
||||
},
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue