@spectrum-web-components/opacity-checkerboard
TypeScript icon, indicating that this package has built-in type declarations

0.42.4 • Public • Published

Description

The opacity-checkerboard class is used to highlight opacity. Leverage these styles in your component as outlined below to unify you application's visuals with those delivered by various Spectrum Web Components.

Usage

Import the styles from the opacity-checkerboard CSS:

import opacityCheckerBoardStyles from '@spectrum-web-components/opacity-checkerboard/src/opacity-checkerboard.css.js';

Add it to your component's styles array before your component's styles. The order that you include the styles in makes a difference, because selectors within opacity checkerboard may have the same specificity as those within your component.

public static override get styles(): CSSResultArray {
    return [opacityCheckerBoardStyles, styles];
}

Use the opacity-checkerboard class in your component's render() method:

<div
    class="opacity-checkerboard"
    style="inline-size: 100px; block-size: 100px;"
></div>

Package Sidebar

Install

npm i @spectrum-web-components/opacity-checkerboard

Weekly Downloads

1,012

Version

0.42.4

License

Apache-2.0

Unpacked Size

39.4 kB

Total Files

25

Last publish

Collaborators

  • nikkimk
  • jnjosh
  • taratadobe
  • rajrock38
  • beeduul
  • jianliao79
  • hunterloftis
  • westbrook
  • benjamind
  • cuberoot