Commit c531d2d7 authored by Kristi Park's avatar Kristi Park Committed by Commit Bot

[NTP] Fix 1px jitter in custom link tiles

Temporary fix for the 1px jitter that occurs when a custom link is
hovered. Will be removed once the Blink library is fixed.

Also fix a missing parentheses.

Bug: 897006
Change-Id: Idea7a921d1933845fb3ab00ecaf649161b21b114
Reviewed-on: https://chromium-review.googlesource.com/c/1295170Reviewed-by: default avatarRamya Nagarajan <ramyan@chromium.org>
Commit-Queue: Kristi Park <kristipark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#602192}
parent d2432373
......@@ -675,7 +675,10 @@ html[dir=rtl] #attribution,
}
#mv-single {
border: none;
/* Quick fix for 1px jitter that occurs when border is set to none or 0 (see
* https://crbug.com/897006).
* TODO(kristipark): Revert once this is fixed in the Blink library. */
border: 1px solid transparent;
height: 100%;
width: 100%;
}
......
......@@ -437,8 +437,8 @@ var swapInNewTiles = function() {
parent.lastChild.querySelectorAll('.' + CLASSES.MD_TITLE));
if (cur.childNodes.length > MD_MAX_TILES_PER_ROW) {
cur.style.maxWidth =
'calc(var(--md-tile-width) * ' + Math.ceil(cur.childNodes.length / 2);
cur.style.maxWidth = 'calc(var(--md-tile-width) * ' +
Math.ceil(cur.childNodes.length / 2) + ')';
}
// Prevent keyboard navigation to tiles that are not visible.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment