Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make flash css not transparent #11

Closed
rusikf opened this issue May 12, 2020 · 2 comments
Closed

Make flash css not transparent #11

rusikf opened this issue May 12, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@rusikf
Copy link

rusikf commented May 12, 2020

Hi, thanks for your plugin
How to make flash not transparent ?
1)

import FlashMessage from '@smartweb/vue-flash-message';
Vue.use(FlashMessage, { time: 1000, wrapperClass: 'flash-wrapper', blockClass: 'blockClass' });

wrapperClass, blockClass doesnt work ( time works )
2) Transparency defined through background-color, So I cannot override it, that's why I hardcoded it in my app


._vue-flash-msg-body {
    z-index: 9
  }

  ._vue-flash-msg-body_success {
    background-color: rgba(1,148,122,100) !important
  }

  ._vue-flash-msg-body_error {
    background-color: rgba(241,34,34,100) !important
  }


@smwbtech
Copy link
Owner

Hi, @rusikf

Yep, you suggest the right way to set transparency. I put it in my todo list and fix things with next patch.

@smwbtech smwbtech added the enhancement New feature or request label May 14, 2020
@smwbtech smwbtech added this to To do in flash-message-vue May 14, 2020
@smwbtech
Copy link
Owner

smwbtech commented Sep 8, 2020

@rusikf Hi there,

I know that 5 month is not timely answer, but had a lot of other problems and stuff besides my open source libs. But I hope this will help for other users, if they faced the same issue.

You don't need to use !important operator to override background color of you message block.

The code below is correct and will work:

 this.flashMessage.error({
        title: "Error Message Title",
        message: "Oh, you broke my heart! Shame on you!",
        time: 0,
        blockClass: "my-custom-class",
        contentClass: "my-content-class"
  });
._vue-flash-msg-body.my-custom-class {
  border: 1px solid green;
  background-color: #1ab394;
}

._vue-flash-msg-body.my-custom-class:hover {
  background-color: #1ab394;
}

._vue-flash-msg-body.my-custom-class .my-content-class {
  border-left: 3px solid green;
}

Codesandbox exemple

@smwbtech smwbtech closed this as completed Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants