scratch-www/src/components/forms/validation-message.scss

91 lines
1.8 KiB
SCSS
Raw Normal View History

@import "../../colors";
@import "../../frameless";
.validation-message {
2019-08-26 14:30:52 -04:00
$arrow-border-width: 1rem;
display: block;
position: absolute;
top: 0;
left: 0;
transform: translate(16rem, 0);
margin-left: $arrow-border-width;
border: 1px solid $active-gray;
border-radius: 5px;
background-color: $ui-orange;
padding: 1rem;
max-width: 18.75rem;
min-height: 1rem;
overflow: visible;
color: $type-white;
z-index: 1;
2019-09-26 14:49:42 -04:00
font-weight: 500;
&:before {
display: block;
position: absolute;
top: 1rem;
left: -$arrow-border-width / 2;
transform: rotate(45deg);
border-bottom: 1px solid $active-gray;
border-left: 1px solid $active-gray;
border-radius: 5px;
background-color: $ui-orange;
width: $arrow-border-width;
height: $arrow-border-width;
content: "";
}
}
.validation-left {
2019-08-26 14:30:52 -04:00
$arrow-border-width: 1rem;
left: unset;
right: 0;
margin-left: unset;
margin-right: $arrow-border-width;
transform: translate(-16rem, 0);
&:before {
left: unset;
right: -$arrow-border-width / 2;
border-top: 1px solid $active-gray;
border-right: 1px solid $active-gray;
border-bottom: none;
border-left: none;
}
}
@media #{$intermediate-and-smaller} {
.validation-message {
position: relative;
transform: none;
margin: inherit;
width: 100%;
height: inherit;
&:before {
display: none;
}
}
}
.validation-error {
background-color: $ui-orange;
&:before {
background-color: $ui-orange;
}
}
.validation-info {
background-color: $ui-blue;
box-shadow: 0 0 4px 2px rgba(0, 0, 0, .15);
&:before {
background-color: $ui-blue;
}
}