Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
spacify, factor out CSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Apr 4, 2014
1 parent 67e4140 commit a7d5a7e
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 55 deletions.
60 changes: 60 additions & 0 deletions elements/x-palette/x-palette.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
:host {
position: relative;
}

#title {
height: 54px;
line-height: 54px;
font-size: 1.5px;
padding-left: 22px;
background-color: #E0E0E0;
border-bottom: 1px solid #E1E1E1;
}

#list {
background-color: #F2F2F2;
position: absolute;
top: 0;
right: 0px;
left: 0px;
bottom: 0px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}

.item {
font-weight: bold;
cursor: pointer;
padding: 12px;
margin: 4px 0;
background-color: white;
border: 1px solid #D3D2D2;
border-radius: 5px;
-webkit-transition: border 0.5s;
}

.group-item {
font-weight: 500;
}

.group-item.palette-selected {
color: #4285f4;
}

.simple-item {
height: 40px;
line-height: 40px;
opacity: 0.7;
font-size: 14px;
font-weight: 500;
cursor: pointer;
color: #000;
white-space: nowrap;
}

[ishidden] {
display: none;
}
62 changes: 7 additions & 55 deletions elements/x-palette/x-palette.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,61 +8,7 @@

<template>

<style>
:host {
position: relative;
}
#title {
height: 54px;
line-height: 54px;
font-size: 1.5px;
padding-left: 22px;
background-color: #E0E0E0;
border-bottom: 1px solid #E1E1E1;
}
#list {
background-color: #F2F2F2;
position: absolute;
top: 0;
right: 0px;
left: 0px;
bottom: 0px;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
}
.item {
font-weight: bold;
cursor: pointer;
padding: 12px;
margin: 4px 0;
background-color: white;
border: 1px solid #D3D2D2;
border-radius: 5px;
-webkit-transition: border 0.5s;
}
.group-item {
font-weight: 500;
}
.group-item.palette-selected {
color: #4285f4;
}
.simple-item {
height: 40px;
line-height: 40px;
opacity: 0.7;
font-size: 14px;
font-weight: 500;
cursor: pointer;
color: #000;
white-space: nowrap;
}
[ishidden] {
display: none;
}
</style>
<link rel="stylesheet" href="x-palette.css">

<x-meta id="meta" categories="{{categories}}"></x-meta>

Expand Down Expand Up @@ -90,9 +36,12 @@

<script>
Polymer('x-palette', {

categories: null,

ready: function() {
},

trackStart: function(event) {
event.stopPropagation();
var tag = event.target.getAttribute('tag');
Expand All @@ -107,6 +56,7 @@
this.drag.drag(event);
}
},

trackEnd: function(event) {
event.stopPropagation();
if (this.drag) {
Expand All @@ -120,6 +70,7 @@
// dropping here sends the item to the bitbucket
drag.element.parentNode.removeChild(drag.element);
},

createDragObject: function(tag, event) {
var meta = this.$.meta.byId(tag);
var e = event || {};
Expand All @@ -130,6 +81,7 @@
element: elt
};
}

});
</script>

Expand Down

0 comments on commit a7d5a7e

Please sign in to comment.