daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest May 24th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // if you have a flex aligned child which is absolutely positioned (but all side kept auto)
  2. // changing it's content won't refresh it's aligned position. Here's how you can force the refresh:
  3.  
  4. child.style.position = 'relative'
  5. child.offsetHeight
  6. child.style.position = ''
  7.  
  8. // changing position instead of display property keeps transitions alive
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top