🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more
Socket
Book a DemoInstallSign in
Socket

@instructure/canvas-high-contrast-theme

Package Overview
Dependencies
Maintainers
35
Versions
1773
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/canvas-high-contrast-theme

A high contrast theme for Canvas LMS made by Instructure Inc.

Source
npmnpm
Version
10.10.1-snapshot-12
Version published
Weekly downloads
11K
73.24%
Maintainers
35
Weekly downloads
 
Created
Source

category: packages

canvas-high-contrast-theme

npm MIT License Code of Conduct

A high contrast UI component theme for Canvas LMS made by Instructure Inc.

This theme meets the WCAG 2 Level AA 4.5:1 minimum contrast requirements.

Installation

npm install @instructure/canvas-high-contrast-theme

Usage

Before mounting (rendering) your React application:

  • global theming:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    theme.use()
    
  • application level theming:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    ReactDOM.render(
      <InstUISettingsProvider theme={theme}>
        <App />
      </InstUISettingsProvider>,
      element
    )
    

To override the variables:

  • globally:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    
    theme.use({ overrides: { spacing: { xxxSmall: '0.3rem' } } })
    
  • application level:

    import { theme } from '@instructure/canvas-high-contrast-theme'
    const themeOverrides = { spacing: { xxxSmall: '0.3rem' } }
    
    ReactDOM.render(
      <InstUISettingsProvider theme={{ ...theme, ...themeOverrides }}>
        <App />
      </InstUISettingsProvider>,
      element
    )
    

FAQs

Package last updated on 03 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts