Streaming live at 10am (PST)

What's "padding-top: Magic"?


#1

I noticed a "padding-top: Magic" default setting for embed component. See screenshot. What is it?


#2

Hey there.
This indicates webflow automatically handles the padding based on the embed you are using.


#3

It's for embeds like videos. It helps keep the video in the right 16:9 ratio


#4

@Maciej That refers to the "intrinsic ratio" that makes the video element responsive like an image (otherwise videos are not responsive by default). There's more background on this technique here: http://alistapart.com/article/creating-intrinsic-ratios-for-video

This is usually handled by developers with JavaScript using libraries like http://fitvidsjs.com/, but Webflow pre-computes these values when you first embed the video saving you time and headaches - hence the magic :smile:


#5

This topic was automatically closed after 60 days. New replies are no longer allowed.


#6