Skip to content

Commit

Permalink
layouting
Browse files Browse the repository at this point in the history
  • Loading branch information
refact0r committed Feb 5, 2023
1 parent 825cb50 commit 50b2745
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 10 deletions.
6 changes: 6 additions & 0 deletions src/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
font-size: 100%;
}

// @media (max-width: 800px) {
// :root {
// font-size: 90%;
// }
// }

* {
box-sizing: border-box;
scrollbar-width: thin;
Expand Down
53 changes: 46 additions & 7 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -180,26 +180,65 @@
}
.assignment-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
@include nowrap;
width: 100%;
}
.assignment-score {
width: 80px;
width: min-content;
text-align: right;
white-space: nowrap;
padding-left: $spacing-small;
padding-left: 0;
}
.course-grade {
padding: 0;
font-weight: bold;
}
.course-score {
text-align: right;
// @media (max-height: 650px) {
// .value {
// display: none;
// }
// .grades {
// grid-row: 2/4;
// }
// }
@media (max-width: 950px) {
.layout {
grid-template-columns: 1fr 1fr 1fr 1.75fr;
}
.week-assignments {
display: none;
}
h1 {
grid-column: 1 / 4;
}
.assignments {
grid-column: 4;
}
.grades {
grid-column: 1 / 4;
}
}
@media (max-width: 750px) {
.layout {
grid-template-columns: 1fr 1fr 1fr;
}
.improvement {
display: flex;
}
.assignments {
display: none;
}
h1 {
grid-column: 1 / 4;
}
.grades {
grid-column: 1 / 4;
}
}
@media (max-width: $breakpoint-phone) {
Expand Down
4 changes: 1 addition & 3 deletions src/routes/course/[courseIndex]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,8 @@
}
h1 {
@include nowrap;
margin-top: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.grid-heading-container {
Expand Down
6 changes: 6 additions & 0 deletions src/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ $breakpoint-phone: 480px;
border-radius: $roundness;
padding: $spacing;
}

@mixin nowrap {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

0 comments on commit 50b2745

Please sign in to comment.