XFix reads publicly published pages only. It requests no credentials and retains no entity data. Traffic is encrypted over HTTPS.
Criterion 4 · FoundationsMachine-measured

Ensure spacing values are applied according to the Unified Design System (Platforms Code)

Every margin and padding value must sit on the approved spacing scale and be written as a variable rather than a raw number. Off-scale values such as 15, 18 or 22 pixels are the residue of accumulated hand-building, not a design decision.

It is one of the primary criteria in the foundations group of the Saudi Platforms Code, issued by the Digital Government Authority.

How XFix measures this criterion

The applied value is read from the page and compared with the value approved in the Platforms Code, so the verdict comes from a measurement rather than an estimate, and the observed and expected values are attached together.

The official text and its checkpoints

This criterion rests on 2 checkpoints published in the Platforms Code, and they are the reference when judging it.

This criterion on the official Platforms Code site

The checkpoints, one by one

Each checkpoint below has its own answer: what it requires, what passes and what fails, how it is measured or verified, and how it is repaired. Each has a direct link.

  1. Approved spacing units (4, 8 and 16 pixels)

    Machine-measuredDGA-004-a

    This checkpoint requires every spacing value between elements to come from the approved scale, which is built on specific multiples such as 4, 8 and 16 pixels. A value off the scale is a violation even when it looks balanced on screen.

    XFix measures this checkpoint automatically, and attaches the observed value and the expected value together.

    What passes: Every margin and padding value on the page sits on the approved scale and is written as a variable rather than a literal number.

    What fails: Values such as 15, 18 or 22 pixels scattered through the stylesheet — the residue of accumulated hand-building rather than a design decision.

    How it is measured or verified: The tool counts every declared spacing value and separates those on the scale from those off it, reporting once per value with its usage count. One measurement on a university platform found 42 off-scale values across 581 usages: 42 rules to fix, not 581 violations.

    How it is repaired: Replace off-scale values with the nearest value on the scale, starting with the most-used. The work here is counted in rules, not elements.

  2. Global spacing variables, no component-specific overrides

    Machine-measuredDGA-004-b

    This checkpoint requires the global spacing variables of the Platforms Code, and forbids custom spacing inside components. The difference is that a global variable stays connected to the library while a custom value detaches from it.

    XFix measures this checkpoint automatically, and attaches the observed value and the expected value together.

    What passes: Spacing is written with global variables everywhere, and components called from the library keep their internal spacing untouched.

    What fails: Overriding a component’s internal spacing with a special value to fix an alignment on one page, which detaches that instance from the library so updates never reach it.

    How it is measured or verified: The variables used in spacing declarations are read, separating variable-written declarations from literal ones. The spacing rule governs scale values today, so this checkpoint is verified by your own team.

    How it is repaired: Return custom spacing to the global scale variables and solve the alignment in the container rather than inside the component.

Related criteria

The limits of this tool

XFix is an independent commercial tool. It is not part of the Digital Government Authority, is not endorsed by it, and does not act on its behalf. What it produces is an indicative estimate expressed as a range. It is not the Platforms Code Application Certificate and not a declaration of conformity. The certificate is issued by the Authority alone, and the Authority’s assessment remains the reference.

Its usefulness is in showing the gap early and with evidence. It does not stand in for the body that decides.

Criterion 4 · Spacing · Saudi Platforms Code | XFix