summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-09-04 22:21:22 +0200
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-09-19 08:46:53 +0200
commita9fa17eb7ebf81886b05ff1a14e1df67ad08bfef (patch)
treec2a9e4093253784adcb8ee42ba7d88f8f1a7279a /core
parentfb9379db3efa204378682bc77049f4153934dc81 (diff)
downloadnextcloud-server-a9fa17eb7ebf81886b05ff1a14e1df67ad08bfef.tar.gz
nextcloud-server-a9fa17eb7ebf81886b05ff1a14e1df67ad08bfef.zip
Fix size of icons in menus inside apps when shown as images
Some popover menus, like the contacts menu, still show their icon using an img element. The main CSS rules assume that a "content-box" sizing is being used, and thus set the size and padding of the image to add up to the line height. However, ".app-*" descendants use a "border-box" sizing, so when a menu with an image was shown in an app the icon was not properly shown. Now both the width and height of the image is set to the item height in those cases, which causes the visible size of the icon to be the item height minus the padding (the same as when "content-box" sizing is used). Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'core')
-rw-r--r--core/css/apps.scss21
1 files changed, 21 insertions, 0 deletions
diff --git a/core/css/apps.scss b/core/css/apps.scss
index 3a56d72ecd1..913e445f5bf 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -1043,6 +1043,27 @@ $popovericon-size: 16px;
}
}
+/* "app-*" descendants use border-box sizing, so the height of the icon must be
+ * set to the height of the item (as well as its width to make it squared). */
+#content[class*='app-'] {
+ .bubble,
+ .app-navigation-entry-menu,
+ .popovermenu {
+ li {
+ > button,
+ > a,
+ > .menuitem {
+ /* DEPRECATED! old img in popover fallback
+ * TODO: to remove */
+ > img {
+ width: $popoveritem-height;
+ height: $popoveritem-height;
+ }
+ }
+ }
+ }
+}
+
/* CONTENT LIST ------------------------------------------------------------ */
.app-content-list {
width: 300px;