CSS import in wiki.css

11 views
Skip to first unread message

figaro

unread,
Jun 13, 2022, 11:43:56 AMJun 13
to Trac Users
Trunk has the following in wiki.css:
@import url(code.css);


However the import of CSS files degrades performance (https://stackoverflow.com/questions/10036977/best-way-to-include-css-why-use-import) and it is the only occurrence in our code base.

Is there a reason why it is still present?


-- figaro

RjOllos

unread,
Jun 13, 2022, 6:54:41 PMJun 13
to Trac Users
There are  few instances:
$ git grep "@import"
doc/utils/tracsphinx.css:@import url("sphinxdoc.css");
trac/htdocs/css/report.css:@import url(code.css);
trac/htdocs/css/ticket.css:@import url(code.css);
trac/htdocs/css/wiki.css:@import url(code.css);

We could consider concatenating all of the stylesheets. We have an open issue for that but it needs more work.

Ryan 

figaro

unread,
Jun 14, 2022, 4:18:46 AMJun 14
to Trac Users
Ok, will have a look and do some more tests. There is also HTTP/2 and caching which I expect will make structural code changes regarding the CSS imports to have a marginal performance impact.
Reply all
Reply to author
Forward
0 new messages