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