forked from mozilla/mozmill-dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Align the contents in the Filter box (mozilla#90)
- Loading branch information
Showing
2 changed files
with
50 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andreieftimie here's the preliminary work for one template. I left the
class="selected"
for All in just for now for visual reference during the alignment work. It will be removed in an eventual PR. I also wasn't sure if the filtercell spans each need new lines, but a W3 check of the code didn't complain about that all being in one line. It seems easier to read.3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this app's markup is heavily tied into the business logic. The changes you made here break all functionality around the filters.
That's why I would propose to not change the markup (otherwise you'll need a lot of changes in JS).
We can achieve the same effect using only CSS.
Something like the following should work (might need a bit of tweaking, but its pretty close).
Just
float
the leftspan
and clear the enclosingdivs
. No markup changes required.3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, crazy. Yes, I had tried just css only first, but didn't get the desired result. I will try your suggestions.
3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think you should be credited wholly with this fix :) Minor thing, I am trying to figure out why the text baselines are not aligned across all four rows. The
float: left
seems to trigger it. It pushes each of the four first-child spans (Application, Branch, OS, From) downwards.3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's because of the vertical padding applied to the span elements which are inline. Padding doesn't really work for inline elements.
We can use
display: inline-block
to mitigate this. Even better is probably to not rely on vertical padding, just useline-height
to make sure all our text elements render with the same leading.I've pushed a result to http://mozmill-sandbox.blargon7.com/
3801fcd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks cool to me! I've made one comment in the PR. Thank you for helping out and explaining the above Andrei, appreciated.