diff --git a/.changeset/warm-adults-allow.md b/.changeset/warm-adults-allow.md new file mode 100644 index 0000000000..05162b42ec --- /dev/null +++ b/.changeset/warm-adults-allow.md @@ -0,0 +1,5 @@ +--- +"@navikt/ds-css": patch +--- + +FileUpload: Remove browser styling from FileUpload.Item when used in list. diff --git a/@navikt/core/css/darkside/form/file-upload.darkside.css b/@navikt/core/css/darkside/form/file-upload.darkside.css index f186237d01..e2ca995eae 100644 --- a/@navikt/core/css/darkside/form/file-upload.darkside.css +++ b/@navikt/core/css/darkside/form/file-upload.darkside.css @@ -1,12 +1,3 @@ -/* Makes it easier for user to use FileItem in semantic lists */ -.navds-file-upload { - & :is(ul, li) { - list-style: none; - margin: 0; - padding: 0; - } -} - /* --------------------------- FileUpload Dropzone -------------------------- */ .navds-dropzone__area { --__axc-dropzone-background: var(--ax-bg-input); @@ -154,6 +145,14 @@ } /* ----------------------------- FileUpload Item ---------------------------- */ +.navds-file-upload :is(ul, li), +ul:has(> li.navds-file-item), +li.navds-file-item { + list-style: none; + margin: 0; + padding: 0; +} + .navds-file-item__inner { background-color: var(--ax-bg-raised); border: 1px solid var(--ax-border-subtleA); diff --git a/@navikt/core/css/form/file-upload.css b/@navikt/core/css/form/file-upload.css index c170fbf63e..e900028771 100644 --- a/@navikt/core/css/form/file-upload.css +++ b/@navikt/core/css/form/file-upload.css @@ -1,12 +1,3 @@ -/** -* Makes it easier for user to use FileItem in semantic lists -*/ -.navds-file-upload :is(ul, li) { - list-style: none; - margin: 0; - padding: 0; -} - /** * FileUpload.Dropzone */ @@ -163,6 +154,13 @@ /** * FileUpload.Item */ +.navds-file-upload :is(ul, li), +ul:has(> li.navds-file-item), +li.navds-file-item { + list-style: none; + margin: 0; + padding: 0; +} .navds-file-item__inner { outline: 1px solid var(--a-border-subtle);