Opting Out
Opting a screen out #
Most plugin UIs get Cast for free, building on Craft's components. One shipping its own compiled stylesheet with colours baked in doesn't, and lands as dark text on a dark canvas.
<div data-cast-ignore>
{# your app #}
</div>
Everything inside gets Craft's palette back, plus color-scheme: light so native controls follow. It's the whole subtree, so mark the outermost element the region owns. Menus opened from inside come with it — Garnish moves them to <body>, which would otherwise hand them back to the theme. Craft's Plugin Store is exempted this way out of the box.
Reach for it only when a region genuinely can't follow the palette; fixing the stylesheet to read Craft's properties earns dark mode rather than opting out of it.
Caveat: the region is restored through Cast's variables, so anything reading them corrects itself. A few patches carry literal colours — Prism syntax highlighting mainly — and those still need overriding by hand inside an ignored region.