123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497 |
- // /**
- // * Copyright © Magento, Inc. All rights reserved.
- // * See COPYING.txt for license details.
- // */
- //
- // Imports
- // _____________________________________________
- @import 'actions/_actions-dropdown.less';
- @import 'actions/_actions-split.less';
- @import 'actions/_actions-select.less';
- @import 'actions/_actions-multicheck.less';
- @import 'actions/_actions-multiselect.less';
- @import 'actions/_actions-switcher.less';
- //
- // Extends
- // _____________________________________________
- .abs-action-reset {
- .action-reset();
- }
- .abs-action-pattern {
- &[disabled],
- &.disabled {
- cursor: default;
- opacity: @disabled__opacity;
- pointer-events: none;
- }
- border: @button__border-size @button__border-style;
- border-radius: 0; // ToDo UI Delete with admin scope
- display: inline-block;
- font-family: @button__font-family;
- font-size: @button__font-size;
- font-weight: @font-weight__semibold;
- line-height: @button__line-height;
- padding: @button__padding-top @button__padding-horizontal @button__padding-bottom;
- text-align: center;
- vertical-align: baseline;
- }
- .abs-action-l {
- font-size: @font-size__l;
- letter-spacing: .025em;
- padding-bottom: @button__padding-vertical__l;
- padding-top: @button__padding-vertical__l;
- }
- .abs-action-delete {
- &:extend(.abs-action-reset all);
- &:extend(.abs-icon all);
- display: inline-block;
- font-size: 1.6rem;
- margin-left: 1.2rem;
- padding-top: .7rem;
- text-decoration: none;
- vertical-align: middle;
- &:after {
- color: @color-very-dark-gray;
- content: @icon-delete__content;
- }
- &:hover {
- &:after {
- color: @color-very-dark-gray-black2;
- }
- }
- > span {
- &:extend(.abs-visually-hidden all);
- }
- }
- .abs-action-button-as-link {
- .lib-button-as-link(@_margin: false);
- .lib-css(font-weight, @font-weight__regular);
- border-radius: 0;
- &:active,
- &:not(:focus) {
- box-shadow: none;
- }
- &:focus {
- color: @link__hover__color;
- }
- }
- .abs-action-default {
- .action-default();
- }
- .abs-action-primary {
- .action-primary();
- }
- .abs-action-secondary {
- .action-secondary();
- }
- .abs-action-tertiary {
- .action-tertiary();
- }
- .abs-action-quaternary {
- .action-quaternary();
- }
- .abs-action-menu {
- .action-menu();
- }
- // Triangle Wrap
- .abs-action-wrap-triangle {
- position: relative;
- .action-default {
- width: 100%;
- &:before,
- &:after {
- border-style: solid;
- content: '';
- height: 0;
- position: absolute;
- top: 0;
- width: 0;
- }
- &:active,
- &:hover,
- &:focus {
- box-shadow: none;
- }
- &:focus {
- ._keyfocus & {
- box-shadow: @button__hover__box-shadow;
- }
- }
- }
- }
- // Right Triangle
- .abs-action-wrap-triangle-right {
- display: inline-block;
- padding-right: @button-triangle__base__size - .1;
- position: relative;
- .action-default {
- &:before,
- &:after {
- border-color: transparent transparent transparent @button__background-color;
- border-width: @button-triangle__base__size 0 (@button-triangle__base__size - .1) @button-triangle__base__size;
- left: 100%;
- margin-left: -(@button-triangle__base__size);
- }
- &:before {
- border-left-color: @button-triangle__base__border-color;
- right: -1px;
- }
- &:hover,
- &:active,
- &:focus {
- &:after {
- border-left-color: @button__hover__background-color;
- }
- }
- }
- .action-primary {
- &:after {
- border-color: transparent transparent transparent @button-primary__background-color;
- }
- &:hover,
- &:active,
- &:focus {
- &:after {
- border-left-color: @button-primary__hover__background-color;
- }
- }
- }
- }
- // Left Triangle
- .abs-action-wrap-triangle-left {
- display: inline-block;
- padding-left: @button-triangle__base__size - .1;
- .action-default {
- text-indent: -(@button-triangle__base__size) / 2;
- &:before,
- &:after {
- border-color: transparent @button__background-color transparent transparent;
- border-width: @button-triangle__base__size @button-triangle__base__size (@button-triangle__base__size - .1) 0;
- margin-right: -(@button-triangle__base__size);
- right: 100%;
- }
- &:before {
- border-right-color: @button-triangle__base__border-color;
- left: -1px;
- }
- &:hover,
- &:active,
- &:focus {
- &:after {
- border-right-color: @button__hover__background-color;
- }
- }
- }
- .action-primary {
- &:after {
- border-color: transparent @button-primary__background-color transparent transparent;
- }
- &:hover,
- &:active,
- &:focus {
- &:after {
- border-right-color: @button-primary__hover__background-color;
- }
- }
- }
- }
- //
- // Default action
- // ---------------------------------------------
- .action-default,
- button {
- &:extend(.abs-action-pattern all);
- background: @button__background-color;
- border-color: @button__border-color;
- color: @button__color;
- &:hover,
- &:active,
- &:focus {
- background-color: @button__hover__background-color;
- color: @button__color;
- text-decoration: none;
- }
- }
- //
- // Primary action
- // ---------------------------------------------
- .action-primary {
- &:extend(.abs-action-pattern all);
- background-color: @button-primary__background-color;
- border-color: @button-primary__background-color;
- color: @button-primary__color;
- text-shadow: 1px 1px 0 rgba(0, 0, 0, .25);
- &:hover,
- &:active,
- &:focus {
- background-color: @button-primary__hover__background-color;
- border-color: @button-primary__hover__border-color;
- box-shadow: @button__hover__box-shadow;
- color: @button-primary__color;
- text-decoration: none;
- }
- &.disabled,
- &[disabled] {
- cursor: default;
- opacity: @disabled__opacity;
- pointer-events: none;
- }
- }
- //
- // Secondary action
- // ---------------------------------------------
- .action-secondary {
- &:extend(.abs-action-pattern all);
- background-color: @button-secondary__background-color;
- border-color: @button-secondary__border-color;
- color: @button-secondary__color;
- text-shadow: 1px 1px 1px rgba(0, 0, 0, .3);
- &:hover,
- &:active,
- &:focus {
- background-color: @button-secondary__hover__background-color;
- border-color: @button-secondary__hover__border-color;
- box-shadow: @button__hover__box-shadow;
- color: @button-secondary__color;
- text-decoration: none;
- }
- &:active {
- background-color: @button-secondary__active__background-color;
- }
- }
- //
- // Tertiary action & Quaternary action
- // ---------------------------------------------
- .action-tertiary,
- .action-quaternary {
- &:extend(.abs-action-pattern all);
- background-color: transparent;
- border-color: transparent;
- text-shadow: none;
- &:active,
- &:hover,
- &:focus {
- background-color: transparent;
- border-color: transparent;
- box-shadow: none;
- }
- }
- .action-tertiary {
- color: @link__color;
- &:active,
- &:hover,
- &:focus {
- color: @link__hover__color;
- text-decoration: underline;
- }
- }
- .action-quaternary {
- color: @text__color;
- &:active,
- &:hover,
- &:focus {
- color: darken(@text__color, 10%);
- }
- }
- //
- // Specific actions
- // ---------------------------------------------
- .action-close {
- > span {
- .hidden();
- }
- &:extend(.abs-action-reset all);
- &:active {
- .scale();
- }
- &:before {
- &:extend(.abs-icon all);
- content: @icon-close-mage__content;
- .transition(color);
- }
- &:hover {
- cursor: pointer;
- text-decoration: none;
- }
- }
- .action-basic {
- &:extend(.abs-action-secondary all);
- }
- .action-additional {
- &:extend(.abs-action-button-as-link all);
- }
- //
- // Action menu
- // ---------------------------------------------
- // Used in actions split, action select and all other simple (one line) action menu list
- .action-menu {
- background-color: @page-wrapper__background-color;
- border: 1px solid @action__active__border-color;
- border-radius: 1px;
- box-shadow: @component__box-shadow__base;
- color: @text__color;
- display: none;
- font-weight: @font-weight__regular;
- left: 0;
- list-style: none;
- margin: 2px 0 0; // Action box-shadow + 1px indent
- min-width: 0; // ToDo UI Should be deleted with old styles
- padding: 0;
- position: absolute;
- right: 0;
- top: 100%;
- &._active {
- display: block;
- }
- > li {
- border: none; // ToDo UI Should be deleted with old styles
- display: block;
- padding: 0;
- transition: background-color .1s linear;
- > a {
- &:hover {
- text-decoration: none;
- }
- }
- &._visible {
- background-color: @action-menu__hover__background-color;
- }
- &:hover {
- background-color: @action-menu__hover__background-color;
- }
- &:active {
- background-color: darken(@action-menu__hover__background-color, 10%);
- }
- &._parent {
- .lib-vendor-prefix-display(flex);
- .lib-vendor-prefix-flex-direction(row);
- display: flex;
- flex-direction: row;
- > .action-menu-item {
- min-width: 100%;
- }
- }
- }
- .item,
- .action-menu-item {
- cursor: pointer;
- display: block;
- padding: .6875em 1em;
- }
- .action-submenu {
- &:extend(.action-menu all);
- bottom: auto;
- left: auto;
- margin-left: 0;
- margin-top: -1px;
- position: absolute;
- right: auto;
- top: auto;
- }
- a {
- &.action-menu-item {
- color: @text__color;
- &:focus {
- background-color: @action-menu__hover__background-color;
- box-shadow: none;
- }
- }
- }
- }
- //
- // ToDo UI: Button migration
- // _____________________________________________
- button {
- &:extend(.abs-action-default all);
- &.primary {
- &:extend(.abs-action-primary all);
- }
- &.secondary {
- &:extend(.abs-action-secondary all);
- }
- &.tertiary {
- &:extend(.abs-action-tertiary all);
- }
- }
|