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

CSS Code Hinting as new extension for Brackets #2498

Merged
merged 7 commits into from
Jan 14, 2013
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/editor/CodeHintManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,8 @@ define(function (require, exports, module) {
} else if (_inSession(editor) && hintList.isOpen()) {
// Pass event to the hint list, if it's open
hintList.handleKeyEvent(event);
} else {
lastChar = String.fromCharCode(event.keyCode);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a suggestion by @redmunds to extend the triggering of hints by pressing 'Tab' or 'Enter'

}
} else if (event.type === "keypress") {
// Last inserted character, used later by handleChange
Expand Down
195 changes: 195 additions & 0 deletions src/extensions/default/CSSCodeHints/CSSProperties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
{
"align-content": {"values": ["center", "flex-end", "flex-start", "space-around", "space-between", "stretch"]},
"align-items": {"values": ["baseline", "center", "flex-end", "flex-start", "stretch"]},
"align-self": {"values": ["auto", "baseline", "center", "flex-end", "flex-start", "stretch"]},
"animation": {"values": []},
"animation-delay": {"values": []},
"animation-direction": {"values": ["alternate", "alternate-reverse", "normal", "reverse"]},
"animation-duration": {"values": []},
"animation-fill-mode": {"values": ["backwards", "both", "forwards", "none"]},
"animation-iteration-count": {"values": ["infinite"]},
"animation-name": {"values": ["none"]},
"animation-play-state": {"values": ["paused", "running"]},
"animation-timing-function": {"values": ["cubic-bezier()", "ease", "ease-in", "ease-in-out", "ease-out", "linear", "step-end", "step-start", "steps()"]},
"backface-visibility": {"values": ["hidden", "visible"]},
"background": {"values": []},
"background-attachment": {"values": ["fixed", "local", "scroll", "inherit"]},
"background-clip": {"values": ["border-box", "content-box", "padding-box", "inherit"]},
"background-color": {"values": ["currentColor", "transparent", "inherit"]},
"background-image": {"values": ["image()", "linear-gradient()", "radial-gradient()", "repeating-linear-gradient()", "repeating-radial-gradient()"]},
"background-origin": {"values": ["border-box", "content-box", "padding-box", "inherit"]},
"background-position": {"values": ["left", "center", "right", "bottom", "top"]},
"background-repeat": {"values": ["no-repeat", "repeat", "repeat-x", "repeat-y", "round", "space"]},
"background-size": {"values": ["auto", "contain", "cover"]},
"border": {"values": []},
"border-collapse": {"values": ["collapse", "separate", "inherit"]},
"border-color": {"values": ["currentColor", "transparent", "inherit"]},
"border-spacing": {"values": ["inherit"]},
"border-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"border-bottom": {"values": []},
"border-bottom-color": {"values": ["currentColor", "transparent", "inherit"]},
"border-bottom-left-radius": {"values": []},
"border-bottom-right-radius": {"values": []},
"border-bottom-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"border-bottom-width": {"values": ["medium", "thin", "thick", "inherit"]},
"border-image": {"values": []},
"border-image-outset": {"values": []},
"border-image-slice": {"values": []},
"border-image-source": {"values": []},
"border-image-repeat": {"values": ["repeat", "round", "space", "stretch"]},
"border-image-width": {"values": ["auto"]},
"border-left": {"values": []},
"border-left-color": {"values": ["currentColor", "transparent", "inherit"]},
"border-left-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"border-left-width": {"values": ["medium", "thin", "thick", "inherit"]},
"border-radius": {"values": []},
"border-right": {"values": []},
"border-right-color": {"values": ["currentColor", "transparent", "inherit"]},
"border-right-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"border-right-width": {"values": ["medium", "thin", "thick", "inherit"]},
"border-top": {"values": []},
"border-top-color": {"values": ["currentColor", "transparent", "inherit"]},
"border-top-left-radius": {"values": []},
"border-top-right-radius": {"values": []},
"border-top-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"border-top-width": {"values": ["medium", "thin", "thick", "inherit"]},
"box-decoration-break": {"values": []},
"box-shadow": {"values": []},
"box-sizing": {"values": ["border-box", "content-box", "padding-box", "inherit"]},
"bottom": {"values": ["auto", "inherit"]},
"break-after": {"values": ["always", "auto", "avoid", "avoid-column", "avoid-page", "column", "left", "page", "right"]},
"break-before": {"values": ["always", "auto", "avoid", "avoid-column", "avoid-page", "column", "left", "page", "right"]},
"break-inside": {"values": ["auto", "avoid", "avoid-column", "avoid-page"]},
"caption-side": {"values": ["bottom", "top", "inherit"]},
"clear": {"values": ["both", "left", "none", "right", "inherit"]},
"clip": {"values": ["auto", "inherit"]},
"color": {"values": ["inherit"]},
"columns": {"values": []},
"column-count": {"values": []},
"column-fill": {"values": ["auto", "balance"]},
"column-gap": {"values": ["normal"]},
"column-rule": {"values": []},
"column-rule-color": {"values": ["currentColor"]},
"column-rule-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"column-rule-width": {"values": ["medium", "thin", "thick", "inherit"]},
"column-span": {"values": ["all", "none"]},
"column-width": {"values": ["auto", "inherit"]},
"content": {"values": ["attr()", "close-quote", "no-close-quote", "no-open-quote", "normal", "none", "open-quote", "inherit"]},
"counter-increment": {"values": ["none", "inherit"]},
"counter-reset": {"values": ["none", "inherit"]},
"cursor": {"values": ["auto", "crosshair", "e-resize", "default", "help", "move", "n-resize", "ne-resize", "nw-resize", "pointer", "progress", "s-resize", "se-resize", "sw-resize", "text", "w-resize", "wait", "inherit"]},
"direction": {"values": ["ltr", "rtl", "inherit"]},
"display": {"values": ["block", "flex", "inline", "inline-block", "inline-flex", "inline-table", "list-item", "none", "table", "table-caption", "table-cell", "table-column", "table-column-group", "table-footer-group", "table-header-group", "table-row", "table-row-group", "inherit"]},
"empty-cells": {"values": ["hide", "show", "inherit"]},
"flex": {"values": ["none"]},
"flex-basis": {"values": []},
"flex-direction": {"values": ["column", "column-reverse", "row", "row-reverse"]},
"flex-flow": {"values": ["column", "column-reverse", "nowrap", "row", "row-reverse", "wrap", "wrap-reverse"]},
"flex-grow": {"values": []},
"flex-shrink": {"values": []},
"flex-wrap": {"values": ["nowrap", "wrap", "wrap-reverse"]},
"float": {"values": ["left", "right", "none", "inherit"]},
"font": {"values": []},
"font-family": {"values": []},
"font-feature-settings": {"values": ["normal"]},
"font-kerning": {"values": ["auto", "none", "normal"]},
"font-language-override": {"values": ["normal"]},
"font-size": {"values": []},
"font-size-adjust": {"values": ["auto", "none"]},
"font-stretch": {"values": ["condensed", "expanded", "extra-condensed", "extra-expanded", "normal", "semi-condensed", "semi-expanded", "ultra-condensed", "ultra-expanded"]},
"font-style": {"values": ["italic", "normal", "oblique"]},
"font-synthesis": {"values": ["none", "style", "weight"]},
"font-variant": {"values": ["normal", "none"]},
"font-variant-alternates": {"values": ["normal"]},
"font-variant-caps": {"values": ["normal", "small-caps", "all-small-caps", "petite-caps", "all-petite-caps", "unicase", "titling-caps"]},
"font-variant-east-asian": {"values": ["normal"]},
"font-variant-ligatures": {"values": ["normal", "none"]},
"font-variant-numeric": {"values": ["normal"]},
"font-variant-position": {"values": ["normal", "sub", "super"]},
"font-weight": {"values": ["bold", "bolder", "lighter", "normal", "100", "200", "300", "400", "500", "600", "700", "800", "900", "inherit"]},
"height": {"values": ["auto", "inherit"]},
"hyphens": {"values": ["auto", "manual", "none"]},
"image-orientation": {"values": []},
"image-resolution": {"values": ["from-image", "snap"]},
"justify-content": {"values": ["center", "flex-end", "flex-start", "space-around", "space-between"]},
"left": {"values": ["auto", "inherit"]},
"letter-spacing": {"values": ["normal", "inherit"]},
"line-height": {"values": ["normal", "inherit"]},
"list-style": {"values": []},
"list-style-image": {"values": []},
"list-style-position": {"values": ["inside", "outside", "inherit"]},
"list-style-type": {"values": ["armenian", "circle", "decimal", "decimal-leading-zero", "disc", "georgian", "lower-alpha", "lower-greek", "lower-latin", "lower-roman", "none", "square", "upper-alpha", "upper-latin", "upper-roman", "inherit"]},
"margin": {"values": ["inherit"]},
"margin-bottom": {"values": []},
"margin-left": {"values": []},
"margin-right": {"values": []},
"margin-top": {"values": []},
"max-height": {"values": ["none", "inherit"]},
"max-width": {"values": ["none", "inherit"]},
"min-height": {"values": ["inherit"]},
"min-width": {"values": ["inherit"]},
"object-fit": {"values": ["contain", "cover", "fill", "none", "scale-down"]},
"object-position": {"values": ["left", "center", "right", "bottom", "top"]},
"opacity": {"values": ["inherit"]},
"order": {"values": []},
"orphans": {"values": ["inherit"]},
"outline": {"values": ["inherit"]},
"outline-color": {"values": ["invert", "inherit"]},
"outline-offset": {"values": ["inherit"]},
"outline-style": {"values": ["dashed", "dotted", "double", "groove", "hidden", "inset", "none", "outset", "ridge", "solid", "inherit"]},
"outline-width": {"values": ["medium", "thin", "thick", "inherit"]},
"overflow": {"values": ["auto", "hidden", "scroll", "visible", "inherit"]},
"overflow-x": {"values": ["auto", "hidden", "scroll", "visible", "inherit"]},
"overflow-y": {"values": ["auto", "hidden", "scroll", "visible", "inherit"]},
"padding": {"values": ["inherit"]},
"padding-bottom": {"values": []},
"padding-left": {"values": []},
"padding-right": {"values": []},
"padding-top": {"values": []},
"page-break-after": {"values": ["always", "auto", "avoid", "left", "right", "inherit"]},
"page-break-before": {"values": ["always", "auto", "avoid", "left", "right", "inherit"]},
"page-break-inside": {"values": ["auto", "avoid", "inherit"]},
"perspective": {"values": ["none"]},
"perspective-origin": {"values": ["bottom", "center", "left", "right", "top"]},
"position": {"values": ["absolute", "fixed", "relative", "static", "sticky", "inherit"]},
"quotes": {"values": ["none", "inherit"]},
"resize": {"values": ["both", "horizontal", "none", "vertical", "inherit"]},
"right": {"values": ["auto", "inherit"]},
"src": {"values": []},
"table-layout": {"values": ["auto", "fixed", "inherit"]},
"text-align": {"values": ["center", "left", "justify", "right", "inherit"]},
"text-align-last": {"values": ["center", "left", "justify", "right", "inherit"]},
"text-decoration": {"values": ["line-through", "none", "overline", "underline", "inherit"]},
"text-decoration-color": {"values": ["currentColor"]},
"text-decoration-line": {"values": ["line-through", "none", "overline", "underline"]},
"text-decoration-skip": {"values": ["edges", "ink", "none", "objects", "spaces"]},
"text-decoration-style": {"values": ["dashed", "dotted", "double", "solid", "wavy"]},
"text-emphasis": {"values": []},
"text-emphasis-color": {"values": ["currentColor"]},
"text-emphasis-position": {"values": ["above", "below", "left", "right"]},
"text-emphasis-style": {"values": ["circle", "dot", "double-circle", "filled", "none", "open", "sesame", "triangle"]},
"text-indent": {"values": ["inherit"]},
"text-overflow": {"values": ["clip", "ellipsis", "inherit"]},
"text-shadow": {"values": []},
"text-transform": {"values": ["capitalize", "full-width", "lowercase", "none", "uppercase", "inherit"]},
"text-underline-position": {"values": ["alphabetic", "auto", "below", "left", "right"]},
"top": {"values": ["auto", "inherit"]},
"transform": {"values": ["matrix()", "matrix3d()", "perspective()", "rotate()", "rotate3d()", "rotateX()", "rotateY()", "rotateZ()", "scale()", "scale3d()", "scaleX()", "scaleY()", "scaleZ()", "skewX()", "skewY()", "translate()", "translate3d()", "translateX()", "translateY()", "translateZ()"]},
"transform-origin": {"values": ["bottom", "center", "left", "right", "top"]},
"transform-style": {"values": ["flat", "preserve-3d"]},
"transition": {"values": []},
"transition-delay": {"values": []},
"transition-duration": {"values": []},
"transition-property": {"values": ["all", "none"]},
"transition-timing-function": {"values": ["cubic-bezier()", "ease", "ease-in", "ease-in-out", "ease-out", "linear", "step-end", "step-start", "steps()"]},
"unicode-bidi": {"values": ["bidi-override", "embed", "normal", "inherit"]},
"unicode-range": {"values": []},
"vertical-align": {"values": ["baseline", "bottom", "middle", "sub", "super", "text-bottom", "text-top", "top", "inherit"]},
"visibility": {"values": ["collapse", "hidden", "visible", "inherit"]},
"white-space": {"values": ["normal", "nowrap", "pre", "pre-line", "pre-wrap", "inherit"]},
"widows": {"values": ["inherit"]},
"width": {"values": ["auto", "inherit"]},
"word-spacing": {"values": ["normal", "inherit"]},
"word-wrap": {"values": ["break-word", "normal"]},
"z-index": {"values": ["auto", "inherit"]}
}
Loading