Rewrote `flex` shorthand for compatibility with IE11
authorAlexander Ebert <ebert@woltlab.com>
Thu, 14 Nov 2019 14:47:30 +0000 (15:47 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Thu, 14 Nov 2019 14:47:30 +0000 (15:47 +0100)
See #3101

wcfsetup/install/files/style/layout/containerList.scss
wcfsetup/install/files/style/ui/article.scss
wcfsetup/install/files/style/ui/attachment.scss
wcfsetup/install/files/style/ui/contentItem.scss
wcfsetup/install/files/style/ui/uploadHandler.scss
wcfsetup/install/files/style/ui/userProfile.scss

index 31868388d078c4d06d2790476f6af2d6360c7f96..8de5a7c21f70ee2e1eb6174e7e8130dd74790132 100644 (file)
                }
                
                &.tripleColumned > li {
-                       flex: 0 0 calc(100% / 3);
-                       /* work-around for IE10 */
-                       width: calc(100% / 3);
+                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                       flex-grow: 0;
+                       flex-shrink: 0;
+                       flex-basis: calc(100% / 3);
                        
                        &:nth-child(3n+1):nth-last-child(-n+3),
                        &:nth-child(3n+1):nth-last-child(-n+3) ~ li {
                }
                
                &.tripleColumned > li {
-                       flex: 0 0 calc(100% / 3);
-                       /* work-around for IE10 */
-                       width: calc(100% / 3);
+                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                       flex-grow: 0;
+                       flex-shrink: 0;
+                       flex-basis: calc(100% / 3);
                }
        }
 }
index c43220087a2d26df948e12f9122f469b2c0fa508..4a79494b44eedc84ecedf9a52f12f0d6def97874 100644 (file)
@@ -310,16 +310,20 @@ html[dir="rtl"] {
        @include screen-lg {
                .articleList {
                        > li {
-                               flex: 0 0 calc(100%/3 - 10px);
-                               max-width: calc(100%/3 - 10px);
+                               /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                               flex-grow: 0;
+                               flex-shrink: 0;
+                               flex-basis: calc(100% / 3 - 10px);
                        }
                }
 
                .boxFullWidth {
                        .articleList {
                                > li {
-                                       flex: 0 0 calc(100%/6 - 10px);
-                                       max-width: calc(100%/6 - 10px);
+                                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                                       flex-grow: 0;
+                                       flex-shrink: 0;
+                                       flex-basis: calc(100% / 6 - 10px);
                                }
                        }
                }
@@ -328,8 +332,10 @@ html[dir="rtl"] {
        @include screen-sm-up {
                .articleList {
                        > li {
-                               flex: 0 0 calc(100%/3 - 10px);
-                               max-width: calc(100%/3 - 10px);
+                               /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                               flex-grow: 0;
+                               flex-shrink: 0;
+                               flex-basis: calc(100% / 3 - 10px);
                        }
                }
        }
index 32ddfcb55bcd77e493300457894bb52088f57c7c..2eaa4a11b807d92dd044b5b69f7b420f451dc35a 100644 (file)
                                   items to be exactly 1 pixel wider than the available space.
                                   Reserving 21px covers all sort of rounding errors, without
                                   being visually noticeable */
-                               flex: 0 0 calc(50% - 21px);
-                               max-width: calc(50% - 21px); /* IE fix */
+                               /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                               flex-grow: 0;
+                               flex-shrink: 0;
+                               flex-basis: calc(50% - 21px);
                                margin-right: 20px;
                        }
                }
index adb49c94fc50a0bf0fa8e308404089c116915dd7..65050174849ef8def3f526193849e04d382d6005 100644 (file)
 }
 
 .contentItemSingleColumn {
-       flex: 0 0 calc(100% - 20px);
-       max-width: calc(100% - 20px); /* IE 11 */
+       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+       flex-grow: 0;
+       flex-shrink: 0;
+       flex-basis: calc(100% - 20px);
 }
 
 .contentItemMultiColumn {
-       flex: 0 0 calc(50% - 20px);
-       max-width: calc(50% - 20px); /* IE 11 */
+       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+       flex-grow: 0;
+       flex-shrink: 0;
+       flex-basis: calc(50% - 20px);
 }
 
 .contentItemLink {
        /* There are no sidebars, use a three column layout. */
        .content:first-child:last-child {
                .contentItemMultiColumn {
-                       flex: 0 0 calc(100% / 3 - 20px);
-                       max-width: calc(100% / 3 - 20px); /* IE 11 */
+                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                       flex-grow: 0;
+                       flex-shrink: 0;
+                       flex-basis: calc(100% / 3 - 20px);
                }
        }
 }
 @include screen-md {
        /* The sidebar, if any, is not adjacent to the content, use a three column layout. */
        .contentItemMultiColumn {
-               flex: 0 0 calc(100% / 3 - 20px);
-               max-width: calc(100% / 3 - 20px); /* IE 11 */
+               /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+               flex-grow: 0;
+               flex-shrink: 0;
+               flex-basis: calc(100% / 3 - 20px);
        }
 }
 
index 0079372d4b432b955082b6c07b0ce5a6153d4445..c2a1bf556ea667ee1bc50093a2ad6058fbe5162b 100644 (file)
                                   items to be exactly 1 pixel wider than the available space.
                                   Reserving 21px covers all sort of rounding errors, without
                                   being visually noticeable */
-                               flex: 0 0 calc(50% - 21px);
-                               max-width: calc(50% - 21px); /* IE fix */
+                               /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                               flex-grow: 0;
+                               flex-shrink: 0;
+                               flex-basis: calc(50% - 21px);
                                margin-right: 20px;
                        }
                }
@@ -52,4 +54,4 @@
                        top: 0;
                }
        }
-}
\ No newline at end of file
+}
index fc1fcb66822636bc4a4ac00b7f228ddef3b6747a..e16d7d02628f732c46900f45b98c5918be69174f 100644 (file)
                }
                
                .contentHeaderTitle {
-                       flex: 0 0 calc(100% - 111px);
+                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                       flex-grow: 0;
+                       flex-shrink: 0;
+                       flex-basis: calc(100% - 111px);
                        max-width: calc(100% - 11px);
                }
        }
                }
                
                .contentHeaderTitle {
-                       flex: 0 0 calc(100% - 58px);
-                       max-width: calc(100% - 58px);
+                       /* The `flex` shorthand fails in IE11 if `calc()` is used. */
+                       flex-grow: 0;
+                       flex-shrink: 0;
+                       flex-basis: calc(100% - 58px);
                }
                
                .contentHeaderNavigation {