Skip to content

Commit

Permalink
feat: move general imports to specific scss files
Browse files Browse the repository at this point in the history
This moves scss imports to a specific file where that is required instead of having a common XModule import list.

This is part of  #31624
  • Loading branch information
andrey-canon committed Apr 26, 2023
1 parent 4afb210 commit 89ca5e8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 2 additions & 0 deletions lms/static/sass/course/courseware/_sidebar.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'bourbon/bourbon';

.course-index {
@include transition(all 0.2s $ease-in-out-quad 0s);
@include border-right(1px solid $border-color-2);
Expand Down
1 change: 1 addition & 0 deletions xmodule/css/capa/display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
// * +Problem - Choice Text Group
// * +Problem - Image Input Overrides
// * +Problem - Annotation Problem Overrides
@import 'bourbon/bourbon';

// +Variables - Capa
// ====================
Expand Down
2 changes: 2 additions & 0 deletions xmodule/css/html/display.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'bourbon/bourbon';

// HTML component display:
* {
line-height: 1.4em;
Expand Down
4 changes: 0 additions & 4 deletions xmodule/css/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@
padding: 0;
border: none;
}

.blue-button {
@include blue-button;
}
}


1 change: 1 addition & 0 deletions xmodule/css/video/display.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// --------
// Defaults: what displays if the icon font doesn't load.
// --------
@import 'bourbon/bourbon';

// the html target is necessary for xblocks and xmodules, but works across the board

Expand Down
6 changes: 2 additions & 4 deletions xmodule/static_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,8 @@ def _write_styles(selector, output_root, classes, css_attribute):
for class_ in classes:
css_imports[class_].add(fragment_name)

module_styles_lines = [
"@import 'bourbon/bourbon';",
"@import 'lms/theme/variables';",
]
module_styles_lines = []

for class_, fragment_names in sorted(css_imports.items()):
fragment_names = sorted(fragment_names)
module_styles_lines.append("""{selector}.xmodule_{class_} {{""".format(
Expand Down

0 comments on commit 89ca5e8

Please sign in to comment.