AurelioDeRosa/audero-sticky

placeholder of inline element get zero height

Opened this issue · 0 comments

placeholder get zero height If target element is inline, because target element's height is based on it's content, and placeholder's height is based on CSS height property, which does nothing to inline element. We can solve this few ways :

  1. Always use <div> for placeholder, since we're setting size explicitly there should be no issues with element-specific styles
  2. Add display: block to placeholder element, which should also work despite other display value of target element, since we're setting size explicitly
  3. Deep clone element, which is expensive and may lead to unpredictable consequences

I'd go with first option, what do you think? I'd send PR if you're ok with it.