From 27b7b9bb1594c91aa6572d2fe0a6f31072e95d84 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 18 Jan 2023 12:39:58 -0500 Subject: [PATCH 1/5] build: upgrade from libsass-python to dart-sass --- pavelib/assets.py | 23 +++++++++-------------- requirements/edx/base.txt | 4 +--- requirements/edx/paver.in | 1 - requirements/edx/paver.txt | 3 --- requirements/edx/testing.txt | 1 - 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/pavelib/assets.py b/pavelib/assets.py index ad933de19596..e52d9924f704 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -509,11 +509,6 @@ def _compile_sass(system, theme, debug, force, timing_info): :param timing_info: list variable to keep track of timing for sass compilation """ - # Note: import sass only when it is needed and not at the top of the file. - # This allows other paver commands to operate even without libsass being - # installed. In particular, this allows the install_prereqs command to be - # used to install the dependency. - import sass if system == "common": sass_dirs = get_common_sass_directories() else: @@ -523,11 +518,9 @@ def _compile_sass(system, theme, debug, force, timing_info): # determine css out put style and source comments enabling if debug: - source_comments = True - output_style = 'nested' + output_style = 'expanded' # note: includes comments else: - source_comments = False - output_style = 'compressed' + output_style = 'compressed' # note: comments are removed for dirs in sass_dirs: start = datetime.now() @@ -555,11 +548,13 @@ def _compile_sass(system, theme, debug, force, timing_info): sass_dir=sass_source_dir, )) else: - sass.compile( - dirname=(sass_source_dir, css_dir), - include_paths=COMMON_LOOKUP_PATHS + lookup_paths, - source_comments=source_comments, - output_style=output_style, + load_paths = COMMON_LOOKUP_PATHS + lookup_paths + sh( + "sass" + + f" --style={output_style}" + + "".join(f" --load-path={path}" for path in load_paths) + + f" {sass_source_dir}" # input dir + + f" {css_dir}" # output dir ) # For Sass files without explicit RTL versions, generate diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index d8db8ec3db39..d0072a2c7360 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -667,9 +667,7 @@ learner-pathway-progress==1.3.3 levenshtein==0.20.9 # via python-levenshtein libsass==0.10.0 - # via - # -r requirements/edx/paver.txt - # ora2 + # via ora2 loremipsum==1.0.5 # via ora2 lti-consumer-xblock==7.2.1 diff --git a/requirements/edx/paver.in b/requirements/edx/paver.in index c5e80916e9fd..4f55ffa0e6bc 100644 --- a/requirements/edx/paver.in +++ b/requirements/edx/paver.in @@ -12,7 +12,6 @@ edx-opaque-keys # Create and introspect course and xblock identities lazy # Lazily-evaluated attributes for Python objects -libsass==0.10.0 # Python bindings for the LibSass CSS compiler markupsafe # XML/HTML/XHTML Markup safe strings mock # Stub out code with mock objects and make assertions about how they have been used path # Easier manipulation of filesystem paths diff --git a/requirements/edx/paver.txt b/requirements/edx/paver.txt index ec13f2fdf300..c6dbe252d4bb 100644 --- a/requirements/edx/paver.txt +++ b/requirements/edx/paver.txt @@ -16,8 +16,6 @@ idna==3.4 # via requests lazy==1.5 # via -r requirements/edx/paver.in -libsass==0.10.0 - # via -r requirements/edx/paver.in markupsafe==2.1.1 # via -r requirements/edx/paver.in mock==5.0.1 @@ -41,7 +39,6 @@ requests==2.28.2 # via -r requirements/edx/paver.in six==1.16.0 # via - # libsass # paver # python-memcached stevedore==4.1.1 diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index ba70bf71d5ec..cafbf27e3c63 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -63,7 +63,6 @@ attrs==22.2.0 # jsonschema # lti-consumer-xblock # openedx-events - # outcome # pytest babel==2.11.0 # via From 5a9f5045bfa2345daa11e5752e41adc4e90ae9e3 Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 18 Jan 2023 15:20:30 -0500 Subject: [PATCH 2/5] temp: hide sass warnings so that we can see the errors --- pavelib/assets.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pavelib/assets.py b/pavelib/assets.py index e52d9924f704..830d348129ae 100644 --- a/pavelib/assets.py +++ b/pavelib/assets.py @@ -551,6 +551,7 @@ def _compile_sass(system, theme, debug, force, timing_info): load_paths = COMMON_LOOKUP_PATHS + lookup_paths sh( "sass" + + " --quiet" + f" --style={output_style}" + "".join(f" --load-path={path}" for path in load_paths) + f" {sass_source_dir}" # input dir From 866fd24e3ecc92a67d4821db47f97aad475a06e3 Mon Sep 17 00:00:00 2001 From: David Joy Date: Wed, 19 May 2021 18:10:39 -0400 Subject: [PATCH 3/5] build: djoy and abutterworth's fixes for libsass upgrade Original contents: chore: update libsass to v0.20.1 Updating libsass to latest. Libsass is now stricter about undefined placeholder mixins, and so we had to mark a bunch of broken code as !optional. We had upgraded libsass until it broke with this version: https://github.com/sass/libsass/releases/tag/3.3.3 That release of libsass included a fix for a missing error on undefined placeholders. Our code was always wrong, now it just complains. This PR fixes it. fix: some more extend issues fix: add needed functions before bootstrap variables No longer rely on themes to import bootstrap functions --- cms/static/sass/bootstrap/_components.scss | 6 +++--- cms/static/sass/bootstrap/_footer.scss | 2 +- cms/static/sass/bootstrap/_header.scss | 12 ++++++------ cms/static/sass/bootstrap/_layouts.scss | 18 +++++++++--------- lms/static/sass/_build-footer-edx.scss | 1 + lms/static/sass/course/_profile.scss | 2 +- .../sass/course/courseware/_courseware.scss | 2 +- .../course/layout/_courseware_preview.scss | 10 +++++----- lms/static/sass/discussion/_discussion.scss | 2 +- .../sass/discussion/elements/_editor.scss | 2 +- .../sass/discussion/elements/_navigation.scss | 2 +- .../sass/discussion/views/_response.scss | 2 +- lms/static/sass/features/_bookmarks.scss | 4 ++-- lms/static/sass/multicourse/_dashboard.scss | 5 ----- .../shared/_alerts_pattern_library_shim.scss | 2 +- lms/static/sass/shared/_help-tab.scss | 2 +- lms/static/sass/shared/_modal.scss | 15 +++++++-------- 17 files changed, 42 insertions(+), 47 deletions(-) diff --git a/cms/static/sass/bootstrap/_components.scss b/cms/static/sass/bootstrap/_components.scss index 14e816f5bc16..98f25b8ff6af 100644 --- a/cms/static/sass/bootstrap/_components.scss +++ b/cms/static/sass/bootstrap/_components.scss @@ -70,8 +70,8 @@ list-style: none; .cta-show-sock { - @extend %ui-btn-pill; - @extend %t-action4; + @extend %ui-btn-pill !optional; + @extend %t-action4 !optional; background: theme-color("light"); padding: ($baseline/2) $baseline; @@ -145,7 +145,7 @@ display: block; .icon { - @extend %t-icon4; + @extend %t-icon4 !optional; vertical-align: middle; margin-right: $baseline/4; diff --git a/cms/static/sass/bootstrap/_footer.scss b/cms/static/sass/bootstrap/_footer.scss index 985a741f0d26..f7a84aa83673 100644 --- a/cms/static/sass/bootstrap/_footer.scss +++ b/cms/static/sass/bootstrap/_footer.scss @@ -13,7 +13,7 @@ padding: $baseline; footer.primary { - @extend %t-copy-sub2; + @extend %t-copy-sub2 !optional; @include clearfix(); diff --git a/cms/static/sass/bootstrap/_header.scss b/cms/static/sass/bootstrap/_header.scss index b90a7ee5ed9c..5fc34b8c312c 100644 --- a/cms/static/sass/bootstrap/_header.scss +++ b/cms/static/sass/bootstrap/_header.scss @@ -74,8 +74,8 @@ // basic layout - nav items nav { > ol > .nav-item { - @extend %t-action3; - @extend %t-strong; + @extend %t-action3 !optional; + @extend %t-strong !optional; display: inline-block; vertical-align: middle; @@ -163,8 +163,8 @@ } .course-title { - @extend %t-action2; - @extend %t-strong; + @extend %t-action2 !optional; + @extend %t-strong !optional; display: block; width: 100%; @@ -422,8 +422,8 @@ } .nav-item { - @extend %t-action3; - @extend %t-regular; + @extend %t-action3 !optional; + @extend %t-regular !optional; display: block; margin: 0 0 ($baseline/4) 0; diff --git a/cms/static/sass/bootstrap/_layouts.scss b/cms/static/sass/bootstrap/_layouts.scss index 7bee47228bc9..0d8b7596ff4a 100644 --- a/cms/static/sass/bootstrap/_layouts.scss +++ b/cms/static/sass/bootstrap/_layouts.scss @@ -119,8 +119,8 @@ // buttons .button { - @extend %btn-primary-blue; - @extend %sizing; + @extend %btn-primary-blue !optional; + @extend %sizing !optional; .action-button-text { display: inline-block; @@ -135,8 +135,8 @@ // CASE: new/create button &.new-button, &.button-new { - @extend %btn-primary-green; - @extend %sizing; + @extend %btn-primary-green !optional; + @extend %sizing !optional; } } } @@ -164,7 +164,7 @@ color: $body-color; &.navigation-current { - @extend %ui-disabled; + @extend %ui-disabled !optional; color: color("gray"); max-width: 250px; @@ -199,7 +199,7 @@ // CASE: wizard-based mast .mast-wizard { .page-header-sub { - @extend %t-title4; + @extend %t-title4 !optional; color: color("gray"); font-weight: 300; @@ -247,7 +247,7 @@ padding-bottom: ($baseline/2); .title-sub { - @extend %t-copy-sub1; + @extend %t-copy-sub1 !optional; display: block; margin: 0; @@ -255,7 +255,7 @@ } .title-1 { - @extend %t-title3; + @extend %t-title3 !optional; @extend %t-strong; margin: 0; @@ -283,7 +283,7 @@ } .title-3 { - @extend %t-title6; + @extend %t-title6 !optional; margin: 0 0 ($baseline/2) 0; } diff --git a/lms/static/sass/_build-footer-edx.scss b/lms/static/sass/_build-footer-edx.scss index f2d63df5c55f..dc58059ad1b9 100644 --- a/lms/static/sass/_build-footer-edx.scss +++ b/lms/static/sass/_build-footer-edx.scss @@ -2,6 +2,7 @@ // LMS edx.org Footer: Shared Build Compile @import 'lms/theme/variables'; @import 'bootstrap/variables'; +@import 'bootstrap/scss/functions'; @import 'bootstrap/scss/variables'; @import 'bootstrap/scss/mixins/breakpoints'; @import '../variables'; diff --git a/lms/static/sass/course/_profile.scss b/lms/static/sass/course/_profile.scss index 76fece68f72a..3f2277fe6005 100644 --- a/lms/static/sass/course/_profile.scss +++ b/lms/static/sass/course/_profile.scss @@ -134,7 +134,7 @@ header { @extend .clearfix; - @extend h1.top-header; + @extend %h1-top-header; margin-bottom: lh(); diff --git a/lms/static/sass/course/courseware/_courseware.scss b/lms/static/sass/course/courseware/_courseware.scss index 33f8dae798ad..4e74841bd978 100644 --- a/lms/static/sass/course/courseware/_courseware.scss +++ b/lms/static/sass/course/courseware/_courseware.scss @@ -570,7 +570,7 @@ html.video-fullscreen { } header { - @extend h1.top-header; + @extend %h1-top-header !optional; border-radius: 0 4px 0 0; margin-bottom: -16px; diff --git a/lms/static/sass/course/layout/_courseware_preview.scss b/lms/static/sass/course/layout/_courseware_preview.scss index ee408151c15c..243be796eebc 100644 --- a/lms/static/sass/course/layout/_courseware_preview.scss +++ b/lms/static/sass/course/layout/_courseware_preview.scss @@ -13,7 +13,7 @@ $proctoring-banner-text-size: 14px; } .preview-menu { - @extend %inner-wrapper; + @extend %inner-wrapper !optional; width: auto; @@ -65,7 +65,7 @@ $proctoring-banner-text-size: 14px; .proctored_exam_status { // STATE: Fixed to viewport (used for scrolling) &.is-fixed { - @extend %ui-depth4; + @extend %ui-depth4 !optional; box-shadow: 0 3px 3px $shadow-d1; position: fixed; @@ -170,9 +170,9 @@ $proctoring-banner-text-size: 14px; } .exam-button-turn-in-exam { - @extend %btn-pl-primary-base; - @extend %t-action3; - @extend %t-weight4; + @extend %btn-pl-primary-base !optional; + @extend %t-action3 !optional; + @extend %t-weight4 !optional; margin-right: $baseline; border: 0; diff --git a/lms/static/sass/discussion/_discussion.scss b/lms/static/sass/discussion/_discussion.scss index 1b98d18b6cb6..61ad57e27bb8 100644 --- a/lms/static/sass/discussion/_discussion.scss +++ b/lms/static/sass/discussion/_discussion.scss @@ -128,7 +128,7 @@ section.discussion { } .xblock-student_view-discussion { - @extend %ui-print-excluded; + @extend %ui-print-excluded !optional; // Overrides overspecific courseware CSS from: // https://github.com/openedx/edx-platform/blob/master/lms/static/sass/course/courseware/_courseware.scss#L499 padding-top: 15px !important; diff --git a/lms/static/sass/discussion/elements/_editor.scss b/lms/static/sass/discussion/elements/_editor.scss index 750b0ad9a2b4..9f45f4cf016c 100644 --- a/lms/static/sass/discussion/elements/_editor.scss +++ b/lms/static/sass/discussion/elements/_editor.scss @@ -120,7 +120,7 @@ } .wmd-prompt-dialog { - @extend .modal; + @extend .modal !optional; background: $forum-color-background; padding: $baseline; diff --git a/lms/static/sass/discussion/elements/_navigation.scss b/lms/static/sass/discussion/elements/_navigation.scss index 580689cdb778..afd74e9d39d6 100644 --- a/lms/static/sass/discussion/elements/_navigation.scss +++ b/lms/static/sass/discussion/elements/_navigation.scss @@ -340,7 +340,7 @@ .forum-nav-thread-comments-count { @extend %forum-nav-thread-wrapper-2-content; - @extend %t-weight4; + @extend %t-weight4 !optional; position: relative; diff --git a/lms/static/sass/discussion/views/_response.scss b/lms/static/sass/discussion/views/_response.scss index 5cd9bfd56f37..d995aefa9ffb 100644 --- a/lms/static/sass/discussion/views/_response.scss +++ b/lms/static/sass/discussion/views/_response.scss @@ -49,7 +49,7 @@ // CASE: larger username for responses .username { - @extend %t-weight5; + @extend %t-weight5 !optional; font-size: $forum-base-font-size; } diff --git a/lms/static/sass/features/_bookmarks.scss b/lms/static/sass/features/_bookmarks.scss index 2aaa1ec208ef..aa0963286e3d 100644 --- a/lms/static/sass/features/_bookmarks.scss +++ b/lms/static/sass/features/_bookmarks.scss @@ -103,11 +103,11 @@ $bookmarked-icon: "\f02e"; // .fa-bookmark } .bookmarks-empty-header { - @extend %t-title5; + @extend %t-title5 !optional; margin-bottom: ($baseline/2); } .bookmarks-empty-detail { - @extend %t-copy-sub1; + @extend %t-copy-sub1 !optional; } diff --git a/lms/static/sass/multicourse/_dashboard.scss b/lms/static/sass/multicourse/_dashboard.scss index 3ede8cb133a8..4b176971c5f8 100644 --- a/lms/static/sass/multicourse/_dashboard.scss +++ b/lms/static/sass/multicourse/_dashboard.scss @@ -149,11 +149,6 @@ display: inline-block; margin-bottom: ($baseline/2); text-decoration: none; - - // Responsive behavior - @include media-breakpoint-down(sm) { - @extend %t-title4; - } } } diff --git a/lms/static/sass/shared/_alerts_pattern_library_shim.scss b/lms/static/sass/shared/_alerts_pattern_library_shim.scss index e22217d63960..af266c02bd10 100644 --- a/lms/static/sass/shared/_alerts_pattern_library_shim.scss +++ b/lms/static/sass/shared/_alerts_pattern_library_shim.scss @@ -142,7 +142,7 @@ $bp-screen-md: 768px !default; .alert-title { @extend %hd-5; - @extend %headings-emphasized; + @extend %headings-emphasized !optional; @media (min-width: $bp-screen-md) { // shift the section up to make the alert more compact diff --git a/lms/static/sass/shared/_help-tab.scss b/lms/static/sass/shared/_help-tab.scss index ea48096d10f1..a0016822c8e7 100644 --- a/lms/static/sass/shared/_help-tab.scss +++ b/lms/static/sass/shared/_help-tab.scss @@ -18,7 +18,7 @@ } .help-tab { - @extend %ui-depth2; + @extend %ui-depth2 !optional; @extend %ui-print-excluded; transform: rotate(-90deg); diff --git a/lms/static/sass/shared/_modal.scss b/lms/static/sass/shared/_modal.scss index 88eb6c354d53..7288fc561075 100644 --- a/lms/static/sass/shared/_modal.scss +++ b/lms/static/sass/shared/_modal.scss @@ -10,7 +10,7 @@ } .modal { - @extend %ui-depth1; + @extend %ui-depth1 !optional; display: none; position: absolute; @@ -51,7 +51,7 @@ } .inner-wrapper { - @extend %ui-depth1; + @extend %ui-depth1 !optional; background: $modal-content-bg; border-radius: 0; @@ -69,7 +69,7 @@ } header { - @extend %ui-depth1; + @extend %ui-depth1 !optional; margin-bottom: ($baseline*1.5); overflow: hidden; @@ -89,7 +89,7 @@ } hr { - @extend %faded-hr-divider-light; + @extend %faded-hr-divider-light !optional; border: none; margin: 0; @@ -97,7 +97,7 @@ z-index: 2; &::after { - @extend %faded-hr-divider; + @extend %faded-hr-divider !optional; bottom: 0; content: ""; @@ -352,7 +352,7 @@ // general reset .list-input, .list-actions { - @extend %ui-no-list; + @extend %ui-no-list !optional; } .settings-language-select .select { @@ -367,7 +367,7 @@ padding: 0 ($baseline*2) $baseline ($baseline*2); .list-actions-item { - @extend %t-copy-sub1; + @extend %t-copy-sub1 !optional; color: $body-color; text-align: center; @@ -379,4 +379,3 @@ } } } - From 4e7afbce5d0053853fc63daea678860f24a9137e Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 18 Jan 2023 22:56:31 -0500 Subject: [PATCH 4/5] build: kyle's fixes: add more "!optional" to @extend --- cms/static/sass/bootstrap/_components.scss | 12 ++++++------ cms/static/sass/bootstrap/_layouts.scss | 7 +++---- lms/static/sass/course/_profile.scss | 2 +- lms/static/sass/views/_program-details.scss | 6 +++--- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/cms/static/sass/bootstrap/_components.scss b/cms/static/sass/bootstrap/_components.scss index 98f25b8ff6af..ac2b3e3cfb90 100644 --- a/cms/static/sass/bootstrap/_components.scss +++ b/cms/static/sass/bootstrap/_components.scss @@ -92,7 +92,7 @@ .sock { @include clearfix(); - @extend %t-copy-sub2; + @extend %t-copy-sub2 !optional; max-width: $studio-max-width; width: flex-grid(12); @@ -103,7 +103,7 @@ // support body header { .title { - @extend %t-title4; + @extend %t-title4 !optional; } } @@ -115,14 +115,14 @@ .support, .feedback { .title { - @extend %t-title6; + @extend %t-title6 !optional; color: $white; margin-bottom: ($baseline/2); } .copy { - @extend %t-copy-sub2; + @extend %t-copy-sub2 !optional; margin: 0 0 $baseline 0; } @@ -140,7 +140,7 @@ } .action { - @extend %t-action4; + @extend %t-action4 !optional; display: block; @@ -159,7 +159,7 @@ .action-primary { @extend %btn-primary-blue; - @extend %t-action3; + @extend %t-action3 !optional; } } } diff --git a/cms/static/sass/bootstrap/_layouts.scss b/cms/static/sass/bootstrap/_layouts.scss index 0d8b7596ff4a..0245728e3e0e 100644 --- a/cms/static/sass/bootstrap/_layouts.scss +++ b/cms/static/sass/bootstrap/_layouts.scss @@ -206,7 +206,7 @@ } .page-header-super { - @extend %t-title4; + @extend %t-title4 !optional; float: left; width: flex-grid(12, 12); @@ -256,7 +256,7 @@ .title-1 { @extend %t-title3 !optional; - @extend %t-strong; + @extend %t-strong !optional; margin: 0; padding: 0; @@ -298,8 +298,7 @@ } .tip { - @extend %t-copy-sub2; - + @extend %t-copy-sub2 !optional; width: flex-grid(7, 12); float: right; margin-top: ($baseline/2); diff --git a/lms/static/sass/course/_profile.scss b/lms/static/sass/course/_profile.scss index 3f2277fe6005..086859f5fd5a 100644 --- a/lms/static/sass/course/_profile.scss +++ b/lms/static/sass/course/_profile.scss @@ -134,7 +134,7 @@ header { @extend .clearfix; - @extend %h1-top-header; + @extend %h1-top-header !optional; margin-bottom: lh(); diff --git a/lms/static/sass/views/_program-details.scss b/lms/static/sass/views/_program-details.scss index 689bfcbe11e8..6ce8e452a458 100644 --- a/lms/static/sass/views/_program-details.scss +++ b/lms/static/sass/views/_program-details.scss @@ -831,19 +831,19 @@ $btn-color-primary: $primary-dark; } .program-detail-nav { - @extend .content; + @extend .content !optional; display: block; width: 100%; padding: 40px; .program-detail-nav-list { - @extend %ui-no-list; + @extend %ui-no-list !optional; border-bottom: 1px solid $gray-base; .nav-item { - @extend %t-copy-base; + @extend %t-copy-base !optional; font-weight: 500; font-size: 1.125rem; From e785892e4dea4bc478e82e2f7e660e6e8ac4cdec Mon Sep 17 00:00:00 2001 From: Kyle McCormick Date: Wed, 18 Jan 2023 22:55:39 -0500 Subject: [PATCH 5/5] build: kyle's fixes: scss errors surfaced by dart-sass --- lms/static/sass/features/_course-experience.scss | 2 +- xmodule/css/capa/display.scss | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lms/static/sass/features/_course-experience.scss b/lms/static/sass/features/_course-experience.scss index 91e4a65452e9..71567492a446 100644 --- a/lms/static/sass/features/_course-experience.scss +++ b/lms/static/sass/features/_course-experience.scss @@ -362,7 +362,7 @@ } margin: 0 (-1 * $baseline) 0 ($baseline); - width: calc(100% + (2)); + width: 100%; padding: 0; border-bottom: 1px solid $border-color; diff --git a/xmodule/css/capa/display.scss b/xmodule/css/capa/display.scss index 684b43da734e..c15e6472dba6 100644 --- a/xmodule/css/capa/display.scss +++ b/xmodule/css/capa/display.scss @@ -31,7 +31,7 @@ $cross-icon: '\f00d'; // .fa-close $asterisk-icon: '\f069'; // .fa-asterisk -@import '../../../../../static/sass/edx-pattern-library-shims/base/variables'; +@import 'edx-pattern-library-shims/base/variables'; // +Extends - Capa // ==================== @@ -1615,7 +1615,7 @@ div.problem { } label.choicetextgroup_correct, section.choicetextgroup_correct { - @extend label.choicegroup_correct; + @extend label, .choicegroup_correct; input[type="text"] { border-color: $correct; @@ -1623,7 +1623,7 @@ div.problem { } label.choicetextgroup_partially-correct, section.choicetextgroup_partially-correct { - @extend label.choicegroup_partially-correct; + @extend label, .choicegroup_partially-correct; input[type="text"] { border-color: $partially-correct; @@ -1631,11 +1631,11 @@ div.problem { } label.choicetextgroup_incorrect, section.choicetextgroup_incorrect { - @extend label.choicegroup_incorrect; + @extend label, .choicegroup_incorrect; } label.choicetextgroup_submitted, section.choicetextgroup_submitted { - @extend label.choicegroup_submitted; + @extend label, .choicegroup_submitted; } label.choicetextgroup_show_correct, section.choicetextgroup_show_correct {