Welcome to the new Daily Docs. Please let us know what you think.

loadCss()

loadCss({ bodyClass, cssFile, cssText })

Deprecated

This method is deprecated. If you need to build a custom video call experience, use the Daily call object.

Compatibility:
Prebuilt
Custom

You can call this function any time to (re-)set the body classes and CSS that you've passed into the iframe.

These three styling properties are used to implement completely custom layouts. They can be passed to the factory function, to the join() method, or to this loadCss() method. They will be ignored unless customLayout: true was also specified (in the factory functions or join()) or createTransparentFrame() was used to create the iframe.

The bodyClass property is a string. The class attribute of the body element inside the call iframe will be set to this string. You can include multiple class names in the string. (Just separate the class names with spaces.)

The cssFile property is the url of a stylesheet to fetch externally. The url can be an absolute url, or a relative url. If it's relative, the url will be resolved relative to the parent iframe.

Each call to loadCss() will replace the previous cssFile stylesheet, if a cssFile property is passed to the method. (It can sometimes be useful to switch stylesheets in the middle of a call.) To remove the previous stylesheet, pass an empty string ('') as the cssFile property.

The cssText property is a string of css to load into the iframe inside a <style> element.

Each call to loadCss() will replace the previous cssText style element, if a cssText property is passed to the method.

The loadCss() method returns this.