Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: runtime/observatory/lib/src/elements/nav/bar.dart

Issue 2211603002: Centralized event streams (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Merged with master Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:html'; 5 import 'dart:html';
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:observatory/src/elements/helpers/tag.dart'; 7 import 'package:observatory/src/elements/helpers/tag.dart';
8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart'; 8 import 'package:observatory/src/elements/helpers/rendering_scheduler.dart';
9 9
10 class NavBarElement extends HtmlElement implements Renderable { 10 class NavBarElement extends HtmlElement implements Renderable {
11 static final StyleElement _style = () { 11 static final StyleElement _style = () {
12 var style = new StyleElement(); 12 var style = new StyleElement();
13 style.text = 'nav.nav-bar {' 13 style.text = 'nav.nav-bar {'
14 'line-height: normal;'
14 'position: fixed;' 15 'position: fixed;'
15 'top: -56px;' 16 'top: 0;'
16 'width: 100%;' 17 'width: 100%;'
17 'z-index: 1000;' 18 'z-index: 1000;'
18 '}' 19 '}'
19 'nav.nav-bar > ul {' 20 'nav.nav-bar > ul {'
20 'display: inline-table;' 21 'display: inline-table;'
21 'position: relative;' 22 'position: relative;'
22 'list-style: none;' 23 'list-style: none;'
23 'padding-left: 0;' 24 'padding-left: 0;'
24 'margin-left: 0;' 25 'margin: 0;'
25 'width: 100%;' 26 'width: 100%;'
26 'z-index: 1000;' 27 'z-index: 1000;'
27 'font: 400 16px \'Montserrat\', sans-serif;' 28 'font: 400 16px \'Montserrat\', sans-serif;'
28 'color: white;' 29 'color: white;'
29 'background-color: #0489c3;' 30 'background-color: #0489c3;'
30 '}'
31 'nav.nav-bar:after {'
32 'content: ""; clear: both; display: block;'
33 '}'
34 'nav.nav-bar:before {'
35 'height: 40px;'
36 'background-color: #0489c3;'
37 'content: ""; display: block;'
38 '}'; 31 '}';
39 return style; 32 return style;
40 }(); 33 }();
41 34
42 static const tag = const Tag<NavBarElement>('nav-bar'); 35 static const tag = const Tag<NavBarElement>('nav-bar');
43 36
44 RenderingScheduler _r; 37 RenderingScheduler _r;
45 38
46 Stream<RenderedEvent<NavBarElement>> get onRendered => _r.onRendered; 39 Stream<RenderedEvent<NavBarElement>> get onRendered => _r.onRendered;
47 40
(...skipping 26 matching lines...) Expand all
74 ..children = [ 67 ..children = [
75 new UListElement() 68 new UListElement()
76 ..children = [ 69 ..children = [
77 new ContentElement() 70 new ContentElement()
78 ], 71 ],
79 ], 72 ],
80 new DivElement() 73 new DivElement()
81 ]; 74 ];
82 } 75 }
83 } 76 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698