5.1.1 • Published 2 months ago

@gravityforms/design-tokens v5.1.1

Weekly downloads
-
License
GPL-2.0-or-later
Repository
github
Last release
2 months ago

Gravity Forms Design Tokens

Design tokens as PostCSS variables, media queries, and mixins for Gravity Forms development.

Installation

Install the module

npm install @gravityforms/design-tokens --save

Note: This package requires node 20.10.0 or later, and npm 10.2.3 or later.

Overview

A collection of design tokens as variables and mixins that drive our theme for Gravity Forms in objects that map to PostCSS plugins, grouped for the admin and theme contexts in WordPress.

Currently, we supply customProperties, customMedia, and mixins. Please note the required PostCSS plugins that must be used with each module type.

Usage

Use all of our Gravity Forms admin custom properties in postcss-custom-properties:

const postcssPlugins = [
        ...otherPlugins,
	require( 'postcss-custom-properties' )( {
		importFrom: [
			{ customProperties: require( '@gravityforms/design-tokens/gravityforms/custom-properties/admin' ) },
		],
	} ),
	...otherPlugins,
];

Use only our Gravity Forms admin color custom properties in postcss-custom-properties:

const postcssPlugins = [
        ...otherPlugins,
	require( 'postcss-custom-properties' )( {
		importFrom: [
			{ customProperties: require( '@gravityforms/design-tokens/gravityforms/custom-properties/admin/colors' ) },
		],
	} ),
	...otherPlugins,
];

Use all of our Gravity Forms admin custom media (media queries) in postcss-custom-media:

const postcssPlugins = [
        ...otherPlugins,
	require( 'postcss-custom-media' )( {
		importFrom: [
			{ customMedia: require( '@gravityforms/design-tokens/gravityforms/custom-media/admin' ) },
		],
	} ),
	...otherPlugins,
];

Use all of our Gravity Forms admin mixins in postcss-mixins (after custom properties):

const postcssPlugins = [
        ...otherPlugins,
	require( 'postcss-mixins' )( {
		mixins: require( '@gravityforms/design-tokens/gravityforms/mixins/admin' ),
	} ),
	...otherPlugins,
];
5.1.1

2 months ago

5.1.0

3 months ago

5.0.11

7 months ago

5.0.12

7 months ago

5.0.13

7 months ago

5.0.14

7 months ago

5.0.15

4 months ago

5.0.16

4 months ago

5.0.17

4 months ago

5.0.10

7 months ago

5.0.9

8 months ago

5.0.8

8 months ago

5.0.7

8 months ago

5.0.6

9 months ago

5.0.5

10 months ago

5.0.4

10 months ago

5.0.3

10 months ago

5.0.2

1 year ago

5.0.1

1 year ago

5.0.0

1 year ago

3.5.3

1 year ago

3.5.2

1 year ago

3.5.1

1 year ago

3.5.0

1 year ago

4.1.3

1 year ago

4.1.0

1 year ago

4.0.1

1 year ago

4.0.0

1 year ago

4.1.2

1 year ago

4.1.1

1 year ago

3.4.2

2 years ago

3.4.1

2 years ago

3.4.0

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.0.0

2 years ago

1.3.15

2 years ago

2.0.0

2 years ago

1.3.14

2 years ago

1.3.10

2 years ago

1.3.13

2 years ago

1.3.11

2 years ago

1.3.12

2 years ago

1.3.9

2 years ago

1.3.7

2 years ago

1.3.8

2 years ago

1.3.6

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.3.5

2 years ago

1.2.6

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.1

2 years ago

1.3.0

2 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago