Implement NTP column count using responsive design

Desktop / Chromium - Chris Pickel [chromium.org] - 10 August 2017 08:57 EDT

A @media query determines when to change the number of columns; there no longer needs to be JS to listen for resize events. To prevent tabbing off-screen, a @media query in the MV iframe hides extra tiles based on the iframe's width.

Bug: 525510 Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation Change-Id: Ia91ed587f54da6d52f8c87945726516f3f99f340 Reviewed-on: https://chromium-review.googlesource.com/609062 Commit-Queue: Chris Pickel

ae70b0d Implement NTP column count using responsive design
chrome/browser/resources/local_ntp/local_ntp.css | 18 ++++-
chrome/browser/resources/local_ntp/local_ntp.js | 81 +---------------------
.../resources/local_ntp/most_visited_single.css | 60 +++++++++++-----
.../resources/local_ntp/most_visited_single.js | 16 -----
4 files changed, 59 insertions(+), 116 deletions(-)

Upstream: git.chromium.org


  • Share