[Owncloud] Theming and Formfactors

Evert Pot evert at rooftopsolutions.nl
Wed Feb 1 15:30:35 UTC 2012


On Feb 1, 2012, at 4:27 PM, Arthur Schiwon (Blizzz) wrote:

> On Wednesday 01 February 2012 16:05:50 Thomas Tanghus wrote:
>> On Wednesday 01 February 2012 15:18 Frank Karlitschek wrote:
>>> Theming:
>>> I propose a similar system for the theming. We add a "theme" config option
>>> to the config.php so that the theme can be configured during deployment
>>> and
>>> controlled from the outside without the need to understand our database
>>> structure. We add "themes" directory into /core where every theme has a
>>> directory named after the theme name. The template and css loader looks
>>> into the selected theme directory first for templates and css files and
>>> loads them if a file is present. If not it just falls back to the default
>>> files in the individual app directories. This has the benefit that the
>>> person who creates the themes can override what ever has to be changed but
>>> donĀ“t have to provide a complete new frontend. The directory structure
>>> inside the themes folder is the same as the rest of owncloud. This means
>>> that a theme developer can just put a different
>>> "apps/contacts/css/styles.css" in the theme directory to change the style
>>> of the contacts app.
>> 
>> I haven't kept up-to-date on what is possible with CSS nowadays, but
>> couldn't we come a long way by using CSS variables [1]? Is it possible to
>> include a stylesheet defining the color scheme into another CSS file?
>> 
>> Now the colors in /core/css/styles.css are hardcoded and I've had to copy
>> some of them to the app stylesheet. It would be much easier just to change
>> one file with color/border/etc definitions and use e.g.
>> "var(mainbackgroundcolor)".
>> 
>> [1] http://disruptive-innovations.com/zoo/cssvariables/
> 
> Agree, it makes sense to define colors  in a basic theme file and use the 
> variable. Although not everyone seem to love varialbes in CSS, it would make 
> things simpler. Not only theming itself, but also specific styles in apps may 
> look good in different themes.

http://lesscss.org/  / http://leafo.net/lessphp/

Perhaps? Once you try it, you don't wanna go back..

Evert


More information about the Owncloud mailing list