Search code examples
javascripthtmliframedisqus

How disqus able inherit parent's styles?


You can't inherit parent's properties into an iframe Source: Iframe inherit from parent.

But how come disqus able to inherit it's background color from parent? For example this site: https://kostasbariotis.com/geospatial-query-with-mongodb-and-node-js/


Solution

  • Because the <iframe> is transparent.

    Example:

    <div style="background-color:#000;">
        <iframe src="about:blank" allowtransparency="true" style="background-color: transparent;" />
    </div>