Commit a048c955fda4de68a4e73e3fe2a4861e245926b8
1 parent
a5838524
Exists in
master
and in
4 other branches
Add JS behaviors
Showing
4 changed files
with
29 additions
and
0 deletions
Show diff stats
app/assets/javascripts/behaviours/details_behavior.coffee
0 → 100644
app/assets/javascripts/behaviours/toggler_behaviour.coffee
0 → 100644
@@ -0,0 +1,14 @@ | @@ -0,0 +1,14 @@ | ||
1 | +// Details | ||
2 | +//-------- | ||
3 | +.js-details-container .content { display: none; } | ||
4 | +.js-details-container .content.hide { display: block; } | ||
5 | +.js-details-container.open .content { display: block; } | ||
6 | +.js-details-container.open .content.hide { display: none; } | ||
7 | + | ||
8 | + | ||
9 | +// Toggler | ||
10 | +//-------- | ||
11 | +.js-toggler-container .turn-on { display: inline-block; } | ||
12 | +.js-toggler-container .turn-off { display: none; } | ||
13 | +.js-toggler-container.on .turn-on { display: none; } | ||
14 | +.js-toggler-container.on .turn-off { display: inline-block; } |
app/assets/stylesheets/main.scss
@@ -84,6 +84,11 @@ $baseLineHeight: 18px !default; | @@ -84,6 +84,11 @@ $baseLineHeight: 18px !default; | ||
84 | @import "common.scss"; | 84 | @import "common.scss"; |
85 | 85 | ||
86 | /** | 86 | /** |
87 | + * Styles necessary to support JS behaviours. | ||
88 | + */ | ||
89 | +@import "behaviors.scss"; | ||
90 | + | ||
91 | +/** | ||
87 | * Styles related to specific part of app | 92 | * Styles related to specific part of app |
88 | */ | 93 | */ |
89 | @import "sections/commits.scss"; | 94 | @import "sections/commits.scss"; |