Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-11070

Redundant background-position property in Prosilver button CSS?

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 3.0.11, 3.1.0-dev
    • Fix Version/s: 3.1.0-a1
    • Component/s: Styles
    • Labels:
      None

      Description

      buttons.css 17:
      background-position: 0 100%;

      buttons.css 25:
      background-position: 0 0;

      Why do we need these? I can't find any background-image property that could be affected by these.

        Issue Links

          Activity

          Hide
          StevieWonderer StevieWonderer [X] (Inactive) added a comment -

          I think you may have mis-understood the problem: there isn't a single background-image property in any Prosilver css files or inline styles that puts a background-image to any DIV under ".buttons" class (or at least it seems so). In other words, if you remove these definitions, nothing happens! Just re-checked and that is the case.

          All button related background images are targeted to SPAN tags. For example, colours.css:664:
          .reply-icon span {
          background-image: ...
          }

          So, buttons.css:17 is a redundant line
          .buttons div {
          float: left;
          margin: 0 5px 0 0;
          background-position: 0 100%; /* redundant */
          }
          because in markup this definition affects only to "DIV.buttons DIV.reply-icon" and not "DIV.buttons DIV.reply-icon A SPAN" where the background image is.

          Also buttons.css:25 is a redundant line
          .buttons div a {
          display: block;
          width: 100%;
          height: 100%;
          background-position: 0 0; /* redundant */
          position: relative;
          overflow: hidden;
          }

          But as I said, the problem is not a big one, it just confuses me that there may be something in this button hover image technique that I don't understand.

          Show
          StevieWonderer StevieWonderer [X] (Inactive) added a comment - I think you may have mis-understood the problem: there isn't a single background-image property in any Prosilver css files or inline styles that puts a background-image to any DIV under ".buttons" class (or at least it seems so). In other words, if you remove these definitions, nothing happens! Just re-checked and that is the case. All button related background images are targeted to SPAN tags. For example, colours.css:664: .reply-icon span { background-image: ... } So, buttons.css:17 is a redundant line .buttons div { float: left; margin: 0 5px 0 0; background-position: 0 100%; /* redundant */ } because in markup this definition affects only to "DIV.buttons DIV.reply-icon" and not "DIV.buttons DIV.reply-icon A SPAN" where the background image is. Also buttons.css:25 is a redundant line .buttons div a { display: block; width: 100%; height: 100%; background-position: 0 0; /* redundant */ position: relative; overflow: hidden; } But as I said, the problem is not a big one, it just confuses me that there may be something in this button hover image technique that I don't understand.
          Hide
          Arty Vjacheslav Trushkin added a comment -

          Ah, I see what you mean. Its not redundant, its just unused.

          .buttons div a is not unused though. It is the same as default value in browsers, but to be on safe side it is better to set it. Users often change default values for stuff in stylesheets for their websites when they add custom header/footer, so it is not a good idea to rely on browser default value.

          Show
          Arty Vjacheslav Trushkin added a comment - Ah, I see what you mean. Its not redundant, its just unused. .buttons div a is not unused though. It is the same as default value in browsers, but to be on safe side it is better to set it. Users often change default values for stuff in stylesheets for their websites when they add custom header/footer, so it is not a good idea to rely on browser default value.
          Hide
          Arty Vjacheslav Trushkin added a comment -

          It has already been fixed in phpBB 3.1

          Show
          Arty Vjacheslav Trushkin added a comment - It has already been fixed in phpBB 3.1
          Hide
          StevieWonderer StevieWonderer [X] (Inactive) added a comment -

          Okay, thanks for the explanation

          Show
          StevieWonderer StevieWonderer [X] (Inactive) added a comment - Okay, thanks for the explanation
          Hide
          Arty Vjacheslav Trushkin added a comment -

          Thanks for reporting. If you'll find any other similar (or not similar) bugs, please report them as well

          I think this ticket should be closed because bug has been fixed (unintentionally when rewriting buttons) in 3.1
          Fixing it for 3.0 might break existing mods and third party styles.

          Show
          Arty Vjacheslav Trushkin added a comment - Thanks for reporting. If you'll find any other similar (or not similar) bugs, please report them as well I think this ticket should be closed because bug has been fixed (unintentionally when rewriting buttons) in 3.1 Fixing it for 3.0 might break existing mods and third party styles.

            People

            • Assignee:
              nickvergessen Joas Schilling
              Reporter:
              StevieWonderer StevieWonderer [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development