summaryrefslogtreecommitdiff
path: root/web-ui/app/scss/_mixins.scss
blob: dfc0f2ec644d83247218d425ff940d9d12b53014 (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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
// SHARED MIXINS
@mixin btn-transition {
  @include transition-property(background-color);
  @include transition-duration(300ms);
  @include transition-timing-function(ease-out);
}

@mixin tooltip($top: 8px, $left: 40px) {
  background: rgba(0, 0, 0, 0.7);
  color: #FFF;
  position: absolute;
  z-index: 2;
  left: $left;
  top: $top;
  font-size: 0.8rem;
  padding: 2px 10px;
  white-space: nowrap;
  @include border-radius(2px);
}

@mixin tt-hint {
  .tt-hint {
    color: #999
  }
  .tt-dropdown-menu {
    width: 400px;
    margin-top: 6px;
    padding: 8px 0;
    background-color: $contrast;
    border: 1px solid darken($contrast, 5%);
  }
  .tt-suggestion {
    padding: 3px 10px;
    font-size: 18px;
    line-height: 24px;
    &.tt-cursor {
      background-color: #FFF;
    }
    p {
      margin: 0;
    }
  }
}

// FORM MIXINS
@mixin check-box {
  background-color: #FFF;
  border: 1px solid #CCC;
  padding: 7px;
  margin: 3px 0;
  cursor: pointer;
  display: inline-block;
  position: relative;
  @include border-radius(2px);
  @include appearance(none);

  &:focus {
    outline: none;
    border-color: #666;
  }

  &:active, &:checked:active {
  }

  &:checked {
    background-color: #EEE;
    border: 1px solid darken(#DDD, 10%);
    color: #333;
  }

  &:checked:after {
    content: '\2714';
    font-size: 1em;
    position: absolute;
    bottom: -2px;
    left: 1px;
    color: $secondary;
  }
}

@mixin tags {
  ul.tags {
    li {
      background: #DDD;
      display: inline;
      font-size: 0.55em;
      padding: 2px 3px;
      margin: 0 1px;
      position: relative;
      text-transform: uppercase;
      @include border-radius(2px);
      &[data-tag="drafts"] {
        color: $attention;
        background: #EEE;
      }
      &.tag:hover {
        text-decoration: line-through;
        cursor: pointer;
      }
      &.add-new {
        opacity: 0.6;
        transition: background-color 150ms ease-out;
        background: transparent;
        border: 1px solid #DDD;
        line-height: 0;
        padding: 1px 2px;
        @include border-radius(2px);
        &:hover {
          opacity: 1;
          background: #DDD;
        }
        i {
          &:before {
            vertical-align: middle;
          }
        }
      }
      &.new-tag {
        font-size: 0.7em;
        display: inline-block;
        padding: 0;
        background: transparent;
        input {
          display: inline;
          font-size: 1em;
          padding: 2px 5px;
          width: 120px;
          margin: 0;
        }
        @include tt-hint;
        .tt-dropdown-menu {
          width: 250px;
        }
      }
    }
  }
}

@mixin searching($top, $left, $color, $size){
  &.searching {
    &:after {
      font-family: FontAwesome;
      content: "\f002";
      font-size: $size;
      top: $top;
      left: $left;
      position: absolute;
      color: $color;
      text-shadow: -1px 0 $contrast, 0 1px $contrast, 1px 0 $contrast, 0 -1px $contrast;
    }
  }
}


@mixin recipients {

  .recipients-area {
    -webkit-appearance: none;
    background-color: white;
    font-family: inherit;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.898em;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    position: relative;

    .recipients-navigation-handler {
      z-index: -1;
      position: absolute;
    }

    .twitter-typeahead {
      flex: 1 1 50px;
    }

    input[type=text] {
      vertical-align: top;
      height: 35px;
      margin-left: 1px;
      font-size: 0.9em;
      width: 100%;
    }

    .fixed-recipient {
      display: inline-block;
      margin-right: -3px;
      flex: none;

      .recipient-value {
        &.selected {
          border: 1px solid #666666;
        }
        background-color: #F5F5F5;
        border: 1px solid #D9D9D9;
        border-radius: 2px;
        margin: 3px;
        padding: 5px;
      }
    }
  }
}

@include tt-hint;