Skip to content

Commit

Permalink
Default to 200ms for all transitions and animations [#157670024]
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Locke <slocke@pivotal.io>
  • Loading branch information
reidmit authored and Steven Locke committed May 17, 2018
1 parent 4893562 commit ec6871a
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 104 deletions.
4 changes: 2 additions & 2 deletions spec/pivotal-ui-react/modals/modals_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ describe('BaseModal', () => {
it('renders a hidden backdrop', () => {
expect('.pui-modal-backdrop').not.toHaveClass('pui-modal-show');
expect('.pui-modal-backdrop').toHaveCss({
visibility: 'hidden', transition: 'opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s'
visibility: 'hidden', transition: 'opacity 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s'
});
expect('.pui-modal-backdrop').toHaveAttr('aria-hidden', 'true');
});

it('renders a hidden dialog', () => {
expect('.pui-modal-dialog').not.toHaveClass('pui-modal-show');
expect('.pui-modal-dialog').toHaveCss({transition: 'transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s'});
expect('.pui-modal-dialog').toHaveCss({transition: 'transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0s'});
});

it('renders a close button', () => {
Expand Down
9 changes: 0 additions & 9 deletions src/css/collapse/collapse.scss
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,4 @@ tr.pui-collapsible.in, tr.collapse.in {

tbody.pui-collapsible.in, tbody.collapse.in {
display: table-row-group;
}

.pui-collapsing, .collapsing {
position: relative;
height: 0;
overflow: hidden;
@include transition-property(height, visibility);
@include transition-duration(.35s);
@include transition-timing-function(ease);
}
2 changes: 1 addition & 1 deletion src/css/common/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ button.pui-close, button.close {

.fade {
opacity: 0;
@include transition(opacity .15s linear);
@include transition(opacity .2s linear);
&.in {
opacity: 1;
}
Expand Down
2 changes: 0 additions & 2 deletions src/css/links/links.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ a {
color: $link-color;
text-decoration: none;
@include transition-pui();

transition: all 150ms ease-out;
}

a:hover {
Expand Down
2 changes: 1 addition & 1 deletion src/css/mixins.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Transition mixins */

@mixin transition-pui($type:all, $speed:300ms, $ease: ease-out) {
@mixin transition-pui($type:all, $speed:200ms, $ease: ease-out) {
-webkit-transition: $type $speed $ease;
-moz-transition: $type $speed $ease;
transition: $type $speed $ease;
Expand Down
2 changes: 1 addition & 1 deletion src/css/radio/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,6 @@
opacity: 0;
width: 4px;
height: 4px;
transition: width ease-out .15s, height ease-out .15s;
transition: width ease-out .2s, height ease-out .2s;
}
}
85 changes: 0 additions & 85 deletions src/css/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -189,56 +189,6 @@
}
}

.tab-highlight {
.nav {
> li {
position: relative;
overflow: hidden;

+ li {
margin-top: -$tab-highlight-border-width;
}

> a {
padding: 15px;
color: $tab-highlight-tab-color;
background-color: $tab-highlight-bg-color;
transition: background-color 150ms ease-out;
}

> a:hover {
z-index: 100;
background-color: $tab-highlight-hover-bg-color;
}
}

> li.active {
a {
z-index: 50;
}

> a,
> a:hover {
color: $tab-highlight-tab-active-color;
background-color: $tab-highlight-tab-hover-bg-color;
border-width: 0;
cursor: default;
}
}

.tab-title {
font-size: $nav-tabs-title-font-size;
}
}

//content area of tabs
.tab-content {
border-top: $tab-highlight-border-width solid $tab-highlight-border-color;
padding: 0;
margin-left: -20px;
}
}

$tab-border-size: 1px;
$tab-padding: $base-unit ($base-unit*2);
$tab-action-padding: ($base-unit/2) ($base-unit*2);
Expand Down Expand Up @@ -438,41 +388,6 @@ $tab-action-padding: ($base-unit/2) ($base-unit*2);
}
}

.tabs-images {
.nav-tabs-images {
text-align: center;
li {
a[data-toggle=tab] {
display: inline-block;
width: 130px;
height: 130px;
margin: 0 30px;
@include button-shadow;
background-color: $neutral-8;
border-radius: 130px;
transition: all 300ms ease;
color: $neutral-5;

.icon-svg {
.icon {
fill: currentColor;
}
}
}
}
}

.nav-tabs-images li {
&.active a,
&:hover a,
&:focus a,
&:active a {
background-color: $teal-3;
color: $neutral-11;
}
}
}

.tab-simple-small-screen, .tab-simple-alt-small-screen, .tab-left-small-screen {
.tab-title > a.disabled {
color: $nav-disabled-link-color;
Expand Down
2 changes: 1 addition & 1 deletion src/react/back-to-top/back-to-top.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class BackToTop extends mixin(React.PureComponent).with(Animation) {
scrollableId: PropTypes.string
};

static FADE_DURATION = 300;
static FADE_DURATION = 200;
static VISIBILITY_HEIGHT = 400;
static SCROLL_DURATION = 200;

Expand Down
2 changes: 1 addition & 1 deletion src/react/collapsible/collapsible.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class CollapsibleComponent extends mixin(React.Component).with(Animation) {
};

static defaultProps = {
delay: 400
delay: 200
};

componentDidMount() {
Expand Down
2 changes: 1 addition & 1 deletion src/react/modals/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class BaseModal extends PureComponent {
};

static defaultProps = {
animationDuration: 300,
animationDuration: 200,
animationEasing: 'cubic-bezier(0.25, 0.46, 0.45, 0.94)',
getActiveElement: () => global.document.activeElement
};
Expand Down

0 comments on commit ec6871a

Please sign in to comment.