zefoy / ngx-color-picker

Color picker widget for the Angular (version 2 and newer)
MIT License
454 stars 142 forks source link

How to unset margin on <color-picker> element? #323

Open harvanchik opened 1 year ago

harvanchik commented 1 year ago

The <color-picker> element has a right margin on it which moves my other elements over when the picker is opened. https://i.gyazo.com/ad6214625a1c0934621e9f54eafb998d.mp4

I tried added css styles to set the margin to 0, but that did not work.

color-picker {
  margin: 0;
}

Then I tried setting the margin after the view is initiatized, but that also didn't work.

ngAfterViewInit() {
  (document.querySelector('color-picker') as HTMLElement).style.margin = '0';
}