mahaplatform/reframe

View on GitHub
src/components/form/style.less

Summary

Maintainability
Test Coverage
.reframe-form {
  display: flex;
  flex: 1;
  position: relative;
}
.reframe-modal-panel-body {
  display: flex;
  .ui.form {
    flex: 1;
    .scrollable();
  }
}
.reframe-form-panels > div > div {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
}
.reframe-modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: fadeout(@black, 98);
}

.reframe-form {
  position: relative;
  .ui.segment {
    position: static;
    padding: 0;
    margin: 0 0 1px;
    & > h4 {
      border-top: 1px solid fadeout(@black, 90);
      border-bottom: 1px solid fadeout(@black, 90);
      background-color: fadeout(@black, 95);
      padding: 0.8em;
      font-size: 0.9em;
      line-height: 1em;
      color: fadeout(@black, 50);
      margin: 0;
      text-transform: uppercase;
      text-align: center;
    }
    &.collapsing {
      cursor: pointer;
      &.collapsed .section {
        display: none;
      }
    }
      input, textarea {
          color: lighten(@black, 40) !important;
      }
      textarea {
          line-height: 1.5em !important;
      }
  }
  .section {
    padding: 1em;
    & > .field {
      line-height: 1.6em;
      margin-bottom: 1.2em;
      & > label {
        margin-bottom: 0;
      }
      &:last-child {
        margin-bottom: 0;
      }
    }
  }
  .instructions {
    color: fadeout(@black, 40);
    line-height: 1.6em;
    margin-bottom: 1.6em;
    ul {
      padding: 0 1.6em;
    }
  }
  :disabled  {
    background-color: #F0F0F0 !important;
  }
  .error {
    input, textarea, select, .lookup-field, .dropdown {
      border-color: #DB2828 !important;
      background-color: #FFFFFF !important;
      .border-radius(5px 5px 0 0) !important;
    }
    & > label {
      color: #DB2828 !important;
    }
    .error-message {
      background-color: #DB2828 !important;
      color: #FFF !important;
      padding: 5px 10px;
      font-size: .8em;
      .border-radius(0 0 5px 5px) !important;
    }
    .ui.right {
      input {
        .border-radius(5px 0 0 0) !important;
      }
      .ui.label {
        .border-radius(0 5px 0 0) !important;
      }
    }
    .ui.left {
      input {
        .border-radius(0 5px 0 0) !important;
      }
      .ui.label {
        .border-radius(5px 0 0 0) !important;
      }
    }
    .ui.label {
      background-color: #DB2828 !important;
      color: #FFF !important;
    }
  }
}