4
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
5
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
6
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
Code distributed by Google as part of the polymer project is also
9
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
14
<title>iron-media-query demo</title>
16
<meta charset="utf-8">
17
<meta name="viewport" content="width=device-width, initial-scale=1.0">
19
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
20
<link rel="import" href="../../paper-styles/demo-pages.html">
21
<link rel="import" href="../iron-media-query.html">
26
<div class="vertical-section vertical-section-container centered">
27
<h1><iron-media-query></h1>
29
<template is="dom-bind">
33
border: 1px solid #ddd;
39
background-color: #eee;
43
.item[wide-layout] .title {
60
<iron-media-query query="(min-width: 600px)" query-matches="{{wide}}"></iron-media-query>
61
<iron-media-query full query="print" query-matches="{{print}}"></iron-media-query>
63
<div class="item" wide-layout$="{{wide}}">
64
<div class="title">Resize the window</div>
65
<div class="description">
66
<template is="dom-if" if="{{!wide}}">
67
The viewport is less than 600px wide, so the items' titles will
70
<template is="dom-if" if="{{wide}}">
71
The viewport is at least 600px, so the items' titles will float
74
Here's another sentence; it's not very long.
77
<div class="item" wide-layout$="{{wide}}">
78
<div class="title"><code>print</code> example</div>
79
<div class="description">
80
<a href="http://polymer-project.org">
81
This link's destination is visible when this page is printed.
83
<template is="dom-if" if="{{print}}">
84
(http://polymer-project.org)
86
This is another sentence which is meant to help fill this box.