Skip to content

Posted on

13 Aug 2025

I was reading Manuel Matuzovic’s article on meta theme color and came across this snippet:

index.html
<style>
:root {
--theme: blue;
}
</style>
<meta name="theme-color" content="var(--theme)" />

I wish it was possible to access custom properties outside the <style> tag in the <head>. It would keep things DRY.

Found this useful?

Let Me Know
← Back to the previous page