Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #10 from Polymer/addprop
Browse files Browse the repository at this point in the history
Add support @Property. Fixes #3
  • Loading branch information
dfreedm committed May 13, 2014
2 parents c9e8f6d + 56008a7 commit 08a1c67
Show file tree
Hide file tree
Showing 3 changed files with 342 additions and 305 deletions.
8 changes: 5 additions & 3 deletions elements/context-free-parser.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@
break;

case 'attribute':
case 'property':
case 'method':
case 'event':
subCurrent = {
name: content,
description: code
};
makePragma(current, pragma + 's', subCurrent);
var label = pragma == 'property' ? 'properties' : pragma + 's';
makePragma(current, label, subCurrent);
break;

case 'default':
Expand All @@ -101,8 +103,8 @@

});

if (classes.length === 0) {
classes.push({name: this.url.split('/').pop(), description: '**Undocumented**'});
if (classes.length === 0) {
classes.push({name: this.url.split('/').pop(), description: '**Undocumented**'});
}
this.data = { classes : classes };
},
Expand Down
340 changes: 179 additions & 161 deletions elements/core-doc-page.css
Original file line number Diff line number Diff line change
@@ -1,161 +1,179 @@
:host {
display: block;
position: relative;
}

#panel {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}

.main {
padding: 0 72px;
max-width: 832px;
margin: 0 auto;
}

markedjs-element {
display: block;
}

h1 {
font-size: 52px;
color: #E91E63
}

.element {
font-size: 21px;
}

.name {
/* typography */
color: white;
/* font-size: 14px; */
font-size: 12px;
font-weight: bold;
text-decoration: none;
/* colors / effects */
background-color: #999;
box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
border-radius: 2px;
cursor: pointer;
/* metrics */
display: inline-block;
padding: 4px 12px 5px 12px;
margin: 4px 0;
}

.ntitle {
font-size: 26px;
}

.box {
margin-bottom: 40px;
}

.top pre {
padding: 12px 13px;
background-color: #f8f8f8;
}

code {
font-family: Consolas, monospace;
border: 1px solid #ddd;
background-color: #f8f8f8;
border-radius: 3px;
padding: 0 3px;
}

pre code {
max-width: 832px;
white-space: pre-wrap;
overflow: hidden;
border: none;
}

/**/

.details-name {
display: inline-block;
vertical-align: top;
width: 190px;
}

.details-info {
display: inline-block;
max-width: 540px;
}

.attribute-box {
}

.attribute-box .details {
background-color: #FFF9C4;
padding: 8px 16px;
border-bottom: 1px solid #D1CCA1;
}

.attribute-box .ntitle {
padding: 24px 16px;
}

.attribute-box code {
color: #FFAB40;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

.method-box {
}

.method-box .details {
background-color: #F0F4C3;
padding: 8px 16px;
border-bottom: 1px solid #D1CCA1;
}

.method-box .ntitle {
background-color: #9E9D24;
padding: 24px 16px;
}

.method-box code {
color: #9E9D24;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

.event-box {
}

.event-box .details {
background-color: #B2DFDB;
padding: 8px 16px;
border-bottom: 1px solid #92B7B3;
}

.event-box .ntitle {
background-color: #009688;
padding: 24px 16px;
}

.event-box code {
color: #009688;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}


:host {
display: block;
position: relative;
}

#panel {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}

.main {
padding: 0 72px;
max-width: 832px;
margin: 0 auto;
}

markedjs-element {
display: block;
}

h1 {
font-size: 52px;
color: #E91E63
}

.element {
font-size: 21px;
}

.name {
/* typography */
color: white;
/* font-size: 14px; */
font-size: 12px;
font-weight: bold;
text-decoration: none;
/* colors / effects */
background-color: #999;
box-shadow: 0 1px 2px 0px rgba(0, 0, 0, 0.1);
box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.1);
border-radius: 2px;
cursor: pointer;
/* metrics */
display: inline-block;
padding: 4px 12px 5px 12px;
margin: 4px 0;
}

.ntitle {
font-size: 26px;
}

.box {
margin-bottom: 40px;
}

.top pre {
padding: 12px 13px;
background-color: #f8f8f8;
}

code {
font-family: Consolas, monospace;
border: 1px solid #ddd;
background-color: #f8f8f8;
border-radius: 3px;
padding: 0 3px;
}

pre code {
max-width: 832px;
white-space: pre-wrap;
overflow: hidden;
border: none;
}

/**/

.details-name {
display: inline-block;
vertical-align: top;
width: 190px;
}

.details-info {
display: inline-block;
max-width: 540px;
}

.attribute-box {
}

.attribute-box .details {
background-color: #FFF9C4;
padding: 8px 16px;
border-bottom: 1px solid #D1CCA1;
}

.attribute-box .ntitle {
padding: 24px 16px;
}

.attribute-box code {
color: #FFAB40;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

.property-box .ntitle {
padding: 24px 16px;
}

.property-box code {
color: #4285F4;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

.property-box .details {
background-color: lightblue;
padding: 8px 16px;
border-bottom: 1px solid #D1CCA1;
}

.method-box {
}

.method-box .details {
background-color: #F0F4C3;
padding: 8px 16px;
border-bottom: 1px solid #D1CCA1;
}

.method-box .ntitle {
background-color: #9E9D24;
padding: 24px 16px;
}

.method-box code {
color: #9E9D24;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

.event-box {
}

.event-box .details {
background-color: #B2DFDB;
padding: 8px 16px;
border-bottom: 1px solid #92B7B3;
}

.event-box .ntitle {
background-color: #009688;
padding: 24px 16px;
}

.event-box code {
color: #009688;
border: none;
background-color: transparent;
border-radius: none;
padding: 0;
font-size: 1.2em;
}

Loading

0 comments on commit 08a1c67

Please sign in to comment.