From 7c1cf0a2dce91dc89faeaf7733751fbf15e201be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20O=E2=80=99Shannessy?= Date: Tue, 12 Nov 2013 11:12:46 -0800 Subject: [PATCH] Small cleanup to style tips --- docs/tips/02-inline-styles.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/tips/02-inline-styles.md b/docs/tips/02-inline-styles.md index 80e89edd4c..1f61596a54 100644 --- a/docs/tips/02-inline-styles.md +++ b/docs/tips/02-inline-styles.md @@ -7,7 +7,7 @@ next: if-else-in-JSX.html prev: introduction.html --- -In React, inline styles are not specified as a string, but as an object whose key is the camelCased version of the style name, and whose value is the style's value in string: +In React, inline styles are not specified as a string. Instead they are specified with an object whose key is the camelCased version of the style name, and whose value is the style's value, usually a string ([more on that later](/react/tips/style-props-value-px.html)): ```js /** @jsx React.DOM */ @@ -21,4 +21,4 @@ var divStyle = { React.renderComponent(
Hello World!
, mountNode); ``` -Style keys are camelCased in order to be consistent with accessing the properties using node.style.___ in DOM. This also explains why WebkitTransition has an uppercase "W". +Style keys are camelCased in order to be consistent with accessing the properties on DOM nodes from JS (e.g. `node.style.backgroundImage`). Vendor prefixes should begin with a capital letter. This is why `WebkitTransition` has an uppercase "W".