diff --git a/demo/scss/_layout.scss b/demo/scss/_layout.scss index 23d463d3326a..1f1bc99525f5 100644 --- a/demo/scss/_layout.scss +++ b/demo/scss/_layout.scss @@ -76,7 +76,3 @@ a { svg { transition: fill 250ms; } - -.bx--tabs__nav-item { - transition: background-color 250ms; -} diff --git a/src/components/button/_mixins.scss b/src/components/button/_mixins.scss index 11e808e52774..65b05dca0d32 100644 --- a/src/components/button/_mixins.scss +++ b/src/components/button/_mixins.scss @@ -24,7 +24,7 @@ border-radius: $button-border-radius; text-align: left; text-decoration: none; - transition: $duration--fast-01 motion(entrance, productive); + transition: all $duration--fast-01 motion(entrance, productive); outline: $button-outline-width solid transparent; position: relative; max-width: rem(320px); @@ -43,7 +43,7 @@ flex-shrink: 0; width: rem(16px); height: rem(16px); - transition: $duration--fast-01 motion(entrance, productive); + transition: all $duration--fast-01 motion(entrance, productive); } } @@ -66,7 +66,7 @@ box-sizing: border-box; position: absolute; content: ''; - transition: $duration--fast-01 motion(entrance, productive); + transition: all $duration--fast-02 motion(standard, productive); } &:not(.#{$prefix}--btn--disabled)::before { diff --git a/src/components/data-table/_data-table-action.scss b/src/components/data-table/_data-table-action.scss index e0d1b06780cd..fad54a423927 100644 --- a/src/components/data-table/_data-table-action.scss +++ b/src/components/data-table/_data-table-action.scss @@ -29,6 +29,10 @@ height: $layout-04; width: 100%; justify-content: flex-end; + transform: translate3d(0, 0, 0); + visibility: visible; + transition: transform $duration--fast-02 motion(standard, productive), + visibility $duration--fast-02 motion(standard, productive); } //------------------------------------------------- @@ -52,6 +56,9 @@ width: $layout-04; padding: $spacing-md; left: 0; + cursor: pointer; + pointer-events: all; + transition: background $duration--fast-02 motion(entrance, productive); } .#{$prefix}--toolbar-search-container-expandable .#{$prefix}--search .#{$prefix}--search-magnifier:focus { @@ -80,7 +87,7 @@ //------------------------------------------------- .#{$prefix}--toolbar-search-container-active { flex: auto; - transition: flex $transition--expansion $carbon--standard-easing; + transition: flex $duration--moderate-01 motion(standard, productive); } .#{$prefix}--toolbar-search-container-active .#{$prefix}--search { @@ -136,6 +143,7 @@ height: $layout-04; width: $layout-04; padding: $spacing-md; + transition: background $duration--fast-02 motion(entrance, productive); } .#{$prefix}--toolbar-action:hover:not([disabled]) { @@ -177,7 +185,6 @@ width: auto; max-width: $layout-01; fill: $ui-05; - transition: $transition--base; } //------------------------------------------------- @@ -188,7 +195,6 @@ height: $layout-04; opacity: 1; position: relative; - transition: opacity $transition--base; } .#{$prefix}--toolbar-search-container-persistent + .#{$prefix}--toolbar-content { @@ -230,7 +236,10 @@ .#{$prefix}--batch-actions--active ~ .#{$prefix}--toolbar-search-container, .#{$prefix}--batch-actions--active ~ .#{$prefix}--toolbar-content { - opacity: 0; + visibility: hidden; + transform: translate3d(0, 48px, 0); + transition: transform $duration--fast-02 motion(standard, productive), + visibility $duration--fast-02 motion(standard, productive); } //------------------------------------------------- @@ -242,14 +251,15 @@ top: 0; left: 0; align-items: center; - opacity: 0; padding-left: $spacing-lg; padding-right: $spacing-lg; width: 100%; height: 100%; - z-index: z('header'); - background-color: transparent; - transition: opacity $transition--base $carbon--standard-easing, background-color $transition--base $carbon--standard-easing; + will-change: transform; + background-color: $interactive-01; + transition: transform $duration--fast-02 motion(standard, productive), + visibility $duration--fast-02 motion(standard, productive), opacity $duration--fast-02 motion(standard, productive); + transform: translate3d(0, 48px, 0); pointer-events: none; visibility: hidden; } @@ -260,10 +270,8 @@ .#{$prefix}--batch-actions--active { visibility: visible; - background-color: $brand-01; pointer-events: all; - transition: opacity $transition--base $carbon--standard-easing, background-color $transition--base $carbon--standard-easing; - opacity: 1; + transform: translate3d(0, 0, 0); } //btns container @@ -332,11 +340,11 @@ content: ''; background-color: $ui-01; border: none; + transition: opacity $duration--fast-02 motion(standard, productive); } .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel:hover::before { opacity: 0; - transition: opacity $transition--base $carbon--standard-easing; } // cancel btn diff --git a/src/components/data-table/_data-table-core.scss b/src/components/data-table/_data-table-core.scss index 7ecfd20b24e7..0d2d47014244 100644 --- a/src/components/data-table/_data-table-core.scss +++ b/src/components/data-table/_data-table-core.scss @@ -66,6 +66,11 @@ width: 100%; } + .#{$prefix}--data-table tbody tr, + .#{$prefix}--data-table tbody tr td { + transition: background-color $duration--fast-01 motion(entrance, productive); + } + .#{$prefix}--data-table tbody tr:hover { background: $hover-field; } @@ -96,6 +101,11 @@ padding-left: $spacing-05; } + .#{$prefix}--data-table th:last-of-type { + position: relative; + width: auto; + } + .#{$prefix}--data-table .#{$prefix}--table-header-label { display: block; padding: rem(14px) 0; @@ -195,8 +205,11 @@ } .#{$prefix}--data-table th.#{$prefix}--table-column-checkbox { + position: relative; + background: $ui-03; padding: rem(12px) $spacing-03 0 $spacing-05; width: rem(44px); // 16px padding left + 8px padding right + 20px checkbox width + transition: background-color $duration--fast-01 motion(entrance, productive); } .#{$prefix}--data-table td.#{$prefix}--table-column-checkbox { diff --git a/src/components/data-table/_data-table-expandable.scss b/src/components/data-table/_data-table-expandable.scss index d3349fd16909..3b1309a2b797 100644 --- a/src/components/data-table/_data-table-expandable.scss +++ b/src/components/data-table/_data-table-expandable.scss @@ -13,6 +13,10 @@ /// @access private /// @group data-table @mixin data-table-expandable { + .#{$prefix}--data-table thead tr .#{$prefix}--table-expand { + position: relative; + } + //---------------------------------------------------------------------------- // Parent row //---------------------------------------------------------------------------- @@ -34,7 +38,7 @@ //child row hidden tr.#{$prefix}--parent-row:not(.#{$prefix}--expandable-row) + tr[data-child-row] { height: 0; - transition: height $transition--expansion $carbon--standard-easing; + transition: height $duration--moderate-01 motion(standard, productive); } tr.#{$prefix}--parent-row:not(.#{$prefix}--expandable-row) + tr[data-child-row] td { @@ -42,8 +46,8 @@ padding-bottom: 0; border: 0; background-color: $hover-field; - transition: padding $transition--expansion $carbon--standard-easing, - background-color $transition--expansion $carbon--standard-easing; + transition: padding $duration--moderate-01 motion(standard, productive), + background-color $duration--moderate-01 motion(standard, productive); } tr.#{$prefix}--parent-row:not(.#{$prefix}--expandable-row) + tr[data-child-row] td .#{$prefix}--child-row-inner-container { @@ -53,12 +57,12 @@ //child row visible tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] { - transition: height $transition--expansion $carbon--standard-easing; + transition: height $duration--moderate-01 motion(standard, productive); } tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] td { padding-bottom: rem(23px); - transition: padding $transition--expansion $carbon--standard-easing; + transition: padding $duration--moderate-01 motion(standard, productive); } tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] td .#{$prefix}--child-row-inner-container { @@ -83,7 +87,18 @@ //---------------------------------------------------------------------------- // Hover styles //---------------------------------------------------------------------------- - //hovering on collapsed parent + tr.#{$prefix}--parent-row:not(.#{$prefix}--expandable-row) td, + tr.#{$prefix}--parent-row.#{$prefix}--expandable-row td, + tr.#{$prefix}--parent-row.#{$prefix}--expandable-row { + transition: height $duration--moderate-02 motion(standard, productive), + background-color $duration--fast-02 motion(standard, productive); + } + + tr.#{$prefix}--parent-row.#{$prefix}--expandable-row + tr[data-child-row] td { + transition: all $duration--fast-02 motion(standard, productive); + } + + // hovering on collapsed parent tr.#{$prefix}--parent-row:not(.#{$prefix}--expandable-row):first-of-type:hover td { border-top: 1px solid $hover-field; border-bottom: 1px solid $hover-field; @@ -148,7 +163,7 @@ .#{$prefix}--table-expand[data-previous-value='collapsed'] .#{$prefix}--table-expand__svg { transform: rotate(270deg); - transition: transform $transition--expansion $carbon--standard-easing; + transition: transform $duration--moderate-01 motion(standard, productive); } .#{$prefix}--table-expand__button { @@ -170,7 +185,7 @@ .#{$prefix}--table-expand__svg { fill: $ui-05; transform: rotate(90deg); - transition: transform $transition--expansion $carbon--standard-easing; + transition: transform $duration--moderate-01 motion(standard, productive); } th.#{$prefix}--table-expand + th.#{$prefix}--table-column-checkbox { diff --git a/src/components/data-table/_data-table-sort.scss b/src/components/data-table/_data-table-sort.scss index 71b5811a37d6..8374d02cd4d2 100644 --- a/src/components/data-table/_data-table-sort.scss +++ b/src/components/data-table/_data-table-sort.scss @@ -37,6 +37,7 @@ // Th > Button // ------------------------------------- .#{$prefix}--table-sort { + @include focus-outline('reset'); @include button-reset(false); position: relative; font: inherit; @@ -47,6 +48,9 @@ color: $text-01; padding: 0 $spacing-03; height: 100%; + background-color: $ui-03; + transition: background-color $duration--fast-01 motion(entrance, productive), + outline $duration--fast-01 motion(entrance, productive); } .#{$prefix}--table-sort:focus { @@ -57,7 +61,6 @@ background: $data-table-column-hover; } - // changes opacity when th is inactive (see line 161) .#{$prefix}--table-sort:focus svg, .#{$prefix}--table-sort:hover svg { opacity: 1; @@ -84,6 +87,7 @@ fill: $ui-05; width: auto; min-width: $layout-01; + transition: opacity $duration--fast-01 motion(entrance, productive); } // active icons @@ -105,7 +109,6 @@ left: rem(2px); margin-left: $spacing-03; margin-right: 0; - transition: transform $transition--base $carbon--standard-easing; transform: rotate(0); opacity: 0; fill: $ui-05; diff --git a/src/components/dropdown/_dropdown.scss b/src/components/dropdown/_dropdown.scss index 69c834fac332..c42030ffd8b5 100644 --- a/src/components/dropdown/_dropdown.scss +++ b/src/components/dropdown/_dropdown.scss @@ -55,7 +55,7 @@ cursor: pointer; color: $text-01; outline: 2px solid transparent; - transition: $duration--fast-02 motion(standard, productive) all; + transition: background-color $duration--fast-01 motion(standard, productive); &:focus { @include focus-outline('outline'); @@ -152,8 +152,8 @@ } .#{$prefix}--dropdown-item { - transition: opacity $duration--fast-02 motion(standard, productive), - background-color $duration--fast-02 motion(standard, productive); + transition: opacity $duration--fast-01 motion(standard, productive), + background-color $duration--fast-01 motion(standard, productive); opacity: 0; &:hover { @@ -219,6 +219,7 @@ .#{$prefix}--dropdown--open .#{$prefix}--dropdown-list { max-height: 15rem; + transition: max-height $duration--fast-02 motion(entrance, productive); &:hover { overflow: auto; @@ -263,10 +264,10 @@ justify-self: start; display: inline-block; border-bottom-color: transparent; - transition-property: none; width: auto; height: rem(32px); background-color: $field-02; + transition: background $duration--fast-01 motion(entrance, productive); &:hover { background-color: $hover-ui; diff --git a/src/components/form/_form.scss b/src/components/form/_form.scss index 6180ae866b9d..9281ae61efc7 100644 --- a/src/components/form/_form.scss +++ b/src/components/form/_form.scss @@ -38,6 +38,7 @@ vertical-align: baseline; margin-bottom: $carbon--spacing-03; line-height: rem(16px); + pointer-events: none; } .#{$prefix}--label .#{$prefix}--tooltip__trigger { diff --git a/src/components/modal/_modal.scss b/src/components/modal/_modal.scss index 1cf134d33fc9..3750e06d7c5a 100644 --- a/src/components/modal/_modal.scss +++ b/src/components/modal/_modal.scss @@ -34,17 +34,21 @@ align-items: center; justify-content: center; content: ''; + background-color: transparent; opacity: 0; - background-color: $overlay-01; - transition: opacity $duration--moderate-01 motion(exit, expressive), - z-index 0s $duration--moderate-01 motion(exit, expressive), visibility 0s $duration--moderate-01 motion(exit, expressive); visibility: hidden; + transition: background-color $duration--slow-02 motion(exit, expressive), + opacity $duration--moderate-02 motion(exit, expressive), z-index $duration--slow-02 motion(exit, expressive), + visibility $duration--moderate-02 motion(exit, expressive); &.is-visible { z-index: z('modal'); - opacity: 1; - transition: opacity $duration--slow-01 motion(entrance, expressive); visibility: visible; + opacity: 1; + background-color: $overlay-01; + transition: background-color $duration--slow-02 motion(entrance, expressive), + opacity $duration--moderate-02 motion(entrance, expressive), z-index $duration--slow-02 motion(entrance, expressive), + visibility $duration--moderate-02 motion(entrance, expressive); } .#{$prefix}--text-input, @@ -57,20 +61,29 @@ @include modal--color($support-01); } + .#{$prefix}--modal.is-visible .#{$prefix}--modal-container { + transition: transform $duration--moderate-02 motion(entrance, expressive); + transform: translate3d(0, 0, 0); + } + .#{$prefix}--modal-container { position: relative; display: flex; flex-direction: column; background-color: $ui-01; width: 100%; - max-height: 100%; height: 100%; + max-height: 100%; + overflow: hidden; + transform-origin: top center; + transform: translate3d(0, -24px, 0); + transition: transform $duration--moderate-02 motion(exit, expressive); @include carbon--breakpoint(md) { - height: auto; width: 50%; max-width: 768px; max-height: 90%; + height: auto; } @include carbon--breakpoint(lg) { @@ -147,6 +160,7 @@ overflow: hidden; cursor: pointer; background-color: transparent; + transition: background-color $duration--fast-02 motion(standard, productive); &:hover { background-color: $hover-ui; diff --git a/src/components/number-input/_number-input.scss b/src/components/number-input/_number-input.scss index 70b654593061..cef42f20f2e9 100644 --- a/src/components/number-input/_number-input.scss +++ b/src/components/number-input/_number-input.scss @@ -40,12 +40,17 @@ border: none; border-radius: 0; border-bottom: 1px solid $ui-04; - transition: all $duration--fast-02 motion(standard, productive); + transition: background-color $duration--fast-01 motion(standard, productive), + outline $duration--fast-01 motion(standard, productive); &:focus { @include focus-outline('outline'); } + &:hover { + background-color: $hover-field; + } + &:disabled { cursor: not-allowed; background-color: $disabled-background-color; diff --git a/src/components/progress-indicator/_progress-indicator.scss b/src/components/progress-indicator/_progress-indicator.scss index 74d714c22451..584db9ce3975 100644 --- a/src/components/progress-indicator/_progress-indicator.scss +++ b/src/components/progress-indicator/_progress-indicator.scss @@ -28,7 +28,6 @@ flex: 1; min-width: 7rem; width: rem(128px); - transition: $duration--fast-02 all motion(standard, productive); overflow: visible; .#{$prefix}--tooltip__label { @@ -55,14 +54,14 @@ } .#{$prefix}--progress-label { + @include type-style('body-short-01'); line-height: 1.45; max-width: rem(88px); margin: $carbon--spacing-03 0 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - @include type-style('body-short-01'); - transition: box-shadow $transition--base $carbon--standard-easing; + transition: box-shadow $duration--fast-02 motion(standard, productive), color $duration--fast-02 motion(standard, productive); &::before { content: ''; @@ -80,7 +79,6 @@ outline: none; color: $link-01; box-shadow: 0 rem(3px) 0 0 $link-01; - transition: box-shadow 0.05s $carbon--standard-easing; } .#{$prefix}--progress-label:active { @@ -106,6 +104,7 @@ //single line tooltip .#{$prefix}--progress-step .#{$prefix}--tooltip { + @include type-style('body-long-01'); min-width: rem(115px); width: rem(125px); min-height: $carbon--spacing-06; @@ -114,25 +113,24 @@ padding: $carbon--spacing-03 $carbon--spacing-05; display: block; visibility: hidden; - @include type-style('body-long-01'); color: $inverse-01; } //multiline tooltip .#{$prefix}--progress-step .#{$prefix}--tooltip_multi { + @include type-style('body-long-01'); width: rem(150px); height: auto; - @include type-style('body-long-01'); color: $inverse-01; } //OPTIONAL HELPER TEXT STYLING .#{$prefix}--progress-optional { + @include type-style('label-01'); position: absolute; left: 0; margin-left: $carbon--spacing-06; margin-top: rem(28px); - @include type-style('label-01'); color: $text-01; } diff --git a/src/components/search/_search.scss b/src/components/search/_search.scss index bec676903d0c..bbed6a95b8b0 100644 --- a/src/components/search/_search.scss +++ b/src/components/search/_search.scss @@ -42,9 +42,14 @@ text-overflow: ellipsis; width: 100%; order: 1; - transition: background-color $duration--fast-01, outline $duration--fast-01; + transition: background-color $duration--fast-02 motion(standard, productive), + outline $duration--fast-02 motion(standard, productive); border-bottom: 1px solid $ui-04; + &:hover { + background-color: $hover-field; + } + &:focus { @include focus-outline('outline'); } @@ -117,9 +122,9 @@ display: flex; align-items: center; justify-content: center; - transition: opacity $duration--fast-02, outline $duration--fast-02, background-color $duration--fast-02, - border-color $duration--fast-02; - border-bottom: 1px solid transparent; + transition: opacity $duration--fast-02 motion(standard, productive), + background-color $duration--fast-02 motion(standard, productive), outline $duration--fast-02 motion(standard, productive), + border $duration--fast-02 motion(standard, productive); cursor: pointer; visibility: visible; opacity: 1; @@ -128,22 +133,55 @@ width: rem(40px); right: 0; fill: $icon-01; - border: 2px solid transparent; + border: 1px solid transparent; border-left: 0; &:hover { - background-color: $hover-ui; + background-color: $hover-field; border-bottom: 1px solid $ui-04; } + + &:focus { + @include focus-outline('outline'); + } + &:active { @include focus-outline('outline'); background-color: $selected-ui; } + + &::before { + content: ''; + display: block; + position: absolute; + left: 0; + top: rem(1px); + height: calc(100% - 2px); + width: 2px; + background-color: $field-01; + transition: background-color $duration--fast-02 motion(standard, productive); + } + } + + .#{$prefix}--search-close:hover { + &::before { + background-color: $hover-field; + } + } + + .#{$prefix}--search-close:focus, + .#{$prefix}--search-close:active { + &::before { + background-color: $focus; + } + } + + .#{$prefix}--search-input:hover ~ .#{$prefix}--search-close::before { + background-color: $hover-field; } .#{$prefix}--search-input:focus ~ .#{$prefix}--search-close:hover { - border: 2px solid $focus; - border-left: 0; + @include focus-outline('outline'); } .#{$prefix}--search--sm .#{$prefix}--search-close { diff --git a/src/components/select/_select.scss b/src/components/select/_select.scss index b943c6b3216a..6bc9c792791a 100644 --- a/src/components/select/_select.scss +++ b/src/components/select/_select.scss @@ -53,7 +53,8 @@ border-bottom: 1px solid $ui-04; border-radius: 0; cursor: pointer; - transition: outline $duration--fast-01, background-color $duration--fast-01; + transition: background-color $duration--fast-01 motion(standard, productive), + outline $duration--fast-01 motion(standard, productive); &:hover { background-color: $hover-ui; diff --git a/src/components/slider/_slider.scss b/src/components/slider/_slider.scss index d53357e5b9d6..7dd53fbfe528 100644 --- a/src/components/slider/_slider.scss +++ b/src/components/slider/_slider.scss @@ -73,7 +73,7 @@ transform-origin: left; pointer-events: none; transform: translate(0%, -50%); - transition: background $duration--fast-01 motion(standard, productive); + transition: background $duration--fast-02 motion(standard, productive); } .#{$prefix}--slider__thumb { @@ -85,8 +85,8 @@ box-shadow: inset 0 0 0 1px transparent, inset 0 0 0 2px transparent; top: 0; transform: translate(-50%, -50%); - transition: transform $duration--fast-01 motion(standard, productive), - background $duration--fast-01 motion(standard, productive), box-shadow $duration--fast-01 motion(standard, productive); + transition: transform $duration--fast-02 motion(standard, productive), + background $duration--fast-02 motion(standard, productive), box-shadow $duration--fast-02 motion(standard, productive); cursor: pointer; outline: none; z-index: 3; @@ -125,6 +125,10 @@ &::-webkit-inner-spin-button { display: none; } + + &:hover { + background-color: $hover-field; + } } .#{$prefix}--slider__thumb:focus ~ .#{$prefix}--slider__filled-track { @@ -169,6 +173,7 @@ background-color: $disabled-01; color: $disabled-02; transition: none; + cursor: not-allowed; &:active, &:focus, diff --git a/src/components/structured-list/_structured-list.scss b/src/components/structured-list/_structured-list.scss index 8c699a959d9e..0fd97c67b955 100644 --- a/src/components/structured-list/_structured-list.scss +++ b/src/components/structured-list/_structured-list.scss @@ -43,11 +43,12 @@ .#{$prefix}--structured-list-row { display: table-row; border-bottom: 1px solid $ui-03; + transition: background-color $duration--fast-02 motion(standard, productive); } .#{$prefix}--structured-list--selection .#{$prefix}--structured-list-row:hover:not(.#{$prefix}--structured-list-row--header-row):not(.#{$prefix}--structured-list-row--selected) { - background-color: $ui_01; + background-color: $ui-01; cursor: pointer; border-bottom: 1px solid $ui-01; } @@ -108,6 +109,7 @@ position: relative; display: table-cell; max-width: 36rem; + transition: color $duration--fast-02 motion(standard, productive); } .#{$prefix}--structured-list-th { @@ -125,7 +127,7 @@ display: inline-block; fill: transparent; vertical-align: middle; - transition: $duration--fast-02 motion(standard, productive); + transition: all $duration--fast-02 motion(standard, productive); } .#{$prefix}--structured-list-row:hover .#{$prefix}--structured-list-svg { diff --git a/src/components/tabs/_tabs.scss b/src/components/tabs/_tabs.scss index b5126d468e17..fa7b3a55a5f9 100644 --- a/src/components/tabs/_tabs.scss +++ b/src/components/tabs/_tabs.scss @@ -56,13 +56,13 @@ width: rem(12px); height: rem(7px); fill: $ui-05; - transition: transform $duration--moderate-01 motion(standard, productive); + transition: transform $duration--fast-01 motion(standard, productive); } .#{$prefix}--tabs-trigger--open:focus, .#{$prefix}--tabs-trigger--open:active { @include focus-outline('reset'); - transition: outline $duration--moderate-01 motion(standard, productive); + transition: outline $duration--fast-01 motion(standard, productive); } .#{$prefix}--tabs-trigger--open { @@ -70,7 +70,7 @@ } .#{$prefix}--tabs-trigger--open svg { - @include rotate(-180deg, $duration--moderate-01, 50% 45%); + @include rotate(-180deg, $duration--fast-01, 50% 45%); } // There is only a difference in tab color when in mobile/dropdown view @@ -103,7 +103,7 @@ flex-direction: column; z-index: z('dropdown'); background: $ui-01; - transition: max-height $duration--moderate-01 motion(standard, productive); + transition: max-height $duration--fast-01 motion(standard, productive); max-height: 600px; width: 100%; @@ -119,7 +119,7 @@ } .#{$prefix}--tabs__nav--hidden { - transition: max-height $duration--moderate-01 motion(standard, productive); + transition: max-height $duration--fast-01 motion(standard, productive); overflow: hidden; max-height: 0; @@ -141,6 +141,8 @@ cursor: pointer; width: 100%; height: rem(40px); + transition: background-color $duration--fast-01 motion(standard, productive); + @include carbon--breakpoint(md) { background: transparent; height: auto; @@ -150,6 +152,11 @@ } } + .#{$prefix}--tabs__nav-item .#{$prefix}--tabs__nav-link { + transition: color $duration--fast-01 motion(standard, productive), + border-bottom-color $duration--fast-01 motion(standard, productive), outline $duration--fast-01 motion(standard, productive); + } + //----------------------------- // Item Hover //----------------------------- @@ -183,6 +190,8 @@ .#{$prefix}--tabs__nav-item--selected:not(.#{$prefix}--tabs__nav-item--disabled) { border: none; display: none; + transition: color $duration--fast-01 motion(standard, productive); + @include carbon--breakpoint(md) { display: flex; .#{$prefix}--tabs__nav-link { @@ -194,7 +203,7 @@ .#{$prefix}--tabs__nav-link:focus, .#{$prefix}--tabs__nav-link:active { color: $text-01; - border-bottom: 2px; + border-bottom: 2px solid $interactive-01; } } } @@ -203,6 +212,7 @@ // Link //----------------------------- a.#{$prefix}--tabs__nav-link { + @include focus-outline('reset'); display: inline-block; color: $text-02; text-decoration: none; @@ -216,6 +226,7 @@ line-height: rem(16px); border-bottom: 1px solid $ui-03; overflow: hidden; + transition: border $duration--fast-01 motion(standard, productive), outline $duration--fast-01 motion(standard, productive); &:focus, &:active { diff --git a/src/components/text-area/_text-area.scss b/src/components/text-area/_text-area.scss index 10a0eb829a83..74945f5eef57 100644 --- a/src/components/text-area/_text-area.scss +++ b/src/components/text-area/_text-area.scss @@ -35,7 +35,8 @@ resize: vertical; border: none; border-bottom: 1px solid $ui-04; - transition: $duration--fast-02 all; + transition: background-color $duration--fast-01 motion(standard, productive), + outline $duration--fast-01 motion(standard, productive); & ~ .#{$prefix}--form__helper-text { margin-top: 0; @@ -55,6 +56,10 @@ } } + .#{$prefix}--text-area:hover { + background-color: $hover-field; + } + .#{$prefix}--text-area:focus, .#{$prefix}--text-area:active { @include focus-outline('outline'); diff --git a/src/components/text-input/_text-input.scss b/src/components/text-input/_text-input.scss index 5077ba0205ae..3689c730d555 100644 --- a/src/components/text-input/_text-input.scss +++ b/src/components/text-input/_text-input.scss @@ -30,7 +30,12 @@ color: $text-01; border: none; border-bottom: 1px solid $ui-04; - transition: $duration--fast-02 all; + transition: background-color $duration--fast-01 motion(standard, productive), + outline $duration--fast-01 motion(standard, productive); + + &:hover { + background-color: $hover-field; + } &:focus, &:active { diff --git a/src/components/time-picker/_time-picker.scss b/src/components/time-picker/_time-picker.scss index 2589f2933444..c00da5faddde 100644 --- a/src/components/time-picker/_time-picker.scss +++ b/src/components/time-picker/_time-picker.scss @@ -56,7 +56,8 @@ align-items: center; width: 4.875rem; height: rem(40px); - transition: outline $duration--fast-01; + transition: outline $duration--fast-01 motion(standard, productive), + background-color $duration--fast-01 motion(standard, productive); } } diff --git a/src/components/toggle/_toggle.scss b/src/components/toggle/_toggle.scss index c0208c8c5b10..e2470b2ac353 100644 --- a/src/components/toggle/_toggle.scss +++ b/src/components/toggle/_toggle.scss @@ -54,6 +54,10 @@ width: rem(48px); border-radius: rem(15px); top: 0; + will-change: box-shadow; + box-shadow: 0 0 0 2px transparent; + transition: box-shadow $duration--fast-01 motion(exit, productive), + background-color $duration--fast-01 motion(exit, productive); } // Toggle circle @@ -69,7 +73,7 @@ background-color: $ui-03; border-radius: 50%; content: ''; - transition: $duration--fast-01 motion(exit, productive); + transition: transform $duration--fast-01 motion(exit, productive); } }