horizon less variables not available to custom dashboard less styles

Bug #1260675 reported by Jiri Tomasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Radomir Dopieralski

Bug Description

Right now, it is possible to include custom stylesheets for custom dashboards into Horizon. (See [1])
But the way it works, it is not possible to use horizon (and through that also bootstrap) less variables in those custom stylesheets.

In short, solution is to import custom stylesheets at the end of horizon.less file.

Implementation:

At the end of horizon.less, @import dashboards.less file, dashboards.less is generated less file, that includes imports of the list of less files with the same name as dashboards that horizon include. eg:
dashboards.less:
@import infrastructure.less
...

Problem is how to generate dashboards.less file. Could it be somehow achieved by using django-compressor?

[1] http://docs.openstack.org/developer/horizon/topics/customizing.html#custom-stylesheets

Jiri Tomasek (jtomasek)
description: updated
Changed in horizon:
assignee: nobody → Radomir Dopieralski (thesheep)
status: New → In Progress
David Lyle (david-lyle)
Changed in horizon:
importance: Undecided → High
milestone: none → juno-1
importance: High → Medium
Revision history for this message
Julie Pichon (jpichon) wrote :
Changed in horizon:
milestone: juno-1 → juno-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/90371
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=27e29250a9d9083dea7c497a1384929bd1987c03
Submitter: Jenkins
Branch: master

commit 27e29250a9d9083dea7c497a1384929bd1987c03
Author: Radomir Dopieralski <email address hidden>
Date: Fri Apr 25 15:37:48 2014 +0200

    Use SCSS instead of LESS

    Convert all of Horizon's styles from LESS to SCSS, and use pyscss and
    django_pyscss to compile them.

    This lets us continue with the upgrade to Bootstrap 3, and the use of
    django_pyscss also lets us include horizon's style files, with all the
    variables, in plugins style files.

    This partially implements the blueprint bootstrap-update.

    Change-Id: I1bc9b4ded5de2393c8e57e5286b1da373673789d
    Closes-bug: #1260675

Changed in horizon:
status: In Progress → Fix Committed
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: juno-2 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.