Utilities
Themes
- HTML/CSS:Dev Ready
- Layout:Desktop Only
Themes apply a set of color styles to an area.
About Themes#
Use a color theme to apply color to the background and text. Some color themes apply a background image or texture.
Base#
This is a default theme and here is a link.
<div class="slds-box slds-theme_default">
<p>This is a
<strong>default</strong> theme and here is a
<a href="#">link</a>.</p>
Examples#
Shade#
This is a default theme and here is a link.
<div class="slds-box slds-theme_shade">
<p>This is a
<strong>default</strong> theme and here is a
<a href="#">link</a>.</p>
Texture#
This theme has the alert texture added to the default theme and has a link.
<div class="slds-box slds-theme_shade slds-theme_alert-texture">
<p>This theme has the
<strong>alert texture</strong> added to the default theme and has a
<a href="#">link</a>.</p>
Overview of CSS Classes#
- Selector
- The CSS class being referred to.
- Summary
- A description of what the class does.
- Support
- Whether the class name is dev-ready (meaning it's fully vetted and tested and safe to use) or prototype (which means it's not fully vetted yet).
- Restrict
- The selector that the class name is allowed to be used on.
- Variant
- The base level pattern for a component. A variant can be extended to create another variant of that component, for example, a stateful button is a derivative of the base button.
- Modifier
- A single class that can be added to an HTML element of a component to modify its output. Typically these will be colors, sizing and positioning.
Selector | .slds-theme_default |
---|---|
Summary | Sets the background color to white |
Restrict | * |
Modifier | True |
Selector | .slds-theme_shade |
---|---|
Summary | Sets the background color to gray |
Restrict | * |
Modifier | True |
Selector | .slds-theme_inverse |
---|---|
Summary | Sets the background color to dark blue |
Restrict | * |
Modifier | True |
Selector | .slds-theme_alt-inverse |
---|---|
Summary | Sets the background color to darker blue |
Restrict | * |
Modifier | True |
Selector | .slds-theme_success |
---|---|
Summary | Sets the background color to green |
Restrict | * |
Modifier | True |
Selector | .slds-theme_info |
---|---|
Summary | Sets the background color to gray-ish blue |
Restrict | * |
Modifier | True |
Selector | .slds-theme_warning |
---|---|
Summary | Sets the background color to yellow |
Restrict | * |
Modifier | True |
Selector | .slds-theme_error |
---|---|
Summary | Sets the background color to red |
Restrict | * |
Modifier | True |
Selector | .slds-theme_offline |
---|---|
Summary | Sets the background color to black |
Restrict | * |
Modifier | True |
Selector | .slds-theme_alert-texture |
---|---|
Summary | Adds striped background |
Restrict | * |
Modifier | True |