| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // See http://www.google.com/design/spec/style/typography.html | |
| 6 | |
| 7 import 'dart:sky'; | |
| 8 | |
| 9 import '../painting/text_style.dart'; | |
| 10 | |
| 11 // TODO(eseidel): Font weights are supposed to be language relative! | |
| 12 // These values are for English-like text. | |
| 13 class _TextTheme { | |
| 14 _TextTheme(Color color54, Color color87) | |
| 15 : display4 = new TextStyle(fontSize: 112.0, fontWeight: FontWeight.w100, col
or: color54), | |
| 16 display3 = new TextStyle(fontSize: 56.0, fontWeight: FontWeight.w400, col
or: color54), | |
| 17 display2 = new TextStyle(fontSize: 45.0, fontWeight: FontWeight.w400, col
or: color54), | |
| 18 display1 = new TextStyle(fontSize: 34.0, fontWeight: FontWeight.w400, col
or: color54), | |
| 19 headline = new TextStyle(fontSize: 24.0, fontWeight: FontWeight.w400, col
or: color87), | |
| 20 title = new TextStyle(fontSize: 20.0, fontWeight: FontWeight.w500, col
or: color87), | |
| 21 subhead = new TextStyle(fontSize: 16.0, fontWeight: FontWeight.w400, col
or: color87), | |
| 22 body2 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87), | |
| 23 body1 = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w400, col
or: color87), | |
| 24 caption = new TextStyle(fontSize: 12.0, fontWeight: FontWeight.w400, col
or: color54), | |
| 25 button = new TextStyle(fontSize: 14.0, fontWeight: FontWeight.w500, col
or: color87); | |
| 26 | |
| 27 final TextStyle display4; | |
| 28 final TextStyle display3; | |
| 29 final TextStyle display2; | |
| 30 final TextStyle display1; | |
| 31 final TextStyle headline; | |
| 32 final TextStyle title; | |
| 33 final TextStyle subhead; | |
| 34 final TextStyle body2; | |
| 35 final TextStyle body1; | |
| 36 final TextStyle caption; | |
| 37 final TextStyle button; | |
| 38 } | |
| 39 | |
| 40 | |
| 41 final _TextTheme black = new _TextTheme( | |
| 42 const Color(0xFF757575), | |
| 43 const Color(0xFF212121) | |
| 44 ); | |
| 45 | |
| 46 | |
| 47 final _TextTheme white = new _TextTheme( | |
| 48 const Color(0xFF8A8A8A), | |
| 49 const Color(0xFFDEDEDE) | |
| 50 ); | |
| 51 | |
| 52 // TODO(abarth): Maybe this should be hard-coded in Scaffold? | |
| 53 const String typeface = 'font-family: sans-serif'; | |
| OLD | NEW |