Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 html.apps-v2, | |
|
Sergey Ulanov
2014/05/06 07:58:14
add copyright header
Jamie
2014/05/06 21:11:08
Done.
| |
| 2 html.apps-v2 body { | |
| 3 height: 100%; | |
| 4 width: 100%; | |
| 5 } | |
| 6 | |
| 7 html.apps-v2 body:not(.fullscreen) { | |
| 8 border: 1px solid gray; /** This is the window border. */ | |
|
Sergey Ulanov
2014/05/06 07:58:14
why "/**" instead of "/*?
Jamie
2014/05/06 21:11:08
Force of habit. Done.
| |
| 9 } | |
| 10 | |
| 11 html.apps-v2 .title-bar { | |
| 12 border-bottom: 1px solid gray; | |
| 13 z-index: 100; | |
| 14 } | |
| 15 | |
| 16 .window-title, | |
| 17 .window-controls { | |
| 18 height: 32px; | |
| 19 line-height: 32px; | |
| 20 font-size: 16px; | |
| 21 background-color: #c4c4c4; | |
| 22 } | |
| 23 | |
| 24 .title-bar .window-title { | |
| 25 padding-left: 12px; | |
| 26 width: 100%; | |
| 27 display: inline-block; | |
| 28 -webkit-app-region: drag; | |
|
kelvinp
2014/05/06 04:42:15
I didn't know about this before. This is cool :)
| |
| 29 } | |
| 30 | |
| 31 .window-controls-hover-target { | |
| 32 -webkit-app-region: no-drag; | |
| 33 position: fixed; | |
| 34 top: 1px; | |
| 35 right: 1px; | |
| 36 } | |
| 37 | |
| 38 .window-controls { | |
| 39 display: table; | |
|
kelvinp
2014/05/06 04:42:15
I think we can probably achieve the same layout wi
Jamie
2014/05/06 21:11:08
See my response to Sergey's similar comment.
| |
| 40 } | |
| 41 | |
| 42 .window-controls > div:first-child { | |
| 43 display: table-row; | |
| 44 } | |
| 45 | |
| 46 .window-control { | |
| 47 height: 32px; | |
| 48 width: 32px; | |
| 49 text-align: center; | |
| 50 display: inline-block; | |
| 51 border-left: 1px solid rgba(0, 0, 0, 0.2); | |
| 52 } | |
| 53 | |
| 54 .window-control:hover { | |
| 55 background-color: #d5d5d5; | |
| 56 } | |
| 57 | |
| 58 .window-control:active { | |
| 59 background-color: #a6a6a6; | |
| 60 } | |
| 61 | |
| 62 .window-control > img { | |
| 63 margin-bottom: -2px; | |
| 64 } | |
| 65 | |
| 66 #window-controls-stub { | |
| 67 display: none; | |
| 68 -webkit-column-span: all; | |
|
Sergey Ulanov
2014/05/06 07:58:14
is it possible to use flex instead of tables to la
Jamie
2014/05/06 21:11:08
I tried lots of different methods for laying out t
| |
| 69 line-height: 3px; | |
| 70 background: url("drag.webp"); | |
| 71 border-top: 1px solid rgba(0, 0, 0, 0.2); | |
| 72 } | |
| 73 | |
| 74 #scroller { | |
| 75 height: 100%; | |
| 76 width: 100%; | |
| 77 overflow: auto; | |
| 78 position: relative; | |
| 79 } | |
| 80 | |
| 81 html.apps-v2 #scroller { | |
| 82 height: calc(100% - 32px); /** Allow space for the title-bar */ | |
| 83 } | |
| 84 | |
| 85 /* Add an etched border to the window controls, title bar and stub */ | |
| 86 .title-bar, | |
| 87 .window-control, | |
| 88 #window-controls-stub { | |
| 89 position: relative; | |
| 90 } | |
| 91 | |
| 92 .title-bar:after, | |
| 93 .window-control:after, | |
| 94 #window-controls-stub:after { | |
| 95 content: ""; | |
| 96 width: 100%; | |
| 97 height: 100%; | |
| 98 position: absolute; | |
| 99 top: 0; | |
| 100 left: 0; | |
| 101 border-left: 1px solid rgba(255, 255, 255, 0.2); | |
| 102 border-top: 1px solid rgba(255, 255, 255, 0.2); | |
| 103 pointer-events: none; | |
| 104 } | |
| 105 | |
| 106 | |
| 107 /* When connected to a host, the Disconnect button is displayed. */ | |
| 108 body:not(.connected) #window-disconnect { | |
| 109 display: none; | |
| 110 } | |
| 111 | |
| 112 | |
| 113 /* | |
| 114 * When in full-screen mode, significant changes are made: | |
| 115 * - The scroll-bars are removed. | |
| 116 * - The window controls have a border (so the left-border of the first button | |
| 117 * is not needed). | |
| 118 * - The title-bar (and its bottom border) are not displayed. | |
| 119 * - The stub is visible. | |
| 120 * - The window controls gain transition effects for position and opacity and | |
| 121 * auto-hide behind the top edge of the screen. | |
| 122 * - The window border is removed. | |
| 123 */ | |
| 124 | |
| 125 html.apps-v2 body.fullscreen #scroller { | |
| 126 height: 100%; | |
| 127 overflow: hidden; | |
| 128 } | |
| 129 | |
| 130 body.fullscreen .window-controls { | |
| 131 border: 1px solid gray; | |
| 132 } | |
| 133 | |
| 134 body.fullscreen .window-control:first-child { | |
| 135 border-left: none; | |
| 136 } | |
| 137 | |
| 138 body.fullscreen .window-title { | |
| 139 display: none; | |
| 140 } | |
| 141 | |
| 142 body.fullscreen .title-bar { | |
| 143 border-bottom: none; | |
|
Sergey Ulanov
2014/05/06 07:58:14
nit: indentation
Jamie
2014/05/06 21:11:08
Done.
| |
| 144 } | |
| 145 | |
| 146 body.fullscreen #window-controls-stub { | |
| 147 display: table-cell; | |
| 148 } | |
| 149 | |
| 150 body.fullscreen .window-controls-hover-target { | |
| 151 -webkit-transition-property: opacity, | |
|
Sergey Ulanov
2014/05/06 07:58:14
CSS transitions no longer need the prefix.
Jamie
2014/05/06 21:11:08
Done.
| |
| 152 box-shadow, | |
| 153 border, | |
| 154 top; | |
| 155 -webkit-transition-duration: 0.3s; | |
| 156 opacity: 0.7; | |
| 157 top: -33px; | |
| 158 right: 8px; | |
| 159 } | |
| 160 | |
| 161 body.fullscreen .window-controls-hover-target:hover, | |
| 162 body.fullscreen .window-controls-hover-target.opened { | |
| 163 top: -4px; | |
| 164 opacity: 1.0; | |
| 165 } | |
| 166 | |
| 167 .fullscreen .window-controls-hover-target.opened #window-controls-stub { | |
| 168 background-color: #a6a6a6; | |
| 169 } | |
| 170 | |
| 171 .fullscreen .window-controls-hover-target:hover .window-controls { | |
| 172 -webkit-box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5); | |
|
Sergey Ulanov
2014/05/06 07:58:14
don't need -webkit-
Jamie
2014/05/06 21:11:08
Done.
| |
| 173 } | |
| OLD | NEW |