Since summer 2017, the MDS library has grown and aged, evolving deliberately to meet our customer’s needs. While the foundational aspects of the MDS visual language and UI component code are strong and fundamentally sound, we’ve collected enhancements that require a breaking change in the design and code API. As a result, MDS launched upgraded capabilities as version 2.0.0 in June 2018.
This Upgrade Guide describes version 2.0.0 and provides step-by-step instructions:
Please refer to this page over time or even print it as a checklist as you complete your upgrade.
The 2.0.0
release significantly evolves how adopting product squads consume the MDS package and includes updates to the visual language (like Color) and UI component library (like Button or List Group).
MDS reduced the complexity of the package by optimizing assets so that adopting teams consume the visual language and UI component library more easily. The changes include:
MDS fortified tooling that applies the visual language of color, typography, space, and more, including:
mds-
, as well as improving their documentation.Across the component library, significant changes include:
Upgrading to version 2.0.0 should not require a significant investment for adopting teams.
For existing MDS adopters, upgrading is mostly a technical exercise to revise how your product installs MDS code followed by itemized changes to the visual language and UI components.
An engineer on your team should:
mds-button
) to find all instances.node_modules/morningstar-design-system/dist/mds.css
node_modules/morningstar-design-system/dist/mds.svg
node_modules/morningstar-design-system/fonts/*
node_modules/morningstar-design-system/constants/constants.css
node_modules/morningstar-design-system/components/**/*.scss
node_modules/morningstar-design-system/styles/**/*.scss
For AutoPrefixer, use the following configuration:
{
browsers: ['last 2 versions'],
grid: true
}
For CleanCSS, use the following configuration:
{
level: 2
}
The 2.0.0
release includes many updates across the MDS visual language. Impacted features include Constants, mixins, and CSS classes that are applied throughout the component library as well as adopting products creating their own style, components, and layout.
Follow the checklist items below to trace breaking changes relative to your team’s implementation.
v1 Constant | v2 Constant |
---|---|
|
|
|
|
|
|
v1 Class | v2 Class |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
MDS-3839 PR-659 Altered tense of asset allocation color constants.
MDS-3006 PR-611 Renamed Asset Allocation colors and removed $mds-visualization-color-asset-allocation-non-local-stocks
.
v1 Constant | v2 Constant |
---|---|
|
|
|
|
|
|
v1 Constant | v2 Constant |
---|---|
|
|
|
|
MDS-3893 PR-672 Removed text coloring mixin from typography mixins applied for headings and body text.
In MDS version 1.x, the mds-level-2-heading()
mixin included a reference to the mds-text-color-primary()
mixin.
[.your-custom-css-rule-using-v1] {
@include mds-level-2-heading(); // includes text coloring
}
In MDS version 2.0.0, the mds-level-2-heading()
mixin does not reference the mds-text-color-primary()
mixin, which therefore must be invoked separately.
[.your-custom-css-rule-using-v2] {
@include mds-level-2-heading(); // omits text coloring
@include mds-text-color-primary();
}
v1 Icon Name | v2 Icon Name |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
v1 Mixin Name | v2 Mixin Name |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MDS-4090 PR-733 Updated Alert markup to improve out-of-the-box accessibility of the component.
Alert markup in 1.x
:
... <div class="mds-alert__content">
<h4 class="mds-alert__title">[Alert Title]</h4> ...
Alert markup in 2.0
:
... <aside class="mds-alert__content">
<strong class="mds-alert__title">[Alert Title]</strong> ...
MDS-2354 PR-681 Adjust button icon size to properly show the correct medium icon for large and medium size flat buttons.
Card markup in 1.x
:
... <div class="mds-card__title"> Core Bond Funds </div> ...
Card markup in 2.0
:
... <h2 class="mds-card__title"> Core Bond Funds </h2> ...
MDS-3406 PR-630 Applied dialog max width of 350px and added a width: 100%
rule to account for responsiveness.
MDS-3392 PR-650 Refactored Dialog class names and styling.
MDS-3829 PR-669 Adjusted the size of many form elements, including checkbox, input, label, radio button, select, and textarea, to align with each other and other MDS components across the library, including changes to font-weight
, line-height
, and font sizes applied across small, medium and large component sizes.
MDS-3305 PR-602 Added sizing features and support for icons per item. Removed and renamed element and modifier classes across many features including toggling and highlighting a selected item.
v1 Class | v2 Class |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MDS-3704 PR-683 Corrected the paired display of icon and label within the selected item of a list group item within a menu.
Menu markup in 1.x
:
... <div class="mds-popover mds-popover--width-200px" role="tooltip">
<header class="mds-popover__header">
<h3 class="mds-popover__title"> Workbook </h3> ...
Menu markup in 2.0
:
... <section class="mds-popover mds-popover--width-200px" role="tooltip">
<header class="mds-popover__header">
<h2 class="mds-popover__title"> Workbook </h2> ...
MDS-3840 PR-685 Removed default modal dimensions and t-shirt sizes available from modals and updated MDS doc site demonstration displays and scripting to reflect less opinionated sizing.
MDS-4250 PR-730 Renamed mds-modal__body
class to mds-modal__content
and removed font style properties.
MDS-3362 PR-680 Removed the deprecated version of Notification, promoting “Notification Enhanced” (released previously) to be the default Notification component.
MDS-4090 PR-733 Updated Notification title markup to improve out-of-the-box accessibility of the component.
Notification markup in 1.x
:
... <h4 class="mds-notification-enhanced__title">[Notification Title]</h4> ...
Notification markup in 2.0
:
... <strong class="mds-notification__title">[Notification Title]</strong> ...
MDS-2684 PR-677 Removed default t-shirt sizes used to specify Popover width, and renamed the referenced trigger.
MDS-4250 PR-730 Removed the mds-popover__paragraph
class and removed font style properties from the mds-popover__content
class.
Popover markup in 1.x
:
... <div class="mds-popover mds-popover--width-200px" role="tooltip">
<header class="mds-popover__header">
<h3 class="mds-popover__title"> Workbook </h3> ...
Popover markup in 2.0
:
... <section class="mds-popover mds-popover--width-200px" role="tooltip">
<header class="mds-popover__header">
<h2 class="mds-popover__title"> Workbook </h2> ...