pub fn id(id_val: &str) -> Option<StyleAttr>Expand description
Creates a new StyleAttr with the specified id.
This function is a convenience method to create a StyleAttr instance with the id field set.
§Arguments
id_val- A string slice representing the ID to be assigned.
§Returns
An Option<StyleAttr> containing the new StyleAttr with the id set, or None if the id is empty.