Vueless Docs
ComponentsGitHubWebsite
  • Getting Started
  • Installation
    • Quick start (Vue)
    • Quick start (Nuxt)
    • Class autocompletion
    • Minimal requirements
    • Storybook docs
  • Global customization
    • General
    • Colors
    • Design system
    • Rounding
    • Focus Outline
    • Font Size
    • Disabled Opacity
    • Dark mode
    • Custom tailwind classes
  • Component customization
    • General
    • Styling
    • Unstyled mode
    • Conditional styling
    • Extends styling from keys
    • Nested components styling
    • Props defaults
    • Redefining props
    • Defining custom props
    • Internationalization (i18n)
  • Creating own components
    • Vueless file structure
    • Create new component
    • Copy existing component
  • Svg Icons
    • General usage
    • Custom icons
    • Dynamic import
    • Advanced settings
  • Helpers
    • Change settings in runtime
  • Other
    • Vueless Vite Plugins
Powered by GitBook
On this page
  1. Global customization

Font Size

You can set the components font size globally for all Vueless components.

vueless.config.{js,ts}
export default {
  text: 16, /* default -> 14 (pixels) */
}

If you define only the text (medium) value, tiny, small and large sizes will be automatically calculated. The expected values are listed in the table below:

tiny (text.xs)
small (text.sm)
medium (text / text.md)
large (text.lg)

8

10

12

14

9

11

13

15

10

12

14

16

11

13

15

17

12

14

16

18

If you want to use custom values for tiny, small and large font-sizes, you can define them manually.

vueless.config.{js,ts}
export default {
  rounding: {
    xs: 12,
    sm: 13,
    md: 14,
    lg: 15,
  }
}

Custom tailwind class

To implement global font size stylings, Vueless provides custom Tailwind CSS classes and corresponding CSS variables. Feel free to use these classes in your components whenever you need consistent rounding across your project.

You can also use the corresponding CSS variables directly:

Custom classes
CSS variables in a utility class

text-tiny

text-(--vl-text-xs)

text-small

text-(--vl-text-sm)

text-medium

text-(--vl-text)

text-large

text-(--vl-text-lg)

Last updated 22 days ago