Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions content/en/docs/howto/front-end/atlas-ui/customize-styling-new.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,30 @@ The shades are calculated in the browser from the base color, so you do not have

Lighter shades are mixed with `--color-base` (white by default), and darker shades are mixed with `--color-contrast` (black by default).

#### Styling the Navigation Bars {#navigation-bars}

In Atlas Core 4.6.0 and above, the navigation bars do not follow `--brand-primary`. Each layout has one primary bar (dark by default) and at most one secondary bar (light by default):

| Layout | Primary Bar | Secondary Bar |
| --- | --- | --- |
| **Atlas_SideBar** | Sidebar | Top bar |
| **Atlas_Default** | Top bar | Sidebar |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this solves a feedback issue: #9386

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just need to confirm, @gjulivan , this is the only place native sidebar should be documented, right? In the Atlas doc?

We also have the navigation widget documented in the native widget styling guide, but I don't think we need sidebar styling info there bc sidebar styling is only from Atlas nav bars -- right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ConnorLand this part is not specific about native mobile.
this is for web.

| **Atlas_TopBar** | Top bar | None |

To restyle the bars in every layout, set the `--bar-primary-*` and `--bar-secondary-*` variables. Each set has the variables `bg`, `bg-hover`, `bg-active`, `color`, `color-hover`, `color-active`, `sub-color`, `title-color`, `border-color`, and `edge`, for example `--bar-primary-bg` and `--bar-secondary-title-color`:

```scss
:root {
--bar-primary-bg: #0a2540;
--bar-primary-color: #d0d7de;
--bar-primary-title-color: #ffffff;
}
```

Atlas Core does not set the region variables, such as `--topbar-bg`, `--sidebar-bg`, the `--navsidebar-*` and `--navtopbar-*` colors, and `--navigation-color`. You can still set them to give one region the same look in every layout. If you set only the background of a region, also set the text colors of that region (or `--navigation-color`). Otherwise, the text is dark where that region is the secondary bar.

Layouts that you copy from Atlas Core get the bar colors only if they keep the `region-topbar` and `region-sidebar` classes. To show the app logo and app name, add the **AppInfo** snippet from Atlas Core. The app name uses the title color of the bar, unless you set `--navbar-brand-name`. The logo height is set by `--brand-logo-height`, and the width follows the logo. To replace the default logo, add your own *logo.svg* to *theme/web*, or to the **public** folder of a theme module.

### Using the Styling Editor {#styling-editor}

The styling editor is based on the editor that powers Visual Studio Code and is also used for JavaScript actions. You can find the styling files (JS, SCSS) and theme settings (JSON) under App Explorer's **Styling** node. When you double-click a styling file, it will be opened in the styling editor:
Expand Down Expand Up @@ -381,7 +405,7 @@ The bullets below describe the file structure for the theme folder and for modul
* *themes/_theme-default.scss* – This file contains all the theme settings (CSS variables) with their default values. Use it as a reference for the variables that can be overridden in your app.
* *design-properties.json* – This file contains the design properties for the standard Mendix supported widgets.
* **native** – This folder (and subfolders) contain the native mobile resources for the standard Mendix supported widgets.
* **public** – This folder contains the font files of the default font.
* **public** – This folder contains the bundled font files, the default app logo (*logo.svg*), and the default chart palette (*com.mendix.charts.json*). To override the logo or the chart palette, add a file with the same name to *theme/web* or to the **public** folder of a theme module.
* **{MODULE_NAME}** – Per module a folder is created which can contain styling resources for (progressive) web apps and native mobile apps.
* **web** – This folder contains re-usable web resources
* *main.scss* – This file is the starting point for the module web based styling.
Expand Down Expand Up @@ -709,7 +733,7 @@ When an end-user opens a Mendix app in an unsupported browser, a page is shown t

## Serving Fonts Locally (Web) {#local-fonts}

By default, Atlas uses the font Poppins. The font files are part of the Atlas Core module (*themesource/atlas_core/public/resources/fonts/poppins*) and are served by your own app. No font files are loaded from an external Content Delivery Network (CDN), which helps you comply with stricter [CSP](/howto/security/csp/) policies.
In Atlas Core 4.6.0 and above, the default font (`--font-family-base`) is the system font stack of the device, so no font files are downloaded. Atlas Core still includes the font Poppins, which was the default font in earlier versions. The font files are part of the Atlas Core module (*themesource/atlas_core/public/resources/fonts/poppins*) and are served by your own app. No font files are loaded from an external Content Delivery Network (CDN), which helps you comply with stricter [CSP](/howto/security/csp/) policies. To use Poppins, set `--font-family-base: "Poppins", sans-serif;` in the `:root` block of your theme file.

### Using a Different Font

Expand Down
4 changes: 2 additions & 2 deletions content/en/docs/howto/front-end/configuring-your-theme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ This document describes how to configure the styling of your page in Studio Pro.

The styling that is loaded when opening your Mendix application in a web browser is configured in the HTML of your index pages.

To ensure that the same styling is loaded when viewing your page in Studio Pro, you can configure the `"cssFiles"` property in *settings.json* in the theme folder of your app. For example, in this configuration, `theme/web/main.scss` is loaded when viewing a page in Studio Pro:
To ensure that the same styling is loaded when viewing your page in Studio Pro, you can configure the `"cssFiles"` property in *settings.json* in the theme folder of your app. For example, in the default configuration of an app that uses Atlas, the compiled theme stylesheet *theme.compiled.css* is loaded when viewing a page in Studio Pro:

```json
{
"cssFiles": [ "theme/web/css/main.scss" ]
"cssFiles": [ "theme.compiled.css" ]
}
```

Expand Down
14 changes: 11 additions & 3 deletions content/en/docs/howto/front-end/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Add these classes to an element to change the text color to your theme colors:

* `text-default`: default text color
* `text-primary`: primary brand color
* `text-info`: info brand color
* `text-info`: info color (a light shade of the primary color)
* `text-success`: success brand color
* `text-warning`: warning brand color
* `text-danger`: danger brand color
Expand All @@ -40,12 +40,12 @@ These are standard useful text colors:
The background colors are based on your theme colors. These are the same colors as for the buttons:

* `background-primary`: primary background color
* `background-info`: info background color
* `background-info`: info background color (a light shade of the primary color)
* `background-success`: success background color
* `background-warning`: warning background color
* `background-danger`: danger background color

A lighter variant of the background color also sets the matching foreground color:
These background classes come from Bootstrap. Their colors are fixed and do not follow your theme colors:

* `bg-primary`: primary background color
* `bg-info`: info background color
Expand Down Expand Up @@ -77,7 +77,11 @@ For more information on shades, see the [Using Color Shades](/howto/front-end/cu

These are useful classes for text items:

* `text-small`: small text
* `text-large`: large text
* `text-light`: light text
* `text-normal`: normal text
* `text-semibold`: semibold text
* `text-bold`: bold text
* `text-break`: breaks text over multiple lines
* `text-uppercase`: transforms the text to upper case
Expand Down Expand Up @@ -127,6 +131,10 @@ Change the way items appear in a list:
* `listview-striped`: list view widget with striped list view items
* `listview-seperated`: list view widget with list view items separated
* `listview-stylingless`: list view widget without spacing and background
* `listview-bordered`: list view widget with a border around each list view item
* `listview-hover`: list view widget with a hover color on list view items
* `listview-sm`: list view widget with small padding in list view items
* `listview-lg`: list view widget with large padding in list view items

## Alerts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ Further documentation on styling can be found here:

To migrate from Atlas 3 to Atlas 4, see [Migrating to Atlas UI 4](/refguide/frontend/atlas4-migration/). To migrate from Atlas 2 to Atlas 3, see [Migrate From Atlas 2 To Atlas 3](/refguide9/moving-from-atlas-2-to-3/).

Atlas Core 4.7 requires Studio Pro 11.0.0 or above.

## Upgrading to Atlas Core 4.6.0 or Above

In Atlas Core 4.6.0, the default theme changed to Atlas Neutral. Theme settings that your app sets in *theme/web/custom-variables.scss* are kept. Everything that your app leaves to Atlas Core changes, for example:

* The brand colors, the page, text, and border colors, and the corner sizes
* The default font, which is the system font stack instead of Poppins (Poppins is still included)
* The navigation bars, which no longer follow `--brand-primary`. Each layout has one dark primary bar and at most one light secondary bar, styled with the `--bar-primary-*` and `--bar-secondary-*` variables. For more information, see the [Styling the Navigation Bars](/howto/front-end/customize-styling-new/#navigation-bars) section of *Customize Styling*.

To keep the previous look, paste the "Previous look" block from the Atlas Core 4.6.0 release notes into the `:root` block of *theme/web/custom-variables.scss* before upgrading, and delete the lines for the variables that your app already sets. If you used that block, also add the three lines listed in the Atlas Core 4.7.0 release notes.

## Read More

* [Atlas UI Kit for Figma](/howto/front-end/figma-ui-kit/)
Loading