/* variables specific to current element */ $transaction-chain-item-inset-mobile: $transaction-block-padding-mobile-global; $transaction-chain-item-inset-desktop: $transaction-block-padding-desktop-global; $transaction-chain-stack-level: "md"; $transaction-chain-stack: map-deep-get($token-spacer-inset-map, $transaction-chain-stack-level); .#{$namespace}transactionChain { /* Save root element context for easy access if nesting is needed */ $self: &; /* properties of current element + media queries */ @include spacer-component-stack($transaction-chain-stack-level); /* Pseudo Elements */ &::before { } &::after { } /* Include elements that are linked to the current element but have to reside at the root level of the stylesheet (e.g: keyframes) */ @at-root { } /* children - write selector in full in comments in order to facilitate search */ // transactionChain__transactions &__transactions { .#{$namespace}transactionBlock__row { z-index: z("medium"); //needed in order for the pseudo element of the operations block to not go over the collapse toggle btn } } // transactionChain__operations &__operations { // follows same logic as parent position: relative; z-index: z("medium"); .#{$namespace}stepInput__item:first-of-type .#{$namespace}stepInput__stepIcon { &::after { transition: top 0.15s linear } } } &__operationsCollapse { &.show { .#{$namespace}stepInput__item:first-of-type .#{$namespace}stepInput__stepIcon { &::after { top: -((map-deep-get($token-spacer-unit-map, "64")*2) + $transaction-chain-stack*2.5); } } } } /* modifiers */ &.-operationsShown { .#{$namespace}transactionBlock__row:last-child { &::before { bottom: 0; } } .#{$namespace}stepInput__item:first-of-type .#{$namespace}stepInput__stepIcon { &::after { top: -(($transaction-chain-item-inset-mobile*2) + $transaction-chain-stack); @include media-breakpoint-up(lg) { top: -(($transaction-chain-item-inset-desktop*2) + $transaction-chain-stack); } } } } /* random parent element */ /* * * Syntax : .randomParentElt & {} * */ /* Pseudo Classes */ &:hover { @media (hover: hover) { } } &:focus { } &:active { } &:focus, &:active { } }