flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Harui (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLEX-35038) ToolTip does not honor global CSS fontSize
Date Tue, 23 Feb 2016 06:58:18 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15158419#comment-15158419
] 

Alex Harui commented on FLEX-35038:
-----------------------------------

Well, Flash doesn't really get good access to the browser and user defaults so Flex CSS doesn't
really have a cascade, but Flex CSS does try to implement the CSS Specificity in the CSS spec.
 There is no support for !important, however.

The issue you are having is that Flex by default has a bunch of "explicit selectors" in the
form of type selectors for the various components and they are supposed to take precedence
over the global selector.  There are ways to change that set of defaults via themes or specifying
a custom css file.

> ToolTip does not honor global CSS fontSize
> ------------------------------------------
>
>                 Key: FLEX-35038
>                 URL: https://issues.apache.org/jira/browse/FLEX-35038
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Spark: ToolTip
>    Affects Versions: Apache Flex 4.14.1
>            Reporter: Skylar Sutton
>
> Define a stylesheet using:
> {code:title=CSS (Test 1)|borderStyle=solid}
> global {
> 	fontFamily:  Helvetica, Arial, sans-serif; 
> 	fontSize:      16;
> 	color:           #333333;
> }
> mx|ToolTip {
> 	backgroundColor:    #FFFFE1;
> 	backgroundAlpha:    1;
> 	color:                       	 #000000;
> 	dropShadowVisible:  "true";
> }
> {code}
> Place a button on your application, assign it a tooltip, and observe that in this test
the tooltip's font size is not 16, as defined globally. 
> Modify the css to:
> {code:title=CSS (Test 2)|borderStyle=solid}
> global {
> 	fontFamily:  Helvetica, Arial, sans-serif; 
> 	fontSize:      16;
> 	color:           #333333;
> }
> mx|ToolTip {
> 	backgroundColor:    #FFFFE1;
> 	backgroundAlpha:    1;
> 	color:                       	 #000000;
> 	dropShadowVisible:  "true";
> 	fontSize:                   16;
> }
> {code}
> In this test, the tooltip's font will in fact be 16, as explicitly defined.
> Test 2 is incorrect, as the ToolTip documentation states it will be affected by the fontSize
style, and that style was set globally:
> {code:title=mx.controls.ToolTip.as}
> package mx.controls
> {
>  ...
> //--------------------------------------
> //  Styles
> //-------------------------------------- 
> /*
>     Note: ToolTip is affected by the following styles:
>     backgroundColor
>     borderColor
>     borderStyle
>     color
>     fontFamily
>     fontSize
>     fontStyle
>     fontWidth
>     paddingBottom
>     paddingLeft
>     paddingRight
>     paddingTop
>     shadowColor (when borderStyle is "toolTip")
>     textAlign
>     textDecoration
> */
> ...
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message