Flex Media Queries for BlackBerry PlayBook

A cool feature now in Flex is media queries. Media queries allow you to deliver different CSS, depending on either the device OS or the pixel density of the device. This is very useful for tweaking your apps to work with the different standards for UI across devices.

Here’s an example. It changes the appearance of Flex menus on iOS, to make the look more iOS’y.


The relevant docs mention:

  • Android
  • IOS
  • Macintosh
  • Windows
  • Linux

But there’s no mention of BlackBerry PlayBook. After a little digging, I found this tidbit in the original sdk docs.

os-platform (allowed values are “Android”, “IOS”, “Macintosh”, “Windows”, “Linux”. Other values are allowed and will be matched against the three character platform abbreviation in Capabilities.version in case new platforms become available).

Which means the example below totally works for BlackBerry PlayBook.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s