Polymer elements added to third_party/polymer.
[chromium-blink-merge.git] / third_party / polymer / components / core-drawer-panel / core-drawer-panel.css
blob62cf44b50d7d69d64669892d53ba5dabab5315e7
1 /*
2 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
3 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
4 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
5 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
6 Code distributed by Google as part of the polymer project is also
7 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
8 */
10 :host {
11 display: block;
12 position: absolute;
13 top: 0;
14 left: 0;
15 width: 100%;
16 height: 100%;
17 overflow: hidden;
20 #drawer {
21 position: absolute;
22 top: 0;
23 left: 0;
24 height: 100%;
25 box-sizing: border-box;
26 -mox-box-sizing: border-box;
29 .transition #drawer {
30 transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
31 transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
35 right-drawer: make drawer on the right side
37 .right-drawer #drawer {
38 left: auto;
39 right: 0;
42 .right-drawer.transition #drawer {
43 transition: -webkit-transform ease-in-out 0.3s, width ease-in-out 0.3s;
44 transition: transform ease-in-out 0.3s, width ease-in-out 0.3s;
47 polyfill-next-selector { content: ':host [drawer]'; }
48 ::content[select="[drawer]"] > * {
49 position: absolute;
50 top: 0;
51 left: 0;
52 width: 100%;
53 height: 100%;
54 box-sizing: border-box;
55 -moz-box-sizing: border-box;
58 #main {
59 position: absolute;
60 top: 0;
61 right: 0;
62 bottom: 0;
65 .transition #main {
66 transition: left ease-in-out 0.3s, padding ease-in-out 0.3s;
69 .right-drawer #main {
70 left: 0;
73 .right-drawer.transition #main {
74 transition: right ease-in-out 0.3s, padding ease-in-out 0.3s;
77 polyfill-next-selector { content: '#main > [main]'; }
78 ::content[select="[main]"] > * {
79 height: 100%;
82 #scrim {
83 position: absolute;
84 top: 0;
85 right: 0;
86 bottom: 0;
87 left: 0;
88 background-color: rgba(0, 0, 0, 0.3);
89 visibility: hidden;
90 opacity: 0;
91 transition: opacity ease-in-out 0.38s, visibility ease-in-out 0.38s;
95 narrow layout
97 .narrow-layout > #drawer.core-selected {
98 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
101 .right-drawer.narrow-layout > #drawer.core-selected {
102 box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15);
105 polyfill-next-selector { content: ':host .narrow-layout > #drawer > [drawer]'; }
106 .narrow-layout > #drawer > ::content[select="[drawer]"] > * {
107 border: 0;
110 .narrow-layout > #drawer:not(.core-selected) {
111 -webkit-transform: translate3d(-100%, 0, 0);
112 transform: translate3d(-100%, 0, 0);
115 .right-drawer.narrow-layout > #drawer:not(.core-selected) {
116 left: auto;
117 -webkit-transform: translate3d(100%, 0, 0);
118 transform: translate3d(100%, 0, 0);
121 .narrow-layout > #main {
122 left: 0 !important;
123 padding: 0;
126 .right-drawer.narrow-layout > #main {
127 left: 0;
128 right: 0;
129 padding: 0;
132 .narrow-layout > #main:not(.core-selected) #scrim,
133 .dragging #scrim {
134 visibility: visible;
135 opacity: 1;
138 polyfill-next-selector { content: ':host .narrow-layout > #main > [main]'; }
139 .narrow-layout > #main > ::content[select="[main]"] > * {
140 margin: 0;
141 min-height: 100%;
142 left: 0;
143 right: 0;
144 box-sizing: border-box;
145 -moz-box-sizing: border-box;