Skip to content

Commit 115a147

Browse files
committed
#4 IE9 Support
1 parent be9ab70 commit 115a147

File tree

4 files changed

+49
-10
lines changed

4 files changed

+49
-10
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.0 / 2017-03-01
2+
3+
- Support IE9
4+
- Update dependencies
5+
16
## 2.0.0 / 2016-12-10
27

38
- Update to jss 6.0.1

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ jss.createStyleSheet(normalize).attach()
1414

1515
#### You must know
1616

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

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

index.js

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ module.exports = {
3232
margin: 0,
3333
},
3434

35+
/**
36+
* Add the correct display in IE9
37+
*/
38+
'article, aside, footer, header, nav, section, figcaption, figure, main': {
39+
display: 'block',
40+
},
41+
3542
/**
3643
* Correct the font size and margin on `h1` elements within `section` and
3744
* `article` contexts in Chrome, Firefox, and Safari.
@@ -71,7 +78,7 @@ module.exports = {
7178
textDecorationSkip: 'objects', /* 2 */
7279
},
7380
'a:active, a:hover': {
74-
outline: 0, /* 3 */
81+
outlineWidth: 0, /* 3 */
7582
},
7683

7784
/**
@@ -106,6 +113,14 @@ module.exports = {
106113
fontStyle: 'italic',
107114
},
108115

116+
/**
117+
* Add the correct background and color in IE 9-.
118+
*/
119+
mark: {
120+
backgroundColor: '#ff0',
121+
color: '#000',
122+
},
123+
109124
/**
110125
* Add the correct font size in all browsers.
111126
*/
@@ -130,6 +145,13 @@ module.exports = {
130145
bottom: '-0.25em'
131146
},
132147

148+
/**
149+
* Add the correct display in IE 9-.
150+
*/
151+
'audio, video': {
152+
display: 'inline-block',
153+
},
154+
133155
/**
134156
* Add the correct display in iOS 4-7.
135157
*/
@@ -155,9 +177,13 @@ module.exports = {
155177
},
156178

157179
/**
158-
* Remove the margin in Firefox and Safari.
180+
* 1. Change the font styles in all browsers (opinionated).
181+
* 2. Remove the margin in Firefox and Safari.
159182
*/
160183
'button, input, optgroup, select, textarea': {
184+
fontFamily: 'sans-serif', /* 1 */
185+
fontSize: '100%', /* 1 */
186+
lineHeight: '1.15', /* 1 */
161187
margin: 0, /* 2 */
162188
},
163189

@@ -222,10 +248,12 @@ module.exports = {
222248
},
223249

224250
/**
225-
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
251+
* 1. Add the correct display in IE 9-.
252+
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
226253
*/
227254
progress: {
228-
verticalAlign: 'baseline',
255+
display: 'inline-block', /* 1 */
256+
verticalAlign: 'baseline', /* 2 */
229257
},
230258

231259
/**
@@ -290,6 +318,13 @@ module.exports = {
290318
display: 'list-item',
291319
},
292320

321+
/**
322+
* Add the correct display in IE 9-.
323+
*/
324+
canvas: {
325+
display: 'inline-block',
326+
},
327+
293328
/**
294329
* Add the correct display in IE.
295330
*/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "normalize-jss",
3-
"version": "2.0.0",
3+
"version": "3.0.0",
44
"description": "normalize-jss",
55
"author": {
66
"name": "Pavel Davydov",

0 commit comments

Comments
 (0)