Skip to content

Commit

Permalink
feat!: Dropping Sass support from builtin word cloud block, replacing…
Browse files Browse the repository at this point in the history
… with vanilla CSS
  • Loading branch information
farhan committed Oct 24, 2024
1 parent 0c91b62 commit 2d5df1b
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 35 deletions.
3 changes: 0 additions & 3 deletions xmodule/assets/WordCloudBlockDisplay.scss

This file was deleted.

30 changes: 0 additions & 30 deletions xmodule/assets/word_cloud/_display.scss

This file was deleted.

32 changes: 32 additions & 0 deletions xmodule/static/css-builtin-blocks/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.scss')
add_webpack_js_to_fragment(fragment, 'WordCloudBlockDisplay')
shim_xmodule_js(fragment, 'WordCloud')

Expand Down

0 comments on commit 2d5df1b

Please sign in to comment.