|
1 | 1 | .flash { |
2 | 2 | cursor: pointer; |
| 3 | +} |
3 | 4 |
|
4 | | - .alert { |
5 | | - .container { |
6 | | - position: relative; |
7 | | - } |
| 5 | +.alert { |
| 6 | + .container { |
| 7 | + position: relative; |
| 8 | + } |
8 | 9 |
|
9 | | - &.alert-success .full-width-container, |
10 | | - &.alert-success .fixed-flash-inner { |
11 | | - background: $dark-blue; |
12 | | - color: white; |
13 | | - } |
| 10 | + // regular flash message full-width-container, displayed full width |
| 11 | + // almost on top of the page |
| 12 | + .full-width-container { |
| 13 | + margin: 0 -10px 10px; |
| 14 | + padding: 5px 10px 5px 35px; |
| 15 | + } |
14 | 16 |
|
15 | | - &.alert-danger .full-width-container, |
16 | | - &.alert-danger .fixed-flash-inner { |
17 | | - background: $red; |
18 | | - color: white; |
19 | | - } |
| 17 | + // fixed positioned flash message container, displayed at the very top of the page |
| 18 | + // as wide as the text, centered |
| 19 | + .fixed-flash { |
| 20 | + position: fixed; |
| 21 | + top: 0; left: 0; right: 0; |
| 22 | + text-align: center; |
20 | 23 |
|
21 | | - // regular flash message full-width-container, displayed full width |
22 | | - // almost on top of the page |
23 | | - .full-width-container { |
24 | | - margin: 0 -10px 10px; |
25 | | - padding: 5px 10px 5px 35px; |
26 | | - } |
| 24 | + .fixed-flash-inner { |
| 25 | + border-radius: 4px; |
| 26 | + cursor: pointer; |
| 27 | + display: inline-block; |
| 28 | + padding: 5px 20px; |
| 29 | + margin-top: 15px; |
27 | 30 |
|
28 | | - // fixed positioned flash message container, displayed at the very top of the page |
29 | | - // as wide as the text, centered |
30 | | - .fixed-flash { |
31 | | - position: fixed; |
32 | | - top: 0; left: 0; right: 0; |
33 | | - text-align: center; |
34 | | - |
35 | | - .fixed-flash-inner { |
36 | | - border-radius: 4px; |
37 | | - cursor: pointer; |
38 | | - display: inline-block; |
39 | | - padding: 5px 20px; |
40 | | - margin-top: 15px; |
41 | | - |
42 | | - @include fadeInDown(0.6s); |
43 | | - |
44 | | - p { |
45 | | - margin: 5px 0; |
46 | | - } |
| 31 | + @include fadeInDown(0.6s); |
| 32 | + |
| 33 | + p { |
| 34 | + margin: 5px 0; |
47 | 35 | } |
48 | 36 | } |
49 | 37 | } |
| 38 | +} |
50 | 39 |
|
51 | | - .close { |
52 | | - left: -20px; |
53 | | - position: absolute; |
54 | | - top: -3px; |
| 40 | +// ember-cli-flash package doesn't currently support custom classes. |
| 41 | +// but they will in their 2.0.0 release. https://github.com/poteto/ember-cli-flash/issues/99 |
| 42 | +// Once they do so, the following classes can be renamed after BEM standards (ex: .alert--state-danger) |
| 43 | +.alert-success { |
| 44 | + .full-width-container, |
| 45 | + .fixed-flash-inner { |
| 46 | + background: $dark-blue; |
| 47 | + color: white; |
55 | 48 | } |
56 | 49 | } |
| 50 | + |
| 51 | +.alert-danger { |
| 52 | + .full-width-container, |
| 53 | + .fixed-flash-inner { |
| 54 | + background: $red; |
| 55 | + color: white; |
| 56 | + } |
| 57 | +} |
| 58 | + |
| 59 | +.close { |
| 60 | + left: -20px; |
| 61 | + position: absolute; |
| 62 | + top: -3px; |
| 63 | +} |
0 commit comments