# Selection Visual Layer Policy

## Purpose

`dev-20.6.1` fixes the issue where selected cells with their own background color did not visibly show the light selection color.

## Design

Cell formatting and selection are separate visual concerns.

- Cell formatting owns the `td` foreground/background styles.
- Selection owns `ng-selected` / `ng-range` classes.
- The theme paints the selection with `td::after` overlay pseudo-elements.

This prevents inline cell background colors from overriding selection feedback.

## Notes for future changes

Do not paint selection by directly setting `background-color` on cells. If a future theme needs stronger or weaker selection feedback, adjust the overlay opacity in `themes/base/grid_layout.css` instead. The renderer should continue to apply semantic selection classes only.
