Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file Autoprefixer.ml
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788(* Implementation of stylis autoprefixer https://github.com/thysultan/stylis *)(* This autoprefixer works with ">1%, last 4 versions, Firefox ESR, not ie < 9, not dead" from browserlist and not so precise as stylis implementation *)letwebkitproperty=Printf.sprintf"-webkit-%s"propertyletmozproperty=Printf.sprintf"-moz-%s"propertyletmsproperty=Printf.sprintf"-ms-%s"propertyletoproperty=Printf.sprintf"-o-%s"propertyletkhtmlproperty=Printf.sprintf"-khtml-%s"propertyletprefix_property(property:string)(value:string)prefixes=prefixes|>Array.map(funprefixer->Rule.declaration(prefixerproperty,value))letprefix_value(property:string)(value:string)prefixes=prefixes|>Array.map(funprefixer->Rule.declaration(property,prefixervalue))letprefixrule=let(@)=Array.appendinmatchrulewith|Rule.Declaration((("animation"|"animation-name"|"animation-duration"|"animation-delay"|"animation-direction"|"animation-fill-mode"|"animation-iteration-count"|"animation-play-state"|"animation-timing-function")asproperty),value)|Declaration(("text-decoration"asproperty),value)|Declaration(("filter"asproperty),value)|Declaration(("clip-path"asproperty),value)|Declaration(("backface-visibility"asproperty),value)|Declaration(("column"asproperty),value)|Declaration(("box-decoration-break"asproperty),value)|Declaration((("mask"|"mask-image"|"mask-mode"|"mask-clip"|"mask-size"|"mask-repeat"|"mask-origin"|"mask-position"|"mask-composite")asproperty),value)|Declaration((("column-count"|"column-fill"|"column-gap"|"column-rule"|"column-rule-color"|"column-rule-style"|"column-rule-width"|"column-span"|"column-width")asproperty),value)|Declaration(("background-clip"asproperty),value)|Declaration((("margin-inline-end"|"margin-inline-start"|"padding-inline-start"|"padding-inline-end")asproperty),value)|Declaration(("columns"asproperty),value)->prefix_propertypropertyvalue[|webkit|]@[|rule|]|Declaration(("user-select"asproperty),value)|Declaration(("appearance"asproperty),value)|Declaration(("transform"asproperty),value)|Declaration(("hyphens"asproperty),value)|Declaration(("text-size-adjust"asproperty),value)->prefix_propertypropertyvalue[|webkit;moz;ms|]@[|rule|]|Declaration((("grid-row"|"grid-column")asproperty),value)->prefix_propertypropertyvalue[|ms|]@[|rule|]|Declaration(("flex"asproperty),value)|Declaration(("flex-direction"asproperty),value)|Declaration(("scroll-snap-type"asproperty),value)|Declaration(("writing-mode"asproperty),value)->prefix_propertypropertyvalue[|webkit;ms|]@[|rule|]|Declaration(("tab-size"asproperty),value)->prefix_propertypropertyvalue[|moz;o|]@[|rule|]|Declaration("color-adjust",value)->prefix_property"print-color-adjust"value[|webkit|]@[|rule|]|Declaration((("align-items"|"align-content"|"flex-shrink"|"flex-basis"|"align-self"|"flex-grow"|"justify-content")as_property),_value)->[|rule|]|Declaration(("cursor"asproperty),(("grab"|"grabbing")asvalue))->prefix_valuepropertyvalue[|webkit|]@[|rule|]|Declaration((("width"|"min-width"|"max-width"|"height"|"min-height"|"max-height"|"min-block-size"|"max-block-size")asproperty),(("fit-content"|"max-content"|"min-content"|"fill-available")asvalue))->prefix_valuepropertyvalue[|webkit;moz|]@[|rule|]|Declaration((("width"|"min-width"|"max-width"|"height"|"min-height"|"max-height")asproperty),"stretch")->(prefix_valueproperty"fill-available"[|webkit|]@prefix_valueproperty"available"[|moz|])@[|rule|](* TODO: Add -webkit-image-set on "background" | "background-image" image-set *)|_->[|rule|]