Atlas Core
Overview
The Atlas Core module contains the base layouts, styling and design properties for the many widgets which can be used to create beautiful experiences.
Documentation
Please see Atlas Core in the Mendix documentation for details.
Atlas 3 to Atlas 4
Highlight
- Atlas 4 will fully utilize CSS variables instead of SASS variables. All the available CSS variables can be seen at Atlas-core/Styling/web/themes/_theme-default.scss.
- Currently, atlas 4 is released under compatibility mode. To fully ignore SASS variables mapping in styling, user can add $use-css-variables: true; inside their Styling/web/custom-variables.scss.
- For backward compatibility, we maintain _variables-css-mappings.scss file which contains conversion from SASS to CSS variables. This file is now renamed into _css-variables-mappings.scss with a few minor changes.
Debugging and overriding CSS variables
CSS variables can easily be viewed and overridden on the browser. Simply run the application, open developer console (F12 or (ctrl|cmd) + shift + I).
In the elements tab, on the right side, find the Styles tab. Scroll down, and user can see the compiled version of CSS variables from color-variants.scss and theme-default.scss right click and press "copy rule". paste this rules inside your own Styling folder to change the value and overrides.
Color mix
darker, dark, light, lighter suffix variables (gray, brand-primary, brand-success, brand-warning, brand-danger, brand-default) will no longer use sass function mix in favor of CSS function color-mix. and there will be a new color-variants.scss file to support this mapping which will produce CSS variables such as:
--gray-50: color-mix(in srgb, var(--gray), var(--color-base) 90%); --gray-100: color-mix(in srgb, var(--gray), var(--color-base) 80%); --gray-200: color-mix(in srgb, var(--gray), var(--color-base) 60%); --gray-300: color-mix(in srgb, var(--gray), var(--color-base) 40%); --gray-400: color-mix(in srgb, var(--gray), var(--color-base) 20%); --gray-500: color-mix(in srgb, var(--gray), var(--color-contrast) 0%); --gray-600: color-mix(in srgb, var(--gray), var(--color-contrast) 20%); --gray-700: color-mix(in srgb, var(--gray), var(--color-contrast) 40%); --gray-800: color-mix(in srgb, var(--gray), var(--color-contrast) 50%); --gray-900: color-mix(in srgb, var(--gray), var(--color-contrast) 60%);
These variables will then mapped to the previously darker, dark, light, and lighter color variants:
--gray-lighter: var(--gray-50); --gray-light: var(--gray-300); --gray-primary: var(--gray-200); --gray-dark: var(--gray-700); --gray-darker: var(--gray-800);
The full list of CSS variables can be seen inside developer console upon running the application.
If you previously rely on the SASS functions to build your color variants, please update.
Releases
Fixed
The primary button hover color follows the app's brand color again (
--brand-primary-hoveris now derived from--brand-primary).The keyboard focus outline is visible in the sidebar and the top bar: it takes the bar's active text color (a theme's region or navigation color first).
The app name is no longer invisible in themes built on the earlier navigation variables: it takes
--navbar-brand-name, then the region's text color a theme sets (--navsidebar-color,--navtopbar-color,--topbar-color,--navigation-color), then the bar's title color.Wide logos are no longer squeezed into a square:
--brand-logo-heightsets the logo height and the width follows the logo. In the open sidebar the app name stays on the same row and ends in an ellipsis. Only the collapsed sidebar keeps the fixed--brand-logo-widthbox. Apps that relied on--brand-logo-widthto size the logo in the open sidebar or the top bar set the size on the logo image instead.Sub-item labels are no longer cut off in the collapsed sidebar on phones: below the tablet breakpoint the icon sits above the label.
The collapsed sidebar's fly-out menu no longer has a wide gap after sub-item icons, and labels no longer overflow in Firefox.
Default labels have a visible background again (
--label-default-bgis now--border-color-default).The default
logo.svgis a vector image instead of an embedded bitmap, so it is sharp at any size.The example neutral theme inverts the sidebar logo, so the default white logo tile stays visible on its light sidebar. Apps with their own logo remove that rule.
The login page template uses
logo.svg. Apps whosetheme/web/login.htmlstill points tologo.pngcan change it tologo.svgto use the default logo, or keep their ownlogo.png.The example neutral and dark themes referred to
--font-color-base, which Atlas Core does not define, so the neutral theme showed white navigation text on its light sidebar. They now use--font-color-default. Apps with a theme copied from these examples replacevar(--font-color-base)withvar(--font-color-default).The 'Previous look' block for Atlas Core 4.6 was missing three lines. Apps that used it add:
--topbar-border-color: var(--border-color-default); --navsidebar-border-color: var(--border-color-default); --navsidebar-spacing: var(--spacing-medium);