Skip to content

Instantly share code, notes, and snippets.

@NV
Created July 30, 2010 20:09
Show Gist options
  • Save NV/501230 to your computer and use it in GitHub Desktop.
Save NV/501230 to your computer and use it in GitHub Desktop.
Built manually using http://svn.webkit.org/repository/webkit/trunk/WebCore/css/CSSValueKeywords.in and Google. Work-in-progress.
var none = ["none"];
var auto = ["auto"];
var inherit = ["inherit"];
var text = ["text"];
var infinite = ["infinite"];
var normal = ["normal"];
var color = [];
var animationDirection = [
"alternate",
"normal"
];
var fillMode = [
"backwards",
"both",
"forwards",
"none"
];
var playState = [
"paused",
"running"
];
var timingFunction = [
"ease",
"linear",
"ease-in",
"ease-out",
"ease-in-out"
];
var appearance = [
"button",
"button-bevel",
"caps-lock-indicator",
"caret",
"checkbox",
"continuous-capacity-level-indicator",
"default-button",
"discrete-capacity-level-indicator",
"inner-spin-button",
"input-speech-button",
"list-button",
"listbox",
"listitem",
"media-controls-background",
"media-current-time-display",
"media-fullscreen-button",
"media-mute-button",
"media-play-button",
"media-return-to-realtime-button",
"media-rewind-button",
"media-seek-back-button",
"media-seek-forward-button",
"media-slider",
"media-sliderthumb",
"media-time-remaining-display",
"media-toggle-closed-captions-button",
"media-volume-slider",
"media-volume-slider-container",
"media-volume-slider-mute-button",
"media-volume-sliderthumb",
"menulist",
"menulist-button",
"menulist-text",
"menulist-textfield",
"meter",
"outer-spin-button",
"progress-bar",
"progress-bar-value",
"push-button",
"radio",
"rating-level-indicator",
"relevancy-level-indicator",
"searchfield",
"searchfield-cancel-button",
"searchfield-decoration",
"searchfield-results-button",
"searchfield-results-decoration",
"slider-horizontal",
"slider-vertical",
"sliderthumb-horizontal",
"sliderthumb-vertical",
"square-button",
"textarea",
"textfield"
];
var systemColor = [
"ActiveBorder",
"ActiveCaption",
"AppWorkspace",
"Background",
"ButtonFace",
"ButtonHighlight",
"ButtonShadow",
"ButtonText",
"CaptionText",
"GrayText",
"Highlight",
"HighlightText",
"InactiveBorder",
"InactiveCaption",
"InactiveCaptionText",
"InfoBackground",
"InfoText",
"Menu",
"MenuText",
"Scrollbar",
"ThreeDDarkShadow",
"ThreeDFace",
"ThreeDHighlight",
"ThreeDLightShadow",
"ThreeDShadow",
"Window",
"WindowFrame",
"WindowText"
];
var backfaceVisibility = [
"visible",
"hidden"
];
var box = [
"border-box",
"content-box",
"padding-box"
];
var webkitBackgroundComposite = [
"clear",
"copy",
"source-over",
"source-in",
"source-out",
"source-atop",
"destination-over",
"destination-in",
"destination-out",
"destination-atop",
"xor",
"plus-darker",
"highlight",
"plus-lighter"
];
var backgroundSize = [
"contain",
"cover"
];
var borderFit = [
"lines"
];
var borderImageRepeat = [
"stretch",
"repeat",
"round"
];
var boxAlign = [
"stretch",
"start",
"end",
"center",
"baseline"
];
var boxDirection = [
"normal",
"reverse"
];
var boxLines = [
"single",
"multiple"
];
var boxOrient = [
"horizontal",
"vertical",
"inline-axis",
"block-axis"
];
var boxPack = [
"start",
"end",
"center",
"justify"
];
// http://webkit.org/blog/182/css-reflections/
var boxReflect = [
"above",
"below",
"left",
"right"
];
var boxSizing = [
"content-box",
"border-box"
];
var webkitColorCorection = [
"default",
"srgb"
];
var webkitColumnBreak = [
"always",
"avoid"
];
var borderStyle = [
"hidden",
"inset",
"groove",
"ridge",
"outset",
"dotted",
"dashed",
"solid",
"double"
];
var borderWidth = [
"thin",
"medium",
"thick"
];
var columnSpan = [
"all"
];
var webkitFontSmoothing = [
"antialiased",
"subpixel-antialiased"
];
var webkitLineBreak = [
"after-white-space",
"normal"
];
var collapse = [
"collapse",
"separate"
];
var webkitMarginCollapse = [
"collapse",
"separate",
"discard"
];
var marqueeDirection = [
"forward",
"reverse"
];
var marqueeStyle = [
"slide",
"scroll",
"alternate"
];
var webkitNbspMode = [
"space",
"normal"
];
// http://webkit.org/blog/386/3d-transforms/
var webkitRtlOrdering = [
"logical",
"visual"
];
var attachment = [
"fixed",
"local",
"scroll"
];
var backgroundPosition = [
"top",
"bottom",
"left",
"center",
"right"
];
var repeat = [
"repeat",
"repeat-x",
"repeat-y",
"no-repeat"
];
var baselineShift = [
"baseline",
"sub",
"super"
];
var captionSide = [
"top",
"bottom",
"left",
"right"
];
var clear = [
"both",
"left",
"rigth"
];
var rule = [
"evenodd",
"nonzero"
];
var colorInterpolation = [
"linearRGB",
"sRGB"
];
var rendering = [
"auto",
"inherit",
"optimizeQuality",
"optimizeSpeed"
];
var cursor = [
"-webkit-grab",
"-webkit-grabbing",
"-webkit-zoom-in",
"-webkit-zoom-out",
"alias",
"all-scroll",
"auto",
"cell",
"col-resize",
"context-menu",
"copy",
"crosshair",
"default",
"e-resize",
"ew-resize",
"help",
"move",
"n-resize",
"ne-resize",
"nesw-resize",
"no-drop",
"not-allowed",
"ns-resize",
"nw-resize",
"nwse-resize",
"pointer",
"progress",
"row-resize",
"s-resize",
"se-resize",
"sw-resize",
"text",
"vertical-text",
"w-resize",
"wait"
];
var direction = [
"ltr",
"rtl"
];
var display = [
"inline",
"block",
"list-item",
"run-in",
"compact",
"inline-block",
"table",
"inline-table",
"table-row-group",
"table-header-group",
"table-footer-group",
"table-row",
"table-column-group",
"table-column",
"table-cell",
"table-caption",
"-webkit-box",
"-webkit-inline-box",
"-wap-marquee",
"none"
];
var dominantBaseline = [
"auto",
"use-script",
"no-change",
"reset-size",
"alphabetic",
"hanging",
"ideographic",
"mathematical",
"central",
"middle",
"text-after-edge",
"text-before-edge"
];
var emptyCells = [
"show",
"hide"
];
var float = [
"left",
"right",
"none"
];
var fontFamily = [
"Arial",
"Georgia",
"Tahoma",
"Verdana",
"Times New Roman",
"Trebuchet MS",
"Lucida Grande",
"Helvetica",
"serif",
"sans-serif",
"cursive",
"fantasy",
"monospace",
"inherit"
];
var fontSize = [
"xx-small",
"x-small",
"small",
"medium",
"large",
"x-large",
"xx-large",
"smaller",
"larger"
];
var fontStyle = [
"normal",
"italic",
"oblique",
"inherit"
];
var fontVariant = [
"normal",
"small-caps",
"inherit"
];
var fontWeight = [
"normal",
"bold",
"bolder",
"lighter",
"100",
"200",
"300",
"400",
"500",
"600",
"700",
"800",
"900",
"inherit"
];
var angle = [
"0deg",
"90deg",
"180deg",
"270deg"
];
var letterSpacing = [
"normal",
"inherit"
];
var properties = {
"-webkit-animation": [animationDirection, fillMode, infinite, playState, timingFunction],
"-webkit-animation-delay": [],
"-webkit-animation-direction": [animationDirection],
"-webkit-animation-duration": [],
"-webkit-animation-fill-mode": [fillMode],
"-webkit-animation-iteration-count": [infinite],
"-webkit-animation-name": [],
"-webkit-animation-play-state": [playState],
"-webkit-animation-timing-function": [timingFunction],
"-webkit-appearance": [appearance],
"-webkit-backface-visibility": [backfaceVisibility],
"-webkit-background-clip": [box, text],
"-webkit-background-composite": [webkitBackgroundComposite],
"-webkit-background-origin": [box],
"-webkit-background-size": [auto, backgroundSize],
"-webkit-border-fit": [borderFit],
"-webkit-border-horizontal-spacing": [inherit],
"-webkit-border-image": [borderImageRepeat, none],
"-webkit-border-vertical-spacing": [inherit],
"-webkit-box-align": [boxAlign],
"-webkit-box-direction": [boxDirection, inherit],
"-webkit-box-flex": [],
"-webkit-box-flex-group": [],
"-webkit-box-lines": [boxLines],
"-webkit-box-ordinal-group": [],
"-webkit-box-orient": [boxOrient, inherit],
"-webkit-box-pack": [boxPack],
"-webkit-box-reflect": [boxReflect],
"-webkit-box-shadow": [none],
"-webkit-box-sizing": [boxSizing, inherit],
"-webkit-color-correction": [webkitColorCorection],
"-webkit-column-break-after": [auto, webkitColumnBreak, inherit],
"-webkit-column-break-before": [auto, webkitColumnBreak, inherit],
"-webkit-column-break-inside": [auto, webkitColumnBreak, inherit],
"-webkit-column-count": [auto],
"-webkit-column-gap": [inherit],
"-webkit-column-rule": [borderWidth, borderStyle, color, auto, none],
"-webkit-column-rule-color": [color],
"-webkit-column-rule-style": [borderStyle, none],
"-webkit-column-rule-width": [auto, borderWidth],
"-webkit-column-span": [columnSpan],
"-webkit-column-width": [auto],
"-webkit-dashboard-region": [none],
"-webkit-font-smoothing": [auto, webkitFontSmoothing, none],
"-webkit-highlight": [none],
"-webkit-line-break": [webkitLineBreak, inherit],
"-webkit-line-clamp": [none],
"-webkit-margin-bottom-collapse": [webkitMarginCollapse],
"-webkit-margin-top-collapse": [webkitMarginCollapse],
"-webkit-marquee": [marqueeDirection, infinite, marqueeStyle, none],
"-webkit-marquee-direction": [marqueeDirection],
"-webkit-marquee-increment": [],
"-webkit-marquee-repetition": [infinite],
"-webkit-marquee-style": [marqueeStyle, none],
"-webkit-mask": [attachment],
"-webkit-mask-attachment": [attachment],
"-webkit-mask-box-image": [none],
"-webkit-mask-clip": [box, text],
"-webkit-mask-composite": [webkitBackgroundComposite],
"-webkit-mask-image": [none],
"-webkit-mask-origin": [box],
"-webkit-mask-position": [backgroundPosition],
"-webkit-mask-repeat": [repeat],
"-webkit-mask-size": [],
"-webkit-nbsp-mode": [webkitNbspMode, inherit],
"-webkit-perspective": [],
"-webkit-perspective-origin": [],
"-webkit-rtl-ordering": [webkitRtlOrdering, inherit],
"-webkit-svg-shadow": [],
"-webkit-text-decorations-in-effect": [],
"-webkit-text-fill-color": [],
"-webkit-text-security": [],
"-webkit-text-stroke": [],
"-webkit-text-stroke-color": [],
"-webkit-text-stroke-width": [],
"-webkit-transform": [],
"-webkit-transform-origin": [],
"-webkit-transform-style": [],
"-webkit-transition": [],
"-webkit-transition-delay": [],
"-webkit-transition-duration": [],
"-webkit-transition-property": [],
"-webkit-transition-timing-function": [],
"-webkit-user-drag": [],
"-webkit-user-modify": [],
"-webkit-user-select": [],
"alignment-baseline": [],
"background": [attachment],
"background-attachment": [attachment],
"background-clip": [box],
"background-color": [color],
"background-image": [none],
"background-origin": [box],
"background-position": [backgroundPosition],
"background-repeat": [repeat],
"background-size": [auto],
"baseline-shift": [baselineShift],
"border": [color, borderStyle, borderWidth, none],
"border-bottom": [color, borderStyle, borderWidth, none],
"border-bottom-color": [color],
"border-bottom-left-radius": [],
"border-bottom-right-radius": [],
"border-bottom-style": [borderStyle],
"border-bottom-width": [borderWidth],
"border-collapse": [collapse],
"border-left": [color, borderStyle, borderWidth, none],
"border-left-color": [color],
"border-left-style": [borderStyle],
"border-left-width": [borderWidth],
"border-right": [color, borderStyle, borderWidth, none],
"border-right-color": [color],
"border-right-style": [borderStyle],
"border-right-width": [borderWidth],
"border-top": [color, borderStyle, borderWidth, none],
"border-top-color": [color],
"border-top-left-radius": [],
"border-top-right-radius": [],
"border-top-style": [borderStyle],
"border-top-width": [borderWidth],
"bottom": [],
"caption-side": [captionSide],
"clear": [clear, none],
"clip": [auto, none],
"clip-path": [none],
"clip-rule": [rule],
"color": [color],
"color-interpolation": [auto, colorInterpolation],
"color-interpolation-filters": [auto, colorInterpolation],
"color-rendering": [auto, rendering],
"cursor": [cursor],
"direction": [direction],
"display": [display],
"dominant-baseline": [dominantBaseline],
"empty-cells": [emptyCells],
"fill": [],
"fill-opacity": [],
"fill-rule": [rule],
"filter": [],
"float": [float],
"flood-color": [color],
"flood-opacity": [],
"font": [],
"font-family": [fontFamily],
"font-size": [fontSize],
"font-style": [fontStyle],
"font-variant": [fontVariant],
"font-weight": [fontWeight],
"glyph-orientation-horizontal": [angle, auto, ["inline"]],
"glyph-orientation-vertical": [angle, auto, ["inline", "upright"]],
"height": [auto],
"image-rendering": [rendering],
"kerning": [],
"left": [auto],
"letter-spacing": [letterSpacing],
"lighting-color": [],
"line-height": [],
"list-style": [],
"list-style-image": [],
"list-style-position": [],
"list-style-type": [],
"margin": [],
"margin-bottom": [],
"margin-left": [],
"margin-right": [],
"margin-top": [],
"marker": [],
"marker-end": [],
"marker-mid": [],
"marker-start": [],
"mask": [],
"max-height": [],
"max-width": [],
"min-height": [],
"min-width": [],
"opacity": [],
"orphans": [],
"outline": [],
"outline-color": [],
"outline-style": [],
"outline-width": [],
"overflow": [],
"overflow-x": [],
"overflow-y": [],
"padding": [],
"padding-bottom": [],
"padding-left": [],
"padding-right": [],
"padding-top": [],
"page": [],
"page-break-after": [],
"page-break-before": [],
"page-break-inside": [],
"pointer-events": [],
"position": [],
"resize": [],
"right": [],
"shape-rendering": [],
"stop-color": [],
"stop-opacity": [],
"stroke": [],
"stroke-dasharray": [],
"stroke-dashoffset": [],
"stroke-linecap": [],
"stroke-linejoin": [],
"stroke-miterlimit": [],
"stroke-opacity": [],
"stroke-width": [],
"table-layout": [],
"text-align": [],
"text-anchor": [],
"text-decoration": [],
"text-indent": [],
"text-overflow": [],
"text-rendering": [],
"text-shadow": [],
"text-transform": [],
"top": [],
"unicode-bidi": [],
"vector-effect": [],
"vertical-align": [],
"visibility": [],
"white-space": [],
"widows": [],
"width": [],
"word-break": [],
"word-spacing": [],
"word-wrap": [],
"writing-mode": [],
"z-index": [],
"zoom": []
};
var propertiesMap = {};
for (var k in properties) {
// http://ideone.com/4rT4L
propertiesMap[k] = Array.prototype.concat.apply([], properties[k]);
}
console.log(propertiesMap);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment