Skip to content

Commit

Permalink
#4 IE9 Support
Browse files Browse the repository at this point in the history
  • Loading branch information
typical000 committed Jan 3, 2017
1 parent be9ab70 commit 115a147
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.0.0 / 2017-03-01

- Support IE9
- Update dependencies

## 2.0.0 / 2016-12-10

- Update to jss 6.0.1
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ jss.createStyleSheet(normalize).attach()

#### You must know

1. Dropped support of IE9. So, removed from original normalize CSS rules, writtend specially for IE9
2. Required jss plugins for correct working:
1. **jss-vendor-preifxer**
2. **jss-camelcase**
3. **jss-global**
Required jss plugins for correct working:
1. **jss-vendor-preifxer**
2. **jss-camelcase**
3. **jss-global**

Anyway, you can use a [preset](https://github.com/cssinjs/jss-preset-default) for a quick setup with default plugins.

Expand Down
43 changes: 39 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ module.exports = {
margin: 0,
},

/**
* Add the correct display in IE9
*/
'article, aside, footer, header, nav, section, figcaption, figure, main': {
display: 'block',
},

/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
Expand Down Expand Up @@ -71,7 +78,7 @@ module.exports = {
textDecorationSkip: 'objects', /* 2 */
},
'a:active, a:hover': {
outline: 0, /* 3 */
outlineWidth: 0, /* 3 */
},

/**
Expand Down Expand Up @@ -106,6 +113,14 @@ module.exports = {
fontStyle: 'italic',
},

/**
* Add the correct background and color in IE 9-.
*/
mark: {
backgroundColor: '#ff0',
color: '#000',
},

/**
* Add the correct font size in all browsers.
*/
Expand All @@ -130,6 +145,13 @@ module.exports = {
bottom: '-0.25em'
},

/**
* Add the correct display in IE 9-.
*/
'audio, video': {
display: 'inline-block',
},

/**
* Add the correct display in iOS 4-7.
*/
Expand All @@ -155,9 +177,13 @@ module.exports = {
},

/**
* Remove the margin in Firefox and Safari.
* 1. Change the font styles in all browsers (opinionated).
* 2. Remove the margin in Firefox and Safari.
*/
'button, input, optgroup, select, textarea': {
fontFamily: 'sans-serif', /* 1 */
fontSize: '100%', /* 1 */
lineHeight: '1.15', /* 1 */
margin: 0, /* 2 */
},

Expand Down Expand Up @@ -222,10 +248,12 @@ module.exports = {
},

/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress: {
verticalAlign: 'baseline',
display: 'inline-block', /* 1 */
verticalAlign: 'baseline', /* 2 */
},

/**
Expand Down Expand Up @@ -290,6 +318,13 @@ module.exports = {
display: 'list-item',
},

/**
* Add the correct display in IE 9-.
*/
canvas: {
display: 'inline-block',
},

/**
* Add the correct display in IE.
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "normalize-jss",
"version": "2.0.0",
"version": "3.0.0",
"description": "normalize-jss",
"author": {
"name": "Pavel Davydov",
Expand Down

0 comments on commit 115a147

Please sign in to comment.