github.com/replicatedhq/ship@v0.55.0/web/init/src/scss/components/forms/input.scss (about)

     1  .Input {
     2    display: block;
     3    box-sizing: border-box;
     4    width: 100%;
     5    border: 1px solid #C4C8CA;
     6    border-radius: 4px;
     7    outline: 0;
     8    font-size: 14px;
     9    padding: 14px 12px 12px;
    10    font-weight: normal;
    11    line-height: normal;
    12    color: #323232;
    13    transition: border .2s;
    14  
    15    &.width-auto {
    16      width: auto;
    17    }
    18  
    19    &:active,
    20    &:focus {
    21      border-color: #4990E2;
    22    }
    23  
    24    &.small {
    25      font-size: 12px;
    26      padding: 7px 12px 8px;
    27    }
    28  
    29    &.has-error,
    30    &.has-error:focus,
    31    &.has-error:active {
    32      border-color: #EE5042;
    33    }
    34    &.is-disabled,
    35    &.readonly {
    36      user-select: none;
    37      cursor: not-allowed;
    38      background-color: #F8F8F8;
    39      border-color: #DFDFDF;
    40      color: #717171;
    41    }
    42  }
    43  .hidden-input {
    44    position: absolute;
    45    left: -1000px;
    46    top: -1000px;
    47    opacity: 0;
    48  }
    49  
    50  /* Switch style checkbox */
    51  
    52  input.Checkbox-toggle {
    53    opacity: .01;
    54    margin: 0;
    55    position: absolute;
    56    top: 0;
    57    bottom: 0;
    58    left: 0;
    59    right: 0;
    60    width: 100%;
    61    height: 100%;
    62    cursor: pointer;
    63    z-index: 2;
    64    cursor: pointer;
    65  }
    66  .Checkbox--switch {
    67    display: inline-block;
    68    border-radius: 100px;
    69    background: #ffffff;
    70    transition: all .2s ease;
    71    padding: 2px;
    72    width: 38px;
    73    height: 20px;
    74    max-height: 18px;
    75    position: relative;
    76    cursor: pointer;
    77    vertical-align: bottom;
    78    border: 1px solid #C4C8CA;
    79  }
    80  .Checkbox--switch.is-disabled {
    81    border: 1px solid #C4C8CA;
    82    opacity: 0.7;
    83  }
    84  .Checkbox--switch::before {
    85    display: none;
    86  }
    87  .Checkbox--switch::after {
    88    position: relative;
    89    display: block;
    90    content: "";
    91    top: -1px;
    92    width: 48%;
    93    height: 100%;
    94    background: #ffffff;
    95    border: 1px solid #C4C8CA;
    96    left: 0;
    97    cursor: pointer;
    98    border-radius: 50%;
    99    transition: left 0.2s ease-in-out, padding 0.2s ease, margin 0.2s ease;
   100    box-shadow: 0px 2px 2px 0px rgba(0,0,0,0.10), inset -2px -2px 2px 0px rgba(23,16,52,0.05);
   101    z-index: 1;
   102  }
   103  .Checkbox--switch::after:hover,
   104  .Checkbox--switch::after:active,
   105  .Checkbox--switch::after.is-checked {
   106    border: 1px solid #C4C8CA;
   107    background: #ffffff;
   108  }
   109  
   110  .Checkbox--switch.is-checked {
   111    background: #337AB7;
   112    border: 1px solid #337AB7;
   113  }
   114  .Checkbox--switch.is-checked::after {
   115    left: 49%;
   116  }