Mobile styles WIP

- Mobile layout mostly done;
- Pane transitions;
This commit is contained in:
charlesh88
2018-08-22 10:21:14 -07:00
parent 2ee7a77a86
commit b070cc27f4
5 changed files with 18 additions and 24 deletions

View File

@ -205,7 +205,7 @@ $legendCollapsedNameMaxW: 50%;
$legendHoverValueBg: rgba($colorBodyFg, 0.2); $legendHoverValueBg: rgba($colorBodyFg, 0.2);
// Tree // Tree
$colorTreeBg: #f5f5f5; // Used $colorTreeBg: #f0f0f0; // Used
$colorItemTreeHoverBg: pullForward($colorBodyBg, $hoverRatioPercent); $colorItemTreeHoverBg: pullForward($colorBodyBg, $hoverRatioPercent);
$colorItemTreeHoverFg: pullForward($colorBodyFg, $hoverRatioPercent); $colorItemTreeHoverFg: pullForward($colorBodyFg, $hoverRatioPercent);
$colorItemTreeIcon: $colorKey; // Used $colorItemTreeIcon: $colorKey; // Used

View File

@ -36,7 +36,7 @@
} }
&__collapse-button { &__collapse-button {
@include test(); // @include test();
position: absolute; position: absolute;
display: flex; display: flex;
align-items: center; align-items: center;
@ -72,12 +72,12 @@
} }
/************************ MOBILE-FIRST STYLES */ /************************ MOBILE-FIRST STYLES */
@include test(green, 0.1); // @include test(green, 0.1);
/************************ DESKTOP STYLES */ /************************ DESKTOP STYLES */
body.desktop & { body.desktop & {
@include test(blue, 0.1); //@include test(blue, 0.1);
&__handle { &__handle {
z-index: 1; z-index: 1;

View File

@ -56,8 +56,15 @@
} }
&__pane-tree { &__pane-tree {
background: $colorTreeBg;
padding: $m;
backface-visibility: hidden;
transition: all 350ms ease-in-out;
width: 30%; width: 30%;
// Add drop shadow
//background-image: linear-gradient(90deg, rgba(black, 0) calc(100% - 10px), rgba(black, 0.1) calc(100% - 2px), rgba(black, 0.2) 100%);
[class*="collapse-button"] { [class*="collapse-button"] {
// For mobile, collapse button becomes menu icon // For mobile, collapse button becomes menu icon
height: $mobileMenuIconD; height: $mobileMenuIconD;
@ -65,6 +72,7 @@
transform: translateX(100%); transform: translateX(100%);
&:before { &:before {
color: $colorKey;
content: $glyph-icon-menu-hamburger; content: $glyph-icon-menu-hamburger;
font-size: 1.4em; font-size: 1.4em;
} }
@ -77,17 +85,11 @@
} }
@include phonePortrait() { @include phonePortrait() {
border: 1px solid red;
&__pane-tree { &__pane-tree {
// @include test(orange);
width: calc(100% - #{$mobileMenuIconD}); width: calc(100% - #{$mobileMenuIconD});
[class*="collapse-button"] {
// transform: translateX(0);
}
+ .l-pane { + .l-pane {
// Hide the next pane over when this pane is expanded // Hide pane-main over when this pane is expanded
opacity: 0; opacity: 0;
pointer-events: none; pointer-events: none;
} }
@ -95,16 +97,9 @@
&[class*="--collapsed"] + .l-pane { &[class*="--collapsed"] + .l-pane {
opacity: 1; opacity: 1;
pointer-events: inherit; pointer-events: inherit;
transition: opacity 500ms ease 250ms;
} }
} }
&__pane-main {
//transform: translateX(calc(100% - #{$mobileMenuIconD}));
/*width: 100%;*/
}
> .l-pane__contents {
}
} }
/********** MAIN AREA */ /********** MAIN AREA */
@ -152,11 +147,6 @@
} }
} }
&__pane-tree {
background: $colorTreeBg;
padding: $m;
}
&__pane-main { &__pane-main {
flex: 1 1 auto; flex: 1 1 auto;
} }

View File

@ -10,6 +10,8 @@
<style lang="scss"> <style lang="scss">
@import "~styles/sass-base"; @import "~styles/sass-base";
// TODO: make sure hit area encompasses all of the tree item; currently is just the text
.c-tree { .c-tree {
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;

View File

@ -23,6 +23,8 @@
</template> </template>
<script> <script>
// TODO: make sure hit area encompasses all of the tree item; currently is just the text
import viewControl from '../controls/viewControl.vue' import viewControl from '../controls/viewControl.vue'
export default { export default {
name: 'tree-item', name: 'tree-item',