Skip to content
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

Closed
mattt opened this issue Dec 5, 2012 · 4 comments · Fixed by #203
Closed

@media Queries to Target iPad / iPhone, Orientation, Auto-Layout Constraints #3

mattt opened this issue Dec 5, 2012 · 4 comments · Fixed by #203

Comments

@mattt
Copy link

mattt commented Dec 5, 2012

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.)

@tombenner
Copy link
Owner

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.

@Altimor
Copy link

Altimor commented Jul 25, 2013

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.

@phatmann
Copy link
Contributor

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.

This was referenced Jan 16, 2014
@tombenner
Copy link
Owner

Major thanks to @phatmann for his implementation of this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants