From 08b93ae51487144f4b2822ec995de65a68d1412a Mon Sep 17 00:00:00 2001 From: Erwan Guyader Date: Mon, 7 Sep 2020 13:27:18 +0200 Subject: [PATCH] gui/styles: Quote file types in stylus loop (#1949) The file type icons CSS rules are generated from a simple loop over all the types we're supporting. One of those types is `text`. However, if those are not quoted, stylus will use the value of any existing variable with that given name in interpolations instead of the string itself. Since we import the `button` component module from `cozy-ui` and a `text` variable is defined in this module, the generated rule for this file type was a mess and the associated icon would not be displayed in the Recent list in the main window. By quoting the types in the loop argument, we make sure those will be interpreted as strings and not variables. --- gui/styles/_two_panes.styl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/styles/_two_panes.styl b/gui/styles/_two_panes.styl index 3a2d8e037..a4333728d 100644 --- a/gui/styles/_two_panes.styl +++ b/gui/styles/_two_panes.styl @@ -218,7 +218,7 @@ background-size cover background-position center center - for mimetype in archive audio binary code contact cozy-note file folder image link pdf presentation spreadsheet text video + for mimetype in 'archive' 'audio' 'binary' 'code' 'contact' 'cozy-note' 'file' 'folder' 'image' 'link' 'pdf' 'presentation' 'spreadsheet' 'text' 'video' &.file-type-{mimetype} background-image url("./images/type-icons/icon-type-" + mimetype + ".svg")