# UnifiedSpread Style Contract

UnifiedSpread declares all runtime CSS in `PACKAGE_MANIFEST.json`. Host implementations must load `styles.required` and then the selected `styles.themes[theme]` before calling `createEditorControl()` or `createWorkbenchControl()`.

## Manifest contract

- `styles.required`: CSS required for Control layout and operation.
- `styles.themes`: theme-only CSS layered after required CSS.
- `styles.hostOptional`: Demo/Host helper CSS not required by the Control runtime.
- `styleScope.rootClass`: `.uspread`.
- `styleScope.overlayClass`: `.unifiedspread-floating-ui` for body-level transient popup menus.

## Required CSS

- `themes/base/unified_spread.css`: root, layout, variables, shell surface.
- `themes/base/grid_layout.css`: grid viewport, cells, headers, selection overlay, object layer.
- `themes/base/sheet_tabs.css`: sheet tabbar and tab overflow.
- `themes/base/formula_bar.css`: name box and formula input.
- `themes/base/panes.css`: frozen panes and resize handles.
- `themes/base/context_menu.css`: cell, row, column, sheet and object menus.

## Scope

Package CSS must be scoped by `.uspread`. Body-level transient menus are scoped by the package-specific `.unifiedspread-floating-ui` overlay class because those nodes are appended to `document.body` to avoid clipping.
