Skip to content

Commit

Permalink
style(choice): Add transition styles in Choice.modules.scss
Browse files Browse the repository at this point in the history
  • Loading branch information
lzcabrera committed Dec 1, 2017
1 parent 754b57b commit e9b498e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/Choice/Choice.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
display: flex;
align-items: center;
justify-content: center;

transition: all 0.1s linear;
}

.fakeCheckbox {
Expand Down

1 comment on commit e9b498e

@ryanoglesby08
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the transition "all" is a bit dangerous. Do we really want to animate every single CSS property?

Also, I've been trying to move us to using Animations as components. We have a set of those now in "src/components/Animations". Want to try adding the animation here as a component? :)

In this case the transition is a background color change. We don't have a component for that yet, but I do have an example one here: https://github.com/ryanoglesby08/exposing-css-hidden-complexities/tree/master/src/components/AnimatedButton (The actual animation component is BgColorShift.js, and AnimatedButton.js uses it)

Please sign in to comment.