Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit 7abed79

Browse files
committed
clarify style property naming in Dart
Added callout now that @vicb has clarified issues related to style property naming.
1 parent 38daeba commit 7abed79

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

public/docs/dart/latest/guide/template-syntax.jade

+14
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,20 @@ block dart-class-binding-bug
5858

5959
[6901]: http://github.com/angular/angular/issues/6901
6060

61+
block style-property-name-dart-diff
62+
.callout.is-helpful
63+
header Dart difference: Style property names
64+
:marked
65+
While [camelCase](glossary.html#camelcase) and
66+
[dash-case](glossary.html#dash-case) style property naming schemes are
67+
equivalent in Angular Dart, only dash-case names are recognized by the
68+
`dart:html` [CssStyleDeclaration][CssSD] methods `getPropertyValue()`
69+
and `setProperty()`. Hence, we recommend only using dash-case for style
70+
property names.
71+
72+
[CssSD]: https://api.dartlang.org/stable/1.16.1/dart-html/CssStyleDeclaration-class.html
73+
74+
6175
block dart-no-truthy-falsey
6276
.callout.is-helpful
6377
header Dart difference: No truthy/falsey values

public/docs/ts/latest/guide/template-syntax.jade

+6-1
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,12 @@ block dart-class-binding-bug
687687

688688
.l-sub-section
689689
:marked
690-
Note that the _style property_ name can be written in camelCase, such as `fontSize`.
690+
Note that a _style property_ name can be written in either
691+
[dash-case](glossary.html#dash-case), as shown above, or
692+
[camelCase](glossary.html#camelcase), such as `fontSize`.
693+
694+
block style-property-name-dart-diff
695+
//- N/A
691696
692697
.l-main-section
693698
:marked

0 commit comments

Comments
 (0)