Skip to content

Commit

Permalink
keyframes support older ios webkit
Browse files Browse the repository at this point in the history
  • Loading branch information
tyfoo committed Apr 20, 2017
1 parent 474ae32 commit 7c5e97b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. If a contri
- Add FlatList, SectionList & VirtualizedList support, thanks to @Kureev(https://github.com/Kureev). (see [#662](https://github.com/styled-components/styled-components/pull/662))
- Removed dependency on `glamor` and migrated remaining references to the internval vendored `glamor` module. (see [#663](https://github.com/styled-components/styled-components/pull/663))
- Fix missing autoprefixing on GlobalStyle model. (see [#702](https://github.com/styled-components/styled-components/pull/702))
- Better support for `keyframes` on older iOS/webkit browsers (see [#720](https://github.com/styled-components/styled-components/pull/720))

## [v1.4.4] — 2017-03-01

Expand Down
2 changes: 2 additions & 0 deletions src/constructors/keyframes.js
Expand Up @@ -12,6 +12,8 @@ export default (nameGenerator: NameGenerator) =>
const hash = hashStr(replaceWhitespace(JSON.stringify(rules)))
const name = nameGenerator(hash)
const keyframes = new GlobalStyle(rules, `@keyframes ${name}`)
const keyframesWebkit = new GlobalStyle(rules, `@-webkit-keyframes ${name}`)
keyframes.generateAndInject()
keyframesWebkit.generateAndInject()
return name
}
8 changes: 8 additions & 0 deletions src/constructors/test/keyframes.test.js
Expand Up @@ -48,6 +48,14 @@ describe('keyframes', () => {
opacity: 1;
}
}
@-webkit-keyframes keyframe_0 {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
`, { styleSheet })
})
})

0 comments on commit 7c5e97b

Please sign in to comment.