Brightspace CSS stylesheet randomly added to source code on our template pages

Jennifer.W.973
Jennifer.W.973 Posts: 369 🎆
edited September 2023 in Higher Ed / Postsecondary

We have templates available via Public Files for our instructors to use, but recently we have noticed that sometimes a line of code gets added randomly and it messes up our own CSS.

<link rel="stylesheet" href="https://templates.lcs.brightspace.com/lib/assets/css/styles.min.css">

This code keeps appearing underneath our own CSS link tags and right before the closing head tag, which means it takes precedence and the styles from this file are being applied to our pages. We have not purchased Creator+ but it seems like this may be the stylesheet for it.

It mostly seems to happen when template pages in Content have been copied from a previous course and then are edited using the source code editor in the new course. Or when choosing Create a File, Select a Document Template, Browse for a Template and choosing the copied template page - then the extra code gets added immediately without even opening the source code editor. (Adding the copied page using Add from Manage Files does not insert the code.)

A separate but possibly related issue: The WYSIWYG editor also seems to have a bug that prevents it from reading any CSS after editing the source code on these template pages, even when the Brightspace stylesheet code does not get added to the source code. The preview is wrong but the page formats correctly when clicking Save and Close.

Why is the Brightspace editor randomly adding code to our pages and how can we stop it? Has anyone else noticed this?

Tagged:

Answers

  • Hello @Jennifer.W.973 ,

    This may be due to the Content Styler tool being turned on in your organization. The configuration variable may be set as well: d2l.Tools.ContentStyler.CssOverride. To read more about this tool I have added a link here: https://community.d2l.com/brightspace/kb/articles/4449-set-up-style-and-branding-with-creator-content-styler

    Let us know if you have further questions.

    Cheers!

  • Jennifer.W.973
    Jennifer.W.973 Posts: 369 🎆

    @Michelle.T.865 We don't have Creator+ and that CssOveride config variable is null.

  • Jennifer.W.973
    Jennifer.W.973 Posts: 369 🎆

    We've also noticed that when a new HTML page is created (without our templates being applied), the default source code is now this, which includes that stylesheet and we cannot delete the link tag. Are all new webpages required to use it now?

    <!DOCTYPE html><html><head><link rel="stylesheet" href="https://templates.lcs.brightspace.com/lib/assets/css/styles.min.css"></head><body style="color: rgb(32, 33, 34); font-family: Lato, sans-serif; font-size: 16px;"><p></p></body></html>

  • z.t.265
    z.t.265 Posts: 1 🌱

    Hello,
    We are having the same issue with this. In our particular case, we recently did get Creator+ and as a result all HTML pages/WYSIWYG editors have a new default stylesheet that one can not delete or get rid of.
    How would we revert the WYSIWYG editors to the original default style? If it just requires us "turning off" the Content Styler tool, how would we do that?

    Best regards,
    Z

  • Jennifer.W.973
    Jennifer.W.973 Posts: 369 🎆

    @z.t.265 I believe this was resolved for us by turning off the config variable d2l.Tools.ContentStyler.AddStylesOnContentCreate (When On, Content Styler Style Sheet - or designated overrides - will be applied when creating a new HTML topic in Content. When Off, the Content Styler Style Sheet will not be applied when creating a new topic.)