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


.u-field {
    padding: $baseline 0;
    border-bottom: 1px solid $gray-l5;
muzaffaryousaf committed
8 9 10 11 12 13 14
    border: 1px dashed transparent;

    &.mode-placeholder {
        border: 2px dashed transparent;
        border-radius: 3px;

        span {
15
            color: $gray;
muzaffaryousaf committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
        }

        &:hover {
            border: 2px dashed $link-color;

            span {
                color: $link-color;
            }
        }
    }

    &.editable-toggle.mode-display:hover {
        background-color: $m-blue-l4;
        border-radius: 3px;

        .message-can-edit {
            display: inline-block;
            color: $link-color;
        }

    }

    &.mode-hidden {
        display: none;
    }

    i {
      color: $gray-l2;
      vertical-align:text-bottom;
45
      @include margin-right(5px);
muzaffaryousaf committed
46 47 48 49 50
    }

    .message-can-edit {
        display: none;
    }
Usman Khalid committed
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72

    .message-error {
        color: $alert-color;
    }

    .message-validation-error {
        color: $warning-color;
    }

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

    .message-success {
        color: $success-color;
    }
}

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

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

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

92
    label, span {
Usman Khalid committed
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
        @include margin-left($baseline/2);
    }
}

.u-field-value {
    width: flex-grid(3, 12);
    display: inline-block;
    vertical-align: top;

    select, input {
        width: 100%;
    }
}

.u-field-message {
muzaffaryousaf committed
108
    @extend %t-copy-sub1;
Usman Khalid committed
109 110 111 112
    @include padding-left($baseline/2);
    width: flex-grid(6, 12);
    display: inline-block;
    vertical-align: top;
muzaffaryousaf committed
113
    color: $gray-l1;
Usman Khalid committed
114 115 116 117

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

    .u-field-message-help,
    .u-field-message-notification {
121
        color: $gray;
122
    }
Usman Khalid committed
123
}
124 125 126 127 128 129

.u-field-dropdown {
    &.mode-display select, &.mode-placeholder select {
        display: none;
    }

130 131 132 133 134 135
    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;
136 137
        font-weight: inherit;
        text-shadow: none;
138 139 140 141
    }


    &.mode-edit button.u-field-value-display {
142 143 144
        display: none;
    }
}