Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ const eslintTester = new ESLintTester({

eslintTester.run('stylex-valid-styles', rule.default, {
valid: [
// issue #1701 — numeric values are valid for grid line properties
`
import * as stylex from '@stylexjs/stylex';
const styles = stylex.create({
foo: {
gridColumn: 1,
gridColumnStart: 1,
gridColumnEnd: 3,
gridRow: 2,
gridRowStart: -1,
gridRowEnd: 4,
}
});
`,
// test for local static variables
`
import * as stylex from '@stylexjs/stylex';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,11 @@ const absoluteSize: RuleCheck = makeUnionRule(
makeLiteralRule('xx-large'),
);
const fontFamily: RuleCheck = isString;
const gridLine: RuleCheck = makeUnionRule(makeLiteralRule('auto'), isString);
const gridLine: RuleCheck = makeUnionRule(
makeLiteralRule('auto'),
isString,
isNumber,
);
const gridTemplate: RuleCheck = makeUnionRule(
makeLiteralRule('none'),
makeLiteralRule('subgrid'),
Expand Down
Loading