Forum Discussion

MikeDunn-46a113's avatar
MikeDunn-46a113
Community Member
5 years ago

Rise 360 Code Snippet text colour

Hi 
Does anyone know if it's possible to change the text colour for Code Snippets?

My purpose is to replicate the look of a command line tool we have which generically has white mono-spaced text on a black background. I can get the background black, but not change the text colour to white. 
I can do this effect in a normal text box but it inherits the course font rather than the mono-spaced font used in the code snippet and does not have the same effect.

Thanks

Mike

 

 

  • KarlMuller's avatar
    KarlMuller
    Community Member

    Oddly enough you can change the background colour of the Snippet block, but not the text itself.

  • You can do this by exporting the package from Rise, expanding it, and adding css to the <style> field in the index.html file and re-save. This isn't a great solution, though, because it means you have to edit the file and re-zip every time you export the package. 

    In this case it's this css (for a black background set in Rise):

    .block-text__code{
    color: white;
    font-weight: bold;
    }
  • DigHotseat's avatar
    DigHotseat
    Community Member

    It's my issue as well - has anyone found a way of doing this?