Skip to content
This repository was archived by the owner on Jan 30, 2025. It is now read-only.

Releases: zss-in-js/typedcssx

2.0.1

28 Jul 01:19

Choose a tag to compare

Small fixes

Removed screen and from breakpoints.
Part of the readme has been updated.

2.0.0

28 Jul 01:14

Choose a tag to compare

Breaking Changes

Function-based media queries have been removed.
They will be replaced by a format using directly specified breakpoints.

[max_sm]: {...}

Other changes

Style class imports are now the default export.
The compilation script for libraries has been changed from compile to compiler.
The compiler now uses tsc --noEmit to perform type checking before compilation.

Other fixes

Fixed to accept % for color rgb etc.

1.3.8

06 Jul 11:58

Choose a tag to compare

  • Made the type flexible so that you can set different units when taking multiple values for margins and padding.
  • RGB and RGBA now accept value-only CSS variables.
color: 'rgba(var(--color-heading), 0.5)'

1.3.7

06 Jul 03:28

Choose a tag to compare

- Added @Keyframes to global
- Added font relative size to margin and padding.

It's can use from and to write it like this:

Style.global({
  '@keyframes fadeIn': {
    from: {
      opacity: 0,
    },
    to: {
      opacity: 1,
    },
  },

Or it can also be written as:

Style.global({
  '@keyframes fadeIn': {
    '0%': {
      opacity: 0,
    },
    '100%': {
      opacity: 1,
    },
  },

We are currently working on improving the issue of not being able to use separate units for padding and margin at the same time.

1.3.6

05 Jul 12:33

Choose a tag to compare

- Memory efficiency up at create

Fixes for development mode preview feature (inject-css)
The create function no longer creates styles with the same hashID.
This is more memory efficient than retrieving and managing them individually.

1.3.5

01 Jul 02:51

Choose a tag to compare

  • Fixed an issue where px was not added when entering a number value in a pseudo element within a media element.
  • Fixed a bug where &string elements were not output correctly when enclosed in media blocks.
  • Refactoring the sheet-compiler.ts and style-compiler.ts

1.3.4

28 Jun 04:32

Choose a tag to compare

Union types have been removed.

old code.

type Exact<T, U> = T extends U ? (U extends T ? T : never) : never;

export type ExactClassesObjectType<T> = {
  [K in keyof T]: Exact<T[K], CustomCSSProperties>;
};

create<T extends ClassesObjectType>(object: ExactClassesObjectType<T> | ClassesObjectType): ReturnStyleType<T> 

new code.

type Exact<T, U> = T extends U ? T : never;

export type ExactClassesObjectType<T> = {
  [K in keyof T | string]: K extends keyof T ? Exact<T[K], CustomCSSProperties> : CustomCSSProperties;
};

create<T extends ClassesObjectType>(object: ExactClassesObjectType<T>): ReturnStyleType<T>

Autocompletion speed slightly has increased due to a change from complex union types.
Also, from this update you can now write directly to component files as css.tsx.

1.3.1

27 Jun 08:47

Choose a tag to compare

Renamed some internal core functions as a refactoring.
The new ones are sheetCompiler and styleCompiler.

1.3.0

27 Jun 08:43

Choose a tag to compare

Minor update.
Migrated from compiling using ts-node to compiling using tsx.
This has resulted in over a 20x speedup in CSS compilation and added support for Node.js 20 and 22.

1.2.8

26 Jun 03:07

Choose a tag to compare

  • Fixed a bug in 1.2.5 where using & in set would result in the output containing &.
  • And now works correctly as &:not and &:has

- ⚠︎ Do not use 1.2.7 as it contains a pseudo output bug.