webpack-bootstrap-ui-kit/src/scss/_components/_ui.main.scss

425 lines
5.3 KiB
SCSS
Executable File

/*
* some basic styles
*/
@import '../_variables';
@import '../_animations';
.loading {
animation: fade 0.8s linear infinite;
}
.pulse {
animation: pulse 0.8s linear infinite;
}
// don't let images be wider than the parent layer
div,
a,
span,
button,
i {
background-repeat: no-repeat;
background-size: contain;
}
iframe,
img {
max-width: 100%;
}
table,
p {
&:first-child {
margin-top: 0;
}
&:last-child {
margin-bottom: 0;
}
}
.a {
cursor: pointer;
color: $link-color;
text-decoration: $link-decoration;
&:hover,
&:focus {
text-decoration: $link-hover-decoration;
color: $link-hover-color;
}
}
.a,
a,
[data-toggle],
button,
.btn {
&:hover,
&.active,
&[aria-expanded='true'] {
opacity: 0.8;
> .fa,
> .far,
> .fas,
> .fab,
&.fa,
&.far,
&.fas,
&.fab {
transform: rotate(-180deg);
}
}
&.disabled {
opacity: 0.5;
cursor: default;
&:hover,
&.active,
&[aria-expanded='true'] {
> .fa,
> .far,
> .fas,
> .fab,
&.fa,
&.far,
&.fas,
&.fab {
transform: rotate(0deg);
}
}
}
}
// exclude bootstrap-table
[data-toggle='table'] {
&:hover,
&.active,
&:focus {
opacity: 1;
}
}
[data-toggle='collapse'] {
&[aria-expanded='true'] {
.accordion-icon {
&:before {
content: '\f068';
}
}
}
}
// transactions
.transition,
a,
a *,
.a,
.a *,
button,
input,
optgroup,
select,
textarea,
.btn,
.btn *,
.dropdown,
.row,
.alert,
.alert *,
.message,
[data-toggle],
[data-toggle] * {
transition: all 0.4s ease;
}
.navbar-toggler {
transition: transform ease 0.4s;
}
.btn-toolbar {
margin-top: $field-gutter-height;
}
/*
* Extra class definition at _ui.form.basics.scss
*/
// navs
.navbar-toggler-icon {
width: auto;
height: auto;
}
.nav-item,
.nav-link {
display: flex;
}
button.nav-link {
border: 0;
outline: 0;
text-transform: inherit;
letter-spacing: inherit;
}
// display dropdown on hover + focus
@media (min-width: $full-body-min-width) {
.dropdown-hover {
&:hover,
&:focus {
.dropdown-menu {
display: block;
}
}
}
}
// custom toggler for mobile view
.dropdown {
> .dropdown-toggle-sm {
@media (min-width: $full-body-min-width) {
display: none;
}
}
> .dropdown-toggle-fl {
display: none;
@media (min-width: $full-body-min-width) {
display: flex;
}
}
}
.meta-MetaWindow {
z-index: 1031;
.meta-nav {
text-decoration: none;
}
}
.field {
position: relative;
display: flex;
flex-wrap: wrap;
margin: $field-gutter-height 0;
}
// element col paddings
.col-block {
padding-top: $col-block-gutter-height;
padding-bottom: $col-block-gutter-height;
}
// rewrite btn opacity on hover
.btn {
&:hover,
&.active,
&:focus {
opacity: 1;
}
}
// SS-messages
.alert,
.alert-info,
.alert-danger {
display: block;
}
.alert + .alert {
border-top: 0;
}
.alert {
.container {
position: relative;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
@media (min-width: map-get($grid-breakpoints, 'sm')) {
flex-direction: row;
}
}
.typography {
flex: 1 1;
}
.btn-close {
position: absolute;
top: 0;
right: 0;
@media (min-width: map-get($grid-breakpoints, 'sm')) {
position: static;
margin-left: 1rem;
}
}
}
.message {
@extend .alert;
@extend .alert-info;
display: block;
margin: 0.5rem 0;
}
.message.validation,
.message.required,
.message.error {
@extend .alert;
@extend .alert-danger;
}
.message.required,
.message.error {
@extend .alert;
@extend .alert-danger;
}
.list-group-item.active {
a,
.a {
color: $list-group-active-color;
}
}
// dropdown icon
.navbar-toggler {
&[aria-expanded='true'] {
transform: rotate(90deg);
}
}
.dropdown-toggle {
position: relative;
padding-right: 1.5em;
&:after {
position: absolute;
right: 0.5em;
bottom: 1em;
}
}
.navbar-nav .dropdown-toggle.nav-link {
padding-right: 1.5em;
}
.dropdown.show .dropdown-toggle::after,
.dropdown-toggle.active-dropdown::after,
.dropdown-toggle.active::after {
transform: rotate(-90deg);
}
@keyframes expand {
from {
max-height: 0;
overflow: hidden;
}
to {
max-height: 500rem;
max-height: 200vh;
overflow: visible;
}
}
.dropdown-menu {
padding: 0;
border-radius: 0;
will-change: max-height, display;
overflow: hidden;
transition: none;
&.show {
animation: expand 2s;
animation-fill-mode: both;
overflow: visible;
}
.dropdown-list {
@extend .list-unstyled;
}
.dropdown-menu {
top: 0;
left: 100%;
}
}
.row,
.row-xs {
> [class^='col-'] > .card {
height: 100%;
}
}
.row-xs {
margin-right: -($grid-gutter-xs-width / 2);
margin-left: -($grid-gutter-xs-width / 2);
[class^='col-'] {
padding-left: $grid-gutter-xs-width / 2;
padding-right: $grid-gutter-xs-width / 2;
}
}
#ForgotPassword {
margin: 1rem 0;
width: 100%;
}
#BetterNavigator {
display: none;
@media (min-width: map-get($grid-breakpoints,'md')) {
display: block;
}
}
#SiteWideOffline {
position: fixed;
top: 0;
left: 0;
z-index: 99999;
width: 100%;
}
.alert-offline {
display: none;
}
body.is-offline {
.alert-offline {
display: block;
}
}
[aria-expanded='true'] {
.fa-bars {
&:before {
content: '\f00d';
}
}
}
.jsSidebarUI {
position: relative;
min-height: 100%;
}
.jsSidebarUI__inner {
position: relative;
will-change: position, top;
}
#BetterNavigator {
a,
button,
div,
i,
span {
background-size: auto;
}
}