Bug 28743 - UMC modules should be able to bring their own CSS files
UMC modules should be able to bring their own CSS files
Status: CLOSED WORKSFORME
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.0
Other Linux
: P4 enhancement (vote)
: UCS 3.x
Assigned To: Alexander Kläser
Florian Best
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-10-11 11:35 CEST by Jascha Geerds
Modified: 2023-03-25 06:43 CET (History)
3 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jascha Geerds univentionstaff 2012-10-11 11:35:50 CEST
Ich halte es für sinnvoll, wenn jedes UMC-Modul seine eigenen CSS- bzw. 'less css'-Dateien mitbringen könnte. Oft sind die Änderungen sehr modulspezifisch (z.B. AppCenter), in dem Fall ist es nicht ideal, wenn jedes mal 'univention-management-console-frontend'-Paket angepasst (und gebaut) werden muss.
Comment 1 Alexander Kläser univentionstaff 2012-10-11 11:43:28 CEST
Ggf. könnte man auch eine CSS-Klasse für jedes Modul setzen, so dass CSS-Regeln definiert werden können, die sich nur auf das Modul beziehen?
Comment 2 Jascha Geerds univentionstaff 2012-10-11 11:48:31 CEST
(In reply to comment #1)
> Ggf. könnte man auch eine CSS-Klasse für jedes Modul setzen, so dass CSS-Regeln
> definiert werden können, die sich nur auf das Modul beziehen?

Du hast meine volle Unterstützung! :-)
Comment 3 Alexander Kläser univentionstaff 2012-10-15 11:39:12 CEST
Das sollte einfach funktionieren mit dem xstyle-Paket:

  http://davidwalsh.name/amd-xstyle

Das bringen wir bereits mit im UMC-Framework.
Comment 4 Florian Best univentionstaff 2014-10-01 10:06:38 CEST
A simple solution for this is:

require(['xstyle/css!umc/modules/foo/bar.css'])
Comment 5 Alexander Kläser univentionstaff 2014-10-01 12:59:08 CEST
(In reply to Florian Best from comment #4)
> A simple solution for this is:
> 
> require(['xstyle/css!umc/modules/foo/bar.css'])

An even better with relative paths: require(['xstyle/css!./mymodule.css'])
Comment 6 Florian Best univentionstaff 2014-11-03 20:25:42 CET
We're doing this already in UCS4.0