Skip to content

Commit

Permalink
feat!: Dropping Sass support from builtin wordcloud block
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Sep 23, 2024
1 parent a509763 commit 1708178
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions xmodule/assets/WordCloudBlockDisplay.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,600,700");

.xmodule_display.xmodule_WordCloudBlock {
/* stylelint-disable-line */
/* stylelint-disable-line */
}

.xmodule_display.xmodule_WordCloudBlock .input-cloud {
margin: calc((var(--baseline) / 4));
}

.xmodule_display.xmodule_WordCloudBlock .result_cloud_section {
display: none;
width: 0px;
height: 0px;
}

.xmodule_display.xmodule_WordCloudBlock .result_cloud_section.active {
display: block;
width: 100%;
height: auto;
margin-top: 1em;
}

.xmodule_display.xmodule_WordCloudBlock .result_cloud_section.active h3 {
font-size: 100%;
}

.xmodule_display.xmodule_WordCloudBlock .your_words {
font-size: 0.85em;
display: block;
}
4 changes: 2 additions & 2 deletions xmodule/word_cloud_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from xblock.fields import Boolean, Dict, Integer, List, Scope, String
from xmodule.editing_block import EditingMixin
from xmodule.raw_block import EmptyDataRawMixin
from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_sass_to_fragment
from xmodule.util.builtin_assets import add_webpack_js_to_fragment, add_css_to_fragment
from xmodule.xml_block import XmlMixin
from xmodule.x_module import (
ResourceTemplates,
Expand Down Expand Up @@ -262,7 +262,7 @@ def student_view(self, context): # lint-amnesty, pylint: disable=unused-argumen
'num_inputs': self.num_inputs,
'submitted': self.submitted,
}))
add_sass_to_fragment(fragment, 'WordCloudBlockDisplay.scss')
add_css_to_fragment(fragment, 'WordCloudBlockDisplay.css')
add_webpack_js_to_fragment(fragment, 'WordCloudBlockDisplay')
shim_xmodule_js(fragment, 'WordCloud')

Expand Down

0 comments on commit 1708178

Please sign in to comment.