Jigsass-generic-normalize - 1.0.6
JigSass Generic Normalize
Modular, configurable, opt-in browser normalization
JigSass Normalize is a modularized and configurable version of Nicolas Gallagher and Jonathan Neal's normalize.css at version 4.0.0.
Normalize.css is a modern alternative to css resets, which preserves useful defaults and corrects bugs and common browser inconsistencies.
Installation
Using npm:
npm i -S jigsass-generic-normalize
Usage
@import 'path/to/jigsass-generic-normalize'/scss/index;
The styles of each JigSass Normalize submodule will only be included a single time, regardless of how many times they are included.
Extended details and known issues
Additional detail and explanation of the esoteric parts of normalize.css.
pre, code, kbd, samp
The font-family: monospace, monospace hack fixes the inheritance and scaling of font-size for preformatted text. The duplication of monospace is intentional. Source.
sub, sup
Normally, using sub or sup affects the line-box height of text in all browsers. Source.
svg:not(:root)
Adding overflow: hidden fixes IE9's SVG rendering. Earlier versions of IE don't support SVG, so we can safely use the :not() and :root selectors that modern browsers use in the default UA stylesheets to apply this style. [Source] (https://lists.w3.org/Archives/Public/public-svg-wg/2008JulSep/0339.html).
select
By default, Chrome on OS X and Safari on OS X allow very limited styling of select, unless a border property is set. The default font weight on optgroup elements cannot safely be changed in Chrome on OSX and Safari on OS X.
[type="checkbox"]
It is recommended that you do not style checkbox and radio inputs as Firefox's implementation does not respect box-sizing, padding, or width.
[type="number"]
Certain font size values applied to number inputs cause the cursor style of the decrement button to change from default to text.
[type="search"]
The search input is not fully stylable by default. In Chrome and Safari on OSX/iOS you can't control font, padding, border, or background. In Chrome and Safari on Windows you can't control border properly. It will apply border-width but will only show a border color (which cannot be controlled) for the outer 1px of that border. Applying -webkit-appearance: textfield addresses these issues without removing the benefits of search inputs (e.g. showing past searches). Safari (but not Chrome) will clip the cancel button on when it has padding (and textfield appearance).
License: MIT
normalize
mixins
jigsass-normalize-links
@mixin jigsass-normalize-links() { ... }Description
Normalize link
Parameters
None.
Requires
- [mixin]
jigsass-normalize
jigsass-normalize
@mixin jigsass-normalize($include: all, $include: ()) { ... }Description
Include multiple parts of jigsass-normalize at once
Parameters
| parameterName | parameterDescription | parameterType | parameterDefault value |
|---|---|---|---|
$include | A list of sections to include. Can contain | List or String | all |
$include | A list of sections to explicitly exclude from inclusion. | String | () |
Requires
- [mixin]
jigsass-normalize-root
Example
// normalize root and html5 elements
@include jigsass-normalize(root html5);// Normalize all elements
@include jigsass-normalize(all);// Normalize all but form elemets
@include jigsass-normalize(all, $exclude: forms);Used by
- [mixin]
jigsass-normalize-html5 - [mixin]
jigsass-normalize-links - [mixin]
jigsass-normalize-text - [mixin]
jigsass-normalize-embedded - [mixin]
jigsass-normalize-grouping - [mixin]
jigsass-normalize-forms
jigsass-normalize-html5
@mixin jigsass-normalize-html5() { ... }Description
Normalize html5 elements
Parameters
None.
Requires
- [mixin]
jigsass-normalize
jigsass-normalize-text
@mixin jigsass-normalize-text() { ... }Description
Normalize text elements
Parameters
None.
Requires
- [mixin]
jigsass-normalize
jigsass-normalize-embedded
@mixin jigsass-normalize-embedded() { ... }Description
Normalize embedded elements
Parameters
None.
Requires
- [mixin]
jigsass-normalize
jigsass-normalize-grouping
@mixin jigsass-normalize-grouping() { ... }Description
Normalize grouping elements
Parameters
None.
Requires
- [mixin]
jigsass-normalize
jigsass-normalize-forms
@mixin jigsass-normalize-forms() { ... }Description
Normalize form elements
Parameters
None.
Requires
- [mixin]
jigsass-normalize
variables
jigsass-normalize-default-font-family
$jigsass-normalize-default-font-family: sans-serif !default;Description
The default font-stack to set.
A string or a list of strings.
Type
List or String
jigsass-normalize-fig-margins
$jigsass-normalize-fig-margins: true !default;Description
Determines if the margins of figure elements should be normalized. Set to false if you intend to later reset margins.
Type
Boolean
jigsass-normalize-fieldset
$jigsass-normalize-fieldset: true !default;Description
Determines if the border, margin and padding of fieldset should be normalized (true) or reset (false).
Type
Boolean
jigsass-normalize-h1
$jigsass-normalize-h1: true !default;Description
Determines if h1 elements should be normalize. Set to false if you intend to later reset headline styles.
Type
Boolean
normalize - 02 - root
mixins
jigsass-normalize-root
@mixin jigsass-normalize-root() { ... }Description
Normalize the body and html elements
Parameters
None.
Used by
- [mixin]
jigsass-normalize