EN, Change language
Englishالعربية
OM-002

Apply colour, size and spacing through the gup design tokens; do not hard-code raw values in components.

The requirement (from the design system site)

Apply colour, size and spacing through the gup design tokens; do not hard-code raw values in components.

Why it matters to users

When the Gov.om palette or spacing is adjusted, for example to raise contrast for people with low vision, sites built on tokens update in one step. Raw hex and pixel values stay behind, so your service drifts from other government services and keeps the older, weaker colours.

How to fix it

Replace raw hex colours, sizes and pixel spacing in your stylesheets with the matching var(--gup-…) tokens, such as var(--gup-color-content-primary) for body text. Then scan again.

How we measure it

Share of colour, font-size, spacing and radius declarations in the site's own stylesheets (each sheet counted once across the scan; at most the first 6000 rules per page) written as var(--gup-…) rather than raw hex, rgb or px values. Met at 90% or more, partly met at 50% or more. Partly measured: we measure what the public pages show of this rule; the rest needs a review.

"

The rule on the design system site

Related rules

Values through gup tokens · Oman OM-002 | xfix