To not overcomplicate the Eufemia - and limit the creativity and possibilities, the DNB UX team has decided to not force the usage of a dedicated layout system. This opens up for more freedom in designing and building interface layouts.
In short, only use
rem for layouts and spacing and make sure ...
- you always use the nearest half
remvalue, like 0.5rem, 1rem or 1.5rem and so forth.
- you always get a total computed height within the grid.
This results in maintaining the integrity of the 8px base grid.
Sometimes You may need a compensation of only a few pixels. Heres how to calculate the correct rem values:
- 1px =
- 2px =
- And so on ...
If You are working together with an DNB UX Designer, You can decide freely what layout mechanism You want to use. For web applications use CSS Flexbox or CSS Grid. But it is Your responsibility to ensure 100% consistency and compatibility.
There is, however a simple Grid Pattern with CSS helpers in Eufemia which you can use.
Although, it will probably be removed in a future major release.