/* * Copyright 2016 Resin.io * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // From http://tympanus.net/Development/ProgressButtonStyles/ .progress-button { @extend .btn; } .progress-button[percentage="100"][active="false"] .progress-button__bar { background-color: $brand-success; } .progress-button[percentage="100"][active="true"] .progress-button__bar { background-color: $brand-warning; } .progress-button[active="true"] { pointer-events: none; } .progress-button--primary { @extend .btn-primary; .progress-button__bar { background: lighten($brand-primary, 5); } } .progress-button__content { position: relative; z-index: 10; transition: transform 0.3s; } .progress-button__bar { position: absolute; left: 0; top: 0; width: 0; height: 100%; transition: width 0.3s, opacity 0.3s; }