Moving from edls-css to css
@volvo-cars/edls-css is being retired. Its styles move into @volvo-cars/css one part at a time, with the same class names and the same look. Keep loading @volvo-cars/edls-css only for the parts that haven’t moved yet.
Upgrade steps
Section titled “Upgrade steps”- Update
@volvo-cars/cssto 3.2 or later. - Update
@volvo-cars/react-tableto 0.4 or later if you use it. See react-table 0.3 → 0.4. - Add the
tableclass to tables you build by hand. The@volvo-cars/cssrules for resize handles and nested rows apply inside<table class="table">. TheTablecomponent from@volvo-cars/react-tableadds it for you. - Remove
@volvo-cars/edls-cssif you only loaded it for tables or the action bar. Remove its imports, and itsmeta.jsonfrom your ESLint and VS Code settings. Otherwise, keep it for the parts listed under Still in edls-css.
Moved to @volvo-cars/css
Section titled “Moved to @volvo-cars/css”| Classes | In @volvo-cars/css since |
|---|---|
table |
1.45 |
odd:bg-secondary, hover:bg-primary-subtle, selected:bg-accent-blue-medium, expanded:bg-accent-blue-medium |
1.45 |
resize-handle, inside .table |
1.45. Has a width without @volvo-cars/edls-css from 3.2 |
Nested rows (tr[data-nested='true']), inside .table |
1.45 |
action-bar, action-bar-menu |
3.2 |
The 12px spacing utilities from @volvo-cars/edls-css, such as p-12 and gap-12, were already part of @volvo-cars/css.
The @volvo-cars/edls-css copies of these classes are deprecated, and a future breaking release of @volvo-cars/edls-css removes them. Your markup doesn’t change, so there’s nothing for the ESLint plugin to flag. Load @volvo-cars/css 3.2 or later and the styles keep working.
What changed
Section titled “What changed”The styles look the same as in @volvo-cars/edls-css, with two exceptions.
A resize handle is 24px wide instead of 20px. It uses the --v-space-24 token, because @volvo-cars/css has no 20px spacing token. The wider handle meets the WCAG minimum target size of 24px, and its visible line sits 2px further from the column edge. While you still load @volvo-cars/edls-css after @volvo-cars/css, its deprecated copy wins and the handle stays 20px wide.
.table keeps header text on one line. Add the text-wrap class to a th to let it wrap, as it did with @volvo-cars/edls-css. TableHead from @volvo-cars/react-table does this for you.
.action-bar now includes its shadow. You no longer need the shadow-md utility from @volvo-cars/edls-css on it.
Design tokens
Section titled “Design tokens”@volvo-cars/edls-css token |
@volvo-cars/css replacement |
|---|---|
--v-space-12 |
--v-space-12, with the same value |
--v-space-20 |
--v-space-24 for resize handles. Elsewhere, still only in @volvo-cars/edls-css |
--v-color-background-feedback-teal, --v-color-foreground-feedback-teal |
None yet |
The action bar keeps the shadow-md values from @volvo-cars/edls-css. The closest token, --v-effect-shadow-default, is much lighter, so the bar would lose its elevation.
Still in edls-css
Section titled “Still in edls-css”Load @volvo-cars/edls-css if you use any of these:
- The
popover,calendar,dropdown-trigger,dropdown-input,dropdown-optionandbadgeclasses - The
bg-feedback-tealandtext-feedback-tealcolors - The
bg-primary-subtleutility without a prefix.@volvo-cars/cssonly hashover:bg-primary-subtle. - 20px spacing utilities, such as
p-20,gap-20andmt-20 - 12px and 20px size utilities, such as
h-12,w-20andmin-h-12 - The
shadow-none,shadow-smandshadow-mdutilities
Need help? Reach out on Slack in #edls.