Problem
Expected: A list item in a filter tip is rendered with normal margins.
Actual: The forms.css stylesheet from the administration theme (Seven) adds a margin to the inline list items, which renders them very far apart.
The problem can be traced to this CSS rule:
ul.tips li {
margin: 0.25em 0 0.25em 1.5em; /* LTR */
}
[dir="rtl"] ul.tips li {
margin: 0.25em 1.5em 0.25em 0;
}
Example:
Reproduction
Simplest is to navigate to /filter/tips
on a standard install with the 7 theme set as default.
Solution
The correct selector to use here would be ul.tips > li
, to apply the style only to the actual tips list, rather than lists nested inside it.
Fixed:
Comment | File | Size | Author |
---|---|---|---|
#35 | interdiff_28-35.txt | 402 bytes | ravi.shankar |
#35 | 2896949-35.patch | 838 bytes | ravi.shankar |
#28 | 2896949-28.patch | 836 bytes | manojkumar_97 |
#28 | After-patch2.jpeg | 118.41 KB | manojkumar_97 |
#28 | After-patch.jpeg | 97.89 KB | manojkumar_97 |
Issue fork drupal-2896949
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cburschkaPatch for both 8.4.x and 8.3.x.
Comment #6
NickDickinsonWildePatches still apply.
Doesn't need tests and only affects the default seven admin theme so despite the css change and is very specific, I believe this can be pulled back to 8.6.X as well.
Comment #7
lauriiiCould you add a full list of steps needed to reproduce the bug in the issue summary?
Also, since the patch makes visual changes, would be useful to have a screenshot added to the issue summary.
Comment #8
NickDickinsonWildeUpdated summary with further details.
Comment #9
gnuschichten CreditAttribution: gnuschichten at ETECTURE GmbH commentedPatch still applies on 8.7.x-dev and works fine.
Comment #10
gnuschichten CreditAttribution: gnuschichten at ETECTURE GmbH commentedComment #11
lauriiiAnother approach would be to add a class for the specific element we want to add the style for. The downside of this approach is that it requires either a template override in Seven or template change in Classy. I went ahead with changing the template in Classy but we might want to instead override the template in Seven.
Comment #15
cburschkaThese screenshots show the problem more distinctly than the ones in the top post.
Comment #16
IndrajithKB CreditAttribution: IndrajithKB at Srijan | A Material+ Company for Drupal India Association commentedHi @lauriii Thanks for the #11 patch.
Here i override the seven template.
attaching the screenshot after applying#11
attaching the screenshot after applying #16
please review.
Comment #18
cburschkaChanges to the classy templates must also be applied to the other themes' copies and the respective file hash in ConfirmClassyCopyTest.
Comment #19
IndrajithKB CreditAttribution: IndrajithKB at Srijan | A Material+ Company for Drupal India Association commentedHi @cburschka thanks for the #18 patch,
It's working fine. But i faced one issue with bartik theme after applying your patch #18
screenshot of bartik after applied #18:
i have fixed the issue and the screenshot is:
Comment #20
priyanka.sahni CreditAttribution: priyanka.sahni at Srijan | A Material+ Company for Drupal India Association commentedComment #21
lauriiiInstead of updating this, we could move this file to the templates directory in Bartik and Seven where we would like to leverage
.tips__item
. This way we don't have to update the hash and templates in all themes.Comment #22
priyanka.sahni CreditAttribution: priyanka.sahni at Srijan | A Material+ Company for Drupal India Association commentedUn assigning the issue as the status changed to Needs Work , earlier I had assigned to test the issue.
Comment #26
larowlanComment #27
manojkumar_97 CreditAttribution: manojkumar_97 at OpenSense Labs commentedComment #28
manojkumar_97 CreditAttribution: manojkumar_97 at OpenSense Labs commentedAfter apply patch:
Comment #29
lauriiiCI is not passing for the latest patch.
Comment #33
rpayanmComment #34
Shubham Sharma 77 CreditAttribution: Shubham Sharma 77 at Srijan | A Material+ Company for Drupal India Association commentedStatus changed to Needs Work. The last patch failed
Comment #35
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedJust fixed the Drupal CS issue of patch #28.
Comment #36
rpayanmComment #37
smustgrave CreditAttribution: smustgrave at Mobomo commentedselectors look valid.
Comment #38
larowlanWe're actively trying to deprecate the Seven theme, so postponing this in the meantime.
Once we move it to contrib, we may choose to unpostpone this issue.
Comment #39
longwaveThe Seven theme has been removed from Drupal 10 core. I confirmed that this issue only affects Seven and no other themes included with Drupal core, so I am moving this to the contributed Seven project.