IMPROVEMENT: .hover and .disabled classes

This commit is contained in:
Tony Air 2019-12-20 10:04:03 +07:00
parent 2aa4e9334e
commit 346b63e198
5 changed files with 337 additions and 179 deletions

461
dist/css/app.css vendored
View File

@ -14793,151 +14793,283 @@ img {
cursor: pointer;
}
.a :not(.disabled).hover,
.a :not(.disabled):hover,
.a :not(.disabled):focus,
a :not(.disabled).hover,
a :not(.disabled):hover,
a :not(.disabled):focus,
[data-toggle] :not(.disabled).hover,
[data-toggle] :not(.disabled):hover,
[data-toggle] :not(.disabled):focus,
button :not(.disabled).hover,
button :not(.disabled):hover,
button :not(.disabled):focus,
.btn :not(.disabled).hover,
.btn :not(.disabled):hover,
.btn :not(.disabled):focus {
.a:hover,
.a.hover,
.a:focus,
a:hover,
a.hover,
a:focus,
[data-toggle]:hover,
[data-toggle].hover,
[data-toggle]:focus,
button:hover,
button.hover,
button:focus,
.btn:hover,
.btn.hover,
.btn:focus {
opacity: 0.8;
}
.a :not(.disabled).hover > .fa,
.a :not(.disabled).hover > .far,
.a :not(.disabled).hover > .fas,
.a :not(.disabled).hover > .fab,
.a :not(.disabled).hover.fa,
.a :not(.disabled).hover.far,
.a :not(.disabled).hover.fas,
.a :not(.disabled).hover.fab,
.a :not(.disabled):hover > .fa,
.a :not(.disabled):hover > .far,
.a :not(.disabled):hover > .fas,
.a :not(.disabled):hover > .fab,
.a :not(.disabled):hover.fa,
.a :not(.disabled):hover.far,
.a :not(.disabled):hover.fas,
.a :not(.disabled):hover.fab,
.a :not(.disabled):focus > .fa,
.a :not(.disabled):focus > .far,
.a :not(.disabled):focus > .fas,
.a :not(.disabled):focus > .fab,
.a :not(.disabled):focus.fa,
.a :not(.disabled):focus.far,
.a :not(.disabled):focus.fas,
.a :not(.disabled):focus.fab,
a :not(.disabled).hover > .fa,
a :not(.disabled).hover > .far,
a :not(.disabled).hover > .fas,
a :not(.disabled).hover > .fab,
a :not(.disabled).hover.fa,
a :not(.disabled).hover.far,
a :not(.disabled).hover.fas,
a :not(.disabled).hover.fab,
a :not(.disabled):hover > .fa,
a :not(.disabled):hover > .far,
a :not(.disabled):hover > .fas,
a :not(.disabled):hover > .fab,
a :not(.disabled):hover.fa,
a :not(.disabled):hover.far,
a :not(.disabled):hover.fas,
a :not(.disabled):hover.fab,
a :not(.disabled):focus > .fa,
a :not(.disabled):focus > .far,
a :not(.disabled):focus > .fas,
a :not(.disabled):focus > .fab,
a :not(.disabled):focus.fa,
a :not(.disabled):focus.far,
a :not(.disabled):focus.fas,
a :not(.disabled):focus.fab,
[data-toggle] :not(.disabled).hover > .fa,
[data-toggle] :not(.disabled).hover > .far,
[data-toggle] :not(.disabled).hover > .fas,
[data-toggle] :not(.disabled).hover > .fab,
[data-toggle] :not(.disabled).hover.fa,
[data-toggle] :not(.disabled).hover.far,
[data-toggle] :not(.disabled).hover.fas,
[data-toggle] :not(.disabled).hover.fab,
[data-toggle] :not(.disabled):hover > .fa,
[data-toggle] :not(.disabled):hover > .far,
[data-toggle] :not(.disabled):hover > .fas,
[data-toggle] :not(.disabled):hover > .fab,
[data-toggle] :not(.disabled):hover.fa,
[data-toggle] :not(.disabled):hover.far,
[data-toggle] :not(.disabled):hover.fas,
[data-toggle] :not(.disabled):hover.fab,
[data-toggle] :not(.disabled):focus > .fa,
[data-toggle] :not(.disabled):focus > .far,
[data-toggle] :not(.disabled):focus > .fas,
[data-toggle] :not(.disabled):focus > .fab,
[data-toggle] :not(.disabled):focus.fa,
[data-toggle] :not(.disabled):focus.far,
[data-toggle] :not(.disabled):focus.fas,
[data-toggle] :not(.disabled):focus.fab,
button :not(.disabled).hover > .fa,
button :not(.disabled).hover > .far,
button :not(.disabled).hover > .fas,
button :not(.disabled).hover > .fab,
button :not(.disabled).hover.fa,
button :not(.disabled).hover.far,
button :not(.disabled).hover.fas,
button :not(.disabled).hover.fab,
button :not(.disabled):hover > .fa,
button :not(.disabled):hover > .far,
button :not(.disabled):hover > .fas,
button :not(.disabled):hover > .fab,
button :not(.disabled):hover.fa,
button :not(.disabled):hover.far,
button :not(.disabled):hover.fas,
button :not(.disabled):hover.fab,
button :not(.disabled):focus > .fa,
button :not(.disabled):focus > .far,
button :not(.disabled):focus > .fas,
button :not(.disabled):focus > .fab,
button :not(.disabled):focus.fa,
button :not(.disabled):focus.far,
button :not(.disabled):focus.fas,
button :not(.disabled):focus.fab,
.btn :not(.disabled).hover > .fa,
.btn :not(.disabled).hover > .far,
.btn :not(.disabled).hover > .fas,
.btn :not(.disabled).hover > .fab,
.btn :not(.disabled).hover.fa,
.btn :not(.disabled).hover.far,
.btn :not(.disabled).hover.fas,
.btn :not(.disabled).hover.fab,
.btn :not(.disabled):hover > .fa,
.btn :not(.disabled):hover > .far,
.btn :not(.disabled):hover > .fas,
.btn :not(.disabled):hover > .fab,
.btn :not(.disabled):hover.fa,
.btn :not(.disabled):hover.far,
.btn :not(.disabled):hover.fas,
.btn :not(.disabled):hover.fab,
.btn :not(.disabled):focus > .fa,
.btn :not(.disabled):focus > .far,
.btn :not(.disabled):focus > .fas,
.btn :not(.disabled):focus > .fab,
.btn :not(.disabled):focus.fa,
.btn :not(.disabled):focus.far,
.btn :not(.disabled):focus.fas,
.btn :not(.disabled):focus.fab {
.a:hover > .fa,
.a:hover > .far,
.a:hover > .fas,
.a:hover > .fab,
.a:hover.fa,
.a:hover.far,
.a:hover.fas,
.a:hover.fab,
.a.hover > .fa,
.a.hover > .far,
.a.hover > .fas,
.a.hover > .fab,
.a.hover.fa,
.a.hover.far,
.a.hover.fas,
.a.hover.fab,
.a:focus > .fa,
.a:focus > .far,
.a:focus > .fas,
.a:focus > .fab,
.a:focus.fa,
.a:focus.far,
.a:focus.fas,
.a:focus.fab,
a:hover > .fa,
a:hover > .far,
a:hover > .fas,
a:hover > .fab,
a:hover.fa,
a:hover.far,
a:hover.fas,
a:hover.fab,
a.hover > .fa,
a.hover > .far,
a.hover > .fas,
a.hover > .fab,
a.hover.fa,
a.hover.far,
a.hover.fas,
a.hover.fab,
a:focus > .fa,
a:focus > .far,
a:focus > .fas,
a:focus > .fab,
a:focus.fa,
a:focus.far,
a:focus.fas,
a:focus.fab,
[data-toggle]:hover > .fa,
[data-toggle]:hover > .far,
[data-toggle]:hover > .fas,
[data-toggle]:hover > .fab,
[data-toggle]:hover.fa,
[data-toggle]:hover.far,
[data-toggle]:hover.fas,
[data-toggle]:hover.fab,
[data-toggle].hover > .fa,
[data-toggle].hover > .far,
[data-toggle].hover > .fas,
[data-toggle].hover > .fab,
[data-toggle].hover.fa,
[data-toggle].hover.far,
[data-toggle].hover.fas,
[data-toggle].hover.fab,
[data-toggle]:focus > .fa,
[data-toggle]:focus > .far,
[data-toggle]:focus > .fas,
[data-toggle]:focus > .fab,
[data-toggle]:focus.fa,
[data-toggle]:focus.far,
[data-toggle]:focus.fas,
[data-toggle]:focus.fab,
button:hover > .fa,
button:hover > .far,
button:hover > .fas,
button:hover > .fab,
button:hover.fa,
button:hover.far,
button:hover.fas,
button:hover.fab,
button.hover > .fa,
button.hover > .far,
button.hover > .fas,
button.hover > .fab,
button.hover.fa,
button.hover.far,
button.hover.fas,
button.hover.fab,
button:focus > .fa,
button:focus > .far,
button:focus > .fas,
button:focus > .fab,
button:focus.fa,
button:focus.far,
button:focus.fas,
button:focus.fab,
.btn:hover > .fa,
.btn:hover > .far,
.btn:hover > .fas,
.btn:hover > .fab,
.btn:hover.fa,
.btn:hover.far,
.btn:hover.fas,
.btn:hover.fab,
.btn.hover > .fa,
.btn.hover > .far,
.btn.hover > .fas,
.btn.hover > .fab,
.btn.hover.fa,
.btn.hover.far,
.btn.hover.fas,
.btn.hover.fab,
.btn:focus > .fa,
.btn:focus > .far,
.btn:focus > .fas,
.btn:focus > .fab,
.btn:focus.fa,
.btn:focus.far,
.btn:focus.fas,
.btn:focus.fab {
-webkit-transform: rotate(-180deg);
transform: rotate(-180deg);
}
[data-toggle='table'] :not(.disabled).hover,
[data-toggle='table'] :not(.disabled):hover,
[data-toggle='table'] :not(.disabled):focus {
.a.disabled,
a.disabled,
[data-toggle].disabled,
button.disabled,
.btn.disabled {
opacity: 0.5;
}
.a.disabled:hover > .fa,
.a.disabled:hover > .far,
.a.disabled:hover > .fas,
.a.disabled:hover > .fab,
.a.disabled:hover.fa,
.a.disabled:hover.far,
.a.disabled:hover.fas,
.a.disabled:hover.fab,
.a.disabled.hover > .fa,
.a.disabled.hover > .far,
.a.disabled.hover > .fas,
.a.disabled.hover > .fab,
.a.disabled.hover.fa,
.a.disabled.hover.far,
.a.disabled.hover.fas,
.a.disabled.hover.fab,
.a.disabled:focus > .fa,
.a.disabled:focus > .far,
.a.disabled:focus > .fas,
.a.disabled:focus > .fab,
.a.disabled:focus.fa,
.a.disabled:focus.far,
.a.disabled:focus.fas,
.a.disabled:focus.fab,
a.disabled:hover > .fa,
a.disabled:hover > .far,
a.disabled:hover > .fas,
a.disabled:hover > .fab,
a.disabled:hover.fa,
a.disabled:hover.far,
a.disabled:hover.fas,
a.disabled:hover.fab,
a.disabled.hover > .fa,
a.disabled.hover > .far,
a.disabled.hover > .fas,
a.disabled.hover > .fab,
a.disabled.hover.fa,
a.disabled.hover.far,
a.disabled.hover.fas,
a.disabled.hover.fab,
a.disabled:focus > .fa,
a.disabled:focus > .far,
a.disabled:focus > .fas,
a.disabled:focus > .fab,
a.disabled:focus.fa,
a.disabled:focus.far,
a.disabled:focus.fas,
a.disabled:focus.fab,
[data-toggle].disabled:hover > .fa,
[data-toggle].disabled:hover > .far,
[data-toggle].disabled:hover > .fas,
[data-toggle].disabled:hover > .fab,
[data-toggle].disabled:hover.fa,
[data-toggle].disabled:hover.far,
[data-toggle].disabled:hover.fas,
[data-toggle].disabled:hover.fab,
[data-toggle].disabled.hover > .fa,
[data-toggle].disabled.hover > .far,
[data-toggle].disabled.hover > .fas,
[data-toggle].disabled.hover > .fab,
[data-toggle].disabled.hover.fa,
[data-toggle].disabled.hover.far,
[data-toggle].disabled.hover.fas,
[data-toggle].disabled.hover.fab,
[data-toggle].disabled:focus > .fa,
[data-toggle].disabled:focus > .far,
[data-toggle].disabled:focus > .fas,
[data-toggle].disabled:focus > .fab,
[data-toggle].disabled:focus.fa,
[data-toggle].disabled:focus.far,
[data-toggle].disabled:focus.fas,
[data-toggle].disabled:focus.fab,
button.disabled:hover > .fa,
button.disabled:hover > .far,
button.disabled:hover > .fas,
button.disabled:hover > .fab,
button.disabled:hover.fa,
button.disabled:hover.far,
button.disabled:hover.fas,
button.disabled:hover.fab,
button.disabled.hover > .fa,
button.disabled.hover > .far,
button.disabled.hover > .fas,
button.disabled.hover > .fab,
button.disabled.hover.fa,
button.disabled.hover.far,
button.disabled.hover.fas,
button.disabled.hover.fab,
button.disabled:focus > .fa,
button.disabled:focus > .far,
button.disabled:focus > .fas,
button.disabled:focus > .fab,
button.disabled:focus.fa,
button.disabled:focus.far,
button.disabled:focus.fas,
button.disabled:focus.fab,
.btn.disabled:hover > .fa,
.btn.disabled:hover > .far,
.btn.disabled:hover > .fas,
.btn.disabled:hover > .fab,
.btn.disabled:hover.fa,
.btn.disabled:hover.far,
.btn.disabled:hover.fas,
.btn.disabled:hover.fab,
.btn.disabled.hover > .fa,
.btn.disabled.hover > .far,
.btn.disabled.hover > .fas,
.btn.disabled.hover > .fab,
.btn.disabled.hover.fa,
.btn.disabled.hover.far,
.btn.disabled.hover.fas,
.btn.disabled.hover.fab,
.btn.disabled:focus > .fa,
.btn.disabled:focus > .far,
.btn.disabled:focus > .fas,
.btn.disabled:focus > .fab,
.btn.disabled:focus.fa,
.btn.disabled:focus.far,
.btn.disabled:focus.fas,
.btn.disabled:focus.fab {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
[data-toggle='table']:hover,
[data-toggle='table'].hover,
[data-toggle='table']:focus {
opacity: 1;
}
@ -15029,9 +15161,9 @@ textarea,
padding: 0.5rem;
}
.btn :not(.disabled).hover,
.btn :not(.disabled):hover,
.btn :not(.disabled):focus {
.btn:hover,
.btn.hover,
.btn:focus {
opacity: 1;
}
@ -15050,7 +15182,8 @@ textarea,
/*
.dropdown.show {
.dropdown {
@include ss_hover {
&:hover,&.hover,
&:focus {
.dropdown-menu {
display: block;
}
@ -15063,7 +15196,8 @@ textarea,
}
.dropdown-hover ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
> .dropdown-toggle::after {
transform: rotate(-90deg);
}
@ -15087,7 +15221,8 @@ textarea,
}
.dropdown-hover ul ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
> ul {
display: block;
}
@ -15107,7 +15242,8 @@ textarea,
}
.dropdown-hover ul ul ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
ul {
display: block;
}
@ -15124,9 +15260,8 @@ textarea,
}
}*/
.navbar-dark .nav-link :not(.disabled).hover,
.navbar-dark .nav-link :not(.disabled):hover,
.navbar-dark .nav-link :not(.disabled):focus {
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link:focus {
background: #212121;
}
@ -15153,15 +15288,12 @@ textarea,
color: rgba(255, 255, 255, 0.5);
}
.dropdown-menu.bg-dark .nav-link :not(.disabled).hover,
.dropdown-menu.bg-alt .nav-link :not(.disabled).hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .nav-link :not(.disabled).hover,
.dropdown-menu.bg-dark .nav-link :not(.disabled):hover,
.dropdown-menu.bg-alt .nav-link :not(.disabled):hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .nav-link :not(.disabled):hover,
.dropdown-menu.bg-dark .nav-link :not(.disabled):focus,
.dropdown-menu.bg-alt .nav-link :not(.disabled):focus,
.element.site__elements__accordion .card .dropdown-menu.card-header .nav-link :not(.disabled):focus {
.dropdown-menu.bg-dark .nav-link:hover,
.dropdown-menu.bg-alt .nav-link:hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .nav-link:hover,
.dropdown-menu.bg-dark .nav-link:focus,
.dropdown-menu.bg-alt .nav-link:focus,
.element.site__elements__accordion .card .dropdown-menu.card-header .nav-link:focus {
color: rgba(255, 255, 255, 0.75);
}
@ -15186,15 +15318,12 @@ textarea,
color: #fff;
}
.dropdown-menu.bg-dark .dropdown-item :not(.disabled).hover,
.dropdown-menu.bg-alt .dropdown-item :not(.disabled).hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .dropdown-item :not(.disabled).hover,
.dropdown-menu.bg-dark .dropdown-item :not(.disabled):hover,
.dropdown-menu.bg-alt .dropdown-item :not(.disabled):hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .dropdown-item :not(.disabled):hover,
.dropdown-menu.bg-dark .dropdown-item :not(.disabled):focus,
.dropdown-menu.bg-alt .dropdown-item :not(.disabled):focus,
.element.site__elements__accordion .card .dropdown-menu.card-header .dropdown-item :not(.disabled):focus {
.dropdown-menu.bg-dark .dropdown-item:hover,
.dropdown-menu.bg-alt .dropdown-item:hover,
.element.site__elements__accordion .card .dropdown-menu.card-header .dropdown-item:hover,
.dropdown-menu.bg-dark .dropdown-item:focus,
.dropdown-menu.bg-alt .dropdown-item:focus,
.element.site__elements__accordion .card .dropdown-menu.card-header .dropdown-item:focus {
color: rgba(255, 255, 255, 0.75);
background: #212121;
}

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
"version": "1.4.7",
"version": "1.4.8",
"author": "Tony Air <tony@twma.pro>",
"license": "MIT",
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",

View File

@ -31,7 +31,9 @@ a,
[data-toggle],
button,
.btn {
@include ss_hover {
&:hover,
&.hover,
&:focus {
opacity: 0.8;
> .fa,
@ -45,11 +47,32 @@ button,
transform: rotate(-180deg);
}
}
&.disabled {
opacity: 0.5;
&:hover,
&.hover,
&:focus {
> .fa,
> .far,
> .fas,
> .fab,
&.fa,
&.far,
&.fas,
&.fab {
transform: rotate(0deg);
}
}
}
}
// exclude bootstrap-table
[data-toggle='table'] {
@include ss_hover {
&:hover,
&.hover,
&:focus {
opacity: 1;
}
}
@ -154,7 +177,9 @@ textarea,
// rewrite btn opacity on hover
.btn {
@include ss_hover {
&:hover,
&.hover,
&:focus {
opacity: 1;
}
}
@ -190,7 +215,8 @@ textarea,
/*
.dropdown.show {
.dropdown {
@include ss_hover {
&:hover,&.hover,
&:focus {
.dropdown-menu {
display: block;
}
@ -203,7 +229,8 @@ textarea,
}
.dropdown-hover ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
> .dropdown-toggle::after {
transform: rotate(-90deg);
}
@ -227,7 +254,8 @@ textarea,
}
.dropdown-hover ul ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
> ul {
display: block;
}
@ -247,7 +275,8 @@ textarea,
}
.dropdown-hover ul ul ul li {
@include ss_hover {
&:hover,&.hover,
&:focus {
ul {
display: block;
}
@ -267,7 +296,7 @@ textarea,
// dark dropdowns
.navbar-dark {
.nav-link {
@include ss_hover {
@include hover-focus {
background: $navbar-dark-hover-background;
}
}
@ -290,7 +319,7 @@ textarea,
.nav-link {
color: $navbar-dark-color;
@include ss_hover {
@include hover-focus {
color: $navbar-dark-hover-color;
}
@ -307,7 +336,7 @@ textarea,
}
.dropdown-item {
@include ss_hover {
@include hover-focus {
color: $navbar-dark-hover-color;
background: $navbar-dark-hover-background;
}

View File

@ -1,5 +1,5 @@
@mixin ss_hover() {
:not(.disabled) {
&:not(.disabled) {
&.hover,
&:hover,
&:focus {