Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
@financial-times/o-normalise
Advanced tools
Foundation styles and standardised utilities
As with all Origami components, o-normalise has a silent mode. To use its compiled CSS (rather than using its mixins with your own Sass) set $o-normalise-is-silent : false;
in your Sass before you import the o-normalise Sass.
oNormaliseVisuallyHidden
- provides styles to visually hide an element while remaining accessible to screen reader.oNormaliseClearfix
- adds clearfix styles to the element. See this Sitepoint article for more on clearfixes - we use a variation on method 3.oNormaliseBoxSizing
- adds box-sizing: border-box
to the current and all descending elements, see this article by Paul Irish for a full explanation.The following mixins apply normalising styles to groups of HTML elements, these aim to fix browser inconsistencies and any potential side-effects caused by browser default styles.
oNormaliseHTML
- affects html
, body
, main
elements and defaults :focus
stateoNormaliseLinks
- affects a
tags and :hover
& :active
statesoNormaliseText
- affects text related elementsoNormaliseImages
- affects the img
elementoNormaliseForms
- affects form related elements$o-normalise-grid-gutters
- provides a map of standardised grid gutter sizes$o-normalise-border-radius
- provides a standardised border radius valueo-normalise
provides default focus states using the :focus-visible
pseudo-class. This applies while an element matches the :focus
pseudo-class and the UA determines that the focus should be specially indicated.
No browser supports :focus-visible
right now (31st Jan 2018) but there is a polyfill which roughly mimics the behaviour by adding a class .focus-visible
to an element if it should have :focus-visible
applied to it. Integrate the polyfill with your project to apply these focus styles.
:focus
is used as a fallback in core
mode.
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.
If you have any questions or comments about this component, or need help using it, please either raise an issue, visit #ft-origami or email Origami Support.
This software is published by the Financial Times under the MIT licence.
FAQs
Provides base styles and resets for stylesheets. Includes standardised utilities, such as visually hiding components or adding a consistent focus state.
The npm package @financial-times/o-normalise receives a total of 2,765 weekly downloads. As such, @financial-times/o-normalise popularity was classified as popular.
We found that @financial-times/o-normalise demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.