Coder Social home page Coder Social logo

Comments (6)

lukasz-galka avatar lukasz-galka commented on June 15, 2024

You can override default styles using /deep/ operator.

ngx-gallery /deep/ .ngx-gallery-icon {
  color: red;
  background: blue;
}

from ngx-gallery.

german-e-mas avatar german-e-mas commented on June 15, 2024

I've read that these operators are going to be deprecated in the future. You can read about it in the Angular Component Style Guide. Something to keep in mind.

from ngx-gallery.

TonganJedi avatar TonganJedi commented on June 15, 2024

I had hoped there would be an alternative way to get to these, but until they come up with a replacement for this, it'll have to do.

from ngx-gallery.

german-e-mas avatar german-e-mas commented on June 15, 2024

I used a hacky workaround to solve this (mainly because I tend to shy away from /deep/).

As my project required using Material Font instead of Font Awesome, I made a custom font with just the characters required for the gallery (there are free websites that can do this).

Inside that font's CSS, I included a circle-icon class. Then, in the gallery, I passed the arrows as: arrowNextIcon: 'gallery-arrow-right circle-icon', where "gallery-arrow-right" is my custom font.

Here's the result (with a white background)

arrow

from ngx-gallery.

lukasz-galka avatar lukasz-galka commented on June 15, 2024

Hi @german-e-mas, you are right with deep. @TonganJedi would you like option like iconStyle, for example options.iconStyle = 'color: red; background: blue' ?

from ngx-gallery.

blessingk avatar blessingk commented on June 15, 2024

I would like to add a delete functionality using an icon but am not sure how to do it here <ngx-gallery [options]="galleryOptions" [images]="galleryImages">

from ngx-gallery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.