Skip to content

Commit

Permalink
feat(scroll-content): add 1px padding-top
Browse files Browse the repository at this point in the history
  • Loading branch information
mhartington committed Aug 7, 2014
1 parent abf77a1 commit e5b5906
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scss/_scaffolding.scss
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ body.grade-c {
// Hide the top border if any
margin-top: -1px;

// Prevents any distortion of lines
padding-top:1px;

width: auto;
height: auto;
}
Expand Down

2 comments on commit e5b5906

@voliva
Copy link
Contributor

@voliva voliva commented on e5b5906 Aug 8, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at #1867 and #1880 not sure if this is fully fixed.
For these "problematic" devices it looks like the 'pixel-grid' is not 1 pixel, but 2-3 pixels maybe, and as antialiasing doesn't work -even in chrome desktop- the lines get distorted. If the user scrolls just a bit down, it may get distorted again.
In the case of chrome desktop and any other "working" device where the 'pixel-grid' is 1 pixel, this only happens when scroll uses a floating-point translate transform.

@mhartington
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the issue will always be there when using images that have odd pixel dimensions. It's the same deal in the native platforms, but we can always consider a different antialiasing option. @ajoslin or @adamdbradley, any thoughts about this?

Please sign in to comment.