Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Quick Docs: Ignore vendor prefixes if needed #8739

Merged
merged 5 commits into from
Sep 9, 2014

Conversation

marcelgerber
Copy link
Contributor

For #8737.

@le717
Copy link
Contributor

le717 commented Aug 17, 2014

👍 This is a very good idea.

@RaymondLim
Copy link
Contributor

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
Copy link
Contributor

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)-/.

@redmunds
Copy link
Contributor

redmunds commented Sep 8, 2014

Done with initial review. RegExp needs to be more strict.

@marcelgerber
Copy link
Contributor Author

@redmunds Changed the RegExp.

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2014

Looks good.

Sorry, for not mentioning it on the first pass, but please add unit tests for

  • valid vendor prefixes
  • invalid property that starts with a - but is not a vendor prefix

@marcelgerber
Copy link
Contributor Author

@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).

@redmunds
Copy link
Contributor

redmunds commented Sep 9, 2014

Thanks. Merging.

redmunds added a commit that referenced this pull request Sep 9, 2014
Quick Docs: Ignore vendor prefixes if needed
@redmunds redmunds merged commit 90c912e into adobe:master Sep 9, 2014
@marcelgerber marcelgerber deleted the wp-docs-vendor-prefixes branch September 10, 2014 11:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants