From 13a9d6e8ecfc29309285bfcabce1d0d0d484d034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B8egh?= Date: Fri, 1 Dec 2023 12:14:07 +0100 Subject: [PATCH] fix(GlobalStatus): remove z-index to enhance flexibility (#2952) The z-index usage was introduces in [this commit](https://github.com/dnbexperience/eufemia/commit/1fb638b12df290533e6a89e7f8135a7e23c0797e#diff-4d582f82c1661d8de20042e6e65250a4d2710c2b31f8955fcd6eda14097a0b4e) in 2019 (v4). Today, I can't find any good reasons why to have it anymore. Surely, it "could" break something visually. But I think we still are pretty safe going forward without a z-index. More info in this [Slack thread](https://dnb-it.slack.com/archives/CMXABCHEY/p1700653977331569). --- .../src/docs/uilib/components/global-status/properties.mdx | 2 +- .../__tests__/__snapshots__/GlobalStatus.test.tsx.snap | 4 ---- .../components/global-status/style/dnb-global-status.scss | 5 ----- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/properties.mdx b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/properties.mdx index 6dc0857bc7e..daf097c6c4c 100644 --- a/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/properties.mdx +++ b/packages/dnb-design-system-portal/src/docs/uilib/components/global-status/properties.mdx @@ -13,7 +13,7 @@ import { GlobalStatusExampleControllers } from 'Docs/uilib/components/global-sta | `text` or `children` | _(optional)_ the text appears as the status content. Besides plain text, you can send in a React component as well. Defaults to `null`. | | `items` | _(optional)_ the items (list items) appear as a part of the status content. you can both use an JSON array, or a vanilla array with a string or an object content. See **Item Object** example below. | | `icon` | _(optional)_ the icon shown before the status title. Defaults to `exclamation`. | -| `state` | _(optional)_ defines the visual appearance of the status. There are two main statuses `error` and `info`. The default status is `error`. | +| `state` | _(optional)_ defines the visual appearance of the status. There are two main statuses `error`, `warning`, `info` and `success`. The default status is `error`. | | `icon_size` | _(optional)_ the icon size of the title icon shows. Defaults to `medium`. | | `show` | _(optional)_ set to `true` or `false` to manually make the global status visible. Defaults to `true`. | | `autoclose` | _(optional)_ set to `true` to automatically close the global status if there are no more left items in the provider stack. Defaults to `true`. | diff --git a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/GlobalStatus.test.tsx.snap b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/GlobalStatus.test.tsx.snap index d357f6b389c..eef1be56c42 100644 --- a/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/GlobalStatus.test.tsx.snap +++ b/packages/dnb-eufemia/src/components/global-status/__tests__/__snapshots__/GlobalStatus.test.tsx.snap @@ -710,10 +710,6 @@ button.dnb-button::-moz-focus-inner { .dnb-global-status.dnb-section { display: block; } -.dnb-global-status__wrapper { - position: relative; - z-index: 1; -} .dnb-global-status__shell { width: 100%; opacity: 1; diff --git a/packages/dnb-eufemia/src/components/global-status/style/dnb-global-status.scss b/packages/dnb-eufemia/src/components/global-status/style/dnb-global-status.scss index 0904bfb3da2..7daa21fb80b 100644 --- a/packages/dnb-eufemia/src/components/global-status/style/dnb-global-status.scss +++ b/packages/dnb-eufemia/src/components/global-status/style/dnb-global-status.scss @@ -12,11 +12,6 @@ display: block; } - &__wrapper { - position: relative; - z-index: 1; - } - &__shell { width: 100%; opacity: 1;