Commit 7adf531e4a337779173ad2d8e4f620e872ff7dfa
1 parent
51159c6c
Exists in
master
and in
4 other branches
fix odd/even sub-section styles
Showing
2 changed files
with
4 additions
and
10 deletions
Show diff stats
src/app/pages/programas/programa.html
| ... | ... | @@ -230,7 +230,7 @@ |
| 230 | 230 | </div> |
| 231 | 231 | <div ng-if="pagePrograma.proposalsTopRated"> |
| 232 | 232 | <div ng-repeat="proposal in pagePrograma.proposalsTopRated"> |
| 233 | - <div class="sub-section sub-section-{{::proposal.id}}"> | |
| 233 | + <div class="sub-section sub-section-{{::proposal.id}}" ng-class="{'sub-section-even': ( ($index+1) % 2 === 0), 'sub-section-odd': ( ($index+1) % 2 === 1)}"> | |
| 234 | 234 | <div class="container"> |
| 235 | 235 | <div class="row"> |
| 236 | 236 | <div class="col-sm-4 col-md-3"> | ... | ... |
src/app/pages/programas/programas.scss
| ... | ... | @@ -262,15 +262,9 @@ |
| 262 | 262 | h3 { |
| 263 | 263 | font-weight: bold; |
| 264 | 264 | } |
| 265 | - .sub-section{ | |
| 266 | - &:nth-child(odd) { | |
| 267 | - background-color: #f1f1f1; | |
| 268 | - } | |
| 269 | - | |
| 270 | - &:nth-child(even) { | |
| 271 | - background-color: #ffffff; | |
| 272 | - } | |
| 273 | - } | |
| 265 | + | |
| 266 | + .sub-section-odd {background-color: #f1f1f1; } | |
| 267 | + .sub-section-even {background-color: #ffffff; } | |
| 274 | 268 | |
| 275 | 269 | .gov-response { |
| 276 | 270 | background-color: #e1e1e1; | ... | ... |