Skip to content

Commit bdcb8e8

Browse files
author
Chris Hart
committed
Clean up content layout div styles
Fixes: CNVS-32644 This commit removes all CSS styles associated with the #content and #content-wrapper divs, transferring them to new classes that will be part of the updated layout: .ic-layout-contentMain .ic-layout-contentWrapper Test plan: - Compile assets - Canvas should look and function exactly as it did before. - Check Conversations, Gradebook, the Login screen, and Speedgrader in particular, as I had to update styles in those parts of Canvas. Change-Id: I8488a1762482f9d0d0e2e8890c02da84e03186dd Reviewed-on: https://gerrit.instructure.com/92900 Reviewed-by: Pam Hiett <phiett@instructure.com> Tested-by: Jenkins QA-Review: Pierce Arner <pierce@instructure.com> Product-Review: Chris Hart <chart@instructure.com>
1 parent 774ff31 commit bdcb8e8

13 files changed

Lines changed: 58 additions & 50 deletions

File tree

app/stylesheets/base/_ic_app_layout.scss

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,35 @@ body:not(.ic-no-flex-layout):not(.embedded) .ic-app-main-content {
3939
min-width: 1px;
4040
}
4141

42-
.ic-app-main-content__primary {
42+
.ic-layout-contentWrapper {
4343
box-sizing: border-box;
4444
}
45+
46+
.ic-layout-contentMain {
47+
padding: $ic-sp*2;
48+
49+
body.is-inside-submission-frame & {
50+
padding-left: $ic-sp;
51+
padding-right: $ic-sp;
52+
}
53+
54+
body.no-headers & {
55+
padding-top: 0;
56+
}
57+
58+
body.embedded & {
59+
padding: 0 1em 1em;
60+
}
61+
62+
body.ic-framed-lti-tool & {
63+
padding: 0 $ic-sp*2;
64+
}
65+
66+
body.ic-full-screen-lti-tool & {
67+
padding: 0;
68+
}
69+
}
70+
4571
.ic-app-main-content__secondary {
4672
box-sizing: border-box;
4773
padding: $ic-sp*2;
@@ -55,7 +81,7 @@ body.course-menu-expanded {
5581
&:not(.ic-no-flex-layout):not(.embedded) .ic-app-main-content {
5682
@include breakpoint(desktop--nav-open) { @include shared-main-content; }
5783
}
58-
&:not(.ic-no-flex-layout):not(.embedded) .ic-app-main-content__primary {
84+
&:not(.ic-no-flex-layout):not(.embedded) .ic-layout-contentWrapper {
5985
@include breakpoint(desktop--nav-open) {
6086
@include shared-primary;
6187
}
@@ -72,7 +98,7 @@ body:not(.course-menu-expanded) {
7298
&:not(.ic-no-flex-layout):not(.embedded) .ic-app-main-content {
7399
@include breakpoint(desktop) { @include shared-main-content; }
74100
}
75-
&:not(.ic-no-flex-layout):not(.embedded) .ic-app-main-content__primary {
101+
&:not(.ic-no-flex-layout):not(.embedded) .ic-layout-contentWrapper {
76102
@include breakpoint(desktop) {
77103
@include shared-primary;
78104
}
@@ -122,6 +148,12 @@ body:not(.course-menu-expanded) {
122148
box-sizing: border-box;
123149
min-height: 100vh;
124150

151+
body:not(.full-width) & {
152+
// We want to add a max size to most pages in canvas
153+
// unless it's a full-width app
154+
max-width: 1366px;
155+
}
156+
125157
body:not(.ic-no-flex-layout):not(.embedded) & {
126158
display: flex;
127159
flex-direction: column;

app/stylesheets/base/_layout.scss

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ $layout-modal-font-color: $ic-font-color-dark;
77
$footer-links-color: lighten($ic-font-color-dark, 16);
88
$footer-links-border-color: lighten($ic-color-dark, 16);
99

10-
body:not(.full-width) .ic-app-main-layout-vertical {
11-
// We want to add a max size to most pages in canvas
12-
// unless it's a full-width app
13-
max-width: 1366px;
14-
}
15-
1610
body {
1711
min-height: 100vh;
1812
&:not(.is-inside-submission-frame):not(.embedded) {
@@ -38,9 +32,6 @@ body {
3832
background-color: transparent;
3933
box-shadow: none;
4034
}
41-
#content {
42-
padding-top: 0;
43-
}
4435
}
4536
&.embedded {
4637
#application, #wrapper, #main {
@@ -49,9 +40,6 @@ body {
4940
#main {
5041
min-height: 0;
5142
}
52-
#content {
53-
padding: 1em;
54-
}
5543
h2, .h2 {
5644
@include ui-widget-header-bg-and-text;
5745
@include fontSize($ic-font-size--small);
@@ -86,20 +74,9 @@ body {
8674
z-index: 10;
8775
}
8876

89-
#content {
90-
padding: $ic-sp*2;
91-
body.is-inside-submission-frame & {
92-
padding-left: $ic-sp;
93-
padding-right: $ic-sp;
94-
}
95-
}
96-
9777
// **********************************************************************************
9878
// all of the following are classes that should be applied to 'body' when appropriate
9979

100-
body.ic-framed-lti-tool #content { padding: 0 $ic-sp*2; }
101-
body.ic-full-screen-lti-tool #content { padding: 0; }
102-
10380
.with-left-side {
10481
#left-side {
10582
display: block;
@@ -130,14 +107,6 @@ body.ic-full-screen-lti-tool #content { padding: 0; }
130107
}
131108
}
132109

133-
// This hides stuff till the javascript has done it's stuff
134-
.hide-content-while-scripts-not-loaded {
135-
#content, #right-side-wrapper {
136-
transiton: opacity 0.3s;
137-
opacity: 1;
138-
}
139-
}
140-
141110
// **********************************************************************************
142111
// end classes applied to body
143112

app/stylesheets/base/_print.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
// this is for firefox, if things dont have overflow:visible then it wont print any more than one page.
3030
.ic-app-main-layout-vertical,
31-
#content,
31+
.ic-layout-contentMain,
3232
#wiki_show_view_main {
3333
overflow: visible !important;
3434
}
@@ -42,7 +42,7 @@
4242
display: block !important;
4343
}
4444

45-
#content {
45+
.ic-layout-contentMain {
4646
width: auto;
4747
// the padding:0 here is to revert the padding added by .with-scrolling-right-side, &.with-sidebar-pinned-to-bottom
4848
padding: 0 !important;

app/stylesheets/bundles/context_modules2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
margin-bottom: 0;
8484
}
8585
}
86-
#content {
86+
.ic-layout-contentMain {
8787
padding: 0;
8888
}
8989
.btn {

app/stylesheets/bundles/speed_grader.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@import "vendor/_xflex.scss";
44

55

6-
#content {
6+
.ic-layout-contentMain {
77
padding: 0;
88
}
99

app/stylesheets/components/_g_instructure.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1565,7 +1565,8 @@ body > #ui-datepicker-div {
15651565
}
15661566
}
15671567

1568-
body.padless-content #content, #content.padless {
1568+
body.padless-content .ic-layout-contentMain,
1569+
.ic-layout-contentMain.padless {
15691570
#sequence_footer {
15701571
margin-left: 10px;
15711572
margin-right: 10px;

app/stylesheets/pages/conversations/_conversations_new.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
@import "vendor/bootstrap/button-groups";
22
@import "components/autocomplete";
33

4-
#not_right_side, #content-wrapper, #content, .conversations {
4+
#not_right_side,
5+
.ic-layout-contentWrapper,
6+
.ic-layout-contentMain,
7+
.conversations {
58
height: 100%;
69
}
710

@@ -18,7 +21,7 @@
1821
display: none;
1922
}
2023

21-
#content {
24+
.ic-layout-contentMain {
2225
overflow: visible;
2326
padding: 0;
2427
}

app/stylesheets/pages/gradebook2/_gradebook2.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ $cell_height: 33px;
4242

4343
// ******* END overrides of the default slick.grid.css styles ********
4444

45-
.gradebook2 #content {
45+
.gradebook2 .ic-layout-contentMain {
4646
position: relative;
4747
padding: 0 $ic-sp*2;
4848
}

app/stylesheets/pages/login/_ic-login.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ $ic-Login-confirmation-bgd: #34444f;
3535
////////////////////////////////////////
3636
// New Login Styles
3737
////////////////////////////////////////
38-
#content {padding: 0;}
38+
.ic-layout-contentMain {
39+
padding: 0;
40+
}
41+
3942
body.ic-Login-Body { // apply the background to the body element so that you don't see white bg as you scroll
4043
background-color: $ic-brand-Login-body-bgd-color;
4144
background-image:

app/stylesheets/pages/login/_login_otp.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ body.modal {
6363
margin: 0;
6464
}
6565
}
66-
body.no-headers #content,
67-
body.embedded #content {
66+
body.no-headers .ic-layout-contentMain,
67+
body.embedded .ic-layout-contentMain {
6868
padding: 10px;
6969
}
7070
#login_form {
@@ -73,4 +73,4 @@ body.modal {
7373
#footer {
7474
padding: 0 20px;
7575
}
76-
}
76+
}

0 commit comments

Comments
 (0)