diff --git a/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html
index 5b514dc86..b61015674 100644
--- a/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html
+++ b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/addon-block-recentlyaccesseditems.html
@@ -2,13 +2,17 @@
{{ 'addon.block_recentlyaccesseditems.pluginname' | translate }}
-
-
-
-
-
-
-
+
diff --git a/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss
new file mode 100644
index 000000000..36d06eb54
--- /dev/null
+++ b/src/addon/block/recentlyaccesseditems/components/recentlyaccesseditems/recentlyaccesseditems.scss
@@ -0,0 +1,11 @@
+ion-app.app-root addon-block-recentlyaccesseditems .core-horizontal-scroll .card {
+ @include horizontal_scroll_item(80%, 250px, 300px);
+
+ [text-wrap] .label {
+ h2, p {
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/core/courses/components/course-progress/course-progress.scss b/src/core/courses/components/course-progress/course-progress.scss
index 95155e832..0805bdd31 100644
--- a/src/core/courses/components/course-progress/course-progress.scss
+++ b/src/core/courses/components/course-progress/course-progress.scss
@@ -93,41 +93,7 @@ ion-app.app-root core-courses-course-progress {
ion-app.app-root .core-horizontal-scroll core-courses-course-progress {
- min-width: 300px;
- align-self: stretch;
- .card-md {
- height: calc(100% - #{($card-md-margin-end + $card-md-margin-start)});
- }
- .card-ios {
- height: calc(100% - #{($card-ios-margin-end + $card-ios-margin-start)});
- }
- .card-wp {
- height: calc(100% - #{($card-wp-margin-end + $card-wp-margin-start)});
- }
-}
-
-@media (min-width: 576px) {
- ion-app.app-root .core-horizontal-scroll core-courses-course-progress {
- width: calc(50% - 0.5rem);
- }
-}
-
-@media (min-width: 840px) {
- ion-app.app-root .core-horizontal-scroll core-courses-course-progress {
- width: calc(33.33% - 0.5rem);
- }
-}
-
-@media (min-width: 1100px) {
- ion-app.app-root .core-horizontal-scroll core-courses-course-progress {
- width: calc(25% - 0.5rem);
- }
-}
-
-@media (min-width: 1360px) {
- ion-app.app-root .core-horizontal-scroll core-courses-course-progress {
- width: calc(20% - 0.5rem);
- }
+ @include horizontal_scroll_item(40%, 150px, 300px);
}
body.version-3-1 .core-course-thumb{
diff --git a/src/theme/variables.scss b/src/theme/variables.scss
index 974cc1380..0d6c2bad8 100644
--- a/src/theme/variables.scss
+++ b/src/theme/variables.scss
@@ -351,6 +351,28 @@ $core-question-state-incorrect-color: $red-light !default;
}
}
+@mixin horizontal_scroll_item($width, $min-width, $max-width) {
+ flex: 0 0 $width;
+ min-width: $min-width;
+ max-width: $max-width;
+ align-self: stretch;
+ display: block;
+
+ &.card-md, .card-md {
+ height: calc(100% - #{($card-md-margin-end + $card-md-margin-start)});
+ }
+ &.card-ios, .card-ios {
+ height: calc(100% - #{($card-ios-margin-end + $card-ios-margin-start)});
+ }
+ &.card-wp, .card-wp {
+ height: calc(100% - #{($card-wp-margin-end + $card-wp-margin-start)});
+ }
+ &.card {
+ margin-top: $card-md-margin-start;
+ margin-bottom: $card-md-margin-end;
+ }
+}
+
// Font Awesome
$fa-font-path: $font-path;
@import "font-awesome";