Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Unified Diff: chrome/browser/resources/new_new_tab.js

Issue 160291: Fix issues with right border of the lower section as well as some CSS... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/new_new_tab.css ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.js
===================================================================
--- chrome/browser/resources/new_new_tab.js (revision 21869)
+++ chrome/browser/resources/new_new_tab.js (working copy)
@@ -696,21 +696,26 @@
lowerSectionsElement.style.height = lowerSectionsElement.style.opacity = 0;
}
+ // Even when the width is set to 0 it will take up 2px due to the border. We
+ // compensate by setting the margin to -2px.
if (recentShown && tipsShown) {
var w = (totalWidth - spacing) / 2;
recentElement.style.width = tipsElement.style.width = w + 'px'
- recentElement.style.opacity = tipsElement.style.opacity = '';
+ recentElement.style.opacity = tipsElement.style.opacity =
+ recentElement.style.WebkitMarginStart = '';
spacer.style.width = spacing + 'px';
} else if (recentShown) {
recentElement.style.width = totalWidth + 'px';
- recentElement.style.opacity = '';
+ recentElement.style.opacity = recentElement.style.WebkitMarginStart = '';
tipsElement.style.width =
tipsElement.style.opacity = 0;
spacer.style.width = 0;
+
} else if (tipsShown) {
tipsElement.style.width = totalWidth + 'px';
tipsElement.style.opacity = '';
recentElement.style.width = recentElement.style.opacity = 0;
+ recentElement.style.WebkitMarginStart = '-2px';
spacer.style.width = 0;
}
}
« no previous file with comments | « chrome/browser/resources/new_new_tab.css ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698