diff --git a/angular-ui-switch.css b/angular-ui-switch.css index d5bcdf2..412435a 100644 --- a/angular-ui-switch.css +++ b/angular-ui-switch.css @@ -1,5 +1,5 @@ .switch { - background: #fff; + background: #EFEFEF; border: 1px solid #dfdfdf; position: relative; display: inline-block; @@ -14,8 +14,19 @@ box-shadow: rgb(223, 223, 223) 0px 0px 0px 0px inset; transition: 0.3s ease-out all; -webkit-transition: 0.3s ease-out all; + user-select: none; /* Non-prefixed version */ + -webkit-touch-callout: none; /* iOS Safari */ + -webkit-user-select: none; /* Chrome/Safari/Opera */ + -khtml-user-select: none; /* Konqueror */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* Internet Explorer/Edge */ top: -1px; } + +.switch:focus { + outline: none; +} + /*adding a wide width for larger switch text*/ .switch.wide { width:80px; @@ -33,11 +44,23 @@ -webkit-transition: 0.3s ease-out all; } .switch.checked { - background: rgb(100, 189, 99); - border-color: rgb(100, 189, 99); + background: #64BD63; + border-color: #64BD63; } + +.switch.blue.checked { + background: #36B4F6; + border-color: #36B4F6; +} + +.switch.red.checked { + background: #DF3B3A; + border-color: #DF3B3A; +} + .switch.checked small { - left: 22px; + left: initial; + right: 0px; } /*wider switch text moves small further to the right*/ .switch.wide.checked small { @@ -49,20 +72,27 @@ font-size:13px; } +.switch[on][off] { + width: 60px; +} + +.switch .on, .switch .off { + position: absolute; + font-weight: bold; + z-index: 0; +} + .switch .off { display:block; - position: absolute; - right: 10%; + right: 2px; top: 25%; - z-index: 0; - color:#A9A9A9; + color: #949494; + text-align: center; } .switch .on { display:none; - z-index: 0; color:#fff; - position: absolute; top: 25%; left: 9%; } diff --git a/angular-ui-switch.min.css b/angular-ui-switch.min.css index a52d377..faa65c7 100644 --- a/angular-ui-switch.min.css +++ b/angular-ui-switch.min.css @@ -1 +1 @@ -.switch{background:#fff;border:1px solid #dfdfdf;position:relative;display:inline-block;box-sizing:content-box;overflow:visible;width:52px;height:30px;padding:0;margin:0;border-radius:20px;cursor:pointer;box-shadow:#dfdfdf 0 0 0 0 inset;transition:.3s ease-out all;-webkit-transition:.3s ease-out all;top:-1px}.switch.wide{width:80px}.switch small{background:#fff;border-radius:100%;box-shadow:0 1px 3px rgba(0,0,0,.4);width:30px;height:30px;position:absolute;top:0;left:0;transition:.3s ease-out all;-webkit-transition:.3s ease-out all}.switch.checked{background:#64bd63;border-color:#64bd63}.switch.checked small{left:22px}.switch.wide.checked small{left:52px}.switch .switch-text{font-family:Arial,Helvetica,sans-serif;font-size:13px}.switch .off{display:block;position:absolute;right:10%;top:25%;z-index:0;color:#A9A9A9}.switch .on{display:none;z-index:0;color:#fff;position:absolute;top:25%;left:9%}.switch.checked .off{display:none}.switch.checked .on{display:block}.switch.disabled{opacity:.5;cursor:not-allowed} +.switch{background:#EFEFEF;border:1px solid #dfdfdf;position:relative;display:inline-block;box-sizing:content-box;overflow:visible;width:52px;height:30px;padding:0;margin:0;border-radius:20px;cursor:pointer;box-shadow:#dfdfdf 0 0 0 0 inset;transition:.3s ease-out all;-webkit-transition:.3s ease-out all;user-select:none;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;top:-1px}.switch:focus{outline:0}.switch.wide{width:80px}.switch small{background:#fff;border-radius:100%;box-shadow:0 1px 3px rgba(0,0,0,.4);width:30px;height:30px;position:absolute;top:0;left:0;transition:.3s ease-out all;-webkit-transition:.3s ease-out all}.switch.checked{background:#64BD63;border-color:#64BD63}.switch.blue.checked{background:#36B4F6;border-color:#36B4F6}.switch.red.checked{background:#DF3B3A;border-color:#DF3B3A}.switch.checked small{left:initial;right:0}.switch.wide.checked small{left:52px}.switch .switch-text{font-family:Arial,Helvetica,sans-serif;font-size:13px}.switch[on][off]{width:60px}.switch .off,.switch .on{position:absolute;font-weight:700;z-index:0}.switch .off{display:block;right:2px;top:25%;color:#949494;text-align:center}.switch .on,.switch.checked .off{display:none}.switch .on{color:#fff;top:25%;left:9%}.switch.checked .on{display:block}.switch.disabled{opacity:.5;cursor:not-allowed}