robertwijas / UISS

UIAppearance Stylesheets
MIT License
1.23k stars 80 forks source link

Media query support #20

Closed btaylor closed 10 years ago

btaylor commented 11 years ago

Similar to CSS, media query support in UISS allows you to have layouts specific to various device configurations (e.g.: iPhone 4 vs 5). This code is also extensible to allow for additional properties (e.g.: device-version: 6, device-version: 7) in the future.

Since UISS files are evaluated once at runtime, media queries can only be used to evaluate device-specific properties.

The syntax is a bit clunky, but a) it's understandable, and b) it's extensible. I could see adding properties for device-version (iOS < 7, >= 7), idioms (pad, phone) as well as retina/non-retina so that you could distinguish between retina iPad and iPad mini (for slightly larger font sizes).

Ashton-W commented 11 years ago

Nice job!

robertwijas commented 10 years ago

@btaylor thanks! I will add this performance tweak in next version.