ICEmobile
  1. ICEmobile
  2. MOBI-404

Avoid the use of element selectors in the Themes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1 Final
    • Fix Version/s: 1.3 Beta
    • Component/s: Faces, Spring
    • Labels:
      None
    • Environment:
      n/a

      Description


      The themes often use parent child styling rules with element selectors, eg.

      .mobi-list > .mobi-list-item > .mobi-list-item-default > a {
          text-decoration: none;
          display: block;
          padding: 15px 25px;
      }

      or

      .mobi-list-item-default > span {
          padding: 15px 25px;
          display: inline-block;
      }

      specifying styles with children solely by element, eg' 'a' or 'span' raises the likelihood that these styles will affect other markup not generated by the component. We should limit the use of element selectors. A better approach would be relying solely on CSS class names like so:

      .mobi-list-item-default > .mobi-list-item-content {
          padding: 15px 25px;
          display: inline-block;
      }

      It may still be preferable to use child selectors like above, as this approach can be more performant.

        Activity

          People

          • Assignee:
            Philip Breau
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: