← All articles

APEX 26.2 Utility CSS: u- Classes, Tokens and Where They Belong

APEX 26.2 loads a token-based utility CSS framework on every page. Here is how its u- class names and scales work, where each class goes in Page Designer, when to use utilities instead of Template Options or custom CSS, and how to keep AI coding assistants on the documented vocabulary.

AI-readable summary

Oracle APEX 26.2 includes the APEX Utility CSS Framework, a token-based set of u- utility classes that is already included in every APEX page, App Builder pages too, with no installation or stylesheet registration. Spacing utilities such as u-padding-4 and u-gap-3 resolve to --u-space tokens with rem fallbacks, sizing utilities use a separate --u-size scale, the display utilities are the only ones marked !important, and the color utilities reference theme tokens without fallbacks. Oracle's guidance is to start with built-in components, use Theme Roller for application-wide changes and Template Options or CSS Classes for component-level adjustments, then add small utilities to the attribute that targets the rendered element. The release notes cite u-flex as an example, but the reference documents u-display-flex for flex containers, while u-flex remains an older Universal Theme layout modifier. Universal Theme 26.2 expands its use of the framework's tokens and aligns its own utility classes with it.

The short version

APEX 26.2 adds a utility CSS layer you do not have to install. Oracle’s reference describes a practical, token-based CSS framework for APEX applications: small u- classes for layout, spacing, sizing, typography, color and more, already included in every APEX page.

  • Already there. No installation, download or stylesheet registration. App Builder pages include it too.
  • Token-driven. u-padding-4 resolves to var(--u-space-4, 1rem): a token with a fallback, not a hard-coded value.
  • Declarative first. Oracle places utilities after built-in components, Theme Roller and Template Options, not in their place.
  • Shared vocabulary. The release notes pitch it as a predictable styling vocabulary for developers and AI-assisted tools.

Two details catch people early: spacing and sizing classes use different number scales, and the u-flex named in the release notes is not the reference’s flex container class.

What Oracle shipped

The 26.2 release notes describe a shared, token-driven set of utility classes for layout, spacing and sizing, available automatically on every page alongside the existing APP_UI styles. The stated aim is “reducing the need for brittle, one-off CSS”. Universal Theme 26.2 builds on the same foundation with styling and token refinements.

The reference is broader than layout and spacing. By our count it lists about 1,600 classes in 24 sections, from Accessibility, Background and Border through Sizing, Typography, Visibility and Z Index. It is organized by CSS intent and, in Oracle’s words, designed to “complement declarative APEX features rather than replace them”. You use the classes in Page Designer, component attributes, templates or your own markup.

The release notes do not define APP_UI, and the reference does not mention it.

The families you will use most

  • Layout: u-display-flex, u-display-grid, u-flex-col, u-justify-between, u-grid-cols-3, u-col-span-2
  • Spacing: u-padding-4, u-padding-inline-4, u-margin-block-end-4, u-margin-inline-auto, u-gap-3
  • Sizing: u-width-full, u-max-width-md, u-height-screen, u-width-1-2
  • Typography: u-text-lg, u-font-semibold, u-leading-tight, u-truncate
  • Color: u-bg-surface-base, u-text-muted, u-border-subtle, u-bg-state-success-subtle
  • Border, effects and accessibility: u-border, u-rounded-lg, u-shadow-2, u-vh (screen-reader only text)
Vocabulary sheet of the APEX 26.2 Utility CSS Framework: six class families, layout, spacing, sizing, typography, color, and border, effects and accessibility, each with a one-line purpose and a few documented u- classes, plus a note that u-padding-4 is 1rem while u-width-4 is 0.25rem
A few documented classes from each family. The full reference has 24 sections, organized by CSS intent.

How the class names work

Most names follow the pattern u-, then a property, then a value. This is Oracle’s own example from the reference:

<div class="u-display-flex u-align-items-center u-gap-3 u-padding-4">
  <span class="u-text-lg u-font-semibold">Account settings</span>
</div>

The div becomes a flex container with its children centered on the cross axis, 0.75rem between children and 1rem of padding. With a single child, the gap only shows once a second child is added. u-text-lg sets the font size from --u-font-size-lg (fallback 1.125rem) with a paired line height, and u-font-semibold reads --u-font-weight-semibold (fallback 500).

Schematic anatomy of Oracle's utility class example: a flex row with padding, gap and centered children next to a numbered list of its six classes, u-display-flex, u-align-items-center, u-gap-3, u-padding-4, u-text-lg and u-font-semibold, each with the declaration or token it applies
Six classes, six documented declarations. The icon tile is a hypothetical second child, added to make the gap visible.

The details live in the declarations. A few rows from the reference’s tables:

u-padding-4    padding: var(--u-space-4, 1rem);
u-gap-3        gap: var(--u-space-3, 0.75rem);
u-gap-0_5      gap: var(--u-space-0_5, 0.125rem);
u-width-4      inline-size: var(--u-size-4, .25rem);
u-width-16     inline-size: var(--u-size-16, 1rem);

What we take from them:

  • Spacing and sizing numbers use different scales. Padding, margin and gap read --u-space-N, where step 4 is 1rem. Width and height read --u-size-N, where step 4 is 0.25rem and step 16 is 1rem. u-padding-4 and u-width-4 look like siblings and are not. Half steps use an underscore, as in u-gap-0_5.
  • Logical properties. Directional utilities say inline and block, not left and right: u-padding-inline-4, u-margin-block-end-4, u-margin-inline-auto. Width utilities set inline-size. This fits Universal Theme 26.2’s wider move to logical CSS properties for right-to-left and writing-mode support.
  • Fallbacks, except for color. The spacing, sizing, radius, shadow and typography tokens we checked carry fallback values. The color utilities, such as u-bg-surface-base, u-text-muted and u-border-subtle, reference their tokens with no fallback, so they rely on the theme to supply them. Check them in every theme style you ship.
  • Only display classes use !important. The eight u-display-* classes are the only declarations marked that way. Everything else competes normally, and the reference’s color guidance says to target the inner item or column when component markup has a more specific color rule.
  • Fractions differ by family. Width fractions use a hyphen (u-width-1-2), flex basis an underscore (u-flex-basis-1_2).

u-flex or u-display-flex?

The release notes name u-flex as an example. The reference documents u-display-flex for a flex container, and we found no u-flex class in it. u-flex does exist, as a Universal Theme layout modifier: the Universal Theme reference app, whose footer shows 26.2.0, still describes it as treating the element as a flex container. The same page documents Universal Theme’s own padding classes, such as u-padding-md at 16 px, which gained the u- prefix in Universal Theme 24.2.

So a 26.2 page can carry two utility vocabularies. The release notes say Universal Theme 26.2 aligned its utility classes with the framework; we found no published mapping between the two sets. Our rule: new markup uses names from the framework reference. Existing Universal Theme modifiers stay until you rework that component, then move together. Never mix u-padding-md and u-padding-4 on one element, because nobody reviewing it later will know which scale was intended.

Where a utility class goes in Page Designer

A utility affects only the rendered element that receives it. The reference’s guidance, condensed:

  • Page or region. Page-level classes for broad layout. Region > CSS Classes for the region container, for example u-bg-surface-base or u-padding-4.
  • Region attributes. When a class must reach a specific generated element or template hook.
  • Items and columns. Item classes for the item wrapper or control, report column classes for individual cells. A layout class on the report region does not change a column’s inner element.
  • Parent or child. Flex and grid container utilities go on the parent; placement, span and flex item utilities go on the child.

When a class appears to do nothing, Oracle’s advice is to inspect the rendered HTML and check which element actually received it. If Page Designer cannot target that element, use markup or a template.

Utilities, Template Options or custom CSS?

Oracle sets an order: start with built-in controls and components, use Theme Roller for application-wide theme changes, use Template Options or the CSS Classes attribute for component-level adjustments, then add small, focused utilities. Our reading of that order:

  • The whole application should look different. Theme Roller and theme styles. One place, one decision.
  • A Template Option exists for it. Use the Template Option. It is declarative, visible in Page Designer and maintained with the template.
  • Spacing, alignment or layout inside one region or your own markup. Utilities. A class string in the CSS Classes field replaces a selector in a stylesheet.
  • A pattern repeated across many pages, or something the scales cannot express. Custom CSS in one file; Oracle’s App Builder guide covers uploading CSS files for one application or a whole workspace. We prefer custom rules that read the same --u-* tokens. Oracle documents them only through the utilities’ declarations, so retest after upgrades.

Keeping pages maintainable

Our house rules, built on the documented behavior above:

  1. Broad first. Oracle’s padding guidance is to prefer the broadest utility that matches the design and use block or inline variants only when one axis needs adjusting.
  2. Short class strings. Five or six utilities on one component usually means a pattern. Promote it to a Template Option where one exists, or to a named custom class.
  3. Stay on the scale. If a design needs a value the scale does not have, question the design before writing a one-off rule.
  4. Review classes like code. Classes set in Page Designer are part of the application definition, so a diff adding twelve utilities deserves the same scrutiny as twelve lines of CSS.
  5. Test every theme style. Color utilities have no fallbacks, and Universal Theme 26.2 changed component styling and fallback behavior.

Working with AI coding assistants

The release notes argue that utilities give AI-assisted tools a predictable styling vocabulary. We agree with the direction: an assistant that writes u-padding-4 produces something you can read in review, while an assistant that writes a new stylesheet produces something you have to maintain.

How we brief assistants:

  • One source of truth. Point the assistant at the framework reference and allow only classes listed there. Otherwise expect Universal Theme modifiers, invented names or another framework’s naming in the same diff.
  • State the traps. Spacing versus sizing scales, logical property names, u-display-flex rather than u-flex.
  • No new stylesheet rules unless the task asks for them.
  • Check the rendered page. Oracle’s agent guidance for APEXlang is to treat validation as part of the editing loop, and we run offline APEXlang validation on every agent edit. We found nothing in Oracle’s documentation saying validation checks CSS class names, so assume a misspelled utility passes silently and catch it in review.

Universal Theme 26.2 token refinements

The release notes list the theme changes that matter here:

  • Expanded use of the framework’s shared tokens for spacing, sizing, typography, borders, radii and shadows.
  • Further migration to logical CSS properties.
  • Utility classes aligned with the framework.
  • Fixed fallbacks for subtle color, active background, shadow, border width and border radius.
  • Standardized component styling and fallback behavior across alerts, buttons, forms, cards, reports, navigation, calendars, dialogs and trees.

If your application overrides Universal Theme component styles with custom CSS, compare those pages before and after the upgrade. Our APEX 26.2 upgrade checklist covers the rest of the release.

Styling changes are cheap to make and easy to miss, so they deserve a test environment that matches production. Oracle announced APEX 26.2 for on-premises installations, with Oracle Autonomous AI Database following shortly and OCI and multicloud rollouts over the coming weeks. For managed development, test and production APEX environments, see Cloud Hosting and the plans page.

Bottom line

The utility framework gives APEX one documented, token-based way to say “1rem of padding, centered, flex row” without a stylesheet. It is already on every page, so trying it costs close to nothing.

Use it after Theme Roller and Template Options, not before. Learn the two scales, use the reference’s names rather than the older modifiers, and hold AI assistants to the same list you hold yourself to.

FAQ

Do I need to install or register the utility CSS framework?

No. The reference says it is already included in APEX pages, including App Builder pages, with no installation, download or stylesheet registration.

Is u-flex part of the new framework?

The release notes use it as an example, but the reference documents u-display-flex for flex containers. u-flex is a Universal Theme layout modifier.

Does u-padding-4 mean the same size as u-width-4?

No. u-padding-4 uses --u-space-4 with a 1rem fallback. u-width-4 uses --u-size-4 with a 0.25rem fallback.

Should I use utility classes instead of Template Options?

No. Oracle’s order is built-in components first, Theme Roller for application-wide changes, Template Options or CSS Classes for component adjustments, and utilities for small, focused changes.

Why does my utility class have no effect?

It is probably on the wrong element. Inspect the rendered HTML, move the class to the element that owns the property, or use markup or a template when Page Designer cannot reach that element.

Can AI coding assistants use the framework?

Yes, and Oracle pitches it partly for that. Restrict the assistant to classes in the reference, explain the two scales, and review the rendered result.

Sources