From 7d89e38f02a8a8d9f068153b6d0cbe08697258bf Mon Sep 17 00:00:00 2001 From: Federico Zivolo Date: Mon, 25 Aug 2014 16:36:54 +0200 Subject: [PATCH] separated snackbarjs css --- less/plugin-snackbarjs.less | 42 +++++++++++++++++++++++++++++++++++++ less/popups.less | 41 ------------------------------------ 2 files changed, 42 insertions(+), 41 deletions(-) create mode 100644 less/plugin-snackbarjs.less diff --git a/less/plugin-snackbarjs.less b/less/plugin-snackbarjs.less new file mode 100644 index 00000000..243582a4 --- /dev/null +++ b/less/plugin-snackbarjs.less @@ -0,0 +1,42 @@ +// main: material.less + +// Support for SnackbarJS plugin +// https://github.com/FezVrasta/snackbarjs + +.snackbar { + // Style + background-color: #323232; + color: @darkbg-text; + font-size: 14px; + border-radius: 2px; + .shadow-z-1; + + // Animation + height: 0; + -moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; + -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; + transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; + -moz-transform: translateY(200%); + -webkit-transform: translateY(200%); + transform: translateY(200%); +} + +.snackbar.snackbar-opened { + // Style + padding: 14px 15px; + margin-bottom: 20px; + + // Animation + height: auto; + -moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s; + -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s; + transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s; + -moz-transform: none; + -webkit-transform: none; + transform: none; +} + +// Variations +.snackbar.toast { + border-radius: 200px; +} diff --git a/less/popups.less b/less/popups.less index 3fc0538c..433aae43 100644 --- a/less/popups.less +++ b/less/popups.less @@ -25,44 +25,3 @@ border-bottom-color: #323232; } } - -// Support for SnackbarJS plugin -// https://github.com/FezVrasta/snackbarjs - -.snackbar { - // Style - background-color: #323232; - color: @darkbg-text; - font-size: 14px; - border-radius: 2px; - .shadow-z-1; - - // Animation - height: 0; - -moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; - -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; - transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, padding 0 linear 0.2s, height 0 linear 0.2s; - -moz-transform: translateY(200%); - -webkit-transform: translateY(200%); - transform: translateY(200%); -} - -.snackbar.snackbar-opened { - // Style - padding: 14px 15px; - margin-bottom: 20px; - - // Animation - height: auto; - -moz-transition: -moz-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s; - -webkit-transition: -webkit-transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s; - transition: transform 0.2s ease-in-out, opacity 0.2s ease-in, height 0 linear 0.2s, height 0 linear 0.2s; - -moz-transform: none; - -webkit-transform: none; - transform: none; -} - -// Variations -.snackbar.toast { - border-radius: 200px; -}