Custom CSS and Javascript


Custom CSS and Javascript


Description

CSS and JavaScript customization in the KU CMS - Sunflower is made possible with the Asset Injector Module. It provides advanced users the ability to quickly apply CSS and JavaScript.

Both CSS and JavaScript customization are advanced topics that require sufficient knowledge to use. If you need help please contact KU Web Services at webservices@ku.edu.

How to Add CSS

  1. Go to: Configuration > Development > Asset Injector
  2. Select Add CSS Injector
  3. Enter a Label*
  4. In the Code field, enter your custom CSS
  5. Leave the Media field set to "All" - except in special cases
  6. If you want to limit the CSS to specific content types, select the desired content types in the Content type area.
  7. Leave the Current Theme "Not restricted" or select "KU CMS - Sunflower"
  8. In the Pages field, provide specific paths to show/hide from the CSS override
  9. Leave User Role set to "Not restricted" - except in special cases
  10. Leave Condition Requirements set to "Require ALL Conditions" - except in special cases

*NOTE: A site may have multiple CSS Injectors

How to Add Javascript

  1. Go to: Configuration > Development > Asset Injector
  2. Select Add JS Injector
  3. Enter a Label*
  4. Enter the JavaScript Code
  5. Select the Advanced Options you wish to use
  6. Optionally select the Content type(s) you wish to use the override on
  7. Select KU CMS - Sunflower from the Theme tab
  8. Optionally select any pages you wish to apply or exclude from the override
  9. Optionally select any user roles you wish to apply or exclude from the override
  10. Optionally deselect the Require all conditions checkbox

*NOTE: A site may have multiple JS Injectors

Accessibility

All content on KU CMS sites must meet accessibility standards. See Accessibility for information, including guidelines and best practices.