Designers can use the CSS properties and the CSS rules section to directly enter CSS for a component. The CSS properties field takes inline CSS properties. For example:
color: red;
font-size: 12px;
The CSS rules field takes CSS selectors, unlike the CSS properties section. It allows designers to target the CSS shadow parts of a component. For example, it is possible to add an icon before the label of a Document metadata component by inserting the following in the CSS rules:
::part(label)::before {
content: "\e806";
font-family: "ft-icons";
font-size: 13px;
margin: 2px;
}
To find what shadow parts a Fluid Topics component has, use Inspect mode in browsers.
- CSS rules are only available for specific components.
- Only the CSS properties and rules of a selected component can be modified.