Skip to content
Chennai Code NotesPractical notes on building for the web

Themes as data, not code

1 min read

In many platforms a theme is a folder of executable code. That is powerful, but every theme is also a security and performance risk.

The alternative

Here a theme is a small JSON document: colors, fonts, spacing and a few layout choices. Trusted components read those values and render the site.

Switching themes never breaks content, and a bad value simply falls back to the preset.