-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #828 from marineb/826-updates-alerts.scss-BEM-refa…
…ctor Updates .alerts.scss to be closer to BEM methodology.
- Loading branch information
Showing
1 changed file
with
50 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,63 @@ | ||
.flash { | ||
cursor: pointer; | ||
} | ||
|
||
.alert { | ||
.container { | ||
position: relative; | ||
} | ||
.alert { | ||
.container { | ||
position: relative; | ||
} | ||
|
||
&.alert-success .full-width-container, | ||
&.alert-success .fixed-flash-inner { | ||
background: $dark-blue; | ||
color: white; | ||
} | ||
// regular flash message full-width-container, displayed full width | ||
// almost on top of the page | ||
.full-width-container { | ||
margin: 0 -10px 10px; | ||
padding: 5px 10px 5px 35px; | ||
} | ||
|
||
&.alert-danger .full-width-container, | ||
&.alert-danger .fixed-flash-inner { | ||
background: $red; | ||
color: white; | ||
} | ||
// fixed positioned flash message container, displayed at the very top of the page | ||
// as wide as the text, centered | ||
.fixed-flash { | ||
position: fixed; | ||
top: 0; left: 0; right: 0; | ||
text-align: center; | ||
|
||
// regular flash message full-width-container, displayed full width | ||
// almost on top of the page | ||
.full-width-container { | ||
margin: 0 -10px 10px; | ||
padding: 5px 10px 5px 35px; | ||
} | ||
.fixed-flash-inner { | ||
border-radius: 4px; | ||
cursor: pointer; | ||
display: inline-block; | ||
padding: 5px 20px; | ||
margin-top: 15px; | ||
|
||
// fixed positioned flash message container, displayed at the very top of the page | ||
// as wide as the text, centered | ||
.fixed-flash { | ||
position: fixed; | ||
top: 0; left: 0; right: 0; | ||
text-align: center; | ||
|
||
.fixed-flash-inner { | ||
border-radius: 4px; | ||
cursor: pointer; | ||
display: inline-block; | ||
padding: 5px 20px; | ||
margin-top: 15px; | ||
|
||
@include fadeInDown(0.6s); | ||
|
||
p { | ||
margin: 5px 0; | ||
} | ||
@include fadeInDown(0.6s); | ||
|
||
p { | ||
margin: 5px 0; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.close { | ||
left: -20px; | ||
position: absolute; | ||
top: -3px; | ||
// ember-cli-flash package doesn't currently support custom classes. | ||
// but they will in their 2.0.0 release. https://github.com/poteto/ember-cli-flash/issues/99 | ||
// Once they do so, the following classes can be renamed after BEM standards (ex: .alert--state-danger) | ||
.alert-success { | ||
.full-width-container, | ||
.fixed-flash-inner { | ||
background: $dark-blue; | ||
color: white; | ||
} | ||
} | ||
|
||
.alert-danger { | ||
.full-width-container, | ||
.fixed-flash-inner { | ||
background: $red; | ||
color: white; | ||
} | ||
} | ||
|
||
.close { | ||
left: -20px; | ||
position: absolute; | ||
top: -3px; | ||
} |