about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/styles/components/doodle.scss
blob: 52c7cd54a02421df6ae1bc54618f673fc0562371 (plain) (blame)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
$doodle-background: #d9e1e8;

.doodle-modal {
  @extend .boost-modal;

  width: unset;
}

.doodle-modal__container {
  background: $doodle-background;
  text-align: center;
  line-height: 0; // remove weird gap under canvas
  canvas {
    border: 5px solid $doodle-background;
  }
}

.doodle-modal__action-bar {
  @extend .boost-modal__action-bar;

  .filler {
    flex-grow: 1;
    margin: 0;
    padding: 0;
  }

  .doodle-toolbar {
    line-height: 1;
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    justify-content: space-around;

    &.with-inputs {
      label {
        display: inline-block;
        width: 70px;
        text-align: right;
        margin-right: 2px;
      }

      input[type='number'],
      input[type='text'] {
        width: 40px;
      }

      span.val {
        display: inline-block;
        text-align: left;
        width: 50px;
      }
    }
  }

  .doodle-palette {
    padding-right: 0 !important;
    border: 1px solid black;
    line-height: 0.2rem;
    flex-grow: 0;
    background: white;

    button {
      appearance: none;
      width: 1rem;
      height: 1rem;
      margin: 0;
      padding: 0;
      text-align: center;
      color: black;
      text-shadow: 0 0 1px white;
      cursor: pointer;
      box-shadow: inset 0 0 1px rgba(white, 0.5);
      border: 1px solid black;
      outline-offset: -1px;

      &.foreground {
        outline: 1px dashed white;
      }

      &.background {
        outline: 1px dashed red;
      }

      &.foreground.background {
        outline: 1px dashed red;
        border-color: white;
      }
    }
  }
}