From 07ed373078be8542daef34efbf40cf5b58823486 Mon Sep 17 00:00:00 2001 From: cyphercodes Date: Tue, 2 Jun 2026 06:34:21 +0300 Subject: [PATCH] Fix outlineWidth calc validation --- .../__tests__/stylex-valid-styles-test.js | 16 ++++++++++++++++ .../eslint-plugin/src/reference/cssProperties.js | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js b/packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js index 27f4cefbb..73d9d98cc 100644 --- a/packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js +++ b/packages/@stylexjs/eslint-plugin/__tests__/stylex-valid-styles-test.js @@ -917,6 +917,22 @@ eslintTester.run('stylex-valid-styles', rule.default, { } }); `, + { + code: ` + import * as stylex from '@stylexjs/stylex'; + const styles = stylex.create({ + foo: { + outlineWidth: 'calc(0.25rem + 1px)', + }, + hover: { + outlineWidth: { + default: 'calc(0.25rem + 1px)', + ':hover': 'calc(0.5rem + 1px)', + }, + }, + }); + `, + }, { code: ` import * as stylex from '@stylexjs/stylex'; diff --git a/packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js b/packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js index 29aaff2ed..2caad86cf 100644 --- a/packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js +++ b/packages/@stylexjs/eslint-plugin/src/reference/cssProperties.js @@ -2077,7 +2077,7 @@ const CSSProperties = { 'inset', 'outset', ) as RuleCheck, - outlineWidth: makeUnionRule(isNumber, isLength) as RuleCheck, + outlineWidth: borderWidth, blockOverflow: overflow, // TODO - Add support to Babel Plugin inlineOverflow: overflow, // TODO - Add support to Babel Plugin overflow: overflow,