Naman Goel
Naman Goel
> When I declare the value of the constant MD within the Component.tsx file the same code works without any issues. Yes, values need to defined statically within the same...
Thanks for your feedback about the `media` and `supports` function names. Please provide some examples of the usage of those functions that would feel most natural. --- Regarding global styles,...
@edamascus The examples make sense. The use-case for `mediaWidth` and `mediaHeight` functions would be to enforce `min-width` *and* `max-width` for media queries. In a project with lots of media queries,...
> A worse alternative might be to allow setting a constant name to reusable CSS variables. We're considering something on these lines anyway, so I'm more in favour of this...
@pksorensen No, which is why this proposal exists. Today, you can ether export styles themselves (the result of calling `stylex.create`). Also variables can't be used within Media Queries. It's not...
> wrote a webpack plugin / loader to find and replace the imports before stylex babel plugin This is another approach, but I don't recommend it as it hurts cache-ability....
@pksorensen For sure. It makes sense for your use-case. Just explaining why I don't suggest it pre-emptively.
> Just to confirm, would stylex.types.mediaWidth (et al.) also work with defineVars? No. variables created with `defineVars` can be changed for particular UI sub-trees using `createTheme`. This is not possible...
@enmanuel-lab49 This work has a couple of pre-requisites, namely integrating a CSS post-processing step. Once that is done, this work will be relatively trivial to implement.
> it could be mobile first or desktop first @tounsoo We don't intend to choose one. Instead our plan is to create media queries that don't conflict by defining both...