rule

Function rule 

Source
pub fn rule(name: &str) -> Option<Rule>
Expand description

The rule for one class, or None if it is not a utility this knows.

§It is a subset, and the gate measures which one

Tailwind’s surface is enormous and this covers the families a page is actually built from — layout, spacing, colour, type, borders, flex and grid — with the variants in front of them. What matters is the direction of the error. A name this accepts must be one Tailwind emits the same rule for; a name Tailwind refuses must be refused here. A name Tailwind accepts and this does not is a gap, counted rather than tolerated silently, and style.rs::the_utility_table_agrees_with_tailwind is where all three are asserted against Tailwind’s own output rather than against a table somebody typed in.

§What made a fixed table wrong, found by asking

Tailwind 4’s spacing is multiplicative — calc(var(--spacing) * n) — so p-2.75 and gap-13.5 are rules, and any list of steps would have refused them. So the spacing families here take a number rather than a member of a set, which is a thing the oracle said and a person would not have. Asking it about the rule rather than only about the name said three more: 1 is var(--spacing) and not calc(var(--spacing) * 1), 0 is 0px rather than 0, and auto is a padding value in no family at all — which this table used to accept in seventeen names the candidate list had never asked about.