Skip to content

Commit

Permalink
Frontend: Move scss variables to vars file
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhcc committed Nov 9, 2020
1 parent f1edf37 commit a9cb692
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
11 changes: 4 additions & 7 deletions vue-app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,16 +292,13 @@ a {
}
}
$nav-header-height-sm: 40px;
$profile-height-sm: 50px;
@media (max-width: 900px) {
#app {
flex-direction: column;
}
#nav-bar {
bottom: $profile-height-sm + $content-space * 2;
bottom: $profile-image-size + $content-space * 2; /* offset for profile block */
border-right: none;
max-width: 100%;
position: fixed;
Expand Down Expand Up @@ -344,16 +341,16 @@ $profile-height-sm: 50px;
}
#content {
margin-bottom: $profile-height-sm + $content-space * 2;
margin-top: $nav-header-height-sm + $content-space * 2;
margin-bottom: $profile-image-size + $content-space * 2; /* offset for profile block */
margin-top: $nav-header-height-sm + $content-space * 2; /* offset for nav header */
}
#user-bar {
bottom: 0;
max-width: none;
overflow-y: scroll;
position: fixed;
top: $nav-header-height-sm + $content-space * 2;
top: $nav-header-height-sm + $content-space * 2; /* offset for nav header */
width: 100%;
z-index: 1;
Expand Down
2 changes: 1 addition & 1 deletion vue-app/src/components/Cart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ export default class Cart extends Vue {
.cart {
display: flex;
flex-direction: column;
min-height: calc(100vh - 110px);
min-height: calc(100vh - #{$profile-image-size + 2 * $content-space});
}
.cart-item {
Expand Down
6 changes: 3 additions & 3 deletions vue-app/src/components/Profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class Profile extends Vue {
align-items: center;
background-color: #23212f;
display: flex;
height: 50px;
height: $profile-image-size;
justify-content: center;
padding: $content-space;
}
Expand Down Expand Up @@ -174,10 +174,10 @@ export default class Profile extends Vue {
border: 4px solid $button-color;
border-radius: 25px;
box-sizing: border-box;
height: 50px;
height: $profile-image-size;
margin-left: 20px;
overflow: hidden;
width: 50px;
width: $profile-image-size;
img {
height: 100%;
Expand Down
3 changes: 3 additions & 0 deletions vue-app/src/styles/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ $error-color: #BD6B5E;

$border: 2px solid $border-color;
$content-space: 30px;

$nav-header-height-sm: 40px;
$profile-image-size: 50px;

0 comments on commit a9cb692

Please sign in to comment.