css-grid-polyfill
css-grid-polyfill copied to clipboard
Add note how to install
npm install
and
require('css-grid-polyfill')
I didn't find anything in npm packages. Is it available?
I am not sure if it is installable at all. I couldn't find a way.. Looking at the package.json
it looks like it is called css-polyfills
.
I'll keep trying to install it (or just make it work) in the next hours. If I find anything, I'll let you know!
There is no npm package. Just include js file in old way.
Yes. I just did that and it worked! I added in my root react component
componentDidMount(){
injectTapEventPlugin();
let script = document.createElement('script');
script.src = "css-polyfills.min.js";
script.type = "text/javascript";
document.getElementsByTagName('body')[0].appendChild(script);
}
And i did the trick. Good luck :)
I would indeed recommend to use the script directly. There is a bower port courtesy of https://github.com/FremyCompany/css-grid-polyfill/issues/24 but I don't think it is entirely up to date (probably not).
At the same time, it's a good time to remind people that the project currently isn't actively maintained by anyone so using this in production should be really done with caution only.
IMPORTANT NOTE: The Grid specification has undergone several major changes since this polyfill was written, and I have not had time to work on keeping the polyfill up to date. I welcome contributions and am ready to help, but I do not have time to commit on fixing issues myself at this time.
I might have some time during the holiday period to finish the work of some of the pull requests that have been submitted but not entirely ironed out by their authors, so there might be an update coming that would help us bring this closer to the current spec, but there is still a fair amount of work remaining.
Be cautious out there ;)