Git Product home page Git Product logo

Comments (6)

kryptonianson avatar kryptonianson commented on June 6, 2024 1

I am sorry, for sure I don't know what I was thinking. !important of course is the problem. Thank you for your patience. But the way I really love this component. Great work.

from ngx-gallery.

MurhafSousli avatar MurhafSousli commented on June 6, 2024

Hi @kryptonianson, Welcome!

  1. Simply remove the height from the style so that it will inherit whatever the parent is. (I favor this.)

This height is just a default value for the wrapper height. (it is not necessary, I will remove it in a future update 👍).

For now, you are probably trying to override it from your component style, which will not work!
Override the height from the global style style.css

your-component-name gallery gallery-main {
    height: auto;
}
  1. Provide bounding size properties.

If you look inside Basic Demo you can adjust the height from the config.

image

As you see in the screenshot, I have disabled the default height: 500px and set 450px in config.

  1. Make it so that the bounding container respects the image size specified.

If so, the gallery size will be changing every time the image changes (resulting in bad UX), putting in mind that you have navigation, thumbs, bullets on top of it (imagine an image with 500x80 size) ! the container size must be set.

from ngx-gallery.

kryptonianson avatar kryptonianson commented on June 6, 2024

I tried what you have suggested and no matter what combination I put in the global styles it will not override what is in the resulting "gallery-main[_ngcontent-c2]" style. I have no issues setting the gallery height in general. That works great. It is simply the bounding "gallery-main[_ngcontent-c2]" box. If you have further suggestions as to what I can do in my global style I am happy to do it.

from ngx-gallery.

kryptonianson avatar kryptonianson commented on June 6, 2024

On a side note, do you have an ETA on the next release which will include removing the default height in gallery.component.scss?

from ngx-gallery.

MurhafSousli avatar MurhafSousli commented on June 6, 2024

@kryptonianson use height: auto !important; in the style.

I don't really know when I will be pushing another update, I was hoping to find contributors to help improve this project. however, I will add improvement on my free time.

from ngx-gallery.

kefengwei avatar kefengwei commented on June 6, 2024

hello, is there update the 'gallery-main'? i didn't find this class.I try to just add to gallery,but there only show the thumbs.so how can i respect the height now?

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.