Add color and palette APIs for Grantlee
Summary: This aims at enabling us to do the entire CSS styling via Grantlee, by providing access to palette colors, by offering color operations and by allowing to convert colors to CSS compatible strings. Most of this is fairly straightforward, the ugly one is the colorMix operator. I didn't find a way to do a two argument filter with both arguments referencing variables. Therefore it's done as a tag, which means chaining it to filters requires assigning it to a variable first. And while color mixing isn't used in the current messagelib CSS generation, it's heavily used in the Breeze style code (which is what I'm trying to follow for the itinerary plug-in at least). This isn't complete, there's more color operations in use in styling (such as desaturate or tint), and this still misses KColorScheme access. All that should be doable in a very similar fashion though, as needed. Using FilterExpression for the two inputs of the colorMix operator might also be an interesting future extension. This works with the last Grantlee release, on Grantlee master it fails without https://github.com/steveire/grantlee/pull/56. Reviewers: skelly, kde-pim Tags: #kde_pim Differential Revision: https://phabricator.kde.org/D23585
parent
bd289495
Please register or sign in to comment