mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #16998
[Bug 1273931] A patch has been submitted for review
Patch for "master" branch: https://reviews.mahara.org/3009
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1273931
Title:
It is impossible to add custom CSS for blocks
Status in Mahara ePortfolio:
New
Bug description:
class PluginBlocktype that used for artefact blocks doesn't have any methods to load CSS files while it has two of them for JS:
- get_instance_javascript
- get_instance_inline_javascript
I see two ways of customizing CSS for blocks, but they both have
significant disadvantages:
1. Load custom CSS for a block using js dynamic loader (dynamically
create link tag to CSS in header). However, this way is quite limited
because it doesn't support themes.
2. Change docroot/theme/view.css. This way used for core artifcats
like blog. However it is also bad, because it makes artefacts hard to
distibute separate from Mahara (main view.css file is part of core).
Also, lots of styles that need for unused blocks stored anyway.
Generally it makes a bit of mess.
My proposed solution is create style folder structure for blocktype as it done for artefact:
artefact/[artefactname]/blocktype/[blockname]/theme/[themename]/static/style/style.css
This file (if exists) will be loaded when block placed on current page
and during page edit mode only.
I am going to implement this functionality anyway, but want to know if
community interested in this feature or may be there some workarounds
that I don't know?
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1273931/+subscriptions
References