stylex icon indicating copy to clipboard operation
stylex copied to clipboard

stylex.firstThatWorks() not correctly linted

Open olivierpascal opened this issue 1 year ago • 2 comments

Describe the issue

image

Expected behavior

No eslint error.

Steps to reproduce

Take the example in the doc:

https://stylexjs.com/docs/api/javascript/firstThatWorks/

import * as stylex from '@stylexjs/stylex';

const styles = stylex.create({
  header: {
    position: stylex.firstThatWorks('sticky', '-webkit-sticky', 'fixed'),
  },
});

Test case

No response

Additional comments

No response

olivierpascal avatar Jul 13 '24 14:07 olivierpascal

We probably wouldn't allow vendor prefixed values in source code, and instead rely on polyfills

necolas avatar Jul 13 '24 22:07 necolas

I intend to use this as a default fallback for a css variable: https://github.com/facebook/stylex/issues/432

olivierpascal avatar Jul 14 '24 04:07 olivierpascal

Does this issue reproduce with a variable instead then? Give the code you shared, the lint message looks correct to me

necolas avatar Sep 08 '24 16:09 necolas