Skip to documentation
SLOP

tiny.css.Specificity

Reference 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.

No direct callersNo direct callstiny.cssSpecificity
Static calls · unresolved targets: unknown · external targets: unknown.

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

selector.Specificity.

Audit

Definitions3
Public names6
Members4
Version26.7.0
Revisiondaab053ee433