Font Family
RyuseiCode uses a regular san-serif font for texts, and a monospace font for code.
To change the main font, set font-family
to the root element:
.ryuseicode { font-family: Gotham, sans-serif; }
But to change the monospace font, use the monospaceFont
option because it is referred by some elements:
new RyuseiCode( { monospaceFont: `'Fira Code', monospace` } );
Border Radius
The root element (.ryuseicode
) must not have overflow:hidden
.
If you want to set border-radius
to round the corner of the editor, set the style to the view
element:
.ryuseicode__view { border-radius: 10px; }
or add a custom class to it:
new RyuseiCode( { viewClasses: 'round-me' } );
Background Color
Set the background-color
to the view element:
.ryuseicode__view { background-color: #000; }
or add a custom class to it:
new RyuseiCode( { viewClasses: 'dark-background' } );
Line Height
Update the lineHeight
option as a number. This does not accept the CSS format:
new RyuseiCode( { lineHeight: 1.4 } );
Advanced Styling
If you'd like to fully customize the appearance, creating your own theme may be more simple and efficient than overriding each class and property, because most of the essential values are exposed in the dart SASS way like this:
@use '../../core/object/token' with ( $keyword: #e75a77, $constant: #06b297, $symbol: #06b297, $comment: #8baad1, $tag: #f75766, $selector: #72bc31, $atrule: #e75a77, $attr: #06b297, $prop: #06b297, ... );
See this page for more details.