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

Unified Diff: sky/examples/fn/lib/style.dart

Issue 987463002: Move fn.dart into /sky/framework (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/examples/fn/lib/reflect.dart ('k') | sky/examples/fn/widgets/item.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/fn/lib/style.dart
diff --git a/sky/examples/fn/lib/style.dart b/sky/examples/fn/lib/style.dart
deleted file mode 100644
index 4dd510f7280f0623fc47def9e51b10ee70705b10..0000000000000000000000000000000000000000
--- a/sky/examples/fn/lib/style.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-part of fn;
-
-class Style {
- final String _className;
- static final Map<String, Style> _cache = new HashMap<String, Style>();
-
- static int nextStyleId = 1;
-
- static String nextClassName(String styles) {
- assert(sky.document != null);
- String className = "style$nextStyleId";
- nextStyleId++;
-
- sky.Element styleNode = sky.document.createElement('style');
- styleNode.setChild(new sky.Text(".$className { $styles }"));
- sky.document.appendChild(styleNode);
-
- return className;
- }
-
- factory Style(String styles) {
- return _cache.putIfAbsent(styles, () {
- return new Style._internal(nextClassName(styles));
- });
- }
-
- Style._internal(this._className);
-}
« no previous file with comments | « sky/examples/fn/lib/reflect.dart ('k') | sky/examples/fn/widgets/item.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698