ICEfaces
  1. ICEfaces
  2. ICE-9819

ace:contextMenu styleClass not displayed

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA, 4.0.BETA
    • Fix Version/s: EE-3.3.0.GA_P02, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Icefaces 4 trunk rev #39873, Icefaces ee-3.3.0.GA Maintenance branch Tomcat 7, All browsers.
    • Assignee Priority:
      P2

      Description

      ContextMenu styleClass is not displayed in test application. See attached screen-shot.
      Steps to reproduce:
      Navigate to http://dev.icesoft.com/svn/repo/qa/trunk/Regression-Icefaces4/Sparkle/Nightly/contextMenu
      Build and deploy onto any browser.
      Navigate to contextMenu Attribute test.
      Right click on "Style (border:2px dotted red; font-size:10px;)".
      Immediately below that, right click on "StyleClass (same styling as above)".
      The styleClass does not display the red dotted border as expected.

        Activity

        Hide
        Judy Guglielmin added a comment -

        screen shot of chrome inspection of css classes

        Show
        Judy Guglielmin added a comment - screen shot of chrome inspection of css classes
        Hide
        Ken Fyten added a comment -

        Assign to Art to determine if overriding the ui-widget style is supposed to be done via styleClass, or if the test should be changed.

        Show
        Ken Fyten added a comment - Assign to Art to determine if overriding the ui-widget style is supposed to be done via styleClass, or if the test should be changed.
        Hide
        Liana Munroe added a comment -

        This issue also applies to ace:menuBar. StyleClass is not displayed as expected.

        Show
        Liana Munroe added a comment - This issue also applies to ace:menuBar. StyleClass is not displayed as expected.
        Hide
        Arturo Zambrano added a comment -

        The custom style class is added correctly to the root containers of these components. I verified that the root container has the custom style classes added at the end of its 'class' attribute, after the all the jQuery and Wijmo classes. The reason why the custom class doesn't override the other styles visually seems to be due to the way the jQuery UI and Wijmo classes are defined. In pretty much any other case, adding a custom style class at the end of the 'class' attribute overrides all other stylings defined by the classes that appear before it. However, this is not occurring with these components for some obscure reason. I tried adding the custom style class at the beginning of the 'class' attribute, and it didn't override the other stylings.

        The way to solve this is at the app level, by simply making the custom CSS classes more specific. In the case of the contextMenu test app, defining the custom class in either of the following ways will effectively override the stylings of the other classes:

        	div.customStyling {
        		border:2px dotted red;
        		font-size:10px;
        	}
        
        	.customStyling {
        		border:2px dotted red !important;
        		font-size:10px !important;
        	}
        

        In the first case, we simply make the custom class more specific, so it has more precedence. In the second case, we add the '!important' keyword to every rule defined in the class to force precedence.

        Show
        Arturo Zambrano added a comment - The custom style class is added correctly to the root containers of these components. I verified that the root container has the custom style classes added at the end of its 'class' attribute, after the all the jQuery and Wijmo classes. The reason why the custom class doesn't override the other styles visually seems to be due to the way the jQuery UI and Wijmo classes are defined. In pretty much any other case, adding a custom style class at the end of the 'class' attribute overrides all other stylings defined by the classes that appear before it. However, this is not occurring with these components for some obscure reason. I tried adding the custom style class at the beginning of the 'class' attribute, and it didn't override the other stylings. The way to solve this is at the app level, by simply making the custom CSS classes more specific. In the case of the contextMenu test app, defining the custom class in either of the following ways will effectively override the stylings of the other classes: div.customStyling { border:2px dotted red; font-size:10px; } .customStyling { border:2px dotted red !important; font-size:10px !important; } In the first case, we simply make the custom class more specific, so it has more precedence. In the second case, we add the '!important' keyword to every rule defined in the class to force precedence.
        Hide
        Arturo Zambrano added a comment -

        Added the recommendations above to the wiki for the menu components.

        Show
        Arturo Zambrano added a comment - Added the recommendations above to the wiki for the menu components.

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Liana Munroe
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: