Uploaded image for project: 'ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)'
  1. ZZZ: PUBLIC - Old Liferay Portal (Use Liferay Portal Standard Edition)
  2. LEP-6323

Adding portlets to the page overwrites the theme's CSS with the portlet CSS

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.4.2, 5.0.1
    • Fix Version/s: 5.1.0
    • Component/s: None
    • Labels:
      None

      Description

      When adding a portlet to the page, any CSS files the portlet has are appended to the head of the document. This means, however, that any styles they have will overwrite what's specified in the theme.

      The fix is to prepend the elements to the head.

      There is one catch however, and that is that IE always puts priority on the last inserted stylesheet, no matter where in the head you place it.
      However, for IE, the fix is to grab all of the CSS files defined in the theme, and loop over them and run a document.createStyleSheet(stylesheet url) over each of the stylesheets href attribute.

      This required a small change to the css velocity macro (I also added similar modifications to the js macro, just in case).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              nathan.cavanaugh Nate Cavanaugh
              Reporter:
              nathan.cavanaugh Nate Cavanaugh
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  5.1.0