Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c8bc9d56
Commit
c8bc9d56
authored
Aug 22, 2015
by
Collin Jackson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typography to use opacity instead of color value
parent
9a493c15
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
24 deletions
+27
-24
colors.dart
packages/flutter/lib/theme/colors.dart
+4
-0
typography.dart
packages/flutter/lib/theme/typography.dart
+23
-24
No files found.
packages/flutter/lib/theme/colors.dart
View file @
c8bc9d56
...
@@ -10,6 +10,10 @@ import 'dart:sky' show Color;
...
@@ -10,6 +10,10 @@ import 'dart:sky' show Color;
const
white
=
const
Color
(
0xFFFFFFFF
);
const
white
=
const
Color
(
0xFFFFFFFF
);
const
black
=
const
Color
(
0xFF000000
);
const
black
=
const
Color
(
0xFF000000
);
const
transparent
=
const
Color
(
0x00000000
);
const
transparent
=
const
Color
(
0x00000000
);
const
white54
=
const
Color
(
0x8AFFFFFF
);
const
white87
=
const
Color
(
0xDDFFFFFF
);
const
black54
=
const
Color
(
0x8A000000
);
const
black87
=
const
Color
(
0xDD000000
);
const
Map
<
int
,
Color
>
Red
=
const
{
const
Map
<
int
,
Color
>
Red
=
const
{
50
:
const
Color
(
0xFFFFEBEE
),
50
:
const
Color
(
0xFFFFEBEE
),
...
...
packages/flutter/lib/theme/typography.dart
View file @
c8bc9d56
...
@@ -7,39 +7,38 @@
...
@@ -7,39 +7,38 @@
import
'dart:sky'
;
import
'dart:sky'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/painting/text_style.dart'
;
import
'package:sky/theme/colors.dart'
as
colors
;
// TODO(eseidel): Font weights are supposed to be language relative!
// TODO(eseidel): Font weights are supposed to be language relative!
// TODO(jackson): Baseline should be language relative!
// TODO(jackson): Baseline should be language relative!
// These values are for English-like text.
// These values are for English-like text.
class
TextTheme
{
class
TextTheme
{
// The two colours used here are 54% and 87%, respectively, of the base color (black or white)
const
TextTheme
.
_black
()
const
TextTheme
.
_black
()
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
co
nst
Color
(
0xFF757575
)
,
textBaseline:
TextBaseline
.
alphabetic
),
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
co
lors
.
black54
,
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF757575
)
,
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black54
,
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF757575
)
,
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black54
,
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF757575
)
,
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black54
,
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF212121
)
,
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black87
,
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFF212121
)
,
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
black87
,
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF212121
)
,
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black87
,
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFF212121
)
,
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
black87
,
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF212121
)
,
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black87
,
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF757575
)
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
black54
,
textBaseline:
TextBaseline
.
alphabetic
),
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFF212121
)
,
textBaseline:
TextBaseline
.
alphabetic
);
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
black87
,
textBaseline:
TextBaseline
.
alphabetic
);
const
TextTheme
.
_white
()
const
TextTheme
.
_white
()
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
co
nst
Color
(
0xFF8A8A8A
)
,
textBaseline:
TextBaseline
.
alphabetic
),
:
display4
=
const
TextStyle
(
fontSize:
112.0
,
fontWeight:
FontWeight
.
w100
,
color:
co
lors
.
white54
,
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF8A8A8A
)
,
textBaseline:
TextBaseline
.
alphabetic
),
display3
=
const
TextStyle
(
fontSize:
56.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white54
,
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF8A8A8A
)
,
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display2
=
const
TextStyle
(
fontSize:
45.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white54
,
height:
48.0
/
45.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF8A8A8A
)
,
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
display1
=
const
TextStyle
(
fontSize:
34.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white54
,
height:
40.0
/
34.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
headline
=
const
TextStyle
(
fontSize:
24.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white87
,
height:
32.0
/
24.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
title
=
const
TextStyle
(
fontSize:
20.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
white87
,
height:
28.0
/
20.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
subhead
=
const
TextStyle
(
fontSize:
16.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white87
,
height:
24.0
/
16.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body2
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
white87
,
height:
24.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
body1
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white87
,
height:
20.0
/
14.0
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
nst
Color
(
0xFF8A8A8A
)
,
textBaseline:
TextBaseline
.
alphabetic
),
caption
=
const
TextStyle
(
fontSize:
12.0
,
fontWeight:
FontWeight
.
w400
,
color:
co
lors
.
white54
,
textBaseline:
TextBaseline
.
alphabetic
),
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
nst
Color
(
0xFFDEDEDE
)
,
textBaseline:
TextBaseline
.
alphabetic
);
button
=
const
TextStyle
(
fontSize:
14.0
,
fontWeight:
FontWeight
.
w500
,
color:
co
lors
.
white87
,
textBaseline:
TextBaseline
.
alphabetic
);
final
TextStyle
display4
;
final
TextStyle
display4
;
final
TextStyle
display3
;
final
TextStyle
display3
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment