{{{
--header-branding-color: var(--accent);
}}}
but it is not used anywhere else. I expected it to be used in the branding
h1 tags starting at line 920:
{{{
#branding h1 {
padding: 0;
margin: 0 20px 0 0;
font-weight: 300;
font-size: 24px;
color: var(--accent);
}
#branding h1, #branding h1 a:link, #branding h1 a:visited {
color: var(--accent);
}
}}}
but as can be seen, `var(--accent)` is used instead. Also the second block
redundantly calls out `#branding h1`. Any idea what it should have been?
`#branding h1 a`?
`--header-branding-color` appears nowhere else in Django. This bug is
found in 3.2, 4.0, and the main branch.
--
Ticket URL: <https://code.djangoproject.com/ticket/33667>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* type: Bug => Cleanup/optimization
* stage: Unreviewed => Accepted
Comment:
Agreed, `--header-branding-color` should be used for `#branding h1`
> Also the second block redundantly calls out `#branding h1`. Any idea
what it should have been? `#branding h1 a`?
As far as I'm aware, `#branding h1` is redundant in the second rule and
can be removed. Would you like to prepare a patch?
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:1>
Comment (by Mike DeSimone):
Would the patch get into a 3.2 update? It does me no good if it's only
fixed on `main`.
I might be able to get to it in a week or three; I ran into it on an
airgapped system and would need to recreate it on another machine some
weekend or another. (I already had to jump through internal hoops just to
report this.) I have no problem if someone wants to roll the fix in
themselves.
Also, what else would need to be in the patch? I don't know how to
generate a test case for this.
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:2>
Comment (by Mariusz Felisiak):
> Would the patch get into a 3.2 update? It does me no good if it's only
fixed on `main`.
Unfortunately not, it doesn't qualify for a backport.
> Also, what else would need to be in the patch? I don't know how to
generate a test case for this.
IMO a regression test is not needed.
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:3>
Comment (by Mike DeSimone):
> Unfortunately not, it doesn't qualify for a backport.
Then making a patch is low priority for me. I'm going to have to override
`#branding h1` directly anyway.
Hmm, it seems `--accent` isn't used anywhere but these two places in
`#branding`. Is this also an oversight? I'm wondering which fix is better:
* use `--header-branding-color` in `#branding h1` and `--accent` in
`#branding h1, #branding h1 a:link, #branding h1 a:visited` (changing the
first `#branding h1` to `#branding h1 a`)
* remove `--header-branding-color` as redundant, or
* use `--accent` elsewhere?
It's hard to say since I'm not the style designer.
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:4>
Comment (by Mariusz Felisiak):
I would use `--header-branding-color` for `#branding h1` and leave
`--accent` for `#branding h1 a:link`, `#branding h1 a:visited`.
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:5>
* owner: nobody => Hrushikesh Vaidya
* status: new => assigned
* has_patch: 0 => 1
Comment:
I've prepared a patch [https://github.com/django/django/pull/15652 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"f74d4cae6dd6e64226a10c74f725e649bf736655" f74d4ca]:
{{{
#!CommitTicketReference repository=""
revision="f74d4cae6dd6e64226a10c74f725e649bf736655"
Fixed #33667 -- Used --header-branding-color for branding headers in
admin.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33667#comment:7>