@@ -28,6 +28,21 @@ interface ThemeVariables {
2828 [ key : string ] : string | null ;
2929}
3030
31+ /**
32+ * Defines legacy colors that are kept for backwards compatibility
33+ *
34+ * Allows theme-engine to be updated without breaking existing themes
35+ */
36+ const legacyColors = {
37+ '--color-alpha' : 'var(--header-background-color)' ,
38+ '--color-beta' : 'var(--header-text-primary)' ,
39+ '--color-gamma' : 'var(--header-text-secondary)' ,
40+ '--color-gamma-opaque' : 'rgba(153, 153, 153, .5)' ,
41+ '--color-customgradient-start' : 'rgba(242, 242, 242, .0)' ,
42+ '--color-customgradient-end' : 'rgba(242, 242, 242, .85)' ,
43+ '--shadow-beta' : '0 25px 50px -12px rgba(242, 242, 242, .15)' ,
44+ } ;
45+
3146const defaultLight = {
3247 '--background' : '0 0% 3.9%' ,
3348 '--foreground' : '0 0% 98%' ,
@@ -54,6 +69,7 @@ const defaultLight = {
5469 '--header-gradient-start' : 'rgba(0, 0, 0, 0)' ,
5570 '--header-gradient-end' : 'var(--header-background-color)' ,
5671 '--banner-gradient' : null ,
72+ ...legacyColors ,
5773} as const ;
5874
5975const defaultDark = {
@@ -83,6 +99,7 @@ const defaultDark = {
8399 '--header-gradient-start' : 'rgba(0, 0, 0, 0)' ,
84100 '--header-gradient-end' : 'var(--header-background-color)' ,
85101 '--banner-gradient' : null ,
102+ ...legacyColors ,
86103} as const ;
87104
88105/**
0 commit comments