Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version Packages #1476

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/cold-eyes-rescue.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/good-wombats-doubt.md

This file was deleted.

20 changes: 0 additions & 20 deletions .changeset/purple-cheetahs-hear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twelve-pans-dress.md

This file was deleted.

6 changes: 6 additions & 0 deletions packages/babel-plugin-debug-ids/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @vanilla-extract/babel-plugin-debug-ids

## 1.1.0

### Minor Changes

- [#1450](https://github.com/vanilla-extract-css/vanilla-extract/pull/1450) [`7b256d2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/7b256d2a8ee815911ee96199abe78d6b7246c415) Thanks [@wuz](https://github.com/wuz)! - Add support for the new `createViewTransition` API

## 1.0.6

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugin-debug-ids/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vanilla-extract/babel-plugin-debug-ids",
"version": "1.0.6",
"version": "1.1.0",
"description": "Zero-runtime Stylesheets-in-TypeScript",
"main": "dist/vanilla-extract-babel-plugin-debug-ids.cjs.js",
"module": "dist/vanilla-extract-babel-plugin-debug-ids.esm.js",
Expand Down
119 changes: 79 additions & 40 deletions packages/css/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @vanilla-extract/css

## 1.16.0

### Minor Changes

- [#1475](https://github.com/vanilla-extract-css/vanilla-extract/pull/1475) [`cd9d8b2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/cd9d8b231bbd7a7ac6674d2b28f77cff93e5be9e) Thanks [@corradopetrelli](https://github.com/corradopetrelli)! - Add `::-webkit-calendar-picker-indicator` as a valid pseudo-element

- [#1450](https://github.com/vanilla-extract-css/vanilla-extract/pull/1450) [`7b256d2`](https://github.com/vanilla-extract-css/vanilla-extract/commit/7b256d2a8ee815911ee96199abe78d6b7246c415) Thanks [@wuz](https://github.com/wuz)! - Add `createViewTransition` API

`createViewTransition` creates a single scoped view transition name for use with CSS View Transitions. This avoids potential naming collisions with other view transitions.

```ts
import {
style,
createViewTransition
} from '@vanilla-extract/css';

export const titleViewTransition = createViewTransition();

export const pageTitle = style({
viewTransitionName: titleViewTransition
});
```

## 1.15.5

### Patch Changes
Expand Down Expand Up @@ -54,12 +77,12 @@
globalFontFace(gentium, [
{
src: 'local("Gentium")',
fontWeight: 'normal',
fontWeight: 'normal'
},
{
src: 'local("Gentium Bold")',
fontWeight: 'bold',
},
fontWeight: 'bold'
}
]);
```

Expand Down Expand Up @@ -110,16 +133,16 @@
const gentium = fontFace([
{
src: 'local("Gentium")',
fontWeight: 'normal',
fontWeight: 'normal'
},
{
src: 'local("Gentium Bold")',
fontWeight: 'bold',
},
fontWeight: 'bold'
}
]);

export const font = style({
fontFamily: gentium,
fontFamily: gentium
});
```

Expand Down Expand Up @@ -152,9 +175,9 @@
export const standard = style({
'@layer': {
[typography]: {
fontSize: '1rem',
},
},
fontSize: '1rem'
}
}
});
```

Expand Down Expand Up @@ -225,7 +248,7 @@

const identifier = generateIdentifier({
debugId,
debugFileName: false,
debugFileName: false
});
```

Expand All @@ -244,20 +267,23 @@
`createContainer` creates a single scoped container name for use with CSS Container Queries. This avoids potential naming collisions with other containers.

```ts
import { style, createContainer } from '@vanilla-extract/css';
import {
style,
createContainer
} from '@vanilla-extract/css';

export const sidebarContainer = createContainer();

export const sidebar = style({
containerName: sidebarContainer,
containerName: sidebarContainer
});

export const navigation = style({
'@container': {
[`${sidebarContainer} (min-width: 400px)`]: {
display: 'flex',
},
},
display: 'flex'
}
}
});
```

Expand All @@ -269,9 +295,9 @@
export const myStyle = style({
'@container': {
'(min-width: 400px)': {
display: 'flex',
},
},
display: 'flex'
}
}
});
```

Expand Down Expand Up @@ -409,9 +435,15 @@

const base = style({ padding: 12 });

export const primary = style([base, { background: 'blue' }]);
export const primary = style([
base,
{ background: 'blue' }
]);

export const secondary = style([base, { background: 'aqua' }]);
export const secondary = style([
base,
{ background: 'aqua' }
]);
```

When composed styles are used in selectors, they are assigned an additional class if required so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.
Expand All @@ -425,7 +457,7 @@
export const container = style([background, padding]);

globalStyle(`${container} *`, {
boxSizing: 'border-box',
boxSizing: 'border-box'
});
```

Expand All @@ -450,25 +482,25 @@
// themes.css.ts
import {
createGlobalThemeContract,
createGlobalTheme,
createGlobalTheme
} from '@vanilla-extract/css';

export const vars = createGlobalThemeContract({
color: {
brand: 'color-brand',
brand: 'color-brand'
},
font: {
body: 'font-body',
},
body: 'font-body'
}
});

createGlobalTheme(':root', vars, {
color: {
brand: 'blue',
brand: 'blue'
},
font: {
body: 'arial',
},
body: 'arial'
}
});
```

Expand All @@ -483,13 +515,13 @@
export const vars = createGlobalThemeContract(
{
color: {
brand: 'color-brand',
brand: 'color-brand'
},
font: {
body: 'font-body',
},
body: 'font-body'
}
},
(value) => `prefix-${value}`,
(value) => `prefix-${value}`
);
```

Expand All @@ -502,13 +534,13 @@
export const vars = createGlobalThemeContract(
{
color: {
brand: null,
brand: null
},
font: {
body: null,
},
body: null
}
},
(_value, path) => `prefix-${path.join('-')}`,
(_value, path) => `prefix-${path.join('-')}`
);
```

Expand Down Expand Up @@ -541,15 +573,22 @@
When style compositions are used in selectors, they are now assigned an additional class so they can be uniquely identified. When selectors are processed internally, the composed classes are removed, only leaving behind the unique identifier classes. This allows you to treat them as if they were a single class within vanilla-extract selectors.

```ts
import { style, globalStyle, composeStyles } from '@vanilla-extract/css';
import {
style,
globalStyle,
composeStyles
} from '@vanilla-extract/css';

const background = style({ background: 'mintcream' });
const padding = style({ padding: 12 });

export const container = composeStyles(background, padding);
export const container = composeStyles(
background,
padding
);

globalStyle(`${container} *`, {
boxSizing: 'border-box',
boxSizing: 'border-box'
});
```

Expand Down
2 changes: 1 addition & 1 deletion packages/css/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vanilla-extract/css",
"version": "1.15.5",
"version": "1.16.0",
"description": "Zero-runtime Stylesheets-in-TypeScript",
"sideEffects": true,
"main": "dist/vanilla-extract-css.cjs.js",
Expand Down
Loading