Giter Site home page Giter Site logo

CSS conflicts about vue-notifyjs HOT 4 CLOSED

binarcode avatar binarcode commented on September 2, 2024
CSS conflicts

from vue-notifyjs.

Comments (4)

cristijora avatar cristijora commented on September 2, 2024

Thanks for posting the issue. I think it's a good idea. I will try to wrap everything in a class and place the css under that class

from vue-notifyjs.

thgh avatar thgh commented on September 2, 2024

In case you're going full BEM the resulting css would look like:

.notifyjs {
  position: fixed; ...
}
.notifyjs-notification {
  display: inline-block; ...
}
.notifyjs-close {
  float: right;
}

// Variants for position
.notifyjs--top {
  top: 0
}
.notifyjs--right {
  right: 0
}
...

// Variants for themes
.notifyjs--material {
  .notifyjs-notification {
    color:; box-shadow:; border-radius:;
  }
}

I consider making a PR if I find the time.

from vue-notifyjs.

cristijora avatar cristijora commented on September 2, 2024

As much as I would like to go with BEM, I don't think I will do that.
I mainly created this component in order to use it in some of my projects which override the css for notifications.
I think making a wrapper should be sufficient so it doesn't interfere with other items.

.notifyjs{
 .close{....}
.alert{...}
}

There can be a chance that these elements can be affected by other styles though. If that happens, I will have to use BEM in the end.

PS: Any PR is welcome

from vue-notifyjs.

cristijora avatar cristijora commented on September 2, 2024

0.2.0 will have all css wrapped in a .vue-notifyjs class for now. This will avoid elements being affected by vue-notifyjs. Will add BEM support later on so other css libraries don't affect the plugin as well.

from vue-notifyjs.

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.