File size: 1,862 Bytes
da96562 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 | .alert-icon-center-vertically(@font-size) {
@half-height: @font-size / 2;
// IE8 doesn't support calc(): it's OK, the icon will just be aligned to the top
top: calc(~'50% - @{half-height}');
// phantomjs only supports -webkit-calc()
top: -webkit-calc(~'50% - @{half-height}');
}
.alert {
color: #212121 !important;
padding: 20px 20px 20px 60px;
margin-bottom: 20px;
border: 2px solid;
border-radius: 2px;
font-size: 14px;
position: relative;
@media (max-width: 480px) {
padding: 15px;
}
.inDarkMode({
color: #ccc !important;
});
&::before {
font-family: "matomo";
content: "\e88f";
position: absolute;
left: 20px;
line-height: 100%; // line-height = font-size
font-size: 24px;
margin-top: -3px;
@media (max-width: 480px) {
position: static;
display: block;
margin-bottom: 0.5em;
text-align: center;
}
}
a {
color: #212121 !important;
text-decoration: underline;
.inDarkMode({
color: #ccc !important;
});
&:hover {
text-decoration: underline;
}
}
}
.alert-success {
background-color: #ebf2eb;
border-color: #378039;
&::before {
content: "\e63d";
color: #378039;
}
.inDarkMode({
background-color: transparent;
});
}
.alert-info {
background-color: #ecf7fe;
border-color: #0d94e3;
&::before {
color: #0d94e3;
}
.inDarkMode({
background-color: transparent;
});
}
.alert-warning {
background-color: #fefbe9;
border-color: #a18a0b;
&::before {
content: "\e621";
color: #a18a0b;
}
.inDarkMode({
background-color: transparent;
});
}
.alert-danger {
background-color: #faeaea;
border-color: @color-red-matomo;
&::before {
content: "\e616";
color: @color-red-matomo;
}
.inDarkMode({
background-color: transparent;
});
}
|