diff --git a/src/addon/block/timeline/components/events/events.scss b/src/addon/block/timeline/components/events/events.scss index 1c722ae93..76da48072 100644 --- a/src/addon/block/timeline/components/events/events.scss +++ b/src/addon/block/timeline/components/events/events.scss @@ -1,19 +1,7 @@ ion-app.app-root core-courses-course-progress { - .core-course-module-handler.item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - - .core-course-module-handler.item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - - .core-course-module-handler.item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - - .core-course-module-handler.item:last-child .item-inner { - border-bottom: 0; + .core-course-module-handler.item { + @include core-items(); } .core-course-module-handler.item .item-heading:first-child { diff --git a/src/addon/mod/workshop/components/assessment/assessment.scss b/src/addon/mod/workshop/components/assessment/assessment.scss index bacc18ee2..f7d3ed7f2 100644 --- a/src/addon/mod/workshop/components/assessment/assessment.scss +++ b/src/addon/mod/workshop/components/assessment/assessment.scss @@ -1,35 +1,4 @@ -ion-app.app-root addon-mod-workshop-assessment { - .item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - - .item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - - .item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - - &:last-child .item .item-inner { - border-bottom: 0; - } -} - +ion-app.app-root addon-mod-workshop-assessment, ion-app.app-root .card.with-borders addon-mod-workshop-assessment { - .item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - - .item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - - .item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - - &:last-child .item .item-inner { - border-bottom: 0; - } + @include core-as-items(); } \ No newline at end of file diff --git a/src/addon/mod/workshop/components/submission/submission.scss b/src/addon/mod/workshop/components/submission/submission.scss index 2dac5ff4e..6775a13ac 100644 --- a/src/addon/mod/workshop/components/submission/submission.scss +++ b/src/addon/mod/workshop/components/submission/submission.scss @@ -1,35 +1,4 @@ -ion-app.app-root addon-mod-workshop-submission { - .item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - - .item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - - .item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - - &:last-child .item .item-inner { - border-bottom: 0; - } -} - +ion-app.app-root addon-mod-workshop-submission, ion-app.app-root .card.with-borders addon-mod-workshop-submission { - .item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - - .item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - - .item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - - &:last-child .item .item-inner { - border-bottom: 0; - } + @include core-as-items(); } \ No newline at end of file diff --git a/src/app/app.ios.scss b/src/app/app.ios.scss index 3a6213ed1..a2f7085af 100644 --- a/src/app/app.ios.scss +++ b/src/app/app.ios.scss @@ -70,15 +70,6 @@ ion-app.app-root.ios { } } - // Recover borders on items inside cards. - .card-ios.with-borders .item-ios.item-block .item-inner { - border-bottom: $hairlines-width solid $list-ios-border-color; - } - .card-ios.with-borders .item-ios:last-child .item-inner { - border-bottom: 0; - } - - .radio-ios .radio-icon { @include position(0, null, null, 0); @include margin(0); diff --git a/src/app/app.md.scss b/src/app/app.md.scss index c718b691c..8fe5fb096 100644 --- a/src/app/app.md.scss +++ b/src/app/app.md.scss @@ -48,14 +48,6 @@ ion-app.app-root.md { } } - // Recover borders on items inside cards. - .card-md.with-borders .item-md.item-block .item-inner { - border-bottom: 1px solid $list-md-border-color; - } - .card-md.with-borders .item-md:last-child .item-inner { - border-bottom: 0; - } - .action-sheet-md { .action-sheet-title, .action-sheet-container > .action-sheet-group:first-child { diff --git a/src/app/app.scss b/src/app/app.scss index 839ceb389..3160c9009 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -96,6 +96,16 @@ ion-app.app-root { border: 0; } + // Recover borders on items inside cards. + .card.with-borders .core-as-item, + .core-as-item { + @include core-as-items(); + } + + .card.with-borders .item { + @include core-items(); + } + .core-oauth-icon, .item.core-oauth-icon, .list .item.core-oauth-icon { min-height: 32px; img, .label { diff --git a/src/app/app.wp.scss b/src/app/app.wp.scss index f8156ec7c..e64c3726a 100644 --- a/src/app/app.wp.scss +++ b/src/app/app.wp.scss @@ -47,12 +47,4 @@ ion-app.app-root.wp { @include padding(null, null, null, 15px * $i + $item-wp-padding-start); } } - - // Recover borders on items inside cards. - .card-wp.with-borders .item-wp.item-block .item-inner { - border-bottom: 1px solid $list-wp-border-color; - } - .card-wp.with-borders .item-wp:last-child .item-inner { - border-bottom: 0; - } } \ No newline at end of file diff --git a/src/components/file/file.scss b/src/components/file/file.scss index 0c7c1f2cb..a39dcde10 100644 --- a/src/components/file/file.scss +++ b/src/components/file/file.scss @@ -13,4 +13,8 @@ ion-app.app-root { core-file + core-file > .item-wp.item-block > .item-inner { border-top: 1px solid $list-wp-border-color; } + + core-file > .item.item-block > .item-inner { + border-bottom: 0; + } } \ No newline at end of file diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 3e0d624a2..f3fbdfd3e 100644 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -433,6 +433,42 @@ $core-question-state-incorrect-color: $red-light !default; } } +@mixin core-as-items() { + .item-md.item-block > .item-inner { + border-bottom: 1px solid $list-md-border-color; + } + + .item-ios.item-block > .item-inner { + border-bottom: $hairlines-width solid $list-ios-border-color; + } + + .item-wp.item-block > .item-inner { + border-bottom: 1px solid $list-wp-border-color; + } + + &:last-child .item > .item-inner { + border-bottom: 0; + } +} + +@mixin core-items() { + &.item-md.item-block > .item-inner { + border-bottom: 1px solid $list-md-border-color; + } + + &.item-ios.item-block > .item-inner { + border-bottom: $hairlines-width solid $list-ios-border-color; + } + + &.item-wp.item-block > .item-inner { + border-bottom: 1px solid $list-wp-border-color; + } + + &:last-child > .item-inner { + border-bottom: 0; + } +} + // Font Awesome $fa-font-path: $font-path; @import "font-awesome";