Community

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kevinw
Community Contributor

Is there really no way to apply a style sheet to a specific course?

Jump to solution

I've done some research on here and I've found some references to inline styling. But I can't find anything that suggests that a CSS can be applied only at a specific course level. 

For example, we have two courses and want two different style guidelines for both. Say in Course B we want headers 2 through 5 to be bold/italic/centered/size 14 but we don't want that in Course A. Course A is happy being non-stylized. 

There's no way to assign a stylesheet that is specific to that particular course? I understand this can be done with div containers but I don't see that being a viable solution when you need it done to every content page. 

1 Solution

Accepted Solutions
bneporadny
Community Champion

Hi  @kevinw ,

Canvas doesn't allow #css style‌ sheets to be uploaded at the course level.  It is available at the top account level as we as at the different sub-account levels.

View solution in original post

21 Replies
bneporadny
Community Champion

Hi  @kevinw ,

Canvas doesn't allow #css style‌ sheets to be uploaded at the course level.  It is available at the top account level as we as at the different sub-account levels.

kevinw
Community Contributor

Do you know why? 

bneporadny
Community Champion

Hi  @kevinw ‌,

I don't know the exact reason, but I would think it would have to do with the complexity of code that would be required to handle allowing CSS to be upload at the individual course level, not to mention most instructor wouldn't know how to do CSS. Which is why it is best left at the account level where an Admin with knowledge of CSS be allowed to control it so not to cause issues.

My suggestion for you if you want to do this via two distinct CSS files and not utilizing different DIV's is to create two sub-accounts and put the course into the sub-account with the correct CSS loaded.

Brian

aaron_bahmer
Community Contributor

 @kevinw ,

Although I'm not trying to stylize things per course, I did create a custom css file to upload as part of the admin "theme" tool. I created a single div.class with each of the desired stylized elements defined as children. Making it work requires faculty to create a single classed div around all of their content, so just one code pair around the entire page. It doesn't appear properly in the editor, but looks fine after they save.

div.ewc {etc}

div.ewc h1 {}

div.ewc p {}

...etc

If it's really necessary, you could define several of these "master" divs and related elements and tell those who need them how to make them work.

Good luck!

jacob_standish
Community Member

An approach that I've taken with this challenge is to create template html files with the styles already added in.  I then packaged this into a Chrome extension and shared it with my staff.    Then they can just drag and drop the template and not even touch the HTML.

Canvas Template Extension Example

This was inspired by  @James   and his Canvancements - Canvas Enhancements  

<shamelessPromotion>

I put in a proposal for InstructureCon to show how you can build your own templates like this.   

</shamelessPromotion>

What?! That looks totally amazing... is it available to try out yet??

I would totally attend that session.

 @jacob_standish ‌,

I hope to this session @ #instructurecon2018

I don't have an extension I can share out yet.  It's on a very long list of to dos to build a generic example that the community could test out and give feedback... 

The one in my example above uses content from templates that our district purchased and the images are actually hosted outside of Canvas so I need to limit access to it.  The idea is that you design your template and then we package it into the extension.  My staff have really liked that fact that they can just drag and drop into any RCE where they are editing.