Using css Mako templates to make the styles configurable

Angel Ezquerra angel.ezquerra at gmail.com
Tue Mar 1 12:27:46 UTC 2016


On Mon, Feb 29, 2016 at 12:09 PM, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 02/27/2016 04:40 PM, Angel Ezquerra wrote:
>>
>> Hi,
>>
>> this is something that has probably already been discussed but please
>> bear with me since I am new to Kallithea and mako. I've been wondering
>> about what would be the best way to make the Kallithea look
>> configurable. CSS is a bit annoying in this regard because it does not
>> support variables or anything of the sort. However it could be
>> possible to change the existing CSS and turn it into mako templates,
>> couldn't it? Then it would "just" be a matter of adding some UI to
>> select the colors of the different UI elements.
>>
>> Would that make sense? Which drawbacks would there be?
>
>
> The main drawback would be that the css no longer would be static and thus
> is less trivial to cache - worst case the browser would have to fetch it for
> every page load.
>
> There are solutions to that, but we currently don't use those.

What I had in mind would be to generate the CSS files only once (e.g.
when saving the settings or perhaps by executing some specific paste
command)...

> We try to make step towards cleaning up and following existing best
> practice.
> https://bitbucket.org/conservancy/kallithea/pull-requests/167/port-kallithea-theme-to-bootstrap-wip/diff
> will take a big step in that direction.
>
> (At Unity we currently just tweak style.css in one of the patches we have on
> top of the upstream default branch.)
>
> /Mads

I don't know much about Bootstrap but since there seems to be a plan
in place to tackle this I guess we can forget about my proposal.

Cheers,

Angel


More information about the kallithea-general mailing list