feat: Allow to have a base theme and to have child theming in page

Signed-off-by: Avior <github@avior.me>
This commit is contained in:
Florian Bouillon 2022-10-03 22:53:35 +02:00
parent 81f654e1b2
commit 6f8c627e33
Signed by: Florian Bouillon
GPG Key ID: BEEAF3722D0EBF64

View File

@ -67,6 +67,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--gray-900 hextorgb(#212121) --gray-900 hextorgb(#212121)
:root :root
:root.theme-base-red
.red .red
.red * .red *
--theme-50: hextorgb(#FFEBEE) --theme-50: hextorgb(#FFEBEE)
@ -80,6 +81,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800: hextorgb(#C62828) --theme-800: hextorgb(#C62828)
--theme-900: hextorgb(#B71C1C) --theme-900: hextorgb(#B71C1C)
:root.theme-base-pink
.pink .pink
.pink * .pink *
--theme-50: hextorgb(#FCE4EC) --theme-50: hextorgb(#FCE4EC)
@ -93,6 +95,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800: hextorgb(#AD1457) --theme-800: hextorgb(#AD1457)
--theme-900: hextorgb(#880E4F) --theme-900: hextorgb(#880E4F)
:root.theme-base-purple
.purple .purple
.purple * .purple *
--theme-50: hextorgb(#F3E5F5) --theme-50: hextorgb(#F3E5F5)
@ -119,6 +122,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#4527A0) --theme-800 hextorgb(#4527A0)
--theme-900 hextorgb(#311B92) --theme-900 hextorgb(#311B92)
:root.theme-base-indigo
.indigo .indigo
.indigo * .indigo *
--theme-50 hextorgb(#E8EAF6) --theme-50 hextorgb(#E8EAF6)
@ -132,6 +136,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#283593) --theme-800 hextorgb(#283593)
--theme-900 hextorgb(#1A237E) --theme-900 hextorgb(#1A237E)
:root.theme-base-blue
.blue .blue
.blue * .blue *
--theme-50 hextorgb(#E3F2FD) --theme-50 hextorgb(#E3F2FD)
@ -158,6 +163,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#0277BD) --theme-800 hextorgb(#0277BD)
--theme-900 hextorgb(#01579B) --theme-900 hextorgb(#01579B)
:root.theme-base-cyan
.cyan .cyan
.cyan * .cyan *
--theme-50 hextorgb(#E0F7FA) --theme-50 hextorgb(#E0F7FA)
@ -171,6 +177,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#00838F) --theme-800 hextorgb(#00838F)
--theme-900 hextorgb(#006064) --theme-900 hextorgb(#006064)
:root.theme-base-teal
.teal .teal
.teal * .teal *
--theme-50 hextorgb(#E0F2F1) --theme-50 hextorgb(#E0F2F1)
@ -184,6 +191,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#00695C) --theme-800 hextorgb(#00695C)
--theme-900 hextorgb(#004D40) --theme-900 hextorgb(#004D40)
:root.theme-base-green
.green .green
.green * .green *
--theme-50 hextorgb(#E8F5E9) --theme-50 hextorgb(#E8F5E9)
@ -197,6 +205,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#2E7D32) --theme-800 hextorgb(#2E7D32)
--theme-900 hextorgb(#1B5E20) --theme-900 hextorgb(#1B5E20)
:root.theme-base-light-green
.light-green .light-green
.light-green * .light-green *
--theme-50 hextorgb(#F1F8E9) --theme-50 hextorgb(#F1F8E9)
@ -210,6 +219,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#558B2F) --theme-800 hextorgb(#558B2F)
--theme-900 hextorgb(#33691E) --theme-900 hextorgb(#33691E)
:root.theme-base-lime
.lime .lime
.lime * .lime *
--theme-50 hextorgb(#F9FBE7) --theme-50 hextorgb(#F9FBE7)
@ -223,6 +233,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#9E9D24) --theme-800 hextorgb(#9E9D24)
--theme-900 hextorgb(#827717) --theme-900 hextorgb(#827717)
:root.theme-base-yellow
.yellow .yellow
.yellow * .yellow *
--theme-50 hextorgb(#FFFDE7) --theme-50 hextorgb(#FFFDE7)
@ -236,6 +247,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#F9A825) --theme-800 hextorgb(#F9A825)
--theme-900 hextorgb(#F57F17) --theme-900 hextorgb(#F57F17)
:root.theme-base-amber
.amber .amber
.amber * .amber *
--theme-100 hextorgb(#FFECB3) --theme-100 hextorgb(#FFECB3)
@ -248,6 +260,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#FF8F00) --theme-800 hextorgb(#FF8F00)
--theme-900 hextorgb(#FF6F00) --theme-900 hextorgb(#FF6F00)
:root.theme-base-orange
.orange .orange
.orange * .orange *
--theme-50 hextorgb(#FFF3E0) --theme-50 hextorgb(#FFF3E0)
@ -261,6 +274,7 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#EF6C00) --theme-800 hextorgb(#EF6C00)
--theme-900 hextorgb(#E65100) --theme-900 hextorgb(#E65100)
:root.theme-base-deep-orange
.deep-orange .deep-orange
.deep-orange * .deep-orange *
--theme-50 hextorgb(#FBE9E7) --theme-50 hextorgb(#FBE9E7)
@ -275,7 +289,8 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-900 hextorgb(#BF360C) --theme-900 hextorgb(#BF360C)
:root.theme-base-brown
.brown
.brown * .brown *
--theme-50 hextorgb(#EFEBE9) --theme-50 hextorgb(#EFEBE9)
--theme-100 hextorgb(#D7CCC8) --theme-100 hextorgb(#D7CCC8)
@ -288,6 +303,8 @@ generateTheme($name, c50, c100, c200, c300, c400, c500, c600, c700, c800, c900)
--theme-800 hextorgb(#4E342E) --theme-800 hextorgb(#4E342E)
--theme-900 hextorgb(#3E2723) --theme-900 hextorgb(#3E2723)
:root.theme-base-blue-gray
.blue-gray
.blue-gray * .blue-gray *
--theme-50 hextorgb(#ECEFF1) --theme-50 hextorgb(#ECEFF1)
--theme-100 hextorgb(#CFD8DC) --theme-100 hextorgb(#CFD8DC)