-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Quick Docs: Ignore vendor prefixes if needed #8739
Conversation
👍 This is a very good idea. |
Triage complete. |
@@ -110,6 +110,10 @@ define(function (require, exports, module) { | |||
.done(function (cssDocs) { | |||
// Construct inline widget (if we have docs for this property) | |||
var cssPropDetails = cssDocs.PROPERTIES["css/properties/" + cssPropName]; | |||
if (!cssPropDetails) { | |||
cssPropName = cssPropName.replace(/^-\w+-/, ""); // remove possible vendor prefixes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This RegExp could lead to false positives if there's a typo in a css property name. For example, if property is mistyped as -border-width
, then user will see info for width
. RegExp should explicitly list most popular vendor prefixes such as: /^-(webkit|moz|ms|o)-/
.
Done with initial review. RegExp needs to be more strict. |
@redmunds Changed the RegExp. |
Looks good. Sorry, for not mentioning it on the first pass, but please add unit tests for
|
@redmunds Added unit tests and fixed a case where you couldn't open an Inline Editor when your cursor was on the very beginning (before the first hyphen). |
Thanks. Merging. |
Quick Docs: Ignore vendor prefixes if needed
For #8737.