polished_css/selector/
element.rs

1//! [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element)
2
3use super::SelectorDisplay;
4
5#[derive(Clone, Debug, PartialEq, strum_macros::Display)]
6#[strum(serialize_all = "lowercase")]
7pub enum Element {
8    /// [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html)
9    Html,
10
11    // TODO: Verify if those are needed, AFAIK - not stylable
12    // Document metadata
13
14    // Sectioning root
15    /// [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body)
16    Body,
17
18    // Content sectioning
19    Address,
20    Article,
21    Aside,
22    Footer,
23    Header,
24    H1,
25    H2,
26    H3,
27    H4,
28    H5,
29    H6,
30    HGroup,
31    Main,
32    Nav,
33    Section,
34    Search,
35
36    // Text content
37    Blockquote,
38    Dd,
39    Div,
40    Dl,
41    Dt,
42    Figcaption,
43    Figure,
44    Hr,
45    Li,
46    Menu,
47    Ol,
48    P,
49    Pre,
50    Ul,
51
52    // Inline text semantics
53    A,
54    Abbr,
55    B,
56    Bdi,
57    Bdo,
58    Br,
59    Cite,
60    Code,
61    Data,
62    Dfn,
63    Em,
64    I,
65    Kbd,
66    Mark,
67    Q,
68    Rp,
69    Rt,
70    Ruby,
71    S,
72    Samp,
73    Small,
74    Span,
75    Strong,
76    Sub,
77    Sup,
78    Time,
79    U,
80    Var,
81    Wbr,
82    Area,
83    Audio,
84    Img,
85    Map,
86    Track,
87    Video,
88
89    // Embedded content - TODO: Verify if they're stylable at all.
90    // Embed,
91    // Iframe,
92    // Object,
93    // Picture,
94    // Portal,
95    // Source,
96
97    // SVG and MathML
98    Svg,
99    Math,
100
101    // Scripting - TODO: Verify if they're stylable at all.
102    // Canvas,
103    // Noscript,
104    // Script,
105
106    // Demarcating edits
107    Del,
108    Ins,
109
110    // Table content
111    Caption,
112    Col,
113    Colgroup,
114    Table,
115    TBody,
116    Td,
117    Tfoot,
118    Th,
119    Thead,
120    Tr,
121
122    // Forms
123    Button,
124    Datalist,
125    Fieldset,
126    Form,
127    Input,
128    Label,
129    Legend,
130    Meter,
131    Optgroup,
132    Option,
133    Output,
134    Progress,
135    Select,
136    Textarea,
137
138    // Interactive elements
139    Details,
140    Dialog,
141    Summary,
142
143    // Web components
144    Slot,
145    Template,
146}
147impl SelectorDisplay for Element {
148    fn as_attribute_value(&self) -> String {
149        self.to_string()
150    }
151
152    fn as_styles_content(&self) -> String {
153        self.to_string()
154    }
155}