-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@media Queries to Target iPad / iPhone, Orientation, Auto-Layout Constraints #3
Comments
This would indeed be great! I'll try to take a look at implementing this sometime soon, but if anyone else wants to take a stab at it, go for it! For this to take place, we'd probably want to set up a more proper parser for .nss files. Most lexical analyzer generators seem to have licenses that are ill-suited for the App Store, but @mattt has mentioned CoreParse, which looks very promising. |
Maybe a very quick workaround can be implemented, such as automatically adding a ":iPad" nuiClass to all views when the app is running on an iPad. This way, one would just have to target ":iPad" elements for device specific styles. |
CoreParse is very cool. I am using it to make a real style parser now, and I hope to have a pull request ready this week. |
Major thanks to @phatmann for his implementation of this! |
CSS defines a pretty robust syntax for building responsive layouts with
@media
queries.It would be exceedingly cool to be able to use them in this context to target device families and orientations. Perhaps something could be implemented with Auto-Layout Constraints to this effect.
Anyway, just wanted to put this out there as a feature request. Really psyched about the direction and momentum of this project. Well done, @tombenner!
(By the way, this was totally @dominic's idea originally. That guy is way smart.)
The text was updated successfully, but these errors were encountered: