Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1017350 - Simplify divider design for verticalhome r=kgrandon
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsofapollo authored and KevinGrandon committed Jun 4, 2014
1 parent 6e2a5e3 commit 0390d27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 18 deletions.
16 changes: 0 additions & 16 deletions shared/elements/gaia_grid/js/items/divider.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,6 @@
type: 'divider',
index: 0
};

/**
* Use polynomial regression to find the ideal divider size.
* This calculates the appropriate divider height depending
* on screen height. Examples (height, divider size):
* 480,3 / 854,4 / 960,4 / 1280,6 / 1920,8
* This result is cached in the GridView so we don't have to
* calculate it again.
*/
if (!this.grid.layout._dividerLineHeight) {
this.grid.layout._dividerLineHeight = Math.round(3.8 * Math.pow(10, -7) *
Math.pow(screen.height, 2) + 2.7 * Math.pow(10, -3) *
screen.height + 1.5);
}
this.lineHeight = this.grid.layout._dividerLineHeight;
}

Divider.prototype = {
Expand Down Expand Up @@ -59,7 +44,6 @@
divider.className = 'divider';

var span = document.createElement('span');
span.style.height = this.lineHeight + 'px';
divider.appendChild(span);

this.grid.element.appendChild(divider);
Expand Down
4 changes: 2 additions & 2 deletions shared/elements/gaia_grid/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@

.divider span {
display: block;
background: #fff;
background: linear-gradient(to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.5));
width: 100%;
z-index: 2;
border-radius: 40%;
height: 0.2rem
}

.divider:last-of-type {
Expand Down

0 comments on commit 0390d27

Please sign in to comment.