Fix layout in IE 10+

This commit is contained in:
Ramon Wenger 2019-04-03 10:12:36 +02:00
parent 760e36a344
commit 7d3bcf0fbd
12 changed files with 146 additions and 20 deletions

View File

@ -1,5 +1,5 @@
<template> <template>
<div :class="{'no-scroll': showModal}"> <div :class="{'no-scroll': showModal}" class="app">
<component :is="showModal" v-if="showModal"></component> <component :is="showModal" v-if="showModal"></component>
<component :is="layout"></component> <component :is="layout"></component>
</div> </div>
@ -58,6 +58,11 @@
<style lang="scss"> <style lang="scss">
@import "styles/main.scss"; @import "styles/main.scss";
.app {
/*for IE10+*/
display:flex;
}
.no-scroll { .no-scroll {
overflow-y: hidden; overflow-y: hidden;
} }

View File

@ -69,7 +69,11 @@
width: 46px; width: 46px;
height: 46px; height: 46px;
border-radius: 23px; border-radius: 23px;
display: grid; display: flex;
justify-content: center;
@supports (display: grid) {
display: grid
}
justify-items: center; justify-items: center;
align-items: center; align-items: center;

View File

@ -59,9 +59,13 @@
border-radius: 12px; border-radius: 12px;
box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15); box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.15);
border: 1px solid $color-lightgrey; border: 1px solid $color-lightgrey;
display: grid; display: -ms-grid;
@supports (display: grid) {
display: grid;
}
grid-template-rows: auto 1fr 65px; grid-template-rows: auto 1fr 65px;
grid-template-areas: "header" "body" "footer"; grid-template-areas: "header" "body" "footer";
-ms-grid-rows: auto 1fr 65px;
position: relative; position: relative;
&--hide-header { &--hide-header {
@ -81,6 +85,7 @@
width: 95vw; width: 95vw;
height: auto; height: auto;
grid-template-rows: 1fr; grid-template-rows: 1fr;
-ms-grid-rows: 1fr;
grid-template-areas: "body"; grid-template-areas: "body";
overflow: hidden; overflow: hidden;
} }
@ -107,7 +112,11 @@
} }
&__backdrop { &__backdrop {
display: grid; display: flex;
justify-content: center;
@supports (display: grid) {
display: grid;
}
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -119,12 +128,14 @@
&__header { &__header {
grid-area: header; grid-area: header;
-ms-grid-row: 1;
padding: 10px $modal-lateral-padding; padding: 10px $modal-lateral-padding;
border-bottom: 1px solid $color-lightgrey; border-bottom: 1px solid $color-lightgrey;
} }
&__body { &__body {
grid-area: body; grid-area: body;
-ms-grid-row: 2;
padding: 10px $modal-lateral-padding; padding: 10px $modal-lateral-padding;
overflow: auto; overflow: auto;
box-sizing: border-box; box-sizing: border-box;
@ -150,6 +161,7 @@
&__footer { &__footer {
grid-area: footer; grid-area: footer;
-ms-grid-row: 3;
border-top: 1px solid $color-lightgrey; border-top: 1px solid $color-lightgrey;
padding: 16px $modal-lateral-padding; padding: 16px $modal-lateral-padding;
} }

View File

@ -66,8 +66,12 @@
@import "@/styles/_functions.scss"; @import "@/styles/_functions.scss";
.content-block-element-chooser-widget { .content-block-element-chooser-widget {
display: grid; display: -ms-grid;
@supports (display: grid) {
display: grid;
}
grid-template-columns: repeat(6, 1fr); grid-template-columns: repeat(6, 1fr);
-ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
grid-column-gap: 0px; grid-column-gap: 0px;
font-family: $sans-serif-font-family; font-family: $sans-serif-font-family;
text-align: center; text-align: center;
@ -78,6 +82,31 @@
position: relative; position: relative;
margin-bottom: 20px; margin-bottom: 20px;
/*IE10+*/
& > :nth-child(1) {
-ms-grid-column: 1;
}
& > :nth-child(2) {
-ms-grid-column: 2;
}
& > :nth-child(3) {
-ms-grid-column: 3;
}
& > :nth-child(4) {
-ms-grid-column: 4;
}
& > :nth-child(5) {
-ms-grid-column: 5;
}
& > :nth-child(6) {
-ms-grid-column: 6;
}
&::before { &::before {
content: ""; content: "";
position: absolute; position: absolute;

View File

@ -30,11 +30,19 @@
box-sizing: border-box; box-sizing: border-box;
background-color: $color-white; background-color: $color-white;
border-radius: $default-border-radius; border-radius: $default-border-radius;
display: grid; display: flex;
flex-direction: column;
@supports (display: grid) {
display: grid;
}
grid-template-rows: 1fr 55px; grid-template-rows: 1fr 55px;
&__page { &__page {
display: grid; display: flex;
justify-content: center;
@supports (display: grid) {
display: grid;
}
justify-items: center; justify-items: center;
align-items: center; align-items: center;
height: 100%; height: 100%;

View File

@ -1,14 +1,14 @@
<template> <template>
<div class="project-widget" :class="widgetClass"> <div class="project-widget" :class="widgetClass">
<router-link :to="{name: 'project', params: {slug: slug}}" tag="div" class="project-widget__content"> <router-link :to="{name: 'project', params: {slug: slug}}" tag="div" class="project-widget__content">
<h3 class="project-widget__title">{{title}}</h3> <h3 class="project-widget__title">{{title}}</h3>
<entry-count-widget entry-count="4"></entry-count-widget> <entry-count-widget entry-count="4"></entry-count-widget>
<owner-widget name="Hans Muster"></owner-widget> <owner-widget name="Hans Muster"></owner-widget>
</router-link> </router-link>
<widget-footer <widget-footer class="project-widget__footer"
entity="Eintrag" entity="Eintrag"
></widget-footer> ></widget-footer>
</div> </div>
</template> </template>
@ -47,14 +47,35 @@
box-sizing: border-box; box-sizing: border-box;
display: -ms-grid; display: -ms-grid;
margin-bottom: $large-spacing;
@supports (display: grid) { @supports (display: grid) {
display: grid; display: grid;
margin-bottom: 0;
} }
grid-template-rows: 150px 1fr; grid-template-rows: 150px 1fr;
-ms-grid-rows: 150px 48px;
-ms-grid-columns: 1fr;
&__content { &__content {
padding: 23px; padding: 23px;
cursor: pointer; cursor: pointer;
-ms-grid-row: 1;
/*
* For IE10+
*/
display: -ms-grid;
-ms-grid-rows: 50px 30px 30px;
& > :nth-child(1) {
-ms-grid-row: 1;
}
& > :nth-child(2) {
-ms-grid-row: 2;
}
& > :nth-child(3) {
-ms-grid-row: 3;
}
} }
&__title { &__title {
@ -62,6 +83,10 @@
font-weight: 600; font-weight: 600;
} }
&__footer {
-ms-grid-row: 2;
}
@include skillbox-colors; @include skillbox-colors;
} }
</style> </style>

View File

@ -25,7 +25,8 @@
position: absolute; position: absolute;
right: 0; right: 0;
bottom: -110px; bottom: -110px;
display: grid; display: flex;
flex-direction: column;
background-color: $color-white; background-color: $color-white;
padding: 20px; padding: 20px;
z-index: 10; z-index: 10;

View File

@ -13,14 +13,19 @@
.layout { .layout {
&--simple { &--simple {
display: -ms-grid; display: -ms-grid;
display: grid; @supports (display: grid) {
display: grid;
}
padding: 20px; padding: 20px;
width: 100%;
@include desktop { @include desktop {
grid-template-columns: 1fr 640px 1fr; grid-template-columns: 1fr 640px 1fr;
-ms-grid-columns: 1fr 640px 1fr;
& > :nth-child(2) { & > :nth-child(2) {
grid-column: 2; grid-column: 2;
-ms-grid-column: 2;
} }
} }
@ -31,8 +36,12 @@
justify-self: end; justify-self: end;
cursor: pointer; cursor: pointer;
display:flex;
justify-content:end;
@include desktop { @include desktop {
grid-column: 3; grid-column: 3;
-ms-grid-column: 3;
} }
&__icon { &__icon {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="portfolio__page"> <div class="portfolio__page">
<div class="portfolio"> <div class="portfolio">
<add-project></add-project> <add-project class="portfolio__add-project"></add-project>
<project-widget <project-widget
v-for="project in projects" v-for="project in projects"
@ -46,7 +46,8 @@
@import "@/styles/_variables.scss"; @import "@/styles/_variables.scss";
.portfolio { .portfolio {
display: -ms-grid; display: flex;
flex-direction: column;
@supports (display: grid) { @supports (display: grid) {
display: grid; display: grid;
} }
@ -58,11 +59,22 @@
box-sizing: border-box; box-sizing: border-box;
&__page { &__page {
display: grid; display: flex;
@supports (display: grid) {
display: grid;
}
align-content: center; align-content: center;
justify-content: center; justify-content: center;
padding-top: $large-spacing; padding-top: $large-spacing;
} }
/*IE10*/
&__add-project {
margin-bottom: $large-spacing;
@supports (display: grid) {
margin-bottom: 0;
}
}
} }
</style> </style>

View File

@ -107,7 +107,15 @@
&__content { &__content {
background-color: $color-grey--lighter; background-color: $color-grey--lighter;
display: grid; display: flex;
flex-direction: column;
width: 840px;
align-content: center;
margin: 0 auto;
@supports (display: grid) {
display: grid;
width: auto;
}
grid-template-columns: 840px; grid-template-columns: 840px;
grid-row-gap: 30px; grid-row-gap: 30px;
justify-content: center; justify-content: center;

View File

@ -65,6 +65,7 @@
.rooms-page { .rooms-page {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: start;
@supports (display: grid) { @supports (display: grid) {
display: grid; display: grid;

View File

@ -2,15 +2,24 @@
&__header { &__header {
grid-template-rows: 50px minmax(50px, max-content) auto; grid-template-rows: 50px minmax(50px, max-content) auto;
-ms-grid-rows: 50px 50px auto;
grid-row-gap: 30px; grid-row-gap: 30px;
display: -ms-grid; display: -ms-flex;
display: grid; @supports (display: grid) {
display: grid;
}
} }
&__meta { &__meta {
border-bottom: 1px solid $color-lightgrey; border-bottom: 1px solid $color-lightgrey;
align-self: end; align-self: end;
padding: 20px 0; padding: 20px 0;
width: 100%;
margin-bottom: $large-spacing;
@supports (display: grid) {
margin-bottom: 0;
}
} }
&__title { &__title {
@ -24,8 +33,11 @@
} }
&__content { &__content {
display: -ms-grid; display: flex;
display: grid; flex-direction: column;
@supports (display: grid) {
display: grid;
}
grid-row-gap: 40px; grid-row-gap: 40px;
padding-bottom: 40px; padding-bottom: 40px;