Skip to content

Commit

Permalink
chore: revert css imbedding
Browse files Browse the repository at this point in the history
  • Loading branch information
farhan committed Sep 30, 2024
1 parent 54b8e14 commit 6cf6ad0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions xmodule/tests/test_util_builtin_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ def test_happy_path(self):
fragment = Fragment()
builtin_assets.add_css_to_fragment(fragment, "VideoBlockEditor.css")
fr = FragmentResource(
# kind='url',
# data=f'{settings.REPO_ROOT}/xmodule/assets/VideoBlockEditor.css',
kind='text',
data=PosixPath(f"{settings.REPO_ROOT}/xmodule/assets/VideoBlockEditor.css").read_text(encoding="utf-8"),
kind='url',
data=f'{settings.REPO_ROOT}/xmodule/assets/VideoBlockEditor.css',
# kind='text',
# data=PosixPath(f"{settings.REPO_ROOT}/xmodule/assets/VideoBlockEditor.css").read_text(encoding="utf-8"),
mimetype='text/css',
placement='head',
)
Expand Down
4 changes: 2 additions & 2 deletions xmodule/util/builtin_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def add_css_to_fragment(fragment, css_relative_path):
css_absolute_path = Path(settings.REPO_ROOT) / "xmodule" / "assets" / css_relative_path
if not css_absolute_path.is_file():
raise FileNotFoundError(f"css file not found: {css_absolute_path}")
# fragment.add_css_url(str(css_absolute_path))
fragment.add_css(css_absolute_path.read_text(encoding='utf-8'))
fragment.add_css_url(str(css_absolute_path))
# fragment.add_css(css_absolute_path.read_text(encoding='utf-8'))


def add_sass_to_fragment(fragment, sass_relative_path):
Expand Down

0 comments on commit 6cf6ad0

Please sign in to comment.