summaryrefslogtreecommitdiffstats
path: root/src/styles/input.scss
blob: a78bc185e9531c2ef1fc8a4bc7f4d551825d1fc6 (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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@import './config.scss';
@import './mixins.scss';

.theme__dark .franz-form {
  .franz-form__label {
    color: $dark-theme-text-color;
  }

  .franz-form__input-wrapper {
    background: $dark-theme-gray-dark;
    border: 1px solid $dark-theme-gray-light;
  }

  .franz-form__input {
    color: $dark-theme-gray-lightest;

    &::placeholder {
      color: $dark-theme-gray-lighter;
    }
  }

  .franz-form__input-prefix,
  .franz-form__input-suffix {
    background: $dark-theme-gray;
    color: $dark-theme-gray-lighter;
  }

  .franz-form__input-modifier {
    border-left: 1px solid $dark-theme-gray-light;
    color: $dark-theme-gray-lighter;
  }

  .franz-form__password-score {
    background: $dark-theme-gray-dark;
  }
}

.franz-form {
  .franz-form__field {
    display: flex;
    flex: 1;
    flex-direction: column;
    margin-bottom: 20px;

    &.has-error {
      .franz-form__input-wrapper,
      .franz-form__input-modifier {
        border-color: $theme-brand-danger;
      }
    }
  }

  .franz-form__label {
    @include formLabel();
  }

  .franz-form__error {
    color: $theme-brand-danger;
    margin-top: 10px;
    order: 2;
  }

  .franz-form__input-wrapper {
    background: $theme-gray-lightest;
    border: 1px solid $theme-gray-lighter;
    border-radius: $theme-border-radius-small;
    display: flex;
    flex-wrap: wrap;
    order: 1;
    width: 100%;
  }

  .franz-form__input {
    background: none;
    border: 0;
    color: $theme-gray;
    flex: 1;
    padding: 8px;
    width: 100%;

    &::placeholder {
      color: lighten($theme-gray-light, 10%);
    }
  }

  .franz-form__input-prefix,
  .franz-form__input-suffix {
    background: $theme-gray-lighter;
    color: $theme-gray-light;
    line-height: 35px;
    padding: 0 10px;
  }

  .franz-form__input-modifier {
    border-left: 1px solid $theme-gray-lighter;
    color: $theme-gray-light;
    font-size: 20px;
    padding: 0 20px;
  }

  .franz-form__password-score {
    background: $theme-gray-lighter;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    flex-basis: 100%;
    height: 5px;

    meter {
      border-bottom-left-radius: 3px;
      border-bottom-right-radius: 3px;
      display: block;
      height: 100%;
      overflow: hidden;
      width: 100%;

      &::-webkit-meter-bar {
        background: none;
      }
      &::-webkit-meter-even-less-good-value {
        background: $theme-brand-danger;
      }
      &::-webkit-meter-suboptimum-value {
        background: $theme-brand-warning;
      }
      &::-webkit-meter-optimum-value {
        background: $theme-brand-success;
      }
    }
  }
}