From 8b2b6b548e3da54cf8ef39391251d2fb71e28664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 20 Jun 2018 09:43:26 +0200 Subject: [PATCH] MOBILE-2430 ux: Improve core-format-text image width --- src/app/app.scss | 22 ++++++++--------- src/core/course/components/module/module.scss | 24 ++++++++++++++----- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/src/app/app.scss b/src/app/app.scss index ae83c0189..540da822e 100644 --- a/src/app/app.scss +++ b/src/app/app.scss @@ -180,8 +180,8 @@ ion-datetime { } /** Format Text */ -core-format-text[maxHeight], *[core-format-text][maxHeight], -core-format-text[ng-reflect-max-height], *[core-format-text][ng-reflect-max-height] { +core-format-text[maxHeight], +core-format-text[ng-reflect-max-height] { display: block; position: relative; width: 100%; @@ -254,8 +254,8 @@ core-format-text[ng-reflect-max-height], *[core-format-text][ng-reflect-max-heig } } -core-format-text[singleLine="true"], *[core-format-text][singleLine="true"], -core-format-text[ng-reflect-single-line="true"], *[core-format-text][ng-reflect-single-line="true"] { +core-format-text[singleLine="true"], +core-format-text[ng-reflect-single-line="true"] { cursor: pointer; pointer-events: auto; white-space: nowrap; @@ -298,7 +298,7 @@ audio.core-media-adapt-width { } } -core-format-text, *[core-format-text] { +core-format-text { audio, video, a, iframe { pointer-events: auto; } @@ -329,12 +329,6 @@ core-format-text, *[core-format-text] { position: initial !important; } - // Images in ion-card have width 100% and display block. Remove that when the image is in core-format-text. - img { - width: initial; - display: inline; - } - .core-disable-media-adapt, .core-disable-media-adapt .core-media-adapt-width { max-width: none !important; @@ -345,6 +339,12 @@ core-format-text, *[core-format-text] { } } +// Images in ion-card have width 100% and display block. Remove that when the image is in core-format-text. +ion-card core-format-text img { + width: initial; + display: inline; +} + // Message item. .item-message { core-format-text > p:only-child { diff --git a/src/core/course/components/module/module.scss b/src/core/course/components/module/module.scss index ecc368e10..7c4540d61 100644 --- a/src/core/course/components/module/module.scss +++ b/src/core/course/components/module/module.scss @@ -51,9 +51,13 @@ core-course-module { } .md core-course-module { - .core-module-description, - .core-module-description .core-show-more { + .core-module-description { padding-right: $label-md-margin-end; + margin-bottom: $label-md-margin-bottom; + + .core-module-description .core-show-more { + padding-right: $label-md-margin-end; + } } a.core-course-module-handler .core-module-icon { @@ -77,9 +81,13 @@ core-course-module { } .ios core-course-module { - .core-module-description, - .core-module-description .core-show-more { + .core-module-description { padding-right: $label-ios-margin-end; + margin-bottom: $label-md-margin-bottom; + + .core-module-description .core-show-more { + padding-right: $label-ios-margin-end; + } } a.core-course-module-handler .core-module-icon { @@ -98,9 +106,13 @@ core-course-module { } .wp core-course-module { - .core-module-description, - .core-module-description .core-show-more { + .core-module-description { padding-right: ($item-wp-padding-end / 2); + margin-bottom: $label-md-margin-bottom; + + .core-module-description .core-show-more { + padding-right: ($item-wp-padding-end / 2); + } } a.core-course-module-handler .core-module-icon {