Skip to content

Commit

Permalink
added mixins to fix extend errors inside media query
Browse files Browse the repository at this point in the history
  • Loading branch information
mraarif committed Oct 15, 2020
1 parent 36512bc commit ac4fc5b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 21 deletions.
19 changes: 14 additions & 5 deletions lms/static/sass/elements/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// Scale - (6, 7, 8, 9, 10, 11, 12, 14, 16, 18, 21, 24, 36, 48, 60, 72)

// weights
@import "themes/red-theme/lms/static/sass/partials/lms/theme/_variables.scss";

%t-ultrastrong {
font-weight: 700;
}
Expand All @@ -28,9 +30,13 @@
font-weight: 200;
}

@mixin t-title{
font-family: $font-family-sans-serif;
}

// headings/titles
%t-title {
font-family: $font-family-sans-serif;
@include t-title
}

%t-title1 {
Expand All @@ -54,11 +60,14 @@
@include line-height(36);
}

%t-title4 {
@extend %t-title !optional;
@mixin t-title4{
@include t-title;
@include font-size(24);
@include line-height(24);
}

@include font-size(24);
@include line-height(24);
%t-title4 {
@include t-title4
}

%t-title5 {
Expand Down
4 changes: 3 additions & 1 deletion lms/static/sass/multicourse/_dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

// +Dashboard
// ====================
@import "lms/static/sass/elements/_typography.scss";

.dashboard {
@include clearfix();

Expand Down Expand Up @@ -150,7 +152,7 @@

// Responsive behavior
@include media-breakpoint-down(sm) {
@extend %t-title4 !optional;
@include t-title4
}
}
}
Expand Down
31 changes: 16 additions & 15 deletions scripts/scss_modernizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,19 @@ def process_files(directory):


if __name__ == '__main__':
file_to_process = sys.argv[1]
updated_data_a = process_file(file_to_process)
update_file(file_to_process, updated_data_a)

# print("processing LMS...")
# process_files("lms")
#
# print("processing themes...")
# process_files("themes")
#
# print("processing CMS...")
# process_files("cms")
#
# print("processing common...")
# process_files("common")

# file_to_process = sys.argv[1]
# updated_data_a = process_file(file_to_process)
# update_file(file_to_process, updated_data_a)

print("processing LMS...")
process_files("lms")

print("processing themes...")
process_files("themes")

print("processing CMS...")
process_files("cms")

print("processing common...")
process_files("common")

0 comments on commit ac4fc5b

Please sign in to comment.