Détail du package

postcss-increase-text-sizes

admdh14MIT1.1.0

PostCSS Increase Text Sizes is PostCSS plugin that helps automaticaly increase text size and line height

postcss, css, postcss-plugin, increase font size

readme

Build Status

PostCSS Increase Text Sizes

PostCSS Increase Text Size is a PostCSS plugin that helps automaticaly increase text size and line heights.

Why?

Accessible websites are getting more popular. Some countries even pass laws obliging IT companies create web accessible websites. This plugin focused to help with building web accessible web sites.

Basic Usage

postcss([
    require("postcss-increase-text-sizes")({
        fontSizeMultiplyBy: 1.2,
        lineheightMultiplyBy: 1.2,
        selectorsBlackList: ["h2"]
    })
]);

input.css:

h2 {
    font-size: 12px;
}
p {
    font-size: 12px;
    line-height: 16px;
}

output.css:

h2 {
    font-size: 12px;
}
p {
    font-size: 14px;
    line-height: 19px;
}

Options

Name Default Value Description
fontSizeMultiplyBy 1.2 All font-size properties will be multiplied by this option
lineheightMultiplyBy 1.2 All line-height properties will be multiplied by this option
selectorsBlackList [] Array of selectors which are to be ignored

Works great with:

PostCSS High Contrast

changelog

1.0.5

  • added blacklist

1.0.4

  • eslint 3.1.1

1.0.3

  • 'em', 'rem' units stay unrounded

1.0.2

  • use "object-assign" insteda of util

1.0.1

  • Round values

1.0.0

  • Init release