@@ -84,6 +84,7 @@ export default class RapiDoc extends LitElement {
84
84
textColor : { type : String , attribute : 'text-color' } ,
85
85
headerColor : { type : String , attribute : 'header-color' } ,
86
86
primaryColor : { type : String , attribute : 'primary-color' } ,
87
+ fontSize : { type : String , attribute : 'font-size' } ,
87
88
regularFont : { type : String , attribute : 'regular-font' } ,
88
89
monoFont : { type : String , attribute : 'mono-font' } ,
89
90
@@ -120,16 +121,7 @@ export default class RapiDoc extends LitElement {
120
121
NavStyles ,
121
122
css `
122
123
: host {
123
- - - layout: ${ unsafeCSS ( this . layout || 'row' ) } ;
124
- - - font- mono: ${ unsafeCSS ( this . monoFont || 'Monaco, "Andale Mono", "Roboto Mono", Consolas, monospace' ) } ;
125
- - - font- regular: ${ unsafeCSS ( this . regularFont || 'rapidoc, "Open Sans", BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif' ) } ;
126
-
127
- - - font- size-small: 12px;
128
- - - font- size-mono: 13px;
129
- - - font- size-regular: 14px;
130
124
- - bor der- radius: 2px;
131
- - - resp- area- height: ${ unsafeCSS ( this . responseAreaHeight ) } ;
132
- - - nav- item- padding: ${ unsafeCSS ( this . navItemSpacing === 'relaxed' ? '10px' : this . navItemSpacing === 'compact' ? '5px 10px' : '7px 10px' ) } ;
133
125
134
126
dis play: flex;
135
127
flex- direction: column;
@@ -327,7 +319,7 @@ export default class RapiDoc extends LitElement {
327
319
328
320
@media only screen and (min-width : 1000px ) {
329
321
.nav-bar {
330
- width : 300px ;
322
+ width : ${ unsafeCSS ( this . fontSize === 'default' ? ' 300px' : this . fontSize === 'large' ? '315px' : '330px' ) } ;
331
323
display : flex;
332
324
}
333
325
.section-gap--focused-mode {
@@ -359,6 +351,7 @@ export default class RapiDoc extends LitElement {
359
351
if ( ! this . sortTags || ! 'true, false,' . includes ( `${ this . sortTags } ,` ) ) { this . sortTags = 'false' ; }
360
352
if ( ! this . sortEndpointsBy || ! 'method, path,' . includes ( `${ this . sortEndpointsBy } ,` ) ) { this . sortEndpointsBy = 'path' ; }
361
353
if ( ! this . navItemSpacing || ! 'compact, relaxed, default,' . includes ( `${ this . navItemSpacing } ,` ) ) { this . navItemSpacing = 'default' ; }
354
+ if ( ! this . fontSize || ! 'default, large, largest,' . includes ( `${ this . fontSize } ,` ) ) { this . fontSize = 'default' ; }
362
355
363
356
if ( ! this . showInfo || ! 'true, false,' . includes ( `${ this . showInfo } ,` ) ) { this . showInfo = 'true' ; }
364
357
if ( ! this . showComponents || ! 'true false' . includes ( this . showComponents ) ) { this . showComponents = 'false' ; }
0 commit comments