webcat12345 / ngx-ui-switch

Angular UI Switch component
https://webcat12345.github.io/ngx-ui-switch/demo/
MIT License
111 stars 68 forks source link

Option to turn off inline CSS #287

Closed cmajsmith closed 6 years ago

cmajsmith commented 6 years ago

Hello. First of all thanks for all your work on this awesome component.

I'm currently working on a project that has a very strict Content Security Policy (has style-src set to 'self'), which totally blocks ngx-ui-switch display as it inserts inline styles.

So, the suggestion is to add an option that allows turning the inline CSS addition off, and let the controls rely on outer CSS-files rules only.

cmckni3 commented 6 years ago

I started this a while back. I'll see if I can pick it back up in #242

cmajsmith commented 6 years ago

I could give it a try if you don't mind. Both this one and #242.

cmckni3 commented 6 years ago

Go for it. This is a duplicate issue of #188 and should be done with #247 if possible.

cmajsmith commented 6 years ago

Please check the pull request once you'll have time for it.

I'd handle #247 separately as it definitely shouldn't be added with CSS (in my opinion) as was initially proposed in issue description.

cmckni3 commented 6 years ago

Well yeah it shouldn't be added with CSS. But the structure was going to have to change to support to text.

cmckni3 commented 6 years ago

Wil release this evening