Skip to content

Commit

Permalink
rename to iron-media-query
Browse files Browse the repository at this point in the history
  • Loading branch information
notwaldorf committed Apr 17, 2015
1 parent a2eb5f5 commit 676a111
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bower_components/
bower_components
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
core-media-query
================

See the [component page](http://polymer-project.org/docs/elements/core-elements.html#core-media-query) for more information.
# iron-media-query
28 changes: 20 additions & 8 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
{
"name": "core-media-query",
"name": "iron-media-query",
"version": "0.8.0",
"private": true,
"main": "core-media-query.html",
"authors": [
"Frankie Fu <[email protected]>",
"The Polymer Authors"
],
"repository": "https://github.com/Polymer/core-media-query/tree/0.8-preview",
"keywords": [
"web-components",
"web-component",
"polymer"
],
"main": "index.html",
"private": true,
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/iron-media-query"
},
"license": "MIT",
"homepage": "https://github.com/PolymerElements/iron-media-query",
"ignore": [
],
"dependencies": {
"polymer": "Polymer/polymer#0.8-preview"
"polymer": "Polymer/polymer#v0.8.0-rc.4"
},
"devDependencies": {
"webcomponentsjs": "webcomponents/webcomponentsjs#master",
"webcomponentsjs": "webcomponents/webcomponentsjs#~0.6.1",
"web-component-tester": "Polymer/web-component-tester#^2.2.3",
"test-fixture": "Polymer/test-fixture#master"
"test-fixture": "PolymerElements/test-fixture#^0.8.0",
"iron-doc-viewer": "PolymerElements/iron-doc-viewer#^0.8.0"
}
}
10 changes: 5 additions & 5 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,24 @@
<html>
<head>

<title>core-media-query</title>
<title>iron-media-query demo</title>

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="../core-media-query.html">
<link rel="import" href="../iron-media-query.html">

</head>
<body>

<core-media-query query="(min-width: 600px)"></core-media-query>
<iron-media-query query="(min-width: 600px)"></iron-media-query>
<div id="output"></div>

<script>

var output = document.getElementById('output');
document.querySelector('core-media-query').addEventListener('query-matches-changed', function(e) {
document.querySelector('iron-media-query').addEventListener('query-matches-changed', function(e) {
console.log("ok");
output.textContent = 'query-matches changed: ' + e.detail.value;
});

Expand Down
21 changes: 17 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,26 @@
<html>
<head>

<script src="../webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="../core-component-page/core-component-page.html">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">

<title>iron-media-query</title>

<script src="../webcomponentsjs/webcomponents-lite.js"></script>

<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="../iron-doc-viewer/iron-doc-viewer.html">

<style>
body {
margin: 16px;
}
</style>

</head>
<body unresolved>
<body>

<core-component-page></core-component-page>
<iron-doc-viewer src="iron-media-query.html"></iron-doc-viewer>

</body>
</html>
14 changes: 7 additions & 7 deletions core-media-query.html → iron-media-query.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->

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

<!--
`core-media-query` can be used to data bind to a CSS media query.
`iron-media-query` can be used to data bind to a CSS media query.
The `query` property is a bare CSS media query.
The `queryMatches` property is a boolean representing if the page matches that media query.
Example:
<core-media-query query="(min-width: 600px)" queryMatches="{{queryMatches}}"></core-media-query>
<iron-media-query query="(min-width: 600px)" queryMatches="{{queryMatches}}"></iron-media-query>
@group Polymer Core Elements
@element core-media-query
@element iron-media-query
-->

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

<script>

Polymer({

is: 'core-media-query',
is: 'iron-media-query',

properties: {

Expand All @@ -45,7 +45,7 @@
},

/**
* The CSS media query to evaulate.
* The CSS media query to evaluate.
*
* @attribute query
* @type String
Expand Down
6 changes: 3 additions & 3 deletions test/basic.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
<html>
<head>

<title>core-media-query-basic</title>
<title>iron-media-query-basic</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>

<link rel="import" href="../core-media-query.html">
<link rel="import" href="../iron-media-query.html">
<link rel="import" href="../../test-fixture/test-fixture.html">

</head>
<body>

<test-fixture id="basic">
<template>
<core-media-query></core-media-query>
<iron-media-query></iron-media-query>
</template>
</test-fixture>

Expand Down

0 comments on commit 676a111

Please sign in to comment.