Discourse Custom Width

:information_source: Summary Set a custom width for your Discourse forum
:eyeglasses: Preview Theme Creator (1400px width)
:hammer_and_wrench: Repository GitHub - Canapin/Discourse-custom-width: Set a custom width for your Discourse site.
:question: Install Guide How to install a theme or theme component
:open_book: New to Discourse Themes? Beginner’s guide to using Discourse Themes

Install this theme component

This very simple theme component has a single setting that defines your forum’s width.

The width can’t exceed your window’s width or be less than the default Discourse’s max width of 1110px.

Example width a 1400px width:



Why only fixed width with px?

I have this in my css:

:root {
	--d-max-width: 80%;

.topic-body {
	width: 90%;

#reply-control {
    max-width: 80%;

.body-page {
    width: 100%;
    max-width: 100%;

This is a good idea to allow other units, but in this case, I wouldn’t know how to prevent users from setting a value too low that would break the layout.

I’m open to any ideas and PR :slight_smile:


Is this theme component related in any shape or form to the light full-width theme?

That’s really good question but I think you have trust the users.

I would seperate the value from the unit and make a “if-else query” inside the css if they use px or % and then a second if inside to check the value if it’s to small.

if px
   if value < 1100px
     set value 1100
     set value to variable
else if %
   if value < 50 %
     set value 50%
     set value to variable

I’m honest that I don’t know atm if this is possible in a css file.


It isn’t. Do you have a link to this theme? I couldn’t find it :thinking:


I would love to have “light full-width”, too.

Can please someone from the @team release the css for it?


Can’t find it either, I think this theme is exclusive to this forum.

1 Like

I saw the theme you’re talking about. Yes, it looks like each other and I could also add a setting to set the width of the content as well.

To make the theme component more unique, I could set the fields in the user’s settings so everyone could have their own preferred width.


I’ve been looking for that answer myself!

@sam @Falco any idea where we can find info on how to do the light and dark full-width theme? :innocent:

1 Like

I think here is the full width theme repo: GitHub - discourse/discourse-full-width-component: Make Discourse occupy the full browser width


Found the same issue in the Op post in Multilingual plugin links seem broken.

1 Like