Adding to default CSS without create a whole new style?

I’m currently looking at making AT work properly with RT 3.8 and this
really requires some CSS styles defining. Is there an obvious way to
add to the, say, web2 styles? Can we just add a line to the bottom of
main.css like this:

@import “extensions.css”;

so people can use “extensions.css” to add to the style without
creating a whole new css tree?

PK

I’m currently looking at making AT work properly with RT 3.8 and this
really requires some CSS styles defining. Is there an obvious way to
add to the, say, web2 styles? Can we just add a line to the bottom of
main.css like this:

@import “extensions.css”;

so people can use “extensions.css” to add to the style without
creating a whole new css tree?

There should be a callback in main.css if there isn’t already.

For RTFM, I believe we use the InHeader callback on Elements/Head to add
a custom css file

There should be a callback in main.css if there isn’t already.

I remember really wanting this for similar reasons as Philip. We don’t
have any callbacks yet, but it’s trivial so I went ahead and just added
two callbacks to each theme’s main.css, named Begin and End (so that you
can both define base styles or tweak RT’s style).

They’ll be in the next RT point release, but if you don’t want to wait,
it’s just adding the lines (% included) to the beginning and end of the
main.css of each theme you want to modify:

% $m->callback(CallbackName => ‘Begin’);

and

% $m->callback(CallbackName => ‘End’);

Shawn

I remember really wanting this for similar reasons as Philip.

I tried the RTFM method of using the /Elements/Header “Head” callback
and that seems to work. It also has the added advantage of being an
HTML callback so you can conditionalise the CSS you load for different
browsers, just as the InHeader callback does. I don’t think you could
do this with a callback in a .css file itself? I could be wrong.
Anyway, having callbacks in the .css file is also a good idea.

Here’s a separate but related question, since I’m not at all a Web
design type. AT needs basically copies of all of the styles in
ticket.css as it’s confusing to have AT use 'ticket-’ styles. In
fact, it won’t work in some cases because some assumptions about
things like button length aren’t followed in AT compared to RT. So, I
want to cleanly give AT its own styles. Now, this is easy enough, I
just copy the ticket-
styles from ticket.css and call them all ‘asset-
*’. Not very future-proof though so I really want to be able to say in
the AT .css something like this:

asset-info-basics = ticket-info=basics

for most entries but not all since some need to change. Can this be
done in CSS? I know I can do this:

asset-info-basics, ticket-info-basics { blah blah }

but that means I need to edit RT .css styles and I want to avoid that,
obviously. I want to just point to existing RT style names for some
styles.

PK
Dr Philip Kime

Here’s a separate but related question, since I’m not at all a Web
design type. AT needs basically copies of all of the styles in
ticket.css as it’s confusing to have AT use 'ticket-’ styles. In
fact, it won’t work in some cases because some assumptions about
things like button length aren’t followed in AT compared to RT. So, I
want to cleanly give AT its own styles. Now, this is easy enough, I
just copy the ticket-
styles from ticket.css and call them all ‘asset-
*’. Not very future-proof though so I really want to be able to say in
the AT .css something like this:

asset-info-basics = ticket-info=basics

for most entries but not all since some need to change. Can this be
done in CSS?

I believe you need to use javascript. behaviour.js is the traditional
tool for writing such stuff.

Best,
Jesse

If you have added callbacks to the main.css of each style as you said

  • will you remove 3.5-default local.css? It looks like that was put
    there to do the same sort of thing (but them not included in the web2
    style setup).

PK
Dr Philip Kime

If you have added callbacks to the main.css of each style as you said

  • will you remove 3.5-default local.css? It looks like that was put
    there to do the same sort of thing (but them not included in the web2
    style setup).

I’d rather not remove it outright, out of concern that someone is using
it. It’s an API. We’ll pull it after 3.8, but not in the middle of a
stable series.

Hi Philip,
it’s great to hear about your work. If you need some help, pls let me know (esp. for translations parts) and tiny css things.

Torsten

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne-----Ursprüngliche Nachricht-----
Von: rt-devel-bounces@lists.bestpractical.com [mailto:rt-devel-bounces@lists.bestpractical.com] Im Auftrag von Philip Kime
Gesendet: Donnerstag, 16. Oktober 2008 12:00
An: rt-devel@lists.bestpractical.com
Betreff: [Rt-devel] Adding to default CSS without create a whole new style?

I’m currently looking at making AT work properly with RT 3.8 and this really requires some CSS styles defining. Is there an obvious way to add to the, say, web2 styles? Can we just add a line to the bottom of main.css like this:

@import “extensions.css”;

so people can use “extensions.css” to add to the style without creating a whole new css tree?

PK

List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel