flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bilbosax <waspenc...@comcast.net>
Subject Wrong CSS DPI Buckets Being Chosen
Date Mon, 06 Mar 2017 20:06:46 GMT
I am playing with CSS to try and get a hang of setting my font sizes based on
a device's DPI.  I did not set the applicationDPI at the application level,
assuming that if it is not set, it will set itself to an appropriate DPI
bucket.  Then, I trace the applicationDPI and the Capabilities.screenDPI. 
When I debug it on my iPad, it traces that it's Capabilities.screenDPI is
264, which according to the link below, should map the device to a DPI
bucket of 240.  But it traces the applicationDPI as 320, and the CSS rule
that it is selecting is the 320 rule.  How do I get the application to set
the applicationDPI to 240 when the Capabilities.screenDPI is 264, and force
it to use the 240 CSS rule?


<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
		@namespace s "library://ns.adobe.com/flex/spark";
		@namespace mx "library://ns.adobe.com/flex/mx";
		@media (application-dpi: 160) {
			s|Label {
				fontSize: 40;
		@media (application-dpi: 240) {
			s|Label {
				fontSize: 100;
		@media (application-dpi: 320) {
			s|Label {
				fontSize: 15;
	<s:Label id="testText" horizontalCenter="0" verticalCenter="-300"/>

View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Wrong-CSS-DPI-Buckets-Being-Chosen-tp14779.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

View raw message