Skip to content

PW-186: Adjust list styling inside accordions#195

Closed
djanelle-mit wants to merge 4 commits into
masterfrom
pw-186
Closed

PW-186: Adjust list styling inside accordions#195
djanelle-mit wants to merge 4 commits into
masterfrom
pw-186

Conversation

@djanelle-mit

@djanelle-mit djanelle-mit commented May 11, 2026

Copy link
Copy Markdown

Developer

We noticed that the styling of lists inside our accordions included two or three times as much margins/padding as lists on pages that have been typeset.

This work adjusts the spacing to match other pages with ideal spacing.

https://mitlibraries.atlassian.net/browse/PW-186

Stylesheets

  • Any theme or plugin whose stylesheets have changed has had its version
    string incremented.

Secrets

  • All new secrets have been added to Pantheon tiers
  • Relevant secrets have been updated in Github Actions
  • All new secrets documented in README

Documentation

  • Project documentation has been updated
  • No documentation changes are needed

Accessibility

  • ANDI or Wave has been run in accordance to
    our guide and
    all issues introduced by these changes have been resolved or opened as new
    issues (link to those issues in the Pull Request details above)

Stakeholder approval

  • Stakeholder approval has been confirmed
  • Stakeholder approval is not needed

Dependencies

YES | NO dependencies are updated

Code Reviewer

  • The commit message is clear and follows our guidelines
    (not just this pull request message)
  • The changes have been verified
  • The documentation has been updated or is unnecessary
  • New dependencies are appropriate or there were no changes

@matt-bernhardt matt-bernhardt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm approving this because these rules don't seem to be problematic - but I do want to ask whether the URL I include in the comment below should be affected by this change?

Based on an inspection of that page, this change won't affect that list - and in order to make the markup something that this would apply to, something else intervenes and makes the list element hidden. Maybe I'm missing something, and you're going after a different batch of content?


.expandable {
ul {
li.content {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a piece of content that I can look at that has this condition? When I looked for accordion content on the network, the first thing I came across was the "How does the opt-in license work?" panel here: https://pw-186-mitlib-wp-network.pantheonsite.io/scholarly/mit-open-access/opt-in-oa-license/

These list items don't have the content class, so maybe these aren't the target. However, when I edit the DOM to add that class, some javascript on the page runs and marks them as display: none - so then I'm wondering if you're targeting a different type of content than this.

I do see that these list items don't have the rules you're declaring. when I update one of the items to carry these rules (see below, second element) then it does look a little better.

Image

I'm going to approve this, as the rules themselves don't cause any problems so if you're going after a different set of list styles than for this page, I don't want t delay this longer than I already have. If this is an example of a list that you're hoping to change, though, I think the markup you're looking for doesn't end with li.content

@djanelle-mit

Copy link
Copy Markdown
Author

@matt-bernhardt Thank you for flagging that! I completely ignored the class existing being unusual. I poked around a bit on the example UXWS was working on and it sometimes added the classes automatically and sometimes didn't.

We're going to not ship this code, and focus on the editors stripping away the classes if they're added during editing.

@djanelle-mit

Copy link
Copy Markdown
Author

Closing this PR. We're not going to add this and will pay closer attention to markup when editing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants