3.3.2 • Published 6 months ago

@financial-times/o-normalise v3.3.2

Weekly downloads
1,031
License
MIT
Repository
-
Last release
6 months ago

o-normalise MIT licensed

Foundation styles and standardised utilities

Usage

Check out how to include Origami components in your project to get started with o-normalise.

Sass

To output all default o-normalise styles call the mixin oNormalise:

@include oNormalise();

To include features of o-normalise granularly, pass an $opts map. E.g. to output all styles except for the css helper classes o-normalise-visually-hidden and o-normalise-clearfix:

@include oNormalise($opts: (
	'elements': ('forms', 'images', 'text', 'links'),
	'body': ('font-smoothing', 'focus', 'reduce-motion')
));

Options include:

FeatureDescriptionValues
elementsElement types to apply normalising styles to.'forms', 'images', 'text', 'links'
bodyFeatures which apply to html, body, main elements and all elements with a :focus state.'font-smoothing', 'focus'
helpersClasses which may be applied to elements manually.'clearfix', 'visually-hidden'

Other Mixins

Focus States

o-normalise provides default focus states using the :focus-visible pseudo-class. This applies while an element matches the :focus pseudo-class and the user-agent determines that the focus should be specially indicated.

Browser support is now good so we no longer recommend the focus-visible polyfill, this should be removed from your project. :focus is used as a fallback where needed in older browsers.

Contributing

If you think there is something that could be added to o-normalise, either raise an issue to discuss or create a Pull Request with the changes to be reviewed by the Origami team.

If you think of any JavaScript functions or utilities that would be useful to have in a module like this, please raise an issue on o-utils.

Migration guide

StateMajor VersionLast Minor ReleaseMigration guide
✨ active3N/Amigrate to v3
⚠ maintained22.0migrate to v2
╳ deprecated11.7N/A

Contact

If you have any questions or comments about this component, or need help using it, please either raise an issue, visit #origami-support or email Origami Support.


Licence

This software is published by the Financial Times under the MIT licence.

3.3.2

6 months ago

3.3.1

1 year ago

3.3.0

1 year ago

3.2.2

2 years ago

3.2.1

2 years ago

3.2.0

2 years ago

3.1.0

2 years ago

2.0.8

3 years ago

3.0.3

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

3.0.0-beta.0

3 years ago

3.0.0-0

3 years ago

2.0.7

3 years ago

2.0.6

4 years ago

2.0.5

4 years ago

2.0.4

4 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

2.0.0-beta.6

4 years ago

2.0.0-beta.5

4 years ago

2.0.0-beta.4

4 years ago

2.0.0-beta.3

4 years ago

2.0.0-beta.2

4 years ago

2.0.0-beta.1

5 years ago

1.7.4

5 years ago

1.7.3

5 years ago

1.7.2

5 years ago

1.7.1

5 years ago

1.7.0

5 years ago