Web Inspector: add autocompletion for min/max within a CSS calc
authorwebkit@devinrousso.com <webkit@devinrousso.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Oct 2017 01:10:43 +0000 (01:10 +0000)
committerwebkit@devinrousso.com <webkit@devinrousso.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 9 Oct 2017 01:10:43 +0000 (01:10 +0000)
https://bugs.webkit.org/show_bug.cgi?id=178068

Reviewed by Joseph Pecoraro.

* UserInterface/Models/CSSKeywordCompletions.js:
(WI.CSSKeywordCompletions.forFunction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223038 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Models/CSSKeywordCompletions.js

index 258a176..111fb8b 100644 (file)
@@ -1,3 +1,13 @@
+2017-10-08  Devin Rousso  <webkit@devinrousso.com>
+
+        Web Inspector: add autocompletion for min/max within a CSS calc
+        https://bugs.webkit.org/show_bug.cgi?id=178068
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Models/CSSKeywordCompletions.js:
+        (WI.CSSKeywordCompletions.forFunction):
+
 2017-10-06  Matt Baker  <mattbaker@apple.com>
 
         Web Inspector: Add Canvas tab and CanvasOverviewContentView
index dbb97c0..7f879fd 100644 (file)
@@ -68,6 +68,8 @@ WI.CSSKeywordCompletions.forFunction = function(functionName)
 
     if (functionName === "var")
         suggestions = [];
+    else if (functionName === "calc" || functionName === "min" || functionName === "max")
+        suggestions = suggestions.concat(["calc()", "min()", "max()"]);
     else if (functionName == "env")
         suggestions = suggestions.concat(["safe-area-inset-top", "safe-area-inset-right", "safe-area-inset-bottom", "safe-area-inset-left"]);
     else if (functionName === "image-set")