Ability to change font size for page content #394

Closed
opened 2026-02-04 19:24:36 +03:00 by OVERLORD · 11 comments
Owner

Originally created by @alariva on GitHub (Aug 7, 2017).

Desired Feature: Ability to change font size for page content

  • BookStack Version: v0.17.3
Expected Behavior

Is there any suggested way to change font size through configuration?

Since most of my docs users will prefer bigger font size, I wonder if there's a quick way to change it. An alternative approach would be allowing them to do so client-side with discrete A+ and A- buttons.

Actual Behavior

It looks like the best (and only) approach for this is by customizing the HTML headers.

Also, this looks related to https://github.com/BookStackApp/BookStack/issues/423 , so in that case I'll follow-up.

Thanks and regards,

Originally created by @alariva on GitHub (Aug 7, 2017). Desired Feature: Ability to change font size for page content * BookStack Version: `v0.17.3` ##### Expected Behavior Is there any suggested way to change font size through configuration? Since most of my docs users will prefer bigger font size, I wonder if there's a quick way to change it. An alternative approach would be allowing them to do so client-side with discrete `A+` and `A-` buttons. ##### Actual Behavior It looks like the best (and only) approach for this is by customizing the HTML headers. Also, this looks related to https://github.com/BookStackApp/BookStack/issues/423 , so in that case I'll follow-up. Thanks and regards,
OVERLORD added the 🔨 Feature Request label 2026-02-04 19:24:36 +03:00
Author
Owner

@domainzero commented on GitHub (Aug 7, 2017):

On a per page basis you could always do a <font size="16"> or make an arbitrary class and do a <span class="biggertext"> to get bigger text where you want it since inline HTML is supported.

@domainzero commented on GitHub (Aug 7, 2017): On a per page basis you could always do a `<font size="16">` or make an arbitrary class and do a `<span class="biggertext">` to get bigger text where you want it since inline HTML is supported.
Author
Owner

@alariva commented on GitHub (Aug 7, 2017):

Thanks @domainzero , I was referring to a global-scope setting, but this also helps.

@alariva commented on GitHub (Aug 7, 2017): Thanks @domainzero , I was referring to a global-scope setting, but this also helps.
Author
Owner

@watschi commented on GitHub (Aug 7, 2017):

<font size="16"> won't change text in codeblocks unfortunately.

@watschi commented on GitHub (Aug 7, 2017): `<font size="16">` won't change text in codeblocks unfortunately.
Author
Owner

@ssddanbrown commented on GitHub (Aug 7, 2017):

@alariva Throwing this into the 'Custom HTML Head Content' will get you near:

<style>
.page-content {font-size: 1.1em;}
.cm-s-base16-light.CodeMirror {font-size: 14px;}
</style>

For a documentation platform it may be good to have this as on-page controls though 🤔 . Good idea.

@ssddanbrown commented on GitHub (Aug 7, 2017): @alariva Throwing this into the 'Custom HTML Head Content' will get you near: ``` <style> .page-content {font-size: 1.1em;} .cm-s-base16-light.CodeMirror {font-size: 14px;} </style> ``` For a documentation platform it may be good to have this as on-page controls though 🤔 . Good idea.
Author
Owner

@DoTheEvo commented on GitHub (Jun 26, 2018):

Would be nice to be in the default toolset. I am missing it too. For the whole page or for the selected text. I guess the idea is that people just zoom in as they like in the browser, but controlling selected text font size easily is pretty expected.

@DoTheEvo commented on GitHub (Jun 26, 2018): Would be nice to be in the default toolset. I am missing it too. For the whole page or for the selected text. I guess the idea is that people just zoom in as they like in the browser, but controlling selected text font size easily is pretty expected.
Author
Owner

@drmax24 commented on GitHub (Jun 27, 2019):

Any news on this?

@drmax24 commented on GitHub (Jun 27, 2019): Any news on this?
Author
Owner

@ssddanbrown commented on GitHub (Jun 27, 2019):

@drmax24 Nope, Nothing upon the above options for now

@ssddanbrown commented on GitHub (Jun 27, 2019): @drmax24 Nope, Nothing upon the above options for now
Author
Owner

@Seth-AIG commented on GitHub (Nov 21, 2020):

.cm-s-base16-light.CodeMirror {font-size: 14px;}

Seems this doesnt do anything to the text in the body but only the heading of the page. Has the code updated to reflect a different reference other than .cm-s-base16-light.CodeMirror?

@Seth-AIG commented on GitHub (Nov 21, 2020): > .cm-s-base16-light.CodeMirror {font-size: 14px;} Seems this doesnt do anything to the text in the body but only the heading of the page. Has the code updated to reflect a different reference other than .cm-s-base16-light.CodeMirror?
Author
Owner

@kauesena commented on GitHub (Nov 30, 2020):

It would be nice to be able to choose the default font size of each level of heading (an perhaps style in general, some people may want to do something like Wikipedia with some titles in bold sans-serif and others in bold serif) . I generally feel distracted by the big size of headings. I'm more for a slightly bigger heading.

@kauesena commented on GitHub (Nov 30, 2020): It would be nice to be able to choose the default font size of each level of heading (an perhaps style in general, some people may want to do something like Wikipedia with some titles in bold sans-serif and others in bold serif) . I generally feel distracted by the big size of headings. I'm more for a slightly bigger heading.
Author
Owner

@gtothill commented on GitHub (Feb 26, 2021):

I'm a newcomer to BookStack but I'm already publishing in it. I'm also aware that 'Id like that too' posts are to be discouraged. That having said, the rather beautiful GUI that exists is somewhat, IMHO, degraded by the font sizes of titles and section headings. The ability to change these on a per book or system wide level would be hugely appreciated and allow more fine grained control of the appearance of content. I'm not suggesting full blown themes, just granular font control.

@gtothill commented on GitHub (Feb 26, 2021): I'm a newcomer to BookStack but I'm already publishing in it. I'm also aware that 'Id like that too' posts are to be discouraged. That having said, the rather beautiful GUI that exists is somewhat, IMHO, degraded by the font sizes of titles and section headings. The ability to change these on a per book or system wide level would be hugely appreciated and allow more fine grained control of the appearance of content. I'm not suggesting full blown themes, just granular font control.
Author
Owner

@ssddanbrown commented on GitHub (Feb 26, 2021):

Hi @gtothill,
You can customize the default header sizes by adding something like the below to the "Custom HTML Head Content" setting:

<style>
.page-content h1 { font-size: 2rem; }
.page-content h2 { font-size: 1.8rem; }
.page-content h3 { font-size: 1.6rem; }
.page-content h4 { font-size: 1.4rem; }
.page-content h5 { font-size: 1.3rem; }
.page-content h6 { font-size: 1.15rem; }
</style>
@ssddanbrown commented on GitHub (Feb 26, 2021): Hi @gtothill, You can customize the default header sizes by adding something like the below to the "Custom HTML Head Content" setting: ```html <style> .page-content h1 { font-size: 2rem; } .page-content h2 { font-size: 1.8rem; } .page-content h3 { font-size: 1.6rem; } .page-content h4 { font-size: 1.4rem; } .page-content h5 { font-size: 1.3rem; } .page-content h6 { font-size: 1.15rem; } </style> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#394