Skip to content

Conversation

@effigies
Copy link
Collaborator

@effigies effigies commented Sep 21, 2025

In many cases, our content is naturally wider than our theme (mkdocs-material) handles comfortably. Filename templates and metadata tables are frequently a bit squashed feeling.

This PR sets the max-width of the content pane to fit-content instead of 61rem. I believe this will always be the same as using the full screen width, but at least allows the possibility that a page with narrow contents would be better centered.

Relates somewhat to #1784, which addressed the impact of the narrow content frame on the entity tables.

References:

Before

image image

After

image image

@codecov
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.71%. Comparing base (b9a6673) to head (d1709f3).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2216   +/-   ##
=======================================
  Coverage   82.71%   82.71%           
=======================================
  Files          20       20           
  Lines        1608     1608           
=======================================
  Hits         1330     1330           
  Misses        278      278           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@effigies
Copy link
Collaborator Author

@thinknoack @nellh I'd be interested in your takes on this.

@thinknoack
Copy link

thinknoack commented Sep 22, 2025

@thinknoack @nellh I'd be interested in your takes on this.

this makes sense and utilizes the available space. 👍

alternatives (if you want to try and see if they work for you?)

for the table

If you want to see in action. I was able to get something working here > https://bids-specification.readthedocs.io/en/latest/derivatives/common-data-types.html

you'll want to add this to see:

.md-typeset__scrollwrap {
    margin: 1em -.8rem;
    overflow-x: auto;
    touch-action: auto;
}

.md-typeset table:not([class]) {
    background-color: var(--md-default-bg-color);
    border: .05rem solid var(--md-typeset-table-color);
    border-radius: .1rem;
    display: inline-block;
    font-size: .64rem;
    overflow: auto;
    touch-action: auto;
    width: auto;
    table-layout: fixed;
    border-collapse: collapse;
}
.md-typeset table:not([class]) td:not([align]), .md-typeset table:not([class]) th:not([align]) {
    text-align: left;
    padding: 20px 7px;
    font-size: 15px;
    border-collapse: collapse;
    min-width: 200px;
}
.md-typeset table:not([class]) td:not([align]), .md-typeset table:not([class]) th:not([align]) {
    text-align: left;
    padding: 20px 7px;
    font-size: 15px;
    border-collapse: collapse;
    min-width: 200px;
}

/* add larger min-width to the col headers you want more space for - like description*/
style="min-width: 500px;

screenshots of above css for table
Screenshot 2025-09-22 at 1 54 52 PM

for the code (<pre> or <code>)

  • you can use white-space:pre-wrap; to preserve formatting (spaces and line breaks) while also enabling word wrapping, but if the visual format matters this will not work as a solution.

screenshot of pre-wrap
Screenshot 2025-09-22 at 1 55 01 PM

image

Copy link
Member

@julia-pfarr julia-pfarr left a comment

Choose a reason for hiding this comment

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

makes sense

@effigies effigies added exclude-from-changelog This item will not feature in the automatically generated changelog formatting Aesthetics and formatting of the spec needs-review labels Sep 29, 2025
@effigies effigies requested a review from nellh October 2, 2025 16:37
Copy link
Member

@nellh nellh left a comment

Choose a reason for hiding this comment

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

I think this is a good change.

@effigies effigies merged commit 4702e40 into bids-standard:master Oct 3, 2025
28 checks passed
@effigies effigies deleted the feat/fit-content branch October 3, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude-from-changelog This item will not feature in the automatically generated changelog formatting Aesthetics and formatting of the spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants