Warning, /webapps/ocs-webserver/httpdocs/theme/flatui/less/modules/switch.less is written in an unsupported language. File is not indexed.

0001 /* ============================================================
0002  * bootstrapSwitch v1.3 by Larentis Mattia @spiritualGuru
0003  * http://www.larentis.eu/switch/
0004  * ============================================================
0005  * Licensed under the Apache License, Version 2.0
0006  * http://www.apache.org/licenses/LICENSE-2.0
0007  * ============================================================ */
0008 
0009 .has-switch {
0010   border-radius: @switch-border-radius;
0011   display: inline-block;
0012   cursor: pointer;
0013   line-height: @base-line-height;
0014   overflow: hidden;
0015   position: relative;
0016   text-align: left;
0017   width: @switch-width;
0018   .mask(~"url('../img/switch/mask.png') 0 0 no-repeat");
0019   .user-select(none);
0020 
0021   &.deactivate {
0022     .opacity(50);
0023     cursor: default !important;
0024     label, span {
0025       cursor: default !important;
0026     }
0027   }
0028 
0029   > div {
0030     width: 162%;
0031     position: relative;
0032     top: 0;
0033 
0034     &.switch-animate {
0035       .transition(left 0.25s ease-out);
0036     }
0037 
0038     &.switch-off {
0039       left: -63%;
0040 
0041       label {
0042         background-color: mix(@base, white, 63%);
0043         border-color: @lightgray;
0044         .box-shadow(-1px 0 0 fade(@inverse, 50%));
0045       }
0046     }
0047 
0048     &.switch-on {
0049       left: 0%;
0050 
0051       label {
0052         background-color: @firm;
0053       }
0054     }
0055   }
0056 
0057   input[type=checkbox] {
0058     display: none;
0059   }
0060 
0061   span {
0062     cursor: pointer;
0063     font-size: @base-font-size * 1.071;
0064     font-weight: 700;
0065     float: left;
0066     height: 29px;
0067     line-height: 19px;
0068     margin: 0;
0069     padding-bottom: 6px;
0070     padding-top: 5px;
0071     position: relative;
0072     text-align: center;
0073     width: 50%;
0074     z-index: 1;
0075     .box-sizing();
0076     .transition(.25s ease-out);
0077 
0078     &.switch-left {
0079       border-radius: @switch-border-radius 0 0 @switch-border-radius;
0080       background-color: @base;
0081       color: @firm;
0082       border-left: 1px solid transparent;
0083     }
0084 
0085     &.switch-right {
0086       border-radius: 0 @switch-border-radius @switch-border-radius 0;
0087       background-color: @lightgray;
0088       color: @inverse;
0089       text-indent: 7px;
0090 
0091       [class*="fui-"] {
0092         text-indent: 0;
0093       }
0094     }
0095   }
0096 
0097   label {
0098     border: 4px solid @base;
0099     border-radius: 50%;
0100     float: left;
0101     height: 21px;
0102     margin: 0 -15px 0 -14px;
0103     padding: 0;
0104     position: relative;
0105     vertical-align: middle;
0106     width: 21px;
0107     z-index: 100;
0108     .transition(.25s ease-out);
0109   }
0110 }
0111 
0112 // Square Switch
0113 // -------------------------------
0114 .switch-square {
0115   border-radius: 6px;
0116   .mask(~"url('../img/switch/mask.png') 0 0 no-repeat");
0117 
0118   > div {
0119     &.switch-off {
0120       label {
0121         border-color: mix(@base, white, 63%);
0122         border-radius: 6px 0 0 6px;
0123       }
0124     }
0125   }
0126 
0127   span {
0128     &.switch-left {
0129       border-radius: 6px 0 0 6px;
0130       [class*="fui-"] {
0131         text-indent: -10px;
0132       }
0133     }
0134 
0135     &.switch-right {
0136       border-radius: 0 6px 6px 0;
0137       [class*="fui-"] {
0138         text-indent: 5px;
0139       }
0140     }
0141   }
0142 
0143   label {
0144     border-radius: 0 6px 6px 0;
0145     border-color: @firm;
0146   }
0147 }
0148