Problem/Motivation

When an off-canvas section has multiple items within a list, it quickly becomes hard to differentiate between different items. This is because there is no difference in vertical space between two lines of the same item and two different items.

For example:

current issue

Steps to reproduce

This is noticeable for anyone who has items whose titles are so long that they wrap to the next line. Opening the off-canvas should be enough to reproduce the issue.

Proposed resolution

I propose we add a small amount of vertical padding to items, along with a subtle bottom border.

For example:

proposed solution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

maskedjellybean created an issue. See original summary.

maskedjellybean’s picture

I doubt that I've generated this patch correctly, but these are the changes I made to generate the screenshot you see under proposed resolution.

longwave’s picture

Thanks for the patch! I agree that this does look better than before and makes the items visually distinctive.

You need to edit the .pcss.css files and then compile these to CSS with yarn build:css, I've moved your changes to the .pcss.css files in this patch. I've also rerolled this against 9.2.x as any changes will need to go into the latest version first.

maskedjellybean’s picture

Thanks for making a correct patch @longwave!

I'm curious, do these .pcss.css files exist in 8.9.x or is this new for 9.x? Strangely I don't see them in my D8 install. I understand I should be working with D9 these days, but I'm just trying to understand.

longwave’s picture

Aah, sorry - I forgot that in 8.9.x we only use PostCSS for Claro, we only started using it for the off-canvas CSS in 9.1.x.

Gauravvvv’s picture

Patch #3, seems fine to me. Adding an after-patch screenshot for reference.

Moving to RTBC.

Gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Issue tags: +Usability
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

This is very nice self-contained improvement!

Committed 5deea4f and pushed to 9.2.x. Thanks!

  • lauriii committed 5deea4f on 9.2.x
    Issue #3207680 by maskedjellybean, longwave, Gauravmahlawat: Improve Off...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.