:defined
Since UXP v6.0
Represents any element that has been defined.
See: :defined
Syntax:
Copied to your clipboard1:defined {2 /* ... */3}
Example:
Demonstrates the application of styles via `:defined`
HTML
CSS
Copied to your clipboard1<simple-custom text="Custom element example text"></simple-custom>23<p>Standard paragraph example text</p>
Copied to your clipboard1/* Give the `p` elements distinctive background */2p {3 background: yellow;4}56/* Both the custom and the built-in element are given italic text */7:defined {8 font-style: italic;9}1011/* Only simple-custom element is applied with green background*/12simple-custom:defined {13 display: block;14 background: green;15}