gavinmcfarland / flex-gap-polyfill

A PostCSS plugin to emulate flex gap using margins
https://gavinmcfarland.github.io/flex-gap-polyfill/
Creative Commons Zero v1.0 Universal
147 stars 6 forks source link

Useing in angular 2+ #27

Closed moshe-l closed 2 months ago

moshe-l commented 3 years ago

How this polyfill can used in angular 2 application? How can i pass my css to the proccess function in polyfill.ts file? Thanks a lot.

gavinmcfarland commented 3 years ago

Hi @moshe-l . The polyfill requires PostCSS. I've not used Angular before but from what I've read you need to use a custom Webpack config to use PostCSS. I found this article which talks about using Tailwind and angular, you should be ale to follow the same steps (without the Tailwind stuff).

https://dev.to/seankerwin/angular-8-tailwind-css-guide-3m45

moshe-l commented 3 years ago

Thanks you for your response. I'll check it out.

gavinmcfarland commented 3 years ago

I tried to have a go but I wasn't familiar enough with Angular. Let us know if you get it working, or if you hit a roadblock.

madmacc commented 3 years ago

@moshe-l Did you get this working with Angular? Any tips?

gavinmcfarland commented 2 months ago

I found the following articles talking about enabling PostCSS support for Angular and it seems like they've ditched it for now. It's not been supported for a few versions now. Somebody talks about getting it to work with a custom build. It may be useful for someone that's interested in trying it.

Various links I found below about it below:

https://github.com/angular/angular-cli/issues/26536 https://github.com/nrwl/nx/issues/9650 https://medium.com/@kabya78890/install-tailwind-css-using-post-css-in-your-angular-project-9cc0f9a3927b

I'll be closing this issue for now.