3.0.6 • Published 12 days ago

@csstools/postcss-text-decoration-shorthand v3.0.6

Weekly downloads
-
License
MIT-0
Repository
github
Last release
12 days ago

PostCSS Text Decoration Shorthand

npm install @csstools/postcss-text-decoration-shorthand --save-dev

PostCSS Text Decoration Shorthand lets you use text-decoration as a shorthand following the Text Decoration Specification.

.example {
	text-decoration: wavy underline purple 25%;
}

/* becomes */

.example {
	text-decoration: underline;
	text-decoration: underline wavy purple;
	text-decoration-thickness: calc(0.01em * 25);
	text-decoration: wavy underline purple 25%;
}

Usage

Add PostCSS Text Decoration Shorthand to your project:

npm install postcss @csstools/postcss-text-decoration-shorthand --save-dev

Use it as a PostCSS plugin:

const postcss = require('postcss');
const postcssTextDecorationShorthand = require('@csstools/postcss-text-decoration-shorthand');

postcss([
	postcssTextDecorationShorthand(/* pluginOptions */)
]).process(YOUR_CSS /*, processOptions */);

PostCSS Text Decoration Shorthand runs in all Node environments, with special instructions for:

Options

preserve

The preserve option determines whether the original notation is preserved. By default, it is preserved.

postcssTextDecorationShorthand({ preserve: false })
.example {
	text-decoration: wavy underline purple 25%;
}

/* becomes */

.example {
	text-decoration: underline;
	text-decoration: underline wavy purple;
	text-decoration-thickness: calc(0.01em * 25);
}
3.0.6

12 days ago

3.0.5

1 month ago

3.0.4

5 months ago

3.0.3

8 months ago

3.0.2

8 months ago

3.0.1

8 months ago

3.0.0

10 months ago

2.2.4

12 months ago

2.2.3

1 year ago

2.2.2

1 year ago

2.2.1

1 year ago

2.2.0

1 year ago

2.1.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.0

2 years ago