Skip to content

Commit

Permalink
Fileupload: Remove list-styling when used in ul (#3413)
Browse files Browse the repository at this point in the history
* 📝 Changeset

* Update .changeset/warm-adults-allow.md

Co-authored-by: Halvor Haugan <[email protected]>

---------

Co-authored-by: Halvor Haugan <[email protected]>
  • Loading branch information
KenAJoh and HalvorHaugan authored Nov 29, 2024
1 parent d6f08ff commit 6d74cb7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/warm-adults-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-css": patch
---

FileUpload: Remove browser styling from FileUpload.Item when used in list.
17 changes: 8 additions & 9 deletions @navikt/core/css/darkside/form/file-upload.darkside.css
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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);
Expand Down
16 changes: 7 additions & 9 deletions @navikt/core/css/form/file-upload.css
Original file line number Diff line number Diff line change
@@ -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
*/
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6d74cb7

Please sign in to comment.