tiny.css.Specificity
Defined in tiny.css.
The four specificity fields, ordered from strongest to weakest.
API (6)
Actions
Public operations.
Fields and members
Public fields and members.
Source
Source: lib/css/src/selector/grammar.zig:87
zig
/// The four specificity fields, ordered from strongest to weakest.pub const Specificity = struct { inline_style: u16 = 0, ids: u16 = 0, classes: u16 = 0, types: u16 = 0, pub fn compare(self: Specificity, other: Specificity) std.math.Order { if (self.inline_style != other.inline_style) { return std.math.order(self.inline_style, other.inline_style); } if (self.ids != other.ids) return std.math.order(self.ids, other.ids); if (self.classes != other.classes) return std.math.order(self.classes, other.classes); return std.math.order(self.types, other.types); } pub fn inlineStyle() Specificity { return .{ .inline_style = 1 }; }};Source: lib/css/src/root.zig:55
zig
pub const Specificity = selector.Specificity;Also reachable as
Audit
| Definitions | 3 |
|---|---|
| Public names | 6 |
| Members | 4 |
| Version | 26.7.0 |
| Revision | daab053ee433 |