Newer Version Available

This content describes an older version of this product. View Latest

Styling Apps

An app is a special top-level component whose markup is in a .app resource. Just like any other component, you can put CSS in its bundle in a resource called <appName>.css.

For example, if the app markup is in notes.app, its CSS is in notes.css.

External CSS Resources

To use an external CSS resource, add a <link> tag within your <aura:application> resource.

1<link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"/>

The framework’s content security policy mandates that external CSS resources must use an HTTPS connection. For more information, see .Content Security Policy Overview.

Note

If you have other components in your <aura:application> tag, those components don’t inherit the styles from your external resources when they are included in Salesforce1. CSS declarations for components included in Salesforce1 should be added to the CSS resource in the component bundle.