A property that represents an element's custom CSS classes.
This property is only available to Wix Studio users.
You can use this property to manipulate the custom CSS classes of an element. For example, you can add a custom class to an element or replace an existing class with a new custom class.
Custom classes are those that you create on a site, not the predefined global classes that are provided for each element.
Use the following methods to work with the element's custom CSS classes:
add()
: Adds custom CSS classes to the class list of an element.contains()
: Indicates whether the element's class list contains a specified custom CSS class.remove()
: Removes custom CSS classes from an element's class list.replace()
: Replaces a custom CSS class of an element with a different custom CSS class.toggle()
: Toggles an element's custom CSS class.values()
: Retrieves an array of strings listing an element's custom CSS classes.Note: For more information, see Styling Elements with CSS and the MDN CSS reference docs.