euvl / vue-notification

:icecream: Vue.js 2 library for showing notifications

Home Page:http://vue-notification.yev.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to apply some css

eakenbor opened this issue · comments

Issue

CSS does not apply the notification elements, except for padding. The font-size, color, etc, don't get applied.

To Reproduce

Steps to reproduce the behaviour:

In App.vue, here is the css:

.vue-notification {
  padding: 0px;
  margin: 0 5px 5px;
 
  font-size: 12px;
 
  color: #ffffff;
  background: #44A4FC;
  border-left: 5px solid #187FE7;
}

And here is the modal:

<notifications class="vue-notification" group="general" position="top left" width="100%" /> 

Please how can I apply my custom CSS to the modal?

@eakenbor
There is a slight mistake you are making while using the package. In order to override the default notification classes. there is a prop called classes is provided so below is how you must use this.

<notifications classes="my-style" group="general" position="top left" width="100%" />

<style>
  .my-style {
    padding: 0px;
    margin: 0 5px 5px;
    font-size: 12px;
    color: #ffffff;
    background: #44A4FC !important;
    border-left: 5px solid #187FE7;
  }
</style>

Result:
image

Stale issue message

i can use styles scoped with this .. ?