While working on #1979066: Consider using field formatters to display changes I noticed some weirdness with our theme template for the issue link (now used for both the [#x] filter and also field formatters and Views row plugins). Since the template is defining an outer <span> with a class that we use to decide if we want text-decoration: line-through; applied, and since that span itself contains newlines, you can sometimes see the strike-through happening outside the <a> in a weird way. If you try to put a + in front of the link, it ends up looking like +-[link] which is confusing as hell (and seemed like a bug in the nodechanges code). I think the only way to really deal with this is to remove the newlines from theme/project-issue-issue-link.tpl.php. Even though it makes the template itself less readable, it removes all these extra newlines from the markup, which in cases like this cause serious weirdness in how it looks.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1990478-3.its-the-table-stupid.png | 18.83 KB | dww |
| #2 | 1990478-2.after_.png | 10.78 KB | dww |
| #1 | 1990478-1.template-newline-weirdness.png | 10.85 KB | dww |
Comments
Comment #1
dwwFor example:
Comment #2
dwwAnd here's how it looks with theme/project-issue-issue-link.tpl.php flattened into a single line:
Comment #3
dwwSaw the same weirdness locally with stark as my theme instead of bartik (but only in nodechanges output, never with the [#x] link in other places. Then realized it's something about doing this within a table. Saw the same badness even on git7site with bluecheese:
So, I think there's no good way out of this without just killing the newlines in the template...
Comment #4
dwwAn alternate approach tvn suggested was adding this to project_issue.css:
That seems to work on my local site running stark with Chrome, FF and Safari. However, it forces the links onto a newline when I switch back to bartik. :( And I suspect we'll have the same badness on bluecheese.
So, probably easier to just remove the newlines and be done with it...
Comment #5
dwwScrew it. Removed the newlines. Problem solved:
http://drupalcode.org/project/project_issue.git/commit/df20e2a
Comment #6
dwwp.s. I just looked and in D6 we've never seen any problems because it's not a theme template, it's just a theme function that creates the markup without any newlines. So, this really was a new problem...
Comment #7
dwwp.s. Now merged into bzr and should be live on git7site soon (although I can't access that site right now).