- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CSS allowlist is *extremely* outdated
I'm not sure I'm asking this question in the right place ,but I'm a bit surprised by how very limited the CSS allowlist is (I'm working from this document). In particular, I'm unable to use any modern layout engines (flex, grid, or multicol). I can't think why these limitations would be desirable, in particular since, with inlining required, the absence of media queries guarantees that any moderately complex layouts will be broken on some screens. Are there any thoughts about expanding the list of permissible CSS rules in the style attribute? Even better would be permission to write some CSS as an instructor (if I'm understanding correctly, only admins currently have this ability).
THanks for any help you can give!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect that part of the reason Canvas makes it so difficult to do things is to keep instructors from going off on their own and implementing things (think about the blink element that is not deprecated, but some used to think it was "cool" without understanding the ramifications). Some of the things that people want to do could harm accessibility or be detrimental to learning.
By limiting what people can do to the pages, it helps Canvas maintain a cohesive look and feel, which helps students. There are some times it would be much easier for me to add a single class to a table rather than having to style each cell separately.
I think another original reason was that it limited the amount that they had to support. As you said, CSS has come a long way and they don't have to support Internet Explorer anymore, either. Previously, they would need to make sure that things rendered reasonably the same in all the browsers. That is not as much of an issue as it once was.
Inline CSS also breaks the notion that you should separate style from content, but I'm not sure which side that comes down on. It could be that Canvas not allowing things helps separate the content from style, but it could be that by forcing us to put in CSS, it breaks that concept.
The current solution is to work with your institution (designers / admin) and come up with a shared CSS that incorporates classes. Then it can be maintained in one place for the whole institution, rather than having to deal with it for multiple instructors and pages.
There is an idea for having course-level CSS that you might want to visit and share your thoughts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect that part of the reason Canvas makes it so difficult to do things is to keep instructors from going off on their own and implementing things (think about the blink element that is not deprecated, but some used to think it was "cool" without understanding the ramifications). Some of the things that people want to do could harm accessibility or be detrimental to learning.
By limiting what people can do to the pages, it helps Canvas maintain a cohesive look and feel, which helps students. There are some times it would be much easier for me to add a single class to a table rather than having to style each cell separately.
I think another original reason was that it limited the amount that they had to support. As you said, CSS has come a long way and they don't have to support Internet Explorer anymore, either. Previously, they would need to make sure that things rendered reasonably the same in all the browsers. That is not as much of an issue as it once was.
Inline CSS also breaks the notion that you should separate style from content, but I'm not sure which side that comes down on. It could be that Canvas not allowing things helps separate the content from style, but it could be that by forcing us to put in CSS, it breaks that concept.
The current solution is to work with your institution (designers / admin) and come up with a shared CSS that incorporates classes. Then it can be maintained in one place for the whole institution, rather than having to deal with it for multiple instructors and pages.
There is an idea for having course-level CSS that you might want to visit and share your thoughts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help, James. I can see the rationale here, but at a large institution like mine the likelihood of getting traction on requesting a stylesheet is somewhat low.
I understand the advantages of a unified look and feel, but I wish it were easier to reproduce more complex layout as might traditionally be used in a print syllabus. That means either I have to sacrifice the complexity or provide a printed syllabus... which will be hard to keep updated!
inlining a greater range of CSS properties seems like a decent temporary workaround, so I really wish that canvas would go ahead and maintain a larger allowlist, or, as you pointed out, allow course-level CSS.
Thanks again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you using subaccounts at your institution? Custom JavaScript and CSS can be added to subaccounts so that they don't have to apply to the entire institution and they might be easier to get implemented at that level. I've used that in the past with some customizations for my math courses that didn't apply to anyone else.
