Descendant Style Selector not Working

Anyone know why this descendant style selector does not work?
<?xml version="1.0" encoding="utf-8"?>
<s:Application
  xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:mx="library://ns.adobe.com/flex/mx"
  xmlns:s="library://ns.adobe.com/flex/spark"
  xmlns:comp1="comp1.*" xmlns:comp2="comp2.*">
  <s:layout>
    <s:HorizontalLayout paddingLeft="10" paddingTop="10"/>
  </s:layout>
  <fx:Style>
    @namespace comp1 "comp1.*";
    @namespace comp2 "comp2.*";
    comp1|ParentButtonClassOne comp1|CustomButton {
      color: red;
    comp2|ParentButtonClassTwo comp2|CustomButton {
      color: blue;
  </fx:Style>
  <comp1:CustomButton label="Button One"/>
  <comp2:CustomButton label="Button Two"/>
</s:Application>
--------- comp1.ParentButtonClassOne.as ------
package comp1
  import spark.components.Button;
  public class ParentButtonClassOne extends Button{}
--------- comp1.CustomButton.as ------
package comp1
  import spark.components.Button;
  public class CustomButton extends Button{}
--------- comp2.ParentButtonClassTwo.as ------
package comp2
  import spark.components.Button;
  public class ParentButtonClassTwo extends Button{}
--------- comp2.CustomButton.as ------
package comp2
  import spark.components.Button;
  public class CustomButton extends Button{}

Doesn't "comp2|ParentButtonClassTwo comp2|CustomButton" mean that this style will only be applied to CustomButtons inside of a ParentButtonClassTwo?  From the code sample here it looks like that isn't the case.

Similar Messages

  • Style selector not working...

    Why does the mx|ToggleButtonBar style selector not work in the following code?
    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the Halo TabNavigator layout container. -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/halo">
         <fx:Style>
              /* Not working */
               mx|ToggleButtonBar{
                   buttonStyleName:"mytoggleButtonBarButtonStyle";
                   firstButtonStyleName:"mytoggleButtonBarButtonStyle"
              /* okay */
               #tbb{
                   buttonStyleName:"mytoggleButtonBarButtonStyle";
                   firstButtonStyleName:"mytoggleButtonBarButtonStyle"
              .mytoggleButtonBarButtonStyle{
                   skin: ClassReference("skins.custButtonSkin");
         </fx:Style>   
         <s:VGroup>
              <mx:ToggleButtonBar id="tbb">
              <mx:dataProvider>
                   <fx:Array>
                        <fx:String>Flex</fx:String>
                        <fx:String>Flash</fx:String>
                        <fx:String>ColdFusion</fx:String>
                   </fx:Array>
              </mx:dataProvider>
         </mx:ToggleButtonBar>
         <mx:ToggleButtonBar id="tbb2">
              <mx:dataProvider>
                   <fx:Array>
                        <fx:String>Flex</fx:String>
                        <fx:String>Flash</fx:String>
                        <fx:String>ColdFusion</fx:String>
                   </fx:Array>
              </mx:dataProvider>
         </mx:ToggleButtonBar>
         </s:VGroup>
    </s:Application>

    <?xml version="1.0"?>
    <!-- Simple example to demonstrate the Halo TabNavigator layout container. -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                      xmlns:s="library://ns.adobe.com/flex/spark"
                      xmlns:mx="library://ns.adobe.com/flex/halo">
         <fx:Style>
         @namespace mx "library://ns.adobe.com/flex/halo";
              @namespace s "library://ns.adobe.com/flex/spark";
              /* Not working */
               mx|ToggleButtonBar{
                   buttonStyleName:"mytoggleButtonBarButtonStyle";
                   firstButtonStyleName:"mytoggleButtonBarButtonStyle"
              /* okay */
               #tbb{
                   buttonStyleName:"mytoggleButtonBarButtonStyle";
                   firstButtonStyleName:"mytoggleButtonBarButtonStyle"
              .mytoggleButtonBarButtonStyle{
                   skin: ClassReference("skins.custButtonSkin");
         </fx:Style>   
         <s:VGroup>
              <mx:ToggleButtonBar id="tbb">
              <mx:dataProvider>
                   <fx:Array>
                        <fx:String>Flex</fx:String>
                        <fx:String>Flash</fx:String>
                        <fx:String>ColdFusion</fx:String>
                   </fx:Array>
              </mx:dataProvider>
         </mx:ToggleButtonBar>
         <mx:ToggleButtonBar id="tbb2">
              <mx:dataProvider>
                   <fx:Array>
                        <fx:String>Flex</fx:String>
                        <fx:String>Flash</fx:String>
                        <fx:String>ColdFusion</fx:String>
                   </fx:Array>
              </mx:dataProvider>
         </mx:ToggleButtonBar>
         </s:VGroup>
    </s:Application>

  • Paste and match style does not work in some cases

    Dear Sir
    My "Paste and Match Style" does not work with some sites.

    What happens if you put table Table_1 into the Analytic View?
    Also go ahead and and update HANA, Rev.60 is very old by now.

  • Style Mapping not working

    I have just upgrade from CS3 to CS4 and am trying to import word documents and use style mapping to format with the ind document existing styles.
    It works once even if I save the preset. The next time I use it all my styles have defaulted back to default (New pargraph style)
    It woked fine in CS.
    Please - any suggestions

    Hi - This is apparently a known bug in CS4 but not CS3. 
    http://www.theindesigner.com/blog/restore-style-mapping-presets-report-this-bug
    After reading about it, please do us all a favor and tell Adobe about it.  The instructions on how to do it are in the post above.
    David.

  • Link Styles are not working properly

    I have set the links styles in my top nav bar to be
    Normal: BLUE
    Hover: WHITE and BOLD
    Visited: BLUE
    Actve: WHITE and BOLD
    The bold is working, but the color is not changing
    Simular problen on the Vertical Nav Ban
    Here the Hover and Bold do work, but not the active does not work
    Normal: TAN
    Hover: WHITE and BOLD
    Visited: TAN
    Actve: WHITE and BOLD
    Here's a link to the page
    http://www.imagine-y.com/Clients/TrevorSite/Trevor4

    When you use the link pseudclass in your css it has to be expressed in the correct order.
    LoVe HAte
    Link
    Visited
    Hover
    Active
    It doesn't matter that you have not expressed all four but the three that you have still need to be that way.
    Anyway, try it, we have nothing to lose!
    Martin

  • Link to site-root relative style sheet not working CS4

    I am trying to define links to site-root relative external style sheets - as I believe that IE conditional comments prevent Templates from correctly updating the links. The styles are not being applied when I use any href path begining with "/".  So, the following do not work:
    <link href="/styles/myStyleSheet.css" rel="stylesheet" type="text/css" />
    <link href="/myStyleSheet.css" rel="stylesheet" type="text/css" />
    Dreamweaver can open the css file from a right-mouse click and even give me warnings about css properties as a tool-tip as I hover over the file. The styles are applied fine with document relative paths:
    <link href="../myStyleSheet.css" rel="stylesheet" type="text/css" />
    Any ideas?
    Jeff

    Close your meta tag.
    <meta name="description" content="blah, blah, blah...>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Style Code Not Working for Read Only Users !

    Hi 
    Can anyone help us with this issue. We have created some special Styling code in order to hid the Quick Launch on the home page of our main SharePoint site. The Styling works no problem at
    all for users with edit rights, however we found that the styling did not work for users with read only access.  What we found was that if we switched on the "Edit Items  -  Edit items in lists, edit documents in document libraries, and
    customize Web Part Pages in document libraries." in the List Permissions for the Permission Levels for the Read Access group, the Styling then works no problem at all. HOWEVER it then gives those users the ability to EDIT the site page, as it then
    puts the Edit option on the page top right for the user to click and then mess up the web page, which we can not permit. 
    SO..... How do we get this styling to work for ALL user types ?

    Hi,
    This usually happens when the CSS file is not published or approved, please check it.
    If the CSS files uploaded in the Style Library, please check whether you had to check in those CSS files or not.
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Menubar rollOverColor style will not work.

    I can't get the rollOverColor property or the selectionColor style to work on a Menubar.
    _toolbar.setStyle("selectionColor",_source.@sc);
    _toolbar.setStyle('rollOverColor',_source.@roc);
    _source.@roc = 0x000000;
    _source.@sc = 0xFFFFFF;
    it does not work if I hard code them in either.

    You might need to set these on the menus in the menubar.
    If this post answered your question or helped, please mark it as such.

  • Empty-cells:show CSS style is not work

    this is some visual glitch. empty cells of tables not showed as default. And css attribute empty-cells:show not works.

    Hey there, It is better if you provide a link.
    We need to see how you are calling it. The stylesheet you think is being called may not be etc.

  • Toggle selector not working...

    I recently connected my nano to a Altec Lansing dock speaker system, and ever since then, my toggle does not work, neither does the center button. However, when it is connected to the speakers, i'm able to use the toggle. Does this sound like a hardware failure? Should I make a genius bar appt?

    Hi Tim,
    What's the default selection of your Toggle Button? Is it Off? And when Toggle Button is Off, some components show up by dynamic visibility control?
    I reproduced the problem just when the default selection of Toggle Button is Off and I have submitted a report in system.
    But when the default selection is On, things go well. For the 100% transparency of the Button, there is a walkaround of this problem: set the default selection is On and firstly use On to dynamically show some components and click the button Off, some others show up.
    Hope this can help!

  • Dymanic action with jQuery selector not working in version 4.2.2

    Hi,
    We’re in the process upgrading to APEX version 4.2.2. We have an issue is with a report with a link that’s firing a dynamic action with a jQuery selector.
    The first sequence in the dynamic action is Confirm. When we click the link in the report it’s supposed to popup a confirm “Are you sure you want to save?"
    When we click the link nothing happens. This works in our current version 4.0.1, but not in 4.2.2. Do you have any ideas?
    Thanks,
    Joe

    change the
    in the url to
    javascript:void(0);
    The reason for your issue is that the default action of the anchor tag is not prevented and thus navigation occurs. A confirm action will return true or false, and execution of further true actions will stop when selecting cancel but this will still not prevent the default action from occuring. Similarly a cancel event true action is not adequete as this has to be run after the confirm so not accounting for the execution-stopping cancel of the confirm.
    That javascript in the url is some good ol' "hack". It'll run that javascript instead of performing a navigation and void(0) just does nothing, and the click dynamic action will be unaffected.

  • Certain styles, links not working for me in textflow

    I am building a reader app using the text layout and text flow, but I am having difficulty setting certain styles ('formats') on paragraphs, particularly related to padding and margins. If I take the tlf markup I create and import it into the adobe labs rich text editor, all is well. This leads me to suspect that there is a problem with how I/we are implementing the text flow renderer/controller.
    Note some styles do work, such as indenting, bold, font, etc.
    Anyone seen this behavior and have a possible cause/solution?
    Thx,
    d

    The margin attributes were removed intentionally because they weren't implemented correctly.  The paragraph* attrbiutes were added after some research as a replacement.  It's nice that they inherit unlike padding or margins.  The margin tags may come back - they need to play nice with padding and borders - but it won't be in this release.
    The only thing special about the posted example is that its way out of date.
    Richard

  • InDesign CS5.5 Style sheets not working properly

    Hello,
    I'm checking out a trial version of InDesign CS5.5 and am creating some paragraph style sheets that don't seem to be working. When assigning the latest style I've created to a paragraph, it changes the color I've spec'd, but not the typeface. I open up the style to make sure I've selected the typeface, and it's in order. It just won't style the paragraph with it. What might be going on?
    Thank you in advance for any advice. It's making me crazy.

    @Helenac:
    to force a paragraph style with all defined attributes to a paragraph regardless of local formatting and applied character styles, hold the "alt" + "shift" keys when applying the paragraph style.
    If you want to preserve character styles and overwrite local formatting, then hold the "alt" key when applying the paragraph style.
    Uwe

  • File repository Content Selectors not working

    Hi,
    I am using Weblogic Portal 10 with a file a file repository. When I add content using the admin console (for example an image of type image), I am able to view it. The file is also added to the file system. But for some reason the content selector is not able to retrieve it. Is there something obvious I am missing?

    Doing a local deployment to the server on my laptop, I found that I could recreate this if doing a deployment with the application in .ear format. Deploying from workshop, the application did not seem to have any issues. Did a successful deployment to the Test server this morning deploying with the .ear file in exploded format. Things seem to be working well.
    I think that we will change our deployment process to do deployments with the exploded .ear file. If anyone has run into issues with this type of deployment it would be interesting to hear. Closing the thread.

  • Style sheet not working in Internet Explorer

    Hello Experts
    Please have a look at this. It is working fine in Firefox.http://www.themildmayarms.com
    Here is my Style Sheet linkhttp://www.themildmayarms.com/index.css
    The style sheet is definitely uploaded. The other pages have a different style sheet and are working fine in both browsers.
    I have validated the site and am getting this:
    Line 13,         Column 1:     unclosed start-tag requires SHORTTAG YES<link href="index.css" rel="stylesheet" type="text/css">

    The construct <foo<bar> is valid in HTML (it is an example of the rather obscure “Shorttags” feature)       but its use is not recommended.       In most cases, this is a typo that you will want to fix. If you really want to use shorttags,        be aware that they are not well implemented by browsers.
    Stuck! Please help.
    Thank you in advance.

    Close your meta tag.
    <meta name="description" content="blah, blah, blah...>
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

Maybe you are looking for

  • Listen to serial port open by another applicatio​n

    I have a test setup where another application is communicating with a device over a serial port and I want my Labview gui to be able to listen to the communication. Since two applications cannot have the same serial port open I can't just open the po

  • Register Supplier User

    Does anyone know what workflow sends the Supplier the information about joining iSupplier?

  • Workflows : Reg Check FM and Reciever FM of Events

    Hi, I read that Check Function Modules and Receiver Function Modules can be written to have more control over the Events. I understood the theory, but when I go for the implementation, Am unable to create the CHECK FM or RECIEVER FM. I just want to k

  • Add functionality for enter and close in a dialogue window

    Hi I have a dialogue screen. On pressing enter or the enter icon I need some functionality. And on clicking the close icon or close(on the dialogue window) i need to exit. How to add functionality to close and enter? (The icons are functioning proper

  • Notification updation

    Dear Experts, I am creating a custom workflow with 4 approval levels. When workitem comes to 1st level approver I sent a notification mail to inform initiator that wf is in 1st level. Now I am asked to send a mail to initiator such that when workflow