_checklists.scss 7.26 KB
Newer Older
1 2
// Studio - Course Settings
// ====================
3 4

.view-checklists {
5 6 7 8 9 10

  .content-primary, .content-supplementary {
    @include box-sizing(border-box);
  }

  .content-primary {
11
    @extend .ui-col-wide;
12 13 14 15
  }

  // checklists - general
  .course-checklist {
16
    @extend %ui-window;
17 18 19 20 21 22
    margin: 0 0 ($baseline*2) 0;

    &:last-child {
      margin-bottom: 0;
    }

23 24
    // visual status
    .viz-checklist-status {
25
      @extend %cont-text-hide;
26 27 28 29 30 31 32
      @include size(100%,($baseline/4));
      position: relative;
      display: block;
      margin: 0;
      background: $gray-l4;

      .viz-checklist-status-value {
33
        @include transition(width $tmg-s2 ease-in-out .25s);
34 35 36
        position: absolute;
        top: 0;
        left: 0;
37
        width: 0%;
38 39 40 41
        height: ($baseline/4);
        background: $green;

        .int {
42
          @extend %cont-text-sr;
43 44 45 46 47 48
        }
      }
    }
    // <span class="viz viz-checklist-status"><span class="viz value viz-checklist-status-value"><span class="int">0</span>% of checklist completed</span></span>

    // header/title
49 50
    header {
      @include clearfix();
51
      box-shadow: inset 0 -1px 1px $shadow-l1;
52
      margin-bottom: 0;
53
      border-bottom: 1px solid $gray-l3;
54 55 56
      padding: $baseline ($baseline*1.5);

      .checklist-title {
57
        @include transition(color $tmg-f2 ease-in-out 0s);
58
        width: flex-grid(6, 9);
59
        margin: 0;
60 61
        @include margin-right(flex-gutter());
        @include float(left);
62

63
        .ui-toggle-expansion {
64
          @include transition(all $tmg-f2 ease-in-out 0s);
65
          @extend %t-action1;
66 67
          display: inline-block;
          vertical-align: middle;
68
          @include margin-right($baseline/2);
69 70 71
          color: $gray-l4;
        }

72 73 74 75 76
        &.is-selectable {
          cursor: pointer;

          &:hover {
            color: $blue;
77 78 79 80

            .ui-toggle-expansion {
              color: $blue;
            }
81 82 83 84 85
          }
        }
      }

      .checklist-status {
86
        @extend %t-copy-sub1;
87
        width: flex-grid(3, 9);
88
        @include float(right);
89
        margin-top: ($baseline/2);
90
        @include text-align(right);
91
        color: $gray-l2;
Brian Talbot committed
92

93

94
        .icon-ok {
95
          @extend %t-icon4;
96 97 98 99
          display: inline-block;
          margin-left: ($baseline/2);
          color: $gray-l4;
        }
100 101

        .status-count {
102
          @extend %t-copy-base;
103
          @extend %t-strong;
104 105 106 107 108 109
          margin-left: ($baseline/4);
          margin-right: ($baseline/4);
          color: $gray-d3;
        }

        .status-amount {
110
          @extend %t-copy-base;
111
          @extend %t-strong;
112 113 114 115 116 117 118 119 120
          margin-left: ($baseline/4);
          color: $gray-d3;
        }
      }
    }

    // checklist actions
    .course-checklist-actions {
      @include clearfix();
121
      @include transition(border $tmg-f2 ease-in-out .25s);
122
      box-shadow: inset 0 1px 1px $shadow-l1;
123 124 125 126 127 128
      border-top: 1px solid $gray-l2;
      padding: $baseline ($baseline*1.5);
      background: $gray-l4;

      .action-primary {
        @include green-button();
129
        @include float(left);
130 131

        .icon-add {
132
          @extend %t-icon7;
133 134 135 136 137 138 139 140
          display: inline-block;
          vertical-align: middle;
          margin-right: ($baseline/4);
        }
      }

      .action-secondary {
        @include grey-button();
141
        @extend %t-action3;
142
        @extend %t-regular;
143
        @include float(right);
144 145

        .icon-delete {
146
          @extend %t-icon7;
147 148 149 150 151 152 153 154 155 156
          display: inline-block;
          vertical-align: middle;
          margin-right: ($baseline/4);
        }
      }
    }

    // state - collapsed
    &.is-collapsed {

157
      header {
158
        box-shadow: none;
159 160 161 162 163 164 165 166

        .checklist-title {

          .ui-toggle-expansion {
            @include transform(rotate(-90deg));
            @include transform-origin(50% 50%);
          }
        }
167 168
      }

169 170 171 172 173 174 175
      .list-tasks {
        height: 0;
      }
    }

    // state - completed
    &.is-completed {
Brian Talbot committed
176

177 178 179 180 181 182 183
      .viz-checklist-status {

        .viz-checklist-status-value {
          width: 100%;
        }
      }

184 185
      header {

186
        .checklist-title, .icon-caret-down {
187
          color: $green;
188 189 190
        }

        .checklist-status {
Brian Talbot committed
191

192
          .status-count, .status-amount, .icon-ok {
Brian Talbot committed
193
            color: $green;
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
          }
        }
      }
    }

    // state - not available
    .is-not-available {

    }
  }

  // list of tasks
  .list-tasks {
    height: auto;
    overflow: hidden;

    .task {
211
      @include transition(background $tmg-f2 ease-in-out 0s, border $tmg-f3 ease-in-out 0s);
212 213 214 215 216 217 218 219 220 221 222 223 224 225
      @include clearfix();
      position: relative;
      border-top: 1px solid $white;
      border-bottom: 1px solid $gray-l5;
      padding: $baseline ($baseline*1.5);
      background: $white;
      opacity: 1.0;


      &:last-child {
        margin-bottom: 0;
        border-bottom: none;
      }

226 227 228
      .task-input {
        display: inline-block;
        vertical-align: text-top;
229
        @include float(left);
230
        margin-top: ($baseline/2);
231
        @include margin-right(flex-gutter());
232 233 234
      }

      .task-details {
235
        @extend %t-strong;
236 237
        display: inline-block;
        vertical-align: text-top;
238
        @include float(left);
239
        width: flex-grid(6,9);
240

241
        .task-name {
242
          @include transition(color $tmg-f2 ease-in-out 0s);
243 244 245
          vertical-align: baseline;
          cursor: pointer;
          margin-bottom: 0;
Brian Talbot committed
246
        }
247

248
        .task-description {
249
          @extend %t-copy-sub1;
250
          @include transition(color $tmg-f2 ease-in-out 0s);
251 252
          color: $gray-l2;
        }
253

254
        .task-support {
255
          @extend %t-copy-sub2;
256
          @include transition(opacity $tmg-f2 ease-in-out 0s);
257
          opacity: 0.0;
258
          pointer-events: none;
259 260 261 262
        }
      }

      .task-actions {
263
        @include transition(opacity $tmg-f2 ease-in-out 0.25s);
264 265 266
        @include clearfix();
        display: inline-block;
        vertical-align: middle;
267
        @include float(right);
268 269
        width: flex-grid(2,9);
        margin: ($baseline/2) 0 0 flex-gutter();
270
        opacity: 0.0;
271 272 273 274
        pointer-events: none;
        text-align: right;

        .action-primary {
275 276
          @extend %btn-primary-blue;
          @extend %t-action3;
277 278 279
        }

        .action-secondary {
280
          @extend %t-action4;
281 282 283 284 285 286 287 288 289 290 291 292
          margin-top: ($baseline/2);
        }
      }

      // state - hover
      &:hover {
        background: $blue-l5;
        border-bottom-color: $blue-l4;
        border-top-color: $blue-l4;
        opacity: 1.0;

        .task-details {
293

294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312
          .task-support {
            opacity: 1.0;
            pointer-events: auto;
          }
        }

        .task-actions {
          opacity: 1.0;
          pointer-events: auto;
        }
      }


      // state - completed
      &.is-completed {
        background: $gray-l6;
        border-top-color: $gray-l5;
        border-bottom-color: $gray-l5;

313 314
        .task-name {
          color: $gray-l2;
315 316
        }

317 318 319
        .task-actions {

          .action-primary {
320 321
            @extend %btn-secondary-blue;
            @extend %t-action3;
322 323 324
          }
        }

325
        &:hover {
326 327 328
          background: $gray-l5;
          border-bottom-color: $gray-l4;
          border-top-color: $gray-l4;
329 330

          .task-details {
331
            opacity:1.0;
332 333 334 335 336 337 338
          }
        }
      }
    }
  }

  .content-supplementary {
339
    @extend .ui-col-narrow;
340
  }
Brian Talbot committed
341
}