Upgrading
Upgrading from Fabric v0 to v1
Fabric CSS version 1 contains a BREAKING CHANGE which removes support for Troika utility classes. We don't do this lightly as our general goal is to avoid breaking changes as much as possible but it seems wise to clear this out sooner rather than later.
Will this affect me?
This will affect anyone using Troika utility classes in Fabric only apps. These classes are always prefixed with u- so they are easy to recognise
How can I make the upgrade?
1. Handle u- prefixed Troika utility classes
Go through your markup and replace u- prefixed classes with valid Fabric equivalents. This should be a quick job even on a large app. You can find example replacements here: https://github.schibsted.io/finn/fabric#noteable-changes
Compatibility mode
If you don't have time to make this change right away, you will always have the option of including the Troika utilities package manually to keep supporting u- classes until you can find time.
Install the utils package
In your app's
styles.css
file, import Troika utils:
2. Install the Fabric CSS v1 dependency
3. Update import map to v1
Update your app's eik.json file to point at the correct import map. Without this step you will not
end up with Fabric v1 in production.