mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-18 18:51:32 +10:00
Add ability to customize font size
Added an ability to customize font sizes. This is set at a new section in the settings. The controler for this sets a number of css variables which are used in css rules that override tailwind's text-<size> to use the font size and line spacing contained in the variable. The control itself is a simple logarithmic slider that controls a "scale factor" by which all the text sizes in a resume are scaled by.
This commit is contained in:
18
src/data/fontSizeVarsDefault.js
Normal file
18
src/data/fontSizeVarsDefault.js
Normal file
@ -0,0 +1,18 @@
|
||||
const fontSizeVarsDefault = {
|
||||
'--text-xs-size': 0.75,
|
||||
'--text-sm-size': 0.875,
|
||||
'--text-lg-size': 1.125,
|
||||
'--text-xl-size': 1.25,
|
||||
'--text-2xl-size': 1.5,
|
||||
'--text-3xl-size': 1.875,
|
||||
'--text-4xl-size': 2.25,
|
||||
'--text-xs-line-height': 1,
|
||||
'--text-sm-line-height': 1.25,
|
||||
'--text-lg-line-height': 1.75,
|
||||
'--text-xl-line-height': 1.75,
|
||||
'--text-2xl-line-height': 2,
|
||||
'--text-3xl-line-height': 2.25,
|
||||
'--text-4xl-line-height': 2.5,
|
||||
};
|
||||
|
||||
export default fontSizeVarsDefault;
|
||||
@ -6,6 +6,7 @@ import {
|
||||
MdInfo,
|
||||
MdSettings,
|
||||
MdStyle,
|
||||
MdFormatSize,
|
||||
} from 'react-icons/md';
|
||||
|
||||
export default [
|
||||
@ -25,6 +26,10 @@ export default [
|
||||
id: 'fonts',
|
||||
icon: MdFontDownload,
|
||||
},
|
||||
{
|
||||
id: 'font-sizes',
|
||||
icon: MdFormatSize,
|
||||
},
|
||||
{
|
||||
id: 'actions',
|
||||
icon: MdImportExport,
|
||||
|
||||
Reference in New Issue
Block a user