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

Commit

Permalink
'pages' element that can be paired with 'tabs'
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Aug 28, 2013
1 parent 562c17d commit 4d26fed
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 0 deletions.
34 changes: 34 additions & 0 deletions polymer-ui-pages/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!doctype html>
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<html class="polymer-ui-full-bleed">
<head>
<title>polymer-ui-pages</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<!-- load toolkit -->
<script src="../../polymer/polymer.js"></script>
<!-- import elements-->
<link rel="import" href="polymer-ui-pages.html">
<!-- -->
<link rel="stylesheet" href="../basic.css">
</head>
<body class="polymer-ui-body-text polymer-ui-full-bleed">
<polymer-ui-pages selected="0">
<span>One</span>
<span>Two</span>
<span>Three</span>
<span>Four</span>
<span>Five</span>
</polymer-ui-pages>
<script>
document.body.onclick = function(e) {
var p = document.querySelector('polymer-ui-pages');
p.selected = (p.selected + 1) % 5;
}
</script>
</body>
</html>
28 changes: 28 additions & 0 deletions polymer-ui-pages/polymer-ui-pages.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
*/

@host {
* {
position: relative;
}
}

/*@polyfill @host > * */
::-webkit-distributed(> *) {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
visibility: hidden;
z-index: -1000;
}

/*@polyfill @host > *.polymer-selected */
::-webkit-distributed(> *.polymer-selected) {
visibility: visible;
z-index: auto;
}
27 changes: 27 additions & 0 deletions polymer-ui-pages/polymer-ui-pages.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!--
Copyright 2013 The Polymer Authors. All rights reserved.
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-->
<!--
/**
* @module Polymer UI Elements
*/
-->
<!--
/**
* polymer-ui-pages
*
* @class polymer-ui-pages
* @extends polymer-selector
*/
-->

<link rel="import" href="../../polymer-elements/polymer-selector/polymer-selector.html">

<polymer-element name="polymer-ui-pages" extends="polymer-selector" notap noscript>
<template>
<link rel="stylesheet" href="polymer-ui-pages.css">
<shadow></shadow>
</template>
</polymer-element>

0 comments on commit 4d26fed

Please sign in to comment.