Moodle App Remote Themes Upgrade Guide: Difference between revisions
- Moodle App Overview
- Moodle App Development Guide
- Moodle App Plugins Development Guide
- Moodle App Remote Themes
- Moodle App Customisation
- Setting up your development environment
- Using the Moodle App in a browser
- Moodle App Translation
- Moodle App FAQ
- Moodle App Development Process
- Moodle App Release Notes
Upgrade from previous versions:
- See all Moodle App pages
- See pages for Moodle App Ionic 5 (current)
- See pages for Moodle App Ionic 3 (legacy)
- See pages Moodle App Ionic 1 (legacy)
- See pages for Moodle App Phonegap (legacy)
For user documentation see Moodle Mobile
David Mudrak (talk | contribs) m Text replacement - "</code>" to "</syntaxhighlight>" |
David Mudrak (talk | contribs) m Text replacement - "<code (.*)>" to "<syntaxhighlight lang="$1">" |
||
| Line 30: | Line 30: | ||
Example, toolbar background color on ios dark mode: | Example, toolbar background color on ios dark mode: | ||
< | <syntaxhighlight lang="css"> | ||
html.ios body.ionic5.dark { | html.ios body.ionic5.dark { | ||
--core-header-toolbar-background: red; | --core-header-toolbar-background: red; | ||
| Line 47: | Line 47: | ||
You can style “native” part this way: | You can style “native” part this way: | ||
< | <syntaxhighlight lang="css"> | ||
ion-button::part(native) { | ion-button::part(native) { | ||
text-transform: none; | text-transform: none; | ||
| Line 55: | Line 55: | ||
You can change all buttons background, or just the ones with an specific class: | You can change all buttons background, or just the ones with an specific class: | ||
< | <syntaxhighlight lang="css"> | ||
ion-button { | ion-button { | ||
--background: red; | --background: red; | ||
| Line 72: | Line 72: | ||
The main color in the app is Moodle orange, but you can change it just using: | The main color in the app is Moodle orange, but you can change it just using: | ||
< | <syntaxhighlight lang="css"> | ||
--brand-color: red;</syntaxhighlight> | --brand-color: red;</syntaxhighlight> | ||
| Line 101: | Line 101: | ||
===Page background=== | ===Page background=== | ||
< | <syntaxhighlight lang="css"> | ||
--background-color: white; | --background-color: white; | ||
--ion-background-color-rgb: 255, 255, 255; // Need to be translated to rgb.</syntaxhighlight> | --ion-background-color-rgb: 255, 255, 255; // Need to be translated to rgb.</syntaxhighlight> | ||
===Main text color=== | ===Main text color=== | ||
< | <syntaxhighlight lang="css"> | ||
--text-color: black; | --text-color: black; | ||
--ion-text-color-rgb: 0, 0, 0; // Need to be translated to rgb.</syntaxhighlight> | --ion-text-color-rgb: 0, 0, 0; // Need to be translated to rgb.</syntaxhighlight> | ||
Color used in categories and secondary content. | Color used in categories and secondary content. | ||
< | <syntaxhighlight lang="css"> | ||
--subdued-text-color: gray;</syntaxhighlight> | --subdued-text-color: gray;</syntaxhighlight> | ||
Links color | Links color | ||
< | <syntaxhighlight lang="css"> | ||
--core-link-color: blue;</syntaxhighlight> | --core-link-color: blue;</syntaxhighlight> | ||
| Line 123: | Line 123: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css"> | ||
.toolbar-background-md, | .toolbar-background-md, | ||
.toolbar-background-ios { | .toolbar-background-ios { | ||
background: red; | background: red; | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-header-toolbar-background: red;</syntaxhighlight> | ||
|} | |} | ||
| Line 134: | Line 134: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css"> | ||
.toolbar-title-md, | .toolbar-title-md, | ||
.toolbar-title-ios { | .toolbar-title-ios { | ||
| Line 140: | Line 140: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-header-toolbar-color: red;</syntaxhighlight> | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css"> | ||
.toolbar-title-md, | .toolbar-title-md, | ||
.toolbar-title-ios { | .toolbar-title-ios { | ||
| Line 148: | Line 148: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">ion-header ion-toolbar.in-toolbar h1, | ||
ion-header ion-toolbar.in-toolbar h2 { | ion-header ion-toolbar.in-toolbar h2 { | ||
font-weight: normal; | font-weight: normal; | ||
| Line 157: | Line 157: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css"> | ||
.bar-button-clear-md-default, .bar-button-default-md, .bar-button-md-default, | .bar-button-clear-md-default, .bar-button-default-md, .bar-button-md-default, | ||
.bar-button.button-md, | .bar-button.button-md, | ||
| Line 165: | Line 165: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">ion-header ion-toolbar ion-button { | ||
--ion-toolbar-color: blue; | --ion-toolbar-color: blue; | ||
--color: yellow; | --color: yellow; | ||
| Line 172: | Line 172: | ||
|} | |} | ||
===Border width and color (new)=== | ===Border width and color (new)=== | ||
< | <syntaxhighlight lang="css"> | ||
--core-header-toolbar-border-width: 2px; // 0 will disable it. | --core-header-toolbar-border-width: 2px; // 0 will disable it. | ||
--core-header-toolbar-border-color: yellow; | --core-header-toolbar-border-color: yellow; | ||
| Line 181: | Line 181: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.tabs-md .tabbar, | ||
.tabs-ios .tabbar { | .tabs-ios .tabbar { | ||
background: red; | background: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-bottom-tabs-background: red;</syntaxhighlight> | ||
|} | |} | ||
===Tab icon color=== | ===Tab icon color=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.tabs-md .tab-button-icon, | ||
.tabs-ios .tab-button-icon { | .tabs-ios .tab-button-icon { | ||
color: blue; | color: blue; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-bottom-tabs-color: blue;</syntaxhighlight> | ||
|} | |} | ||
===Selected tab icon color=== | ===Selected tab icon color=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">tabs-md .tab-button[aria-selected=true] .tab-button-icon, | ||
.tabs-ios .tab-button[aria-selected=true] .tab-button-icon { | .tabs-ios .tab-button[aria-selected=true] .tab-button-icon { | ||
color: red; | color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-bottom-tabs-color-selected: red;</syntaxhighlight> | ||
|} | |} | ||
===Badge color and text=== | ===Badge color and text=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">core-ion-tabs .tab-badge.badge { | ||
color: white; | color: white; | ||
background: red; | background: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-bottom-tabs-badge-text-color: white; | ||
--core-bottom-tabs-badge-color: red; | --core-bottom-tabs-badge-color: red; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 225: | Line 225: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.core-tabs-bar { | ||
background-color: red; | background-color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-tabs-background: red;</syntaxhighlight> | ||
|} | |} | ||
===Individual tab background=== | ===Individual tab background=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.core-tabs-bar .tab-slide { | ||
background-color: red; | background-color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-tab-background: red;</syntaxhighlight> | ||
|} | |} | ||
===Unselected tab styles=== | ===Unselected tab styles=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.core-tabs-bar .tab-slide { | ||
color: red; | color: red; | ||
border-bottom-color: red; | border-bottom-color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-tab-color: red; | ||
--core-tab-border-color: red; | --core-tab-border-color: red; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 255: | Line 255: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.core-tabs-bar .tab-slide[aria-selected=true]{ | ||
color: red; | color: red; | ||
border-bottom-color: red; | border-bottom-color: red; | ||
| Line 261: | Line 261: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-tab-color-active: red; | ||
--core-tab-border-color-active: red; | --core-tab-border-color-active: red; | ||
--core-tab-font-weight-active: bold; | --core-tab-font-weight-active: bold; | ||
| Line 271: | Line 271: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">ion-item { | ||
background: red; | background: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--ion-item-background: red;</syntaxhighlight> | ||
|} | |} | ||
===Item divider background color=== | ===Item divider background color=== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">.item-divider-md, | ||
.item-divider-ios { | .item-divider-ios { | ||
background: red; | background: red; | ||
| Line 286: | Line 286: | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--item-divider-background: red; | ||
--item-divider-color: yellow; | --item-divider-color: yellow; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 294: | Line 294: | ||
|- | |- | ||
| New selector. | | New selector. | ||
| < | | <syntaxhighlight lang="css">--spacer-background: red;</syntaxhighlight> | ||
|} | |} | ||
==Buttons== | ==Buttons== | ||
To change button colors, see Purpose buttons section. Also you can set some properties checking like: | To change button colors, see Purpose buttons section. Also you can set some properties checking like: | ||
< | <syntaxhighlight lang="css"> | ||
ion-button { | ion-button { | ||
--background: red; | --background: red; | ||
| Line 311: | Line 311: | ||
You can now easily style the progress bars. | You can now easily style the progress bars. | ||
< | <syntaxhighlight lang="css"> | ||
--core-progressbar-height: 8px; | --core-progressbar-height: 8px; | ||
--core-progressbar-color: red; | --core-progressbar-color: red; | ||
| Line 322: | Line 322: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">page-core-mainmenu-more ion-icon { | ||
color: red; | color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-more-icon: red;</syntaxhighlight> | ||
|} | |} | ||
| Line 332: | Line 332: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">page-core-mainmenu-more .ion-md-folder, | ||
page-core-mainmenu-more .ion-ios-folder { | page-core-mainmenu-more .ion-ios-folder { | ||
color: red; | color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">.addon-privatefiles-handler ion-icon { | ||
color: red; | color: red; | ||
} | } | ||
| Line 345: | Line 345: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| < | | <syntaxhighlight lang="css">page-core-mainmenu-more .item-block.item-ios .item-inner, | ||
page-core-mainmenu-more .item-block.item-md .item-inner { | page-core-mainmenu-more .item-block.item-md .item-inner { | ||
border-bottom-color: red; | border-bottom-color: red; | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| < | | <syntaxhighlight lang="css">--core-more-item-border: red;</syntaxhighlight> | ||
|} | |} | ||
| Line 357: | Line 357: | ||
You can personalize some colors in the login page: (only credentials page, after selecting the site). | You can personalize some colors in the login page: (only credentials page, after selecting the site). | ||
< | <syntaxhighlight lang="css"> | ||
--core-login-background: red; | --core-login-background: red; | ||
--core-login-text-color: blue; | --core-login-text-color: blue; | ||
| Line 367: | Line 367: | ||
Calendar page can be personalized. | Calendar page can be personalized. | ||
< | <syntaxhighlight lang="css"> | ||
--addon-calendar-event-category-color: purple; | --addon-calendar-event-category-color: purple; | ||
--addon-calendar-event-course-color: red; | --addon-calendar-event-course-color: red; | ||
| Line 380: | Line 380: | ||
Message discussion page (including: chat activity and comments) | Message discussion page (including: chat activity and comments) | ||
< | <syntaxhighlight lang="css"> | ||
--addon-messages-message-bg: white; | --addon-messages-message-bg: white; | ||
--addon-messages-message-activated-bg: gray-light; | --addon-messages-message-activated-bg: gray-light; | ||
| Line 391: | Line 391: | ||
Some modifications on the input field: | Some modifications on the input field: | ||
< | <syntaxhighlight lang="css"> | ||
--core-send-message-input-background: gray-light; | --core-send-message-input-background: gray-light; | ||
--core-send-message-input-color: black;</syntaxhighlight> | --core-send-message-input-color: black;</syntaxhighlight> | ||
| Line 398: | Line 398: | ||
This is an example to use some cases explained before: | This is an example to use some cases explained before: | ||
< | <syntaxhighlight lang="css"> | ||
/* Ionic5 styles */ | /* Ionic5 styles */ | ||
Revision as of 08:14, 15 July 2021
In the following guide you will find some examples to migrate your styles to apply ionic5 based Moodle app (3.9.5). It contains tables where each row is a migration to do, the left part is the old code and the right part the new one.
We recommend that you prepend your old CSS rules (see ‘Before starting the migration’), by doing so users that are still using Moodle App 3.9.4 (or earlier versions) will see the same styling you had until now.
Before starting the migration
- Remove all styles using ionic classes ending with -wp (Windows Phone is not supported therefore it’s not necessary to specify it)
- Check the theme file (link can change in the future) where almost all variables are specified.
- As in the previous version, do not use any Saas variable (the ones starting with $). But you can use CSS3 ones (starting with --)
- We recommend prepending all css rules with body.ionic5 in order to make them only available for ionic5 and the old ones prepend them with body:not(.ionic5) for the previous versions of the Moodle App (3.9.4, 3.9.3, and so on).
- Be aware that example rules may differ from your css that could be more specific.
How to inspect the app styles and CSS
We recommend you to install the Chromium browser and follow this guide: Moodle Mobile development using Chrome or Chromium
For opening the new version of the app you can use this link: https://ionic5.apps.moodledemo.net. (This link can change in a near future)
Please, notice that it is very important to launch the browser with the indicated flags in the previous document, otherwise your custom CSS will not load.
Platform based styles
To apply a variable or a rule only to iOS or Android, prepend the whole rule with html.ios for ios or html.md for android devices. Note the correct rule is to place html before body.
Dark mode styles
To apply a variable or a rule only to dark mode, prepend the rule with body.dark.
Example, toolbar background color on ios dark mode:
html.ios body.ionic5.dark {
--core-header-toolbar-background: red;
}
Bear in mind that you can disable Dark Mode for all your users following Moodle app guide for admins (Disabled features)
Shadow DOM
Ionic is a set of web components and shadow DOM is a way to encapsulate them and make them a little less transparent to the developer and user (hiding markup structure, style, and behavior) but avoiding clash when using them.
This makes it more difficult to personalize and change some parts of those components. However you can check the Ionic documentation of each to check the parts that are customizable.
Example, to change ion-button:
- Check shadow parts that you can access.
You can style “native” part this way:
ion-button::part(native) {
text-transform: none;
}
- Check css exposed variables:
You can change all buttons background, or just the ones with an specific class:
ion-button {
--background: red;
}
ion-button.specific {
--background: yellow;
}
More information about shadow DOM:
- Using shadow DOM - Web Components | MDN
- CSS Shadow Parts - Ionic Documentation
- Shadow DOM in Ionic (and Why it's Awesome) - Ionic Blog
Main colors
The main color in the app is Moodle orange, but you can change it just using:
--brand-color: red;
This will probably reduce all the css you are applying right now.
Named Colors
--blue, --red, --green, --yellow, --turquoise, --purple but you’ll have to define also the variants: --blue-light, --blue-dark, --red-light, --red-dark, and also for green and yellow (purple and turquoise don’t use any variant).
Purpose colors
- --primary (brand-color)
- --danger (red)
- --warning (yellow)
- --success (green)
- --info (blue)
- --light (gray-lighter)
- --medium (gray-light)
- --dark (black)
For those you’ll have to define also some variants, ie, primary color:
- --ion-color-primary-rgb: RGB list of the color, ie 245, 233, 222;
- --ion-color-primary-contrast: Black or white depending on which color gives more contrast.
- --ion-color-primary-contrast-rgb: RGB version of the contrast color: 0, 0, 0 or 255, 255, 255
- --ion-color-primary-shade: Slightly darker color. (mix 12% of black)
- --ion-color-primary-tint: Slightly lighter color. (mix 10% of white)
There are limitations on copying those colors (blue, red) to the purpose colors (primary, secondary, success, etc) and, the changes won’t apply to both of them so you’ll have to define all the variables to have a complete change.
Page background
--background-color: white;
--ion-background-color-rgb: 255, 255, 255; // Need to be translated to rgb.
Main text color
--text-color: black;
--ion-text-color-rgb: 0, 0, 0; // Need to be translated to rgb.
Color used in categories and secondary content.
--subdued-text-color: gray;
Links color
--core-link-color: blue;
Header toolbar
On the header toolbar, we’ve added a bottom border that you can disable.
Background
.toolbar-background-md,
.toolbar-background-ios {
background: red;
}
|
--core-header-toolbar-background: red;
|
Text and buttons
.toolbar-title-md,
.toolbar-title-ios {
color: red;
}
|
--core-header-toolbar-color: red;
|
.toolbar-title-md,
.toolbar-title-ios {
font-weight: normal;
}
|
ion-header ion-toolbar.in-toolbar h1,
ion-header ion-toolbar.in-toolbar h2 {
font-weight: normal;
}
|
Buttons color
.bar-button-clear-md-default, .bar-button-default-md, .bar-button-md-default,
.bar-button.button-md,
.bar-button-clear-ios-default, .bar-button-default-ios, .bar-button-ios-default,
.bar-button.button-ios {
color: yellow;
}
|
ion-header ion-toolbar ion-button {
--ion-toolbar-color: blue;
--color: yellow;
}
|
Border width and color (new)
--core-header-toolbar-border-width: 2px; // 0 will disable it.
--core-header-toolbar-border-color: yellow;
Background
.tabs-md .tabbar,
.tabs-ios .tabbar {
background: red;
}
|
--core-bottom-tabs-background: red;
|
Tab icon color
.tabs-md .tab-button-icon,
.tabs-ios .tab-button-icon {
color: blue;
}
|
--core-bottom-tabs-color: blue;
|
Selected tab icon color
tabs-md .tab-button[aria-selected=true] .tab-button-icon,
.tabs-ios .tab-button[aria-selected=true] .tab-button-icon {
color: red;
}
|
--core-bottom-tabs-color-selected: red;
|
Badge color and text
core-ion-tabs .tab-badge.badge {
color: white;
background: red;
}
|
--core-bottom-tabs-badge-text-color: white;
--core-bottom-tabs-badge-color: red;
|
Top tabs
Tabs background
.core-tabs-bar {
background-color: red;
}
|
--core-tabs-background: red;
|
Individual tab background
.core-tabs-bar .tab-slide {
background-color: red;
}
|
--core-tab-background: red;
|
Unselected tab styles
.core-tabs-bar .tab-slide {
color: red;
border-bottom-color: red;
}
|
--core-tab-color: red;
--core-tab-border-color: red;
|
Selected tab styles
.core-tabs-bar .tab-slide[aria-selected=true]{
color: red;
border-bottom-color: red;
font-weigth: normal;
}
|
--core-tab-color-active: red;
--core-tab-border-color-active: red;
--core-tab-font-weight-active: bold;
|
Items
Items background color
ion-item {
background: red;
}
|
--ion-item-background: red;
|
Item divider background color
.item-divider-md,
.item-divider-ios {
background: red;
color: yellow;
}
|
--item-divider-background: red;
--item-divider-color: yellow;
|
Empty divider background
| New selector. | --spacer-background: red;
|
Buttons
To change button colors, see Purpose buttons section. Also you can set some properties checking like:
ion-button {
--background: red;
}
Check Ionic documentation for more information.
Use ion-fab-button to change Floating action buttons.
Progress bar
You can now easily style the progress bars.
--core-progressbar-height: 8px;
--core-progressbar-color: red;
--core-progressbar-text-color: black;
--core-progressbar-background: white;
More page
Icons
The icons in the more page can now easily change the color:
page-core-mainmenu-more ion-icon {
color: red;
}
|
--core-more-icon: red;
|
To change a color on a particular icon you’ll have to use the class of each handler, for example, to change the color of the folder icon on the menu item named Files:
page-core-mainmenu-more .ion-md-folder,
page-core-mainmenu-more .ion-ios-folder {
color: red;
}
|
.addon-privatefiles-handler ion-icon {
color: red;
}
|
Item border color
page-core-mainmenu-more .item-block.item-ios .item-inner,
page-core-mainmenu-more .item-block.item-md .item-inner {
border-bottom-color: red;
}
|
--core-more-item-border: red;
|
The dividers background color can be overridden using --spacer-background: red;
Login page
You can personalize some colors in the login page: (only credentials page, after selecting the site).
--core-login-background: red;
--core-login-text-color: blue;
--core-login-input-background: green;
--core-login-input-color: yellow;
Calendar page
Calendar page can be personalized.
--addon-calendar-event-category-color: purple;
--addon-calendar-event-course-color: red;
--addon-calendar-event-group-color: yellow;
--addon-calendar-event-user-color: blue};
--addon-calendar-event-site-color: green;
--addon-calendar-today-border-color: orange;
--addon-calendar-border-color: gray;
Messages page
Message discussion page (including: chat activity and comments)
--addon-messages-message-bg: white;
--addon-messages-message-activated-bg: gray-light;
--addon-messages-message-note-text: gray-dark;
--addon-messages-message-mine-bg: gray-light;
--addon-messages-message-mine-activated-bg: gray;
--addon-messages-discussion-badge: orange;
--addon-messages-discussion-badge-text: white;
Some modifications on the input field:
--core-send-message-input-background: gray-light;
--core-send-message-input-color: black;
Full Example
This is an example to use some cases explained before:
/* Ionic5 styles */
body.ionic5 {
--core-header-toolbar-background: red;
}
/* Dark mode */
body.ionic5.dark {
--core-header-toolbar-background: blue;
}
/* iOS only */
html.ios body.ionic5 {
--core-link-color: green;
}
/* Android only */
html.md body.ionic5 {
--core-link-color: yellow;
}
/* Legacy ionic3 styles */
body:not(.ionic5) .toolbar-background {
border-color: #004C9C;
background: #004C9C;
}
As you can see we recommend to always add body.ionic as an starter of the css selectors, you can also use :root body.ionic5 or even html before body.