aboutsummaryrefslogtreecommitdiffstats
path: root/public/projects/react-small-apps/apps/todos/src/views/TodoList/TodoList.scss
blob: 024fe3e96d1e3ffc0df76e74d748efeac496e140 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@use "../../sass/abstracts/placeholders";
@use "../../sass/abstracts/variables" as var;

.todos-actions {
  display: flex;
  gap: 1rem;
}

.todos-filters {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  gap: clamp(0.2rem, 1vw, 0.5rem);
  margin-top: 1rem
}

.todos-list {
  @extend %list-reset;
  border: 1px solid #000;
  margin-top: 1.5rem;

  &__item {
    display: flex;
    flex-flow: row wrap;
    align-items: center;
    gap: 1rem;
    padding: 1rem;

    &:not(:first-child) {
      border-top: 1px solid #000;
    }

    .form__label {
      margin: 0;
      letter-spacing: 0;
      text-transform: none;
    }

    .todo__title {
      background-image: linear-gradient(
        to top,
        transparent calc(50% - 3px),
        var.$done-color calc(50% - 3px),
        var.$done-color 50%,
        transparent 50%
      );
      background-size: 0 100%;
      background-repeat: no-repeat;
      margin-right: auto;
      transition: background-size 0.3s ease-in-out 0s;
    }

    &--done {
      .todo__title {
        background-size: 100% 100%;
      }
    }

    .btn {
      padding: 0.4rem 0.7rem;
    }
  }
}