Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Apr 16, 2025

Fixes #4548

This is a stylistic breaking change. We previously would make the output 100% regardless of whether it was markdown or not.

Now: we make the output 100% width only for non-markdown. Markdown has it's own max-width set to 65ch from the tailwind typography defaults.

This can be unset via custom css in app config, user config, or project config. To unset this add the css:

.markdown {
  max-width: unset !important;
}

image

This is inline with how Observable does it as well (thanks to @manzt for pointing this out to me ealier this week unrelated to #4548)

@vercel
Copy link

vercel bot commented Apr 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 7:47pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 16, 2025 7:47pm

Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

  • Pure markdown definitely looks better narrower, especially in full and medium views.
  • 65ch is quite narrow, even for me. Could we do 80ch, overriding tailwind typography too? That roughly matches compact cell size.
  • One issue to think through — this also impacts Python objects, such as tables, that are interpolated into markdown. While narrow text looks good, a narrow table is likely not what the user wants (going back to our decision to default to medium width). Is there any way to design around this? See this example, in which the dataframe cannot expand to its full width.
image

- latex max width
- markdown code blocks max width
- start align markdown h1
@mscolnick mscolnick merged commit 5a2c780 into main Apr 16, 2025
36 of 37 checks passed
@mscolnick mscolnick deleted the ms/md-width branch April 16, 2025 21:46
@github-actions
Copy link

🚀 Development release published. You may be able to view the changes at https://marimo.app?v=0.12.11-dev2

dmadisetti pushed a commit that referenced this pull request Apr 17, 2025
Fixes #4548 

This is a stylistic breaking change. We previously would make the output
100% regardless of whether it was markdown or not.

Now: we make the output 100% width only for non-markdown. Markdown has
it's own `max-width` set to `65ch` from the [tailwind
typography](https://github.com/tailwindlabs/tailwindcss-typography)
defaults.

This can be unset via custom css in [app
config](https://docs.marimo.io/guides/configuration/theming/), user
config, or project config. To unset this add the css:

```css
.markdown {
  max-width: unset !important;
}
```

------

<img width="1800" alt="image"
src="https://github.com/user-attachments/assets/6c5db7fd-afb9-40cd-88c3-6f5006ef7042"
/>


-------

This is inline with how Observable does it as well (thanks to @manzt for
pointing this out to me ealier this week unrelated to #4548)

---------

Co-authored-by: Akshay Agrawal <akshay@marimo.io>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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.

vstack changes markdown styling

3 participants