UNPKG

angular-keypad

Version:

An Angular directive that creates a numeric keypad.

123 lines (107 loc) 2.1 kB
.bc-keypad { display: -webkit-box; display: -ms-flexbox; display: flex; -ms-flex-flow: row wrap; flex-flow: row wrap; overflow: hidden; padding-bottom: .375em; text-align: center; } @-webkit-keyframes ripple { 100% { opacity: 0; -webkit-transform: scale(2.5); transform: scale(2.5); } } @keyframes ripple { 100% { opacity: 0; -webkit-transform: scale(2.5); transform: scale(2.5); } } .bc-keypad .angular-ripple { background-color: rgba(0, 0, 0, 0.1); border-radius: 50%; display: block; position: absolute; -webkit-transform: scale(0); transform: scale(0); } .bc-keypad .angular-ripple.animate { -webkit-animation: ripple .3s linear; animation: ripple .3s linear; } .bc-keypad__key { position: relative; text-align: center; width: calc(100% / 3); } .bc-keypad__key::before { display: block; content: ''; padding-top: 50%; width: 100%; } .bc-keypad__key-button { background: none; background-color: transparent; border: 0; color: inherit; cursor: pointer; font-size: 1.4rem; line-height: 1.5em; outline: 0; padding: 2%; position: absolute; bottom: 0; left: 0; right: 0; top: 0; text-align: center; width: 100%; } .bc-keypad__key-button:focus { outline: 0; } .bc-keypad__key-button::after { background-color: #ccc; content: ''; display: block; height: 1px; position: absolute; left: 10%; right: 10%; bottom: 0; } .bc-keypad__key-button svg { height: 44px; position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%); width: 50px; } .bc-keypad__key-button--icon { background-size: 50%; background-position: 45% 50%; background-repeat: no-repeat; border: 0; position: relative; } .bc-keypad__key-button--backspace { fill: inherit; } .bc-keypad__key-button--submit { fill: inherit; } .bc-keypad [angular-ripple] { overflow: hidden; position: relative; } .bc-keypad [angular-ripple].bc-keypad__key-button { position: absolute; }