Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@atlaskit/css

atlassian237.2kApache-2.00.7.4TypeScript support: included

Style components backed by Atlassian Design System design tokens powered by Compiled CSS-in-JS.

readme

CSS

Style components backed by Atlassian Design System design tokens powered by Compiled CSS-in-JS.

Installation

First set up Compiled.

yarn add @atlaskit/css

Update your Compiled config to have importSources point to @atlaskit/css:

{
+  "importSources": ["@atlaskit/css"]
}

Usage

import { css } from '@atlaskit/css';

const basicStyles = css({
    color: 'var(--ds-link)',
});

<div css={basicStyles} />;

changelog

@atlaskit/css

0.7.4

Patch Changes

0.7.3

Patch Changes

  • Updated dependencies

0.7.2

Patch Changes

0.7.1

Patch Changes

0.7.0

Minor Changes

  • #168289 5fe404687ca98 - Add a test helper to reduce issues when migrating to Compiled CSS.

    Change dom Node's textContent property to remove Compiled CSS definitions except for Compiled style nodes.

0.6.2

Patch Changes

  • #165531 57f451bda8919 - Adds side-effect config to support Compiled css extraction in third-party apps

0.6.1

Patch Changes

  • #160054 a85c8b06aad62 - Updates to the 0.5.2-primitives-emotion-to-compiled codemod to group imports from @atlaskit/primitives.

0.6.0

Minor Changes

0.5.3

Patch Changes

0.5.2

Patch Changes

  • #150360 284490a8c1813 - Add codemod to migrate @atlaskit/primitives from using Emotion APIs towards Compiled.

0.5.1

Patch Changes

  • Updated dependencies

0.5.0

Minor Changes

  • #138792 59c6812e1be91 - Update the @atlaskit/css schema to include:

    • border and font shorthand token values
    • Background and color -hovered and -pressed tokens are available in the non-psuedo-states for patterns like <div css={[isHovered && hoveredStyles]} />
    • Adds more commonly used media queries

Patch Changes

  • Updated dependencies

0.4.0

Minor Changes

  • #127511 db30e29344013 - Widening range of react and react-dom peer dependencies from ^16.8.0 || ^17.0.0 || ~18.2.0 to the wider range of ^16.8.0 || ^17.0.0 || ^18.0.0` (where applicable).

    This change has been done to enable usage of `react@18.3as well as to have a consistent peer dependency range forreactandreact-domfor/platform` packages.

Patch Changes

  • Updated dependencies

0.3.0

Minor Changes

  • #108386 8f3fa9e80b93c - Updated xl breakpoint to be 1768px instead of 1760px (110.5rem instead of 110rem) to match updated design guidance.

0.2.0

Minor Changes

  • #111878 223959ef57c80 - Explicitly set jsxRuntime to classic via pragma comments in order to avoid issues where jsxRuntime is implicitly set to automatic.

0.1.1

Patch Changes

0.1.0

Minor Changes

0.0.6

Patch Changes

0.0.5

Patch Changes

0.0.4

Patch Changes

0.0.3

Patch Changes

  • #62648 1902f30344b5 - Add a StrictXCSSProp to clarify the loose vs. strict implementation.

0.0.2

Patch Changes

  • #63504 a48de33c8536 - Uses codegen'd token schema type definition from the tokens package
  • Updated dependencies

0.0.1

Patch Changes