Skip to content

Commit 27e9e7d

Browse files
committed
fix(MdApp): fix styles after ssr support
1 parent ded23b8 commit 27e9e7d

File tree

6 files changed

+44
-7
lines changed

6 files changed

+44
-7
lines changed

src/components/MdApp/MdApp.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
@import "~components/MdLayout/mixins";
7171
7272
.md-app {
73+
display: flex;
7374
overflow: hidden;
7475
position: relative;
7576
@@ -122,9 +123,17 @@
122123
}
123124
124125
.md-app-content {
125-
margin-top: -64px;
126+
margin: -64px 24px 24px;
126127
position: relative;
127128
z-index: 2;
129+
130+
@include md-layout-small {
131+
margin: -64px 16px 16px;
132+
}
133+
134+
@include md-layout-xsmall {
135+
margin: -64px 8px 8px;
136+
}
128137
}
129138
}
130139
}
@@ -157,9 +166,15 @@
157166
}
158167
159168
.md-app-container {
169+
flex: 1;
170+
display: flex;
160171
overflow: auto;
161172
transform: translate3D(0, 0, 0);
162173
transition: padding-left .4s $md-transition-default-timing;
163174
will-change: padding-left;
164175
}
176+
177+
.md-app-scroller {
178+
flex: 1;
179+
}
165180
</style>

src/components/MdApp/MdAppContent.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@
2121
</script>
2222

2323
<style lang="scss">
24-
.md-app-content.md-card {
25-
margin-right: 16px;
26-
margin-left: 16px;
27-
overflow: visible;
24+
.md-app-content {
25+
height: 100%;
26+
27+
.md-card {
28+
margin-right: 16px;
29+
margin-left: 16px;
30+
overflow: visible;
31+
}
2832
}
2933
</style>

src/components/MdApp/MdAppInternalDrawer.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="md-app md-app-internal-drawer md-layout-column" :class="appClasses">
2+
<div class="md-app md-app-internal-drawer md-layout-column" :class="[appClasses, $mdActiveTheme]">
33
<slot name="md-app-toolbar"></slot>
44

55
<main class="md-app-container md-flex md-layout-row" :style="[containerStyles, contentStyles]" :class="[$mdActiveTheme, scrollerClasses]">
@@ -25,6 +25,8 @@
2525
@import "~components/MdAnimation/variables";
2626
2727
.md-app-internal-drawer {
28+
flex-direction: column;
29+
2830
.md-app-scroller {
2931
overflow: auto;
3032
}

src/components/MdApp/MdAppSideDrawer.vue

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="md-app md-app-side-drawer md-layout-row" :class="appClasses">
2+
<div class="md-app md-app-side-drawer md-layout-row" :class="[appClasses, $mdActiveTheme]">
33
<slot name="md-app-drawer"></slot>
44

55
<main class="md-app-container md-flex md-layout-column" :class="[$mdActiveTheme, scrollerClasses]" :style="contentStyles" @scroll.passive="handleScroll">
@@ -20,3 +20,13 @@
2020
mixins: [MdAppMixin]
2121
})
2222
</script>
23+
24+
<style lang="scss">
25+
@import "~components/MdAnimation/variables";
26+
27+
.md-app-side-drawer {
28+
.md-app-container {
29+
flex-direction: column;
30+
}
31+
}
32+
</style>

src/components/MdApp/theme.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.md-app:not(.md-overlap) {
2+
@include md-theme-component() {
3+
@include md-theme-property(background-color, background);
4+
}
5+
}

src/theme/all.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@import "../components/MdApp/theme";
12
@import "../components/MdAutocomplete/theme";
23
@import "../components/MdAvatar/theme";
34
@import "../components/MdBottomBar/theme";

0 commit comments

Comments
 (0)