Skip to content

Commit 54f9653

Browse files
Version Packages (#1870)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a990973 commit 54f9653

5 files changed

Lines changed: 82 additions & 41 deletions

File tree

.changeset/position-try-support.md

Lines changed: 0 additions & 38 deletions
This file was deleted.

packages/babel-plugin/CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
# @compiled/babel-plugin
22

3+
## 0.39.1
4+
5+
### Patch Changes
6+
7+
- a990973: Add support for @position-try global at-rule
8+
9+
Added support for CSS `@position-try` at-rule (CSS Anchor Positioning Level 1) in Compiled's cssMap API. The `@position-try` at-rule defines named fallback positions for CSS Anchor Positioning and is now correctly handled as a global at-rule, similar to `@keyframes`.
10+
11+
**What changed:**
12+
13+
- Added `'position-try'` to the ignored at-rules list in `packages/css/src/plugins/atomicify-rules.ts`
14+
- This ensures `@position-try` rules are emitted globally without atomification or component scoping
15+
- Both nested and flat syntax styles are supported:
16+
- Nested: `'@position-try': { '--name': { ... } }`
17+
- Flat: `'@position-try --name': { ... }`
18+
19+
**Browser support:**
20+
21+
- Chrome 125+ (May 2024)
22+
- Firefox 131+ (Oct 2024)
23+
- Safari 18.2+ (Dec 2024)
24+
25+
**Example usage:**
26+
27+
```typescript
28+
const styles = cssMap({
29+
arrowBlockStart: {
30+
'@position-try --ds-arrow-block-start': {
31+
positionArea: 'block-start',
32+
margin: 0,
33+
marginBlockEnd: 'var(--ds-arrow-size, 8px)',
34+
},
35+
},
36+
});
37+
```
38+
39+
**Note:** Type support for `@position-try` was already present via csstype 3.2.3 (added in #1867). This change completes the implementation by ensuring the CSS transformation correctly handles it as a global at-rule.
40+
41+
- Updated dependencies [a990973]
42+
- @compiled/css@0.21.1
43+
344
## 0.39.0
445

546
### Minor Changes

packages/babel-plugin/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@compiled/babel-plugin",
3-
"version": "0.39.0",
3+
"version": "0.39.1",
44
"description": "A familiar and performant compile time CSS-in-JS library for React.",
55
"homepage": "https://compiledcssinjs.com/docs/pkg-babel-plugin",
66
"bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md",
@@ -28,7 +28,7 @@
2828
"@babel/template": "^7.26.9",
2929
"@babel/traverse": "^7.26.10",
3030
"@babel/types": "^7.26.10",
31-
"@compiled/css": "^0.21.0",
31+
"@compiled/css": "^0.21.1",
3232
"@compiled/utils": "^0.13.1",
3333
"@emotion/is-prop-valid": "^1.3.1",
3434
"resolve": "^1.22.10"

packages/css/CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# @compiled/css
22

3+
## 0.21.1
4+
5+
### Patch Changes
6+
7+
- a990973: Add support for @position-try global at-rule
8+
9+
Added support for CSS `@position-try` at-rule (CSS Anchor Positioning Level 1) in Compiled's cssMap API. The `@position-try` at-rule defines named fallback positions for CSS Anchor Positioning and is now correctly handled as a global at-rule, similar to `@keyframes`.
10+
11+
**What changed:**
12+
13+
- Added `'position-try'` to the ignored at-rules list in `packages/css/src/plugins/atomicify-rules.ts`
14+
- This ensures `@position-try` rules are emitted globally without atomification or component scoping
15+
- Both nested and flat syntax styles are supported:
16+
- Nested: `'@position-try': { '--name': { ... } }`
17+
- Flat: `'@position-try --name': { ... }`
18+
19+
**Browser support:**
20+
21+
- Chrome 125+ (May 2024)
22+
- Firefox 131+ (Oct 2024)
23+
- Safari 18.2+ (Dec 2024)
24+
25+
**Example usage:**
26+
27+
```typescript
28+
const styles = cssMap({
29+
arrowBlockStart: {
30+
'@position-try --ds-arrow-block-start': {
31+
positionArea: 'block-start',
32+
margin: 0,
33+
marginBlockEnd: 'var(--ds-arrow-size, 8px)',
34+
},
35+
},
36+
});
37+
```
38+
39+
**Note:** Type support for `@position-try` was already present via csstype 3.2.3 (added in #1867). This change completes the implementation by ensuring the CSS transformation correctly handles it as a global at-rule.
40+
341
## 0.21.0
442

543
### Minor Changes

packages/css/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@compiled/css",
3-
"version": "0.21.0",
3+
"version": "0.21.1",
44
"description": "A familiar and performant compile time CSS-in-JS library for React.",
55
"homepage": "https://compiledcssinjs.com/docs/pkg-css",
66
"bugs": "https://github.com/atlassian-labs/compiled/issues/new?assignees=&labels=bug&template=bug_report.md",

0 commit comments

Comments
 (0)