1
1
mirror of https://github.com/primer/css.git synced 2024-11-23 11:27:26 +03:00
css/scss/_alerts.scss

100 lines
1.5 KiB
SCSS

// Default flash
.flash {
position: relative;
padding: 15px;
font-size: 14px;
line-height: 1.5;
color: $flash-text-blue;
background-color: $flash-bg-blue;
border: 1px solid $flash-border-blue;
border-radius: 3px;
p:last-child {
margin-bottom: 0;
}
}
// Contain the flash messages
.flash-messages {
margin-bottom: 20px;
}
// Close button
.flash-close {
float: right;
width: 34px;
height: 44px;
margin: -11px;
line-height: 40px;
color: inherit;
text-align: center;
cursor: pointer;
// Undo `<button>` styles
background: none;
border: 0;
-webkit-appearance: none;
opacity: 0.6;
&:hover {
opacity: 1;
}
}
// Action button
.flash-action {
float: right;
margin-top: -4px;
margin-left: 20px;
}
//
// Variations
//
.flash-warn {
color: $flash-text-yellow;
background-color: $flash-bg-yellow;
border-color: $flash-border-yellow;
}
.flash-error {
color: $flash-text-red;
background-color: $flash-bg-red;
border-color: $flash-border-red;
}
.flash-full {
margin-top: -1px;
border-width: 1px 0;
border-radius: 0;
}
.flash-with-icon {
.container {
padding-left: 40px;
}
.flash-icon {
float: left;
margin-top: 3px;
margin-left: -25px;
}
}
// Content within
//
// Reset margins on headings and paragraphs within alerts.
.flash-content {
margin-top: 0;
margin-bottom: 0;
line-height: 1.5;
}
.warning {
padding: 0.5em;
margin-bottom: 0.8em;
font-weight: bold;
background-color: #fffccc;
}