trac css / js plans for future releases

22 views
Skip to first unread message

Markus Rosjat

unread,
Jan 25, 2023, 4:08:15 AMJan 25
to trac-...@googlegroups.com
Hi all.

since i play around with some UI stuff in my plugin i noticed if I want to sneak in a framework like bootstrap it works in basic but it messes some of the basic layout in trac. This is caused by naming conflict in trac.css and the bootstrap css. So my question is, will there be a kind of naming convention for css classes in trac? I notices some naming ist already prefixed with a "trac" prefix so if this is keept up for the whole css classes i would be much easier to bring in other frameworks for styling.

here is an example :

image.png

thats a default styling of the main nav in trac

and if i pull in the bootstrap CDN
image.png


i know i could make a tailored version of bootstrap and ship it with the plugin but i guess a  cleaner solution would be to introduce a consistent naming for css. 
cheers

MArkus 

Jun Omae

unread,
Jan 25, 2023, 6:36:30 AMJan 25
to trac-...@googlegroups.com
On Wed, Jan 25, 2023 at 6:08 PM Markus Rosjat <markus...@gmail.com> wrote:
>
> Hi all.
>
> since i play around with some UI stuff in my plugin i noticed if I want to sneak in a framework like bootstrap it works in basic but it messes some of the basic layout in trac. This is caused by naming conflict in trac.css and the bootstrap css. So my question is, will there be a kind of naming convention for css classes in trac? I notices some naming ist already prefixed with a "trac" prefix so if this is keept up for the whole css classes i would be much easier to bring in other frameworks for styling.
>
> ...
>
> i know i could make a tailored version of bootstrap and ship it with the plugin but i guess a cleaner solution would be to introduce a consistent naming for css.

See https://trac.edgewall.org/ticket/5997


--
Jun Omae <jun...@gmail.com> (大前 潤)

Markus Rosjat

unread,
Jan 25, 2023, 6:45:14 AMJan 25
to trac-...@googlegroups.com
okay this tells me there was/is an effort to do so but what is the latest development on it? I use a trunk installation here and as i pointed out
in my initial email there is some collision still so i asume there wasnt a full rewrite possible ?

cheers

Markus

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/CAEVLMaiEQkfvO_XPUVUYd4o4KeqHp%3DAwugZmb9K%3Dfb5QNGdD-w%40mail.gmail.com.

Jun Omae

unread,
Jan 25, 2023, 6:59:44 AMJan 25
to trac-...@googlegroups.com, markus...@gmail.com
On 2023/01/25 20:44, Markus Rosjat wrote:
> okay this tells me there was/is an effort to do so but what is the latest development on it? I use a trunk installation here and as i pointed out
> in my initial email there is some collision still so i asume there wasnt a full rewrite possible ?
>
> cheers
>
> Markus

In my opinion, it is not recommended to use CSS frameworks such as Bootstrap. I
usually develop plugins using only css in Trac core and jquery-ui css (bundled
in Trac) so that the plugin's web pages have the same look and feel as Trac.

> i know i could make a tailored version of bootstrap and ship it with the
> plugin but i guess a cleaner solution would be to introduce a consistent
> naming for css.

That would be ideal, but the changes would require to fix web pages in every
plugin. At least, I have no plan to add "trac-" prefix to id/class names in
Trac 1.6.
Reply all
Reply to author
Forward
0 new messages