Skip to content

Instantly share code, notes, and snippets.

@jack-pallot
Last active September 30, 2015 15:04
Show Gist options
  • Save jack-pallot/8ffcde6be88e8ffc8f3c to your computer and use it in GitHub Desktop.
Save jack-pallot/8ffcde6be88e8ffc8f3c to your computer and use it in GitHub Desktop.
Check Browser Support
var checkSupport = function checkSupport(el) {
if (!(el in document.documentElement.style)) {
document.body.className+= ' NoSupport-' + el;
};
};
var test = checkSupport('backgroundSize');
/*
OPTIONS
---
alignContent
alignItems
alignSelf
alignmentBaseline
all
animation
animationDelay
animationDirection
animationDuration
animationFillMode
animationIterationCount
animationName
animationPlayState
animationTimingFunction
backfaceVisibility
background
backgroundAttachment
backgroundBlendMode
backgroundClip
backgroundColor
backgroundImage
backgroundOrigin
backgroundPosition
backgroundPositionX
backgroundPositionY
backgroundRepeat
backgroundRepeatX
backgroundRepeatY
backgroundSize
baselineShift
border
borderBottom
borderBottomColor
borderBottomLeftRadius
borderBottomRightRadius
borderBottomStyle
borderBottomWidth
borderCollapse
borderColor
borderImage
borderImageOutset
borderImageRepeat
borderImageSlice
borderImageSource
borderImageWidth
borderLeft
borderLeftColor
borderLeftStyle
borderLeftWidth
borderRadius
borderRight
borderRightColor
borderRightStyle
borderRightWidth
borderSpacing
borderStyle
borderTop
borderTopColor
borderTopLeftRadius
borderTopRightRadius
borderTopStyle
borderTopWidth
borderWidth
bottom
boxShadow
boxSizing
bufferedRendering
captionSide
clear
clip
clipPath
clipRule
color
colorInterpolation
colorInterpolationFilters
colorRendering
content
counterIncrement
counterReset
cursor
cx
cy
direction
display
dominantBaseline
emptyCells
enableBackground
fill
fillOpacity
fillRule
filter
flex
flexBasis
flexDirection
flexFlow
flexGrow
flexShrink
flexWrap
float
floodColor
floodOpacity
font
fontFamily
fontKerning
fontSize
fontStretch
fontStyle
fontVariant
fontVariantLigatures
fontWeight
glyphOrientationHorizontal
glyphOrientationVertical
height
imageRendering
isolation
justifyContent
left
letterSpacing
lightingColor
lineHeight
listStyle
listStyleImage
listStylePosition
listStyleType
margin
marginBottom
marginLeft
marginRight
marginTop
marker
markerEnd
markerMid
markerStart
mask
maskType
maxHeight
maxWidth
maxZoom
minHeight
minWidth
minZoom
mixBlendMode
objectFit
objectPosition
opacity
order
orientation
orphans
outline
outlineColor
outlineOffset
outlineStyle
outlineWidth
overflow
overflowWrap
overflowX
overflowY
padding
paddingBottom
paddingLeft
paddingRight
paddingTop
page
pageBreakAfter
pageBreakBefore
pageBreakInside
paintOrder
perspective
perspectiveOrigin
pointerEvents
position
quotes
r
resize
right
rx
ry
shapeImageThreshold
shapeMargin
shapeOutside
shapeRendering
size
speak
src
stopColor
stopOpacity
stroke
strokeDasharray
strokeDashoffset
strokeLinecap
strokeLinejoin
strokeMiterlimit
strokeOpacity
strokeWidth
tabSize
tableLayout
textAlign
textAnchor
textDecoration
textIndent
textOverflow
textRendering
textShadow
textTransform
top
touchAction
transform
transformOrigin
transformStyle
transition
transitionDelay
transitionDuration
transitionProperty
transitionTimingFunction
unicodeBidi
unicodeRange
userZoom
vectorEffect
verticalAlign
visibility
webkitAppRegion
webkitAppearance
webkitBackgroundClip
webkitBackgroundComposite
webkitBackgroundOrigin
webkitBorderAfter
webkitBorderAfterColor
webkitBorderAfterStyle
webkitBorderAfterWidth
webkitBorderBefore
webkitBorderBeforeColor
webkitBorderBeforeStyle
webkitBorderBeforeWidth
webkitBorderEnd
webkitBorderEndColor
webkitBorderEndStyle
webkitBorderEndWidth
webkitBorderHorizontalSpacing
webkitBorderImage
webkitBorderStart
webkitBorderStartColor
webkitBorderStartStyle
webkitBorderStartWidth
webkitBorderVerticalSpacing
webkitBoxAlign
webkitBoxDecorationBreak
webkitBoxDirection
webkitBoxFlex
webkitBoxFlexGroup
webkitBoxLines
webkitBoxOrdinalGroup
webkitBoxOrient
webkitBoxPack
webkitBoxReflect
webkitClipPath
webkitColumnBreakAfter
webkitColumnBreakBefore
webkitColumnBreakInside
webkitColumnCount
webkitColumnGap
webkitColumnRule
webkitColumnRuleColor
webkitColumnRuleStyle
webkitColumnRuleWidth
webkitColumnSpan
webkitColumnWidth
webkitColumns
webkitFilter
webkitFontFeatureSettings
webkitFontSizeDelta
webkitFontSmoothing
webkitHighlight
webkitHyphenateCharacter
webkitLineBoxContain
webkitLineBreak
webkitLineClamp
webkitLocale
webkitLogicalHeight
webkitLogicalWidth
webkitMarginAfter
webkitMarginAfterCollapse
webkitMarginBefore
webkitMarginBeforeCollapse
webkitMarginBottomCollapse
webkitMarginCollapse
webkitMarginEnd
webkitMarginStart
webkitMarginTopCollapse
webkitMask
webkitMaskBoxImage
webkitMaskBoxImageOutset
webkitMaskBoxImageRepeat
webkitMaskBoxImageSlice
webkitMaskBoxImageSource
webkitMaskBoxImageWidth
webkitMaskClip
webkitMaskComposite
webkitMaskImage
webkitMaskOrigin
webkitMaskPosition
webkitMaskPositionX
webkitMaskPositionY
webkitMaskRepeat
webkitMaskRepeatX
webkitMaskRepeatY
webkitMaskSize
webkitMaxLogicalHeight
webkitMaxLogicalWidth
webkitMinLogicalHeight
webkitMinLogicalWidth
webkitPaddingAfter
webkitPaddingBefore
webkitPaddingEnd
webkitPaddingStart
webkitPerspectiveOriginX
webkitPerspectiveOriginY
webkitPrintColorAdjust
webkitRtlOrdering
webkitRubyPosition
webkitTapHighlightColor
webkitTextCombine
webkitTextDecorationsInEffect
webkitTextEmphasis
webkitTextEmphasisColor
webkitTextEmphasisPosition
webkitTextEmphasisStyle
webkitTextFillColor
webkitTextOrientation
webkitTextSecurity
webkitTextStroke
webkitTextStrokeColor
webkitTextStrokeWidth
webkitTransformOriginX
webkitTransformOriginY
webkitTransformOriginZ
webkitUserDrag
webkitUserModify
webkitUserSelect
webkitWritingMode
whiteSpace
widows
width
willChange
wordBreak
wordSpacing
wordWrap
writingMode
x
y
zIndex
zoom
cssText
length
parentRule
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment