Skip to content

Instantly share code, notes, and snippets.

@albertoperezf
Created June 20, 2017 10:49
Show Gist options
  • Save albertoperezf/03f85c80730c6269e2dba23760533bad to your computer and use it in GitHub Desktop.
Save albertoperezf/03f85c80730c6269e2dba23760533bad to your computer and use it in GitHub Desktop.
Span to decrease opacity for date
{/* TODO remove in 100 days */}
<span
className={styles.bodyBg}
style={{opacity: `${
1.0 - ((new Date().getTime() - new Date('2017-06-09').getTime()) / 8640000000)
}`}}
/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment