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

Skylar Sutton commented on FLEX-35038:
--------------------------------------

I smell what you're stepping in, but IMHO that's against the spirit of a 
"global" selector. 

Most people working with CSS are going to think of this in the same terms of 
HTML CSS selectors:

 1. Browser Default
 2. Global selector trumps #1 (browser)
 3. Explicit style trumps #2 (global)

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

Reply via email to