Skip to main content

How do I style flash messages on my website?

When a person completes an action on my website - logs in, signs a petition, or RSVPs for an event - a notification pops up to let them know the action was successfully taken. It may also prompt them to promote the action on Facebook and Twitter. How do I change how those messages display?

Official response from

Notifications that pop up on your website are flash messages. The style of flash messages on your website are defined in the theme.scss file. To adjust the color of the text, border, and background of flash messages you'll need to create a custom theme and edit the theme.scss file. Color is defined using hex color codes

The area of the theme.scss file that defines how flash messages display is:

#flash {
.notice {
padding: 8px 14px;
margin-bottom: 20px;
background-color: #fcf8e3;
@include border-radius(2px);
}
.flash-message {
display: inline-block;
}
button.flash-close {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 30px;
font-weight: bold;
line-height: 25px;
padding: 0;
margin: 0;
float: right;
color: #984949;
cursor: pointer;
border: 0;
background: transparent;
-webkit-appearance: none;
&:hover {
cursor: pointer;
}
}
.success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #468847;
}
.error {
background-color: #ead2d3;
border-color: #eed3d7;
color: #984949;
}
.info {
background-color: #d9edf7;
color: #3a87ad;
}
}

If you'd like to change the copy displayed in flash messages, you'll need to use Liquid filter statements in other theme files. 

You can remove the social sharing prompt from displaying on a page by editing the page and going to Settings > Social media and unchecking the box next to "Prompt for posting." 

Share this post

Showing 3 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.