Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

279 lines
4.9 KiB

@import '_mixins';
@import '_vars';
/* stylelint-disable */
//
// Support for Angular validation states.
//
.form-control {
&.ng-invalid {
&.ng-touched,
&.ng-dirty {
& {
border-color: $color-theme-error;
}
&:hover,
&:focus {
border-color: $color-theme-error-dark;
box-shadow: 0 0 .2rem, $color-theme-error;
}
}
}
}
//
// Error tooltip.
//
.errors {
// Container where the tooltip is placed.
&-container {
position: relative;
}
// Small triangle under the error tooltip with the border trick.
&::after {
@include absolute(null, null, -.75rem, .625rem);
@include caret-bottom($color-theme-error, .4rem);
}
// The tooltip rectangle itself.
& {
@include absolute(null, null, .4rem, 0);
background: $color-theme-error;
border: 0;
border-radius: .5 * $border-radius;
color: $color-white;
font-size: .9rem;
font-weight: normal;
padding: .25rem .5rem;
}
}
//
// Align labels to the right.
//
.col-form-label,
.col-form-checkbox-label {
text-align: right;
}
//
// Form alerts.
//
.form-alert {
& {
border: 0;
border-radius: $border-radius;
color: $color-white;
font-size: .9rem;
font-weight: normal;
margin-bottom: .75rem;
margin-top: .25rem;
padding: .5rem;
padding-right: 1.5rem;
}
&-close {
@include absolute(0, 0, auto, auto);
display: none;
padding: .5rem;
}
&-error {
background: $color-theme-error;
}
&-success {
background: $color-theme-success-dark;
}
&.closeable {
position: relative;
.form-alert-close {
display: inline-block;
}
}
p {
&:last-child {
margin-bottom: 0;
}
}
ul {
margin: 0;
}
}
.form-bubble {
& {
position: relative;
}
.form-alert {
@include absolute(.25rem, 0, auto, auto);
font-size: .9rem;
font-weight: normal;
line-height: 1.75;
max-width: 600px;
min-width: 200px;
padding: 1rem;
padding-right: 2.5rem;
text-align: left;
z-index: 2000;
&::after {
@include absolute(-.75rem, .625rem, auto, auto);
@include caret-top($color-theme-error, .4rem);
}
}
}
.preview {
background-color: $color-input;
border: 0;
border-radius: $border-radius;
opacity: .4;
pointer-events: none;
}
//
// Control Dropdown item
//
.control-dropdown {
& {
@include absolute(2px, auto, auto, 0);
@include box-shadow-outer;
background: $color-white;
border: 1px solid $color-input;
border-radius: $border-radius;
max-height: 15rem;
overflow-x: hidden;
overflow-y: auto;
padding: .25rem 0;
}
&-item {
& {
padding: .5rem .75rem;
}
&.separated {
border-bottom: 1px solid lighten($color-input, 5%);
&:last-child {
border: 0;
}
}
&.active,
&:active,
&:hover {
color: $color-white;
.text-muted {
color: $color-white !important;
}
}
&:active,
&.active {
background: $color-theme-brand;
&.separated {
border-color: $color-theme-brand;
}
}
&:hover {
background: $color-theme-brand;
&.separated {
border-color: $color-theme-brand;
}
}
&-selectable {
& {
cursor: pointer;
}
}
}
}
.btn-block {
width: 100%;
}
//
// Form group error.
//
.form-group {
margin-bottom: 1.25rem;
// Remove the margin after the last form group.
&:last-child {
margin-bottom: 0;
}
// Remove the margin if the next element is hidden.
& ~ .hidden {
margin-bottom: 0;
}
}
.col-form-label {
font-size: 90%;
}
label {
& {
font-size: 90%;
font-weight: 500;
}
&.form-check-label {
font-size: 100%;
font-weight: normal;
}
.hint {
color: $color-text-decent;
}
.text-muted {
font-weight: normal;
}
}
//
// Custom search form.
//
.search-form {
& {
flex-grow: 1;
position: relative;
}
// Keep some additional space for the search icon.
.form-control {
padding-right: 3rem;
}
// Search icon that is placed within the form control.
.icon-search {
@include absolute(.75rem, .75rem, auto, auto);
color: $color-input;
font-size: 1.1rem;
font-weight: lighter;
}
}
input {
&.form-empty {
border: 0;
}
}