From c40b792f5dc1902e532c50b1b969d5f069dacc52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Wed, 30 Mar 2022 14:20:12 +0200 Subject: [PATCH] MOBILE-3833 style: Normalize font-size on cards --- .../components/calendar/calendar.scss | 2 +- .../components/index/index.scss | 2 +- .../mod/scorm/components/index/index.scss | 2 +- .../mod/survey/components/index/index.scss | 2 +- src/addons/notifications/pages/list/list.scss | 2 +- .../pages/notification/notification.scss | 2 +- .../components/course-index/course-index.scss | 2 +- .../features/grades/pages/course/course.scss | 2 +- src/theme/components/format-text.scss | 2 +- src/theme/theme.base.scss | 24 ++++++++++--------- src/theme/theme.light.scss | 1 + 11 files changed, 23 insertions(+), 20 deletions(-) diff --git a/src/addons/calendar/components/calendar/calendar.scss b/src/addons/calendar/components/calendar/calendar.scss index b5c40fd10..1fe5598cc 100644 --- a/src/addons/calendar/components/calendar/calendar.scss +++ b/src/addons/calendar/components/calendar/calendar.scss @@ -17,7 +17,7 @@ .addon-calendar-months { background-color: var(--contrast-background); padding: 0; - font-size: 14px; + font-size: var(--text-size); } .addon-calendar-day { diff --git a/src/addons/mod/bigbluebuttonbn/components/index/index.scss b/src/addons/mod/bigbluebuttonbn/components/index/index.scss index 61fe68559..c6f581f99 100644 --- a/src/addons/mod/bigbluebuttonbn/components/index/index.scss +++ b/src/addons/mod/bigbluebuttonbn/components/index/index.scss @@ -1,3 +1,3 @@ ion-item > p[slot="end"] { - font-size: 14px; + font-size: var(--text-size); } diff --git a/src/addons/mod/scorm/components/index/index.scss b/src/addons/mod/scorm/components/index/index.scss index 636b83653..f8fc150a1 100644 --- a/src/addons/mod/scorm/components/index/index.scss +++ b/src/addons/mod/scorm/components/index/index.scss @@ -2,7 +2,7 @@ :host { .addon-mod_scorm-attempt-summary ion-item > p { - font-size: 14px; + font-size: var(--text-size); } .addon-mod_scorm-toc { diff --git a/src/addons/mod/survey/components/index/index.scss b/src/addons/mod/survey/components/index/index.scss index 6f557a178..bdb061e94 100644 --- a/src/addons/mod/survey/components/index/index.scss +++ b/src/addons/mod/survey/components/index/index.scss @@ -3,7 +3,7 @@ --even-background: var(--gray-200); .option-name { - font-size: 14px; + font-size: var(--text-size); } .addon-mod_survey-question { diff --git a/src/addons/notifications/pages/list/list.scss b/src/addons/notifications/pages/list/list.scss index da15978c7..e58fa6b12 100644 --- a/src/addons/notifications/pages/list/list.scss +++ b/src/addons/notifications/pages/list/list.scss @@ -5,7 +5,7 @@ ion-item { margin-top: 8px; margin-bottom: 8px; p.item-heading { - font-size: 14px; + font-size: var(--text-size); -webkit-line-clamp: 3; overflow: hidden; text-overflow: ellipsis; diff --git a/src/addons/notifications/pages/notification/notification.scss b/src/addons/notifications/pages/notification/notification.scss index 05f459851..7b0943218 100644 --- a/src/addons/notifications/pages/notification/notification.scss +++ b/src/addons/notifications/pages/notification/notification.scss @@ -17,7 +17,7 @@ .core-notification-body { core-format-text { - font-size: 14px; + font-size: var(--text-size); } h2 { diff --git a/src/core/features/course/components/course-index/course-index.scss b/src/core/features/course/components/course-index/course-index.scss index f4575ba22..7804c82f3 100644 --- a/src/core/features/course/components/course-index/course-index.scss +++ b/src/core/features/course/components/course-index/course-index.scss @@ -74,7 +74,7 @@ ion-item.item { } &.restricted { - font-size: 14px; + font-size: var(--text-size); } } } diff --git a/src/core/features/grades/pages/course/course.scss b/src/core/features/grades/pages/course/course.scss index bed25f18e..fff8ae719 100644 --- a/src/core/features/grades/pages/course/course.scss +++ b/src/core/features/grades/pages/course/course.scss @@ -98,7 +98,7 @@ } .expandable-status-icon { - font-size: 14px; + font-size: var(--text-size); @include margin-horizontal(0, 2px); @include core-transition(transform, 200ms); diff --git a/src/theme/components/format-text.scss b/src/theme/components/format-text.scss index 808d38dbc..d2a47fe51 100644 --- a/src/theme/components/format-text.scss +++ b/src/theme/components/format-text.scss @@ -210,7 +210,7 @@ core-rich-text-editor .core-rte-editor { p, ul, ol, li { // Normalize font-size inside formatted text. - font-size: 14px; + font-size: var(--text-size); } p { diff --git a/src/theme/theme.base.scss b/src/theme/theme.base.scss index 8f94c4e2e..ae32731e9 100644 --- a/src/theme/theme.base.scss +++ b/src/theme/theme.base.scss @@ -96,7 +96,7 @@ body { &.item-heading-secondary { @include margin(2px, 0); - font-size: 14px; + font-size: var(--text-size); font-weight: normal; line-height: normal; @@ -112,7 +112,7 @@ body { &.item-heading-secondary { @include margin(0, 0, 3px); - font-size: 14px; + font-size: var(--text-size); font-weight: normal; line-height: normal; @@ -222,7 +222,7 @@ ion-header { h1 + h2, h1 + .subheading { - font-size: 14px; + font-size: var(--text-size); font-weight: 400; } @@ -242,7 +242,7 @@ ion-header { h1 + h2, h1 + .subheading { - font-size: 14px; + font-size: var(--text-size); font-weight: 400; } } @@ -690,7 +690,7 @@ body.core-iframe-fullscreen ion-router-outlet { font-style: italic; margin-top: 0; margin-bottom: 10px; - font-size: 14px; + font-size: var(--text-size); } // Item styles @@ -714,7 +714,7 @@ body.core-iframe-fullscreen ion-router-outlet { } p.item-heading { - font-size: 14px; + font-size: var(--text-size); } p { @@ -767,6 +767,7 @@ body.core-iframe-fullscreen ion-router-outlet { --color: var(--color-shade); --inner-border-width: 0px; --border-width: 0px; + font-size: var(--text-size); ion-label, ion-label > p { --color: var(--color-shade); @@ -1227,6 +1228,7 @@ audio.core-media-adapt-width { } ion-item { + font-size: var(--text-size); --inner-border-width: 0px; } @@ -1283,7 +1285,7 @@ html.md div.fake-ion-item { h6 { @include margin(2px, 0); - font-size: 14px; + font-size: var(--text-size); font-weight: normal; line-height: normal; @@ -1291,7 +1293,7 @@ html.md div.fake-ion-item { p { @include margin(0, 0, 2px); - font-size: 14px; + font-size: var(--text-size); line-height: 20px; text-overflow: inherit; overflow: inherit; @@ -1299,7 +1301,7 @@ html.md div.fake-ion-item { } html.ios div.fake-ion-item { - font-size: 14px; + font-size: var(--text-size); @include padding(null, 10px, null, 20px); @include margin(10px, 8px, 10px, null); @@ -1320,14 +1322,14 @@ html.ios div.fake-ion-item { h5, h6 { @include margin(0, 0, 3px); - font-size: 14px; + font-size: var(--text-size); font-weight: normal; line-height: normal; } p { @include margin(0, 0, 2px 0); - font-size: 14px; + font-size: var(--text-size); line-height: normal; text-overflow: inherit; overflow: inherit; diff --git a/src/theme/theme.light.scss b/src/theme/theme.light.scss index 7478d0a85..14da0eacf 100644 --- a/src/theme/theme.light.scss +++ b/src/theme/theme.light.scss @@ -59,6 +59,7 @@ --huge-radius: 24px; --text-color: #{$text-color}; + --text-size: 14px; --background-color: #{$background-color}; --stroke: var(--gray-300);