Skip to content

Fix outlineWidth calc validation#1692

Open
cyphercodes wants to merge 1 commit into
facebook:mainfrom
cyphercodes:cyphercodes/fix-outline-width-calc-1690
Open

Fix outlineWidth calc validation#1692
cyphercodes wants to merge 1 commit into
facebook:mainfrom
cyphercodes:cyphercodes/fix-outline-width-calc-1690

Conversation

@cyphercodes
Copy link
Copy Markdown

What changed / motivation ?

Allow outlineWidth to use the same width validator as border widths, which accepts CSS length expressions like calc(...) while continuing to reject numeric strings such as "10".

Added a focused regression test covering direct outlineWidth: 'calc(...)' and nested pseudoselector value syntax.

Linked PR/Issues

Fixes #1690

Additional Context

Tests run:

  • npm test --workspace @stylexjs/eslint-plugin -- --runTestsByPath __tests__/stylex-valid-styles-test.js --runInBand --coverage=false
  • npx prettier --check packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js
  • npx eslint packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js
  • git diff --check
  • npm run build --workspace @stylexjs/eslint-plugin

Note: yarn install --frozen-lockfile installed dependencies and began the repo postinstall build, but the full monorepo build timed out while building docs after @stylexjs/eslint-plugin had built successfully.

Pre-flight checklist

@cyphercodes cyphercodes requested review from mellyeliu and nmn as code owners June 2, 2026 03:35
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 2, 2026
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
stylex Skipped Skipped Jun 2, 2026 3:35am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@stylexjs/valid-styles ESLint bug: outlineWidth doesn’t allow calc()

1 participant