Git Product home page Git Product logo

Comments (5)

JStrebeyko avatar JStrebeyko commented on June 29, 2024 2

Hi there!

Love the module, using it with my current project with ease. BUT! there's this .v--modal class that still has white background and seems stubborn with overwriting attempts. Any hints? Cheers! 🍻

from vue-js-modal.

Zyles avatar Zyles commented on June 29, 2024

Partly figured it out:

Looks like it needs to be "classes" not ":classes" and I used this:

.modal {
    background-color: #000;
    text-align: left;
    border-radius: 30px;
    box-shadow: 0 20px 60px -2px rgba(27,33,58,.4);
    padding: 0;
    display: block;
  }

It makes the borders round, however the background still remains white.

The problem is this code when rendered:

.v--modal-overlay .v--modal-box[data-v-40dd3b1e] {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #fff;
}

Removing the background-color in developer tools it makes it black. But I can't override it.

from vue-js-modal.

Zyles avatar Zyles commented on June 29, 2024

Consider removing this line from the project source:

https://github.com/euvl/vue-js-modal/blob/master/src/Modal.vue#L392

It seems to have no effect on the white rendering, and I can override the background color.

If I have no specified class I will get a white modal (did not test in all browsers)

from vue-js-modal.

euvl avatar euvl commented on June 29, 2024

Hi @Zyles

Actually you were right, tiny change.
Please check out version [email protected]. It should not have white background.
Let me know if the issue is fixed.

Cheers 👍

from vue-js-modal.

atourkow avatar atourkow commented on June 29, 2024

After banging my head around for hours I finally figured out how to overwrite the .vm--modal CSS.
It's actually VERY simple. Just add !important to the CSS (make sure the .modal-override class is global and not scoped)

<modal name="foo" classes="modal-override">...</modal>
.modal-override
    background #0008 !important
    border-radius 20px !important
    padding 10px

from vue-js-modal.

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.