ngx-gallery icon indicating copy to clipboard operation
ngx-gallery copied to clipboard

box-sizing in ngx-gallery.component.scss

Open hijamoya opened this issue 5 years ago • 8 comments

In the original library:

    /deep/ {

        * {
            box-sizing: border-box;
        }
  ...

In this library:

* {
  box-sizing: border-box;
}

This make global box-sizing change after open the gallery which causes some css issues.

hijamoya avatar Mar 13 '20 09:03 hijamoya

Yes, at the new version of Angular /deep/ is not working. ( but I tried this at Next versions, may be it working in release, I don't know.

kolkov avatar Mar 13 '20 09:03 kolkov

I can confirm that ::ng-deep is still working.

hijamoya avatar Mar 13 '20 09:03 hijamoya

Indeed, ::ng-deep is still working.

Could you maybe update your code? That would fix many webpages' style issues I bet :)

totize avatar May 05 '20 17:05 totize

While updating to angular 9, in the official update guide says this:

In the meantime, I've fixed by adding

ngx-gallery ::ng-deep .ngx-gallery-thumbnails .ngx-gallery-thumbnail {
  border: none !important;
}

in the component.scss file. I think it isn't the best approach because I don't like !important, but I haven't found another solution.

PedroJesusRomeroOrtega avatar May 15 '20 08:05 PedroJesusRomeroOrtega

@PedroJesusRomeroOrtega thanks, are there any other ways in Angular repo issues? I know only this discussion: https://github.com/angular/angular/issues/25160

kolkov avatar May 15 '20 10:05 kolkov

Sorry, I don't know other ways

PedroJesusRomeroOrtega avatar May 15 '20 10:05 PedroJesusRomeroOrtega

Nice catch. Thanks @hijamoya , I was wondering why my styles suddenly broke when updating to this library.

As for the styles, I've been using @PedroJesusRomeroOrtega 's solution. ::ng-deep works (i haven't find a better solution that doesn't use !important though). It would be nice to have a better way to control the border style of thumbnails.

german-e-mas avatar Nov 05 '20 14:11 german-e-mas

This is still an issue for me, it really messes up the CSS of the rest of the site. Can you not structure your CSS better and not use global declarations?

corecodingltd avatar Aug 04 '21 13:08 corecodingltd