aboutsummaryrefslogtreecommitdiffstats
path: root/components/textarea/_textarea.scss
blob: a666d54e8eb638b055d403891247db84c5a23c6e (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
.sdc-textarea {
  margin-bottom: 10px;

  .sdc-textarea__label {
    margin-bottom: 5px;
    display: block;
    @include body-3-emphasis;

    &.required::before {
      content: '*';
      color: $red;
      margin: 0 4px 0 0;
    }
  }

  .sdc-textarea__textarea {
    @include box-sizing;
    padding: 0 10px;
    width: 100%;
    border: solid 1px $light-gray;
    border-radius:2px;
    color: $dark-gray;

    &.error, &.error:focus, &.error:disabled  {
      border: solid 1px $red;
      color: $red;
      outline: none;
    }

    &:read-only{
      border: none;
      outline: none;
      color: $text-black
    }
    &:-moz-read-only { /* For Firefox */
      border: none;
      outline: none;
      color: $text-black
    }

    &:focus {
      border-color: $blue;
      outline: 0 none;
      color: $text-black;
    }

    &:disabled {
      background: $light-silver;
      color: $gray;
    }

    &::-webkit-input-placeholder /* Chrome/Opera/Safari */  {
      color: $gray;
      @include base-font-italic;
    }
    &::-moz-placeholder  /* Firefox 19+ */  {
      color: $gray;
      @include base-font-italic;
    }
    &:-moz-placeholder  /* Firefox 18- */  {
      color: $gray;
      @include base-font-italic;
    }
    &:-ms-input-placeholder  /* IE 10+ */
    {
      color: $gray;
      @include base-font-italic;
    }
  }

  .sdc-label__error{
    margin-top: 2px;
    margin-left: 2px;
    @include body-3;
  }

}