Make Gist embed scrollable

蓝咒 提交于 2019-12-04 16:41:45

The easiest solution is to add the following code to your CSS:

.gist-data{
    height:250px; // Any height
    overflow-y: visible;
}

This will limit the height of the gist's container, I tried other wrappers around it and this was the first one to limit the height.

Depending on specificity, you may need to add !important in your styles.

One WordPress project which provides that kind of feature would be "Embed GitHub Gist / Gist height (7 posts)".

I wanted to add a gist height for really long gists that would result in a scrollbar for the embed.
Here's the patch to achieve this for the current trunk using a height parameter to the shortcode.

The most recent version is at this project.

Some of that work might have been included in "dflydev/embed-github-gist".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!