Improvements to the pallate system
From #2992
I would like to propose a change to the theme system. Since there is no such mechanism currently this should be backward compatible. As far as I can tell it is. This allows me to select one palette for @media screen and another palette for @media print.
Also adds a fallback parameter to the colour macro to allow themes to fallback to the default foreground or background color if a palette doesn't specify a color for a certain item.
@Arlen22 Kudos for splitting up the changes into separate commits. It helps. However, The commit messages were unhelpful. I don't know from the commit list what is being updated. Maybe if there could be some explanation:
From a8fac2e4e5ea89c42d2e7c59b122a4f3c05d1ea4 Mon Sep 17 00:00:00 2001
From: Arlen22 <[email protected]>
Date: Mon, 9 Oct 2017 17:39:41 -0400
Subject: [PATCH 1/3] Add fallback option to colour() macro
Here explain why you need a fallback and how it helps inprove things.
---
core/wiki/macros/CSS.tid | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
[...diff redacted for clarity...]
From d1826925b361b1c16a32dc44e0c50094e322ff54 Mon Sep 17 00:00:00 2001
From: Arlen22 <[email protected]>
Date: Mon, 9 Oct 2017 17:40:54 -0400
Subject: [PATCH 2/3] Add screen/print @media options to PageStylesheet
Explain why separating the two is an advantage.
---
core/ui/PageStylesheet.tid | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
[...diff redacted for clarity...]
From 1eed185182bce201c47fdefa3e9ea845baedfb50 Mon Sep 17 00:00:00 2001
From: Arlen22 <[email protected]>
Date: Mon, 9 Oct 2017 17:44:12 -0400
Subject: [PATCH 3/3] Allow custom palette for print styles
Explain how to use custom palettes.
---
core/ui/PageStylesheet.tid | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[...diff redacted for clarity...]
Just food for thought in the future.
Hi, I think this is a great Idea!