$ cat htdocs/style.css
#content.ticket
{
width: auto;
max-width: 1400px;
}
Try to use site_head.html file.
See https://trac.edgewall.org/wiki/TracInterfaceCustomization#SiteAppearance.
<!-- site_head.html: Add site-specific style sheet -->
<link rel="stylesheet" href="${href.chrome('site/style.css')}" />
<!-- /site_head.html -->In the sources of a ticket package I can't find that .css anymore
--
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/1af33081-4480-4dbe-afe7-1003e3050148%40googlegroups.com.
$ cat ~/projects/trac-pp/htdocs/ticket.css
Try the following steps:
1. Confirm Your $ENV/htdocs/ticket.css is readable via your browser
with force-reload.
e.g. $ curl http://your-hostname/trac-pp/site/ticket.css
(Correct with your Trac project's URL)
body #content.ticket { width: auto; max-width: 1400px }
2. Confirm your rules in $ENV/htdocs/ticket.css work as expected
using Developer tools in Chrome.
If your rules do not work as expected, fix the rules in
$ENV/htdocs/ticket.css.
Also, I suggest to use the following rules to overwrite "#content.ticket":
body #content.ticket {
width: auto;
max-width: 1400px
}
trac-admin $ENV deploy $ENV/static<link rel="stylesheet" href="/trac-pp/chrome/common/css/ticket.css" type="text/css">#content.ticket { width: 56em; max-width: 100%; margin-left: auto; margin-right: auto; }
So my definition does not seem to arrive there.
Same when I try the Firefox Developer Tools, { } Style Editor, I see the ticket.css with 101 rules and this content above...
Instead, you should confirm the following line in ticket view:
<link rel="stylesheet" href="/trac-pp/chrome/site/ticket.css" type="text/css" />
<link rel="stylesheet" href="/trac-pp/chrome/common/css/ticket.css" type="text/css">Works fine in my environment. See attached image, custom-style.png.
$ cat ~/var/trac/1.4-sqlite/htdocs/style.css
body #content.ticket { width: auto; max-width: 1400px }
$ cat ~/var/trac/1.4-sqlite/templates/site_head.html
<link rel="stylesheet" href="${href.chrome('site/style.css')}" />
$ cat ~/var/trac/1.4-sqlite/templates/site_head.html
<link rel="stylesheet" href="${href.chrome('site/style.css')}" />
This one I didn't have anymore...
Works now, thanks.
$ cd $PROJECTENV
$ for file in htdocs/style.css htdocs/report.css templates/site_head.html; do echo -e "\n## $file:";cat $file;done
## htdocs/style.css:
body #content.ticket {
width: auto;
max-width: 1400px;
}
body #content.narrow #wikipage {
max-width: 1400px;
}
## htdocs/report.css:
.report div.reports h3 :link, .report div.reports h3 :visited {
color: #000;
border-bottom: 1px dotted lightgrey;
display: block;
}
## templates/site_head.html:trac-admin $PROJECTENV deploy $PROJECTENV/staticOn Fri, Nov 29, 2019 at 5:58 PM Mo <burcher...@gmail.com> wrote:
> ## htdocs/report.css:
^^^^^^
> ## templates/site_head.html:
> <link rel="stylesheet" href="${href.chrome('site/style.css')}" />
> <link rel="stylesheet" href="${href.chrome('site/reports.css')}" />
^^^^^^^
Not matched. You could find such issues using Network Monitor of
Developer tools in your browser.