Created
July 23, 2017 20:44
-
-
Save patientplatypus/c655c9db3c7557e125dad12c7dc42a61 to your computer and use it in GitHub Desktop.
child css not overriding parents and i dont know why
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const EmojiGlamor = glamorous.div( | |
{ | |
position: 'absolute', | |
backgroundColor: 'red', | |
borderRadius: "20px", | |
marginTop: '-20px', | |
marginLeft: '10px', | |
marginRight: '10px' | |
}, | |
({size})=>({ | |
fontSize: size | |
}), | |
({shape})=>({ | |
width: shape, | |
height: shape*1.2 | |
}), | |
({offsetleft})=>({ | |
left: offsetleft | |
}), | |
({offsettop})=>({ | |
top: offsettop | |
}), | |
({font})=>({ | |
fontSize: font | |
}) | |
); | |
const EmojiScared = glamorous.div( | |
{ | |
position: 'absolute', | |
}, | |
({font})=>({ | |
fontSize: font | |
}) | |
) | |
<Motion style={{fontspring: spring(mobxStore.tornadoplaceholdervisible ? 50 : 0), | |
scaredfontspring: spring(mobxStore.tornadoplaceholdervisible ? 20:0)}} | |
onRest={()=>this.tornadoplaceholderfinished()} | |
> | |
{style => | |
( | |
<div> | |
<EmojiGlamor | |
size={`${style.fontspring}px`} | |
offsetleft={`${100-0.5*style.fontspring}px`} | |
offsettop={`${100-0.5*style.fontspring}px`} | |
shape={`${style.fontspring}px`} | |
> | |
omg why would you do that? | |
<EmojiScared | |
size={`${style.scaredfontspring}px`} | |
> | |
😨 | |
</EmojiScared> | |
</EmojiGlamor> | |
</div> | |
) | |
} | |
</Motion> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment