Migration Guide to Version 3.0.0
An overview of a few things you will need to accommodate in your update to the next major version. In general, we worked hard to ensure backwards compatibility so your existing markup should continue to work. However, if you want to make use of our updated assets, make sure to follow along here.
Typo
All headlines have increased in size which might or might not break your page layout.
<h6>
now looks the same as <h5>
.
fineprint
has been renamed to font-hint
.
Font sizes have changed:
In case you have to have different font sizes for different states, you can prefix the font-size with the state, like so: palm-font-xl
, lap-font-m
, or desk-font-xs
.
Note: According to the Cosma design guidelines, there should be no different font sizes per state. We are providing them here to make the migration of existing projects easier. When in doubt, talk to your designer.
Forms
The standard form theme (form-theme-standard
) is now white, making the white form theme obsolete. Please transition away from form-theme-white
.
Text inputs and select fields
To upgrade to the new design:
-
To make use of putting icons inside of text inputs, use a wrapper
div
around them with the classinput-text-container
. -
To make use of the updated look of select fields, use a wrapper
div
around them with the classselect-container
. -
Radio buttons and checkboxes get wrapper
div
s around them with the classradio-button-container
orcheckbox-container
. -
Form items should use the new
gutter-form
to make use of the new horizontal and vertical distances between form elements. -
Migrate away from
input-unit
andunit-icon
. Replace withinput-icon-right
. See updated input markup code example.
Best practice: Combine every input
element with its corresponding label
element by using id
for input
and corresponding for
for label
. This makes sure users can click on a label and thereby select an input field. See updated input markup code example.
Updated input markup
-
2.4
<input type="text" class="input-text input-unit" /><span class="unit-icon fa fa-euro"></span>
-
3.0
<div class="input-text-container"> <label class="input-label" for="text-input-2">First name</label> <span class="input-icon-left fa fa-user"></span> <input type="text" id="text-input-2" class="input-text" placeholder="John" value="" /> </div>