_fields.scss 2.33 KB
Newer Older
Usman Khalid committed
1 2 3 4 5
// lms - shared - fields
// ====================


.u-field {
6 7 8
  padding: $baseline 0;
  border-bottom: 1px solid $gray-l5;
  border: 1px dashed transparent;
muzaffaryousaf committed
9

10 11 12
  &.mode-placeholder {
    border: 2px dashed transparent;
    border-radius: 3px;
muzaffaryousaf committed
13

14 15 16
    span {
      color: $gray-d1;
    }
muzaffaryousaf committed
17

18 19
    &:hover {
      border: 2px dashed $link-color;
muzaffaryousaf committed
20

21 22 23
      span {
        color: $link-color;
      }
muzaffaryousaf committed
24
    }
25
  }
muzaffaryousaf committed
26

27 28 29
  &.editable-toggle.mode-display:hover {
    background-color: $m-blue-l4;
    border-radius: 3px;
muzaffaryousaf committed
30

31 32 33
    .message-can-edit {
      display: inline-block;
      color: $link-color;
muzaffaryousaf committed
34 35
    }

36
  }
muzaffaryousaf committed
37

38 39 40
  &.mode-hidden {
    display: none;
  }
muzaffaryousaf committed
41

42 43 44
  i {
    color: $gray-l2;
    vertical-align:text-bottom;
Usman Khalid committed
45

46 47
    @include margin-right(5px);
  }
Usman Khalid committed
48

49 50 51
  .message-can-edit {
    display: none;
  }
Usman Khalid committed
52

53 54 55
  .message-error {
    color: $alert-color;
  }
Usman Khalid committed
56

57 58 59 60 61 62 63 64 65
  .message-validation-error {
    color: $warning-color;
  }

  .message-in-progress {
    color: $gray-d2;
  }

  .message-success {
66
    color: theme-color("success");
67
  }
Usman Khalid committed
68 69 70
}

.u-field-readonly {
71 72 73 74 75 76 77
  input[type="text"],
  input[type="text"]:focus {
    background-color: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
  }
Usman Khalid committed
78 79
}

muzaffaryousaf committed
80
.u-field-icon {
81 82
  width: $baseline;
  color: $gray-l2;
muzaffaryousaf committed
83 84
}

Usman Khalid committed
85
.u-field-title {
86 87 88 89 90 91 92 93 94 95
  width: flex-grid(3, 12);
  display: inline-block;
  color: $gray-d1;
  vertical-align: top;
  margin-bottom: 0;
  -webkit-font-smoothing: antialiased;

  label, span {
    @include margin-left($baseline/2);
  }
Usman Khalid committed
96 97 98
}

.u-field-value {
99 100 101
  width: flex-grid(3, 12);
  display: inline-block;
  vertical-align: top;
Usman Khalid committed
102

103 104 105
  select, input {
    width: 100%;
  }
Usman Khalid committed
106 107 108
}

.u-field-message {
109
  @extend %t-copy-sub1;
110

111
  @include padding-left($baseline/2);
112

113 114 115 116
  width: flex-grid(6, 12);
  display: inline-block;
  vertical-align: top;
  color: $gray-l1;
117

118 119 120
  i {
    @include margin-right($baseline/4);
  }
121

122 123 124 125 126
  .u-field-message-help,
  .u-field-message-notification {
    color: $gray;
  }
}
127

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
.u-field-dropdown {
  &.mode-display select, &.mode-placeholder select {
    display: none;
  }

  button.u-field-value-display, button.u-field-value-display:active, button.u-field-value-display:focus, button.u-field-value-display:hover {
    border-color: transparent;
    background: transparent;
    padding: 0;
    box-shadow: none;
    font-size: inherit;
    font-weight: inherit;
    text-shadow: none;
  }


  &.mode-edit button.u-field-value-display {
    display: none;
  }
147
}