csso.js 795 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162
  1. (function (global, factory) {
  2. typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
  3. typeof define === 'function' && define.amd ? define(['exports'], factory) :
  4. (global = global || self, factory(global.csso = {}));
  5. }(this, (function (exports) { 'use strict';
  6. //
  7. // list
  8. // ┌──────┐
  9. // ┌──────────────┼─head │
  10. // │ │ tail─┼──────────────┐
  11. // │ └──────┘ │
  12. // ▼ ▼
  13. // item item item item
  14. // ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
  15. // null ◀──┼─prev │◀───┼─prev │◀───┼─prev │◀───┼─prev │
  16. // │ next─┼───▶│ next─┼───▶│ next─┼───▶│ next─┼──▶ null
  17. // ├──────┤ ├──────┤ ├──────┤ ├──────┤
  18. // │ data │ │ data │ │ data │ │ data │
  19. // └──────┘ └──────┘ └──────┘ └──────┘
  20. //
  21. function createItem(data) {
  22. return {
  23. prev: null,
  24. next: null,
  25. data: data
  26. };
  27. }
  28. function allocateCursor(node, prev, next) {
  29. var cursor;
  30. if (cursors !== null) {
  31. cursor = cursors;
  32. cursors = cursors.cursor;
  33. cursor.prev = prev;
  34. cursor.next = next;
  35. cursor.cursor = node.cursor;
  36. } else {
  37. cursor = {
  38. prev: prev,
  39. next: next,
  40. cursor: node.cursor
  41. };
  42. }
  43. node.cursor = cursor;
  44. return cursor;
  45. }
  46. function releaseCursor(node) {
  47. var cursor = node.cursor;
  48. node.cursor = cursor.cursor;
  49. cursor.prev = null;
  50. cursor.next = null;
  51. cursor.cursor = cursors;
  52. cursors = cursor;
  53. }
  54. var cursors = null;
  55. var List = function() {
  56. this.cursor = null;
  57. this.head = null;
  58. this.tail = null;
  59. };
  60. List.createItem = createItem;
  61. List.prototype.createItem = createItem;
  62. List.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) {
  63. var cursor = this.cursor;
  64. while (cursor !== null) {
  65. if (cursor.prev === prevOld) {
  66. cursor.prev = prevNew;
  67. }
  68. if (cursor.next === nextOld) {
  69. cursor.next = nextNew;
  70. }
  71. cursor = cursor.cursor;
  72. }
  73. };
  74. List.prototype.getSize = function() {
  75. var size = 0;
  76. var cursor = this.head;
  77. while (cursor) {
  78. size++;
  79. cursor = cursor.next;
  80. }
  81. return size;
  82. };
  83. List.prototype.fromArray = function(array) {
  84. var cursor = null;
  85. this.head = null;
  86. for (var i = 0; i < array.length; i++) {
  87. var item = createItem(array[i]);
  88. if (cursor !== null) {
  89. cursor.next = item;
  90. } else {
  91. this.head = item;
  92. }
  93. item.prev = cursor;
  94. cursor = item;
  95. }
  96. this.tail = cursor;
  97. return this;
  98. };
  99. List.prototype.toArray = function() {
  100. var cursor = this.head;
  101. var result = [];
  102. while (cursor) {
  103. result.push(cursor.data);
  104. cursor = cursor.next;
  105. }
  106. return result;
  107. };
  108. List.prototype.toJSON = List.prototype.toArray;
  109. List.prototype.isEmpty = function() {
  110. return this.head === null;
  111. };
  112. List.prototype.first = function() {
  113. return this.head && this.head.data;
  114. };
  115. List.prototype.last = function() {
  116. return this.tail && this.tail.data;
  117. };
  118. List.prototype.each = function(fn, context) {
  119. var item;
  120. if (context === undefined) {
  121. context = this;
  122. }
  123. // push cursor
  124. var cursor = allocateCursor(this, null, this.head);
  125. while (cursor.next !== null) {
  126. item = cursor.next;
  127. cursor.next = item.next;
  128. fn.call(context, item.data, item, this);
  129. }
  130. // pop cursor
  131. releaseCursor(this);
  132. };
  133. List.prototype.forEach = List.prototype.each;
  134. List.prototype.eachRight = function(fn, context) {
  135. var item;
  136. if (context === undefined) {
  137. context = this;
  138. }
  139. // push cursor
  140. var cursor = allocateCursor(this, this.tail, null);
  141. while (cursor.prev !== null) {
  142. item = cursor.prev;
  143. cursor.prev = item.prev;
  144. fn.call(context, item.data, item, this);
  145. }
  146. // pop cursor
  147. releaseCursor(this);
  148. };
  149. List.prototype.forEachRight = List.prototype.eachRight;
  150. List.prototype.reduce = function(fn, initialValue, context) {
  151. var item;
  152. if (context === undefined) {
  153. context = this;
  154. }
  155. // push cursor
  156. var cursor = allocateCursor(this, null, this.head);
  157. var acc = initialValue;
  158. while (cursor.next !== null) {
  159. item = cursor.next;
  160. cursor.next = item.next;
  161. acc = fn.call(context, acc, item.data, item, this);
  162. }
  163. // pop cursor
  164. releaseCursor(this);
  165. return acc;
  166. };
  167. List.prototype.reduceRight = function(fn, initialValue, context) {
  168. var item;
  169. if (context === undefined) {
  170. context = this;
  171. }
  172. // push cursor
  173. var cursor = allocateCursor(this, this.tail, null);
  174. var acc = initialValue;
  175. while (cursor.prev !== null) {
  176. item = cursor.prev;
  177. cursor.prev = item.prev;
  178. acc = fn.call(context, acc, item.data, item, this);
  179. }
  180. // pop cursor
  181. releaseCursor(this);
  182. return acc;
  183. };
  184. List.prototype.nextUntil = function(start, fn, context) {
  185. if (start === null) {
  186. return;
  187. }
  188. var item;
  189. if (context === undefined) {
  190. context = this;
  191. }
  192. // push cursor
  193. var cursor = allocateCursor(this, null, start);
  194. while (cursor.next !== null) {
  195. item = cursor.next;
  196. cursor.next = item.next;
  197. if (fn.call(context, item.data, item, this)) {
  198. break;
  199. }
  200. }
  201. // pop cursor
  202. releaseCursor(this);
  203. };
  204. List.prototype.prevUntil = function(start, fn, context) {
  205. if (start === null) {
  206. return;
  207. }
  208. var item;
  209. if (context === undefined) {
  210. context = this;
  211. }
  212. // push cursor
  213. var cursor = allocateCursor(this, start, null);
  214. while (cursor.prev !== null) {
  215. item = cursor.prev;
  216. cursor.prev = item.prev;
  217. if (fn.call(context, item.data, item, this)) {
  218. break;
  219. }
  220. }
  221. // pop cursor
  222. releaseCursor(this);
  223. };
  224. List.prototype.some = function(fn, context) {
  225. var cursor = this.head;
  226. if (context === undefined) {
  227. context = this;
  228. }
  229. while (cursor !== null) {
  230. if (fn.call(context, cursor.data, cursor, this)) {
  231. return true;
  232. }
  233. cursor = cursor.next;
  234. }
  235. return false;
  236. };
  237. List.prototype.map = function(fn, context) {
  238. var result = new List();
  239. var cursor = this.head;
  240. if (context === undefined) {
  241. context = this;
  242. }
  243. while (cursor !== null) {
  244. result.appendData(fn.call(context, cursor.data, cursor, this));
  245. cursor = cursor.next;
  246. }
  247. return result;
  248. };
  249. List.prototype.filter = function(fn, context) {
  250. var result = new List();
  251. var cursor = this.head;
  252. if (context === undefined) {
  253. context = this;
  254. }
  255. while (cursor !== null) {
  256. if (fn.call(context, cursor.data, cursor, this)) {
  257. result.appendData(cursor.data);
  258. }
  259. cursor = cursor.next;
  260. }
  261. return result;
  262. };
  263. List.prototype.clear = function() {
  264. this.head = null;
  265. this.tail = null;
  266. };
  267. List.prototype.copy = function() {
  268. var result = new List();
  269. var cursor = this.head;
  270. while (cursor !== null) {
  271. result.insert(createItem(cursor.data));
  272. cursor = cursor.next;
  273. }
  274. return result;
  275. };
  276. List.prototype.prepend = function(item) {
  277. // head
  278. // ^
  279. // item
  280. this.updateCursors(null, item, this.head, item);
  281. // insert to the beginning of the list
  282. if (this.head !== null) {
  283. // new item <- first item
  284. this.head.prev = item;
  285. // new item -> first item
  286. item.next = this.head;
  287. } else {
  288. // if list has no head, then it also has no tail
  289. // in this case tail points to the new item
  290. this.tail = item;
  291. }
  292. // head always points to new item
  293. this.head = item;
  294. return this;
  295. };
  296. List.prototype.prependData = function(data) {
  297. return this.prepend(createItem(data));
  298. };
  299. List.prototype.append = function(item) {
  300. return this.insert(item);
  301. };
  302. List.prototype.appendData = function(data) {
  303. return this.insert(createItem(data));
  304. };
  305. List.prototype.insert = function(item, before) {
  306. if (before !== undefined && before !== null) {
  307. // prev before
  308. // ^
  309. // item
  310. this.updateCursors(before.prev, item, before, item);
  311. if (before.prev === null) {
  312. // insert to the beginning of list
  313. if (this.head !== before) {
  314. throw new Error('before doesn\'t belong to list');
  315. }
  316. // since head points to before therefore list doesn't empty
  317. // no need to check tail
  318. this.head = item;
  319. before.prev = item;
  320. item.next = before;
  321. this.updateCursors(null, item);
  322. } else {
  323. // insert between two items
  324. before.prev.next = item;
  325. item.prev = before.prev;
  326. before.prev = item;
  327. item.next = before;
  328. }
  329. } else {
  330. // tail
  331. // ^
  332. // item
  333. this.updateCursors(this.tail, item, null, item);
  334. // insert to the ending of the list
  335. if (this.tail !== null) {
  336. // last item -> new item
  337. this.tail.next = item;
  338. // last item <- new item
  339. item.prev = this.tail;
  340. } else {
  341. // if list has no tail, then it also has no head
  342. // in this case head points to new item
  343. this.head = item;
  344. }
  345. // tail always points to new item
  346. this.tail = item;
  347. }
  348. return this;
  349. };
  350. List.prototype.insertData = function(data, before) {
  351. return this.insert(createItem(data), before);
  352. };
  353. List.prototype.remove = function(item) {
  354. // item
  355. // ^
  356. // prev next
  357. this.updateCursors(item, item.prev, item, item.next);
  358. if (item.prev !== null) {
  359. item.prev.next = item.next;
  360. } else {
  361. if (this.head !== item) {
  362. throw new Error('item doesn\'t belong to list');
  363. }
  364. this.head = item.next;
  365. }
  366. if (item.next !== null) {
  367. item.next.prev = item.prev;
  368. } else {
  369. if (this.tail !== item) {
  370. throw new Error('item doesn\'t belong to list');
  371. }
  372. this.tail = item.prev;
  373. }
  374. item.prev = null;
  375. item.next = null;
  376. return item;
  377. };
  378. List.prototype.push = function(data) {
  379. this.insert(createItem(data));
  380. };
  381. List.prototype.pop = function() {
  382. if (this.tail !== null) {
  383. return this.remove(this.tail);
  384. }
  385. };
  386. List.prototype.unshift = function(data) {
  387. this.prepend(createItem(data));
  388. };
  389. List.prototype.shift = function() {
  390. if (this.head !== null) {
  391. return this.remove(this.head);
  392. }
  393. };
  394. List.prototype.prependList = function(list) {
  395. return this.insertList(list, this.head);
  396. };
  397. List.prototype.appendList = function(list) {
  398. return this.insertList(list);
  399. };
  400. List.prototype.insertList = function(list, before) {
  401. // ignore empty lists
  402. if (list.head === null) {
  403. return this;
  404. }
  405. if (before !== undefined && before !== null) {
  406. this.updateCursors(before.prev, list.tail, before, list.head);
  407. // insert in the middle of dist list
  408. if (before.prev !== null) {
  409. // before.prev <-> list.head
  410. before.prev.next = list.head;
  411. list.head.prev = before.prev;
  412. } else {
  413. this.head = list.head;
  414. }
  415. before.prev = list.tail;
  416. list.tail.next = before;
  417. } else {
  418. this.updateCursors(this.tail, list.tail, null, list.head);
  419. // insert to end of the list
  420. if (this.tail !== null) {
  421. // if destination list has a tail, then it also has a head,
  422. // but head doesn't change
  423. // dest tail -> source head
  424. this.tail.next = list.head;
  425. // dest tail <- source head
  426. list.head.prev = this.tail;
  427. } else {
  428. // if list has no a tail, then it also has no a head
  429. // in this case points head to new item
  430. this.head = list.head;
  431. }
  432. // tail always start point to new item
  433. this.tail = list.tail;
  434. }
  435. list.head = null;
  436. list.tail = null;
  437. return this;
  438. };
  439. List.prototype.replace = function(oldItem, newItemOrList) {
  440. if ('head' in newItemOrList) {
  441. this.insertList(newItemOrList, oldItem);
  442. } else {
  443. this.insert(newItemOrList, oldItem);
  444. }
  445. this.remove(oldItem);
  446. };
  447. var List_1 = List;
  448. var createCustomError = function createCustomError(name, message) {
  449. // use Object.create(), because some VMs prevent setting line/column otherwise
  450. // (iOS Safari 10 even throws an exception)
  451. var error = Object.create(SyntaxError.prototype);
  452. var errorStack = new Error();
  453. error.name = name;
  454. error.message = message;
  455. Object.defineProperty(error, 'stack', {
  456. get: function() {
  457. return (errorStack.stack || '').replace(/^(.+\n){1,3}/, name + ': ' + message + '\n');
  458. }
  459. });
  460. return error;
  461. };
  462. var MAX_LINE_LENGTH = 100;
  463. var OFFSET_CORRECTION = 60;
  464. var TAB_REPLACEMENT = ' ';
  465. function sourceFragment(error, extraLines) {
  466. function processLines(start, end) {
  467. return lines.slice(start, end).map(function(line, idx) {
  468. var num = String(start + idx + 1);
  469. while (num.length < maxNumLength) {
  470. num = ' ' + num;
  471. }
  472. return num + ' |' + line;
  473. }).join('\n');
  474. }
  475. var lines = error.source.split(/\r\n?|\n|\f/);
  476. var line = error.line;
  477. var column = error.column;
  478. var startLine = Math.max(1, line - extraLines) - 1;
  479. var endLine = Math.min(line + extraLines, lines.length + 1);
  480. var maxNumLength = Math.max(4, String(endLine).length) + 1;
  481. var cutLeft = 0;
  482. // column correction according to replaced tab before column
  483. column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
  484. if (column > MAX_LINE_LENGTH) {
  485. cutLeft = column - OFFSET_CORRECTION + 3;
  486. column = OFFSET_CORRECTION - 2;
  487. }
  488. for (var i = startLine; i <= endLine; i++) {
  489. if (i >= 0 && i < lines.length) {
  490. lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
  491. lines[i] =
  492. (cutLeft > 0 && lines[i].length > cutLeft ? '\u2026' : '') +
  493. lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) +
  494. (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? '\u2026' : '');
  495. }
  496. }
  497. return [
  498. processLines(startLine, line),
  499. new Array(column + maxNumLength + 2).join('-') + '^',
  500. processLines(line, endLine)
  501. ].filter(Boolean).join('\n');
  502. }
  503. var SyntaxError$1 = function(message, source, offset, line, column) {
  504. var error = createCustomError('SyntaxError', message);
  505. error.source = source;
  506. error.offset = offset;
  507. error.line = line;
  508. error.column = column;
  509. error.sourceFragment = function(extraLines) {
  510. return sourceFragment(error, isNaN(extraLines) ? 0 : extraLines);
  511. };
  512. Object.defineProperty(error, 'formattedMessage', {
  513. get: function() {
  514. return (
  515. 'Parse error: ' + error.message + '\n' +
  516. sourceFragment(error, 2)
  517. );
  518. }
  519. });
  520. // for backward capability
  521. error.parseError = {
  522. offset: offset,
  523. line: line,
  524. column: column
  525. };
  526. return error;
  527. };
  528. var _SyntaxError = SyntaxError$1;
  529. // CSS Syntax Module Level 3
  530. // https://www.w3.org/TR/css-syntax-3/
  531. var TYPE = {
  532. EOF: 0, // <EOF-token>
  533. Ident: 1, // <ident-token>
  534. Function: 2, // <function-token>
  535. AtKeyword: 3, // <at-keyword-token>
  536. Hash: 4, // <hash-token>
  537. String: 5, // <string-token>
  538. BadString: 6, // <bad-string-token>
  539. Url: 7, // <url-token>
  540. BadUrl: 8, // <bad-url-token>
  541. Delim: 9, // <delim-token>
  542. Number: 10, // <number-token>
  543. Percentage: 11, // <percentage-token>
  544. Dimension: 12, // <dimension-token>
  545. WhiteSpace: 13, // <whitespace-token>
  546. CDO: 14, // <CDO-token>
  547. CDC: 15, // <CDC-token>
  548. Colon: 16, // <colon-token> :
  549. Semicolon: 17, // <semicolon-token> ;
  550. Comma: 18, // <comma-token> ,
  551. LeftSquareBracket: 19, // <[-token>
  552. RightSquareBracket: 20, // <]-token>
  553. LeftParenthesis: 21, // <(-token>
  554. RightParenthesis: 22, // <)-token>
  555. LeftCurlyBracket: 23, // <{-token>
  556. RightCurlyBracket: 24, // <}-token>
  557. Comment: 25
  558. };
  559. var NAME = Object.keys(TYPE).reduce(function(result, key) {
  560. result[TYPE[key]] = key;
  561. return result;
  562. }, {});
  563. var _const = {
  564. TYPE: TYPE,
  565. NAME: NAME
  566. };
  567. var EOF = 0;
  568. // https://drafts.csswg.org/css-syntax-3/
  569. // § 4.2. Definitions
  570. // digit
  571. // A code point between U+0030 DIGIT ZERO (0) and U+0039 DIGIT NINE (9).
  572. function isDigit(code) {
  573. return code >= 0x0030 && code <= 0x0039;
  574. }
  575. // hex digit
  576. // A digit, or a code point between U+0041 LATIN CAPITAL LETTER A (A) and U+0046 LATIN CAPITAL LETTER F (F),
  577. // or a code point between U+0061 LATIN SMALL LETTER A (a) and U+0066 LATIN SMALL LETTER F (f).
  578. function isHexDigit(code) {
  579. return (
  580. isDigit(code) || // 0 .. 9
  581. (code >= 0x0041 && code <= 0x0046) || // A .. F
  582. (code >= 0x0061 && code <= 0x0066) // a .. f
  583. );
  584. }
  585. // uppercase letter
  586. // A code point between U+0041 LATIN CAPITAL LETTER A (A) and U+005A LATIN CAPITAL LETTER Z (Z).
  587. function isUppercaseLetter(code) {
  588. return code >= 0x0041 && code <= 0x005A;
  589. }
  590. // lowercase letter
  591. // A code point between U+0061 LATIN SMALL LETTER A (a) and U+007A LATIN SMALL LETTER Z (z).
  592. function isLowercaseLetter(code) {
  593. return code >= 0x0061 && code <= 0x007A;
  594. }
  595. // letter
  596. // An uppercase letter or a lowercase letter.
  597. function isLetter(code) {
  598. return isUppercaseLetter(code) || isLowercaseLetter(code);
  599. }
  600. // non-ASCII code point
  601. // A code point with a value equal to or greater than U+0080 <control>.
  602. function isNonAscii(code) {
  603. return code >= 0x0080;
  604. }
  605. // name-start code point
  606. // A letter, a non-ASCII code point, or U+005F LOW LINE (_).
  607. function isNameStart(code) {
  608. return isLetter(code) || isNonAscii(code) || code === 0x005F;
  609. }
  610. // name code point
  611. // A name-start code point, a digit, or U+002D HYPHEN-MINUS (-).
  612. function isName(code) {
  613. return isNameStart(code) || isDigit(code) || code === 0x002D;
  614. }
  615. // non-printable code point
  616. // A code point between U+0000 NULL and U+0008 BACKSPACE, or U+000B LINE TABULATION,
  617. // or a code point between U+000E SHIFT OUT and U+001F INFORMATION SEPARATOR ONE, or U+007F DELETE.
  618. function isNonPrintable(code) {
  619. return (
  620. (code >= 0x0000 && code <= 0x0008) ||
  621. (code === 0x000B) ||
  622. (code >= 0x000E && code <= 0x001F) ||
  623. (code === 0x007F)
  624. );
  625. }
  626. // newline
  627. // U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition,
  628. // as they are converted to U+000A LINE FEED during preprocessing.
  629. // TODO: we doesn't do a preprocessing, so check a code point for U+000D CARRIAGE RETURN and U+000C FORM FEED
  630. function isNewline(code) {
  631. return code === 0x000A || code === 0x000D || code === 0x000C;
  632. }
  633. // whitespace
  634. // A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE.
  635. function isWhiteSpace(code) {
  636. return isNewline(code) || code === 0x0020 || code === 0x0009;
  637. }
  638. // § 4.3.8. Check if two code points are a valid escape
  639. function isValidEscape(first, second) {
  640. // If the first code point is not U+005C REVERSE SOLIDUS (\), return false.
  641. if (first !== 0x005C) {
  642. return false;
  643. }
  644. // Otherwise, if the second code point is a newline or EOF, return false.
  645. if (isNewline(second) || second === EOF) {
  646. return false;
  647. }
  648. // Otherwise, return true.
  649. return true;
  650. }
  651. // § 4.3.9. Check if three code points would start an identifier
  652. function isIdentifierStart(first, second, third) {
  653. // Look at the first code point:
  654. // U+002D HYPHEN-MINUS
  655. if (first === 0x002D) {
  656. // If the second code point is a name-start code point or a U+002D HYPHEN-MINUS,
  657. // or the second and third code points are a valid escape, return true. Otherwise, return false.
  658. return (
  659. isNameStart(second) ||
  660. second === 0x002D ||
  661. isValidEscape(second, third)
  662. );
  663. }
  664. // name-start code point
  665. if (isNameStart(first)) {
  666. // Return true.
  667. return true;
  668. }
  669. // U+005C REVERSE SOLIDUS (\)
  670. if (first === 0x005C) {
  671. // If the first and second code points are a valid escape, return true. Otherwise, return false.
  672. return isValidEscape(first, second);
  673. }
  674. // anything else
  675. // Return false.
  676. return false;
  677. }
  678. // § 4.3.10. Check if three code points would start a number
  679. function isNumberStart(first, second, third) {
  680. // Look at the first code point:
  681. // U+002B PLUS SIGN (+)
  682. // U+002D HYPHEN-MINUS (-)
  683. if (first === 0x002B || first === 0x002D) {
  684. // If the second code point is a digit, return true.
  685. if (isDigit(second)) {
  686. return 2;
  687. }
  688. // Otherwise, if the second code point is a U+002E FULL STOP (.)
  689. // and the third code point is a digit, return true.
  690. // Otherwise, return false.
  691. return second === 0x002E && isDigit(third) ? 3 : 0;
  692. }
  693. // U+002E FULL STOP (.)
  694. if (first === 0x002E) {
  695. // If the second code point is a digit, return true. Otherwise, return false.
  696. return isDigit(second) ? 2 : 0;
  697. }
  698. // digit
  699. if (isDigit(first)) {
  700. // Return true.
  701. return 1;
  702. }
  703. // anything else
  704. // Return false.
  705. return 0;
  706. }
  707. //
  708. // Misc
  709. //
  710. // detect BOM (https://en.wikipedia.org/wiki/Byte_order_mark)
  711. function isBOM(code) {
  712. // UTF-16BE
  713. if (code === 0xFEFF) {
  714. return 1;
  715. }
  716. // UTF-16LE
  717. if (code === 0xFFFE) {
  718. return 1;
  719. }
  720. return 0;
  721. }
  722. // Fast code category
  723. //
  724. // https://drafts.csswg.org/css-syntax/#tokenizer-definitions
  725. // > non-ASCII code point
  726. // > A code point with a value equal to or greater than U+0080 <control>
  727. // > name-start code point
  728. // > A letter, a non-ASCII code point, or U+005F LOW LINE (_).
  729. // > name code point
  730. // > A name-start code point, a digit, or U+002D HYPHEN-MINUS (-)
  731. // That means only ASCII code points has a special meaning and we define a maps for 0..127 codes only
  732. var CATEGORY = new Array(0x80);
  733. charCodeCategory.Eof = 0x80;
  734. charCodeCategory.WhiteSpace = 0x82;
  735. charCodeCategory.Digit = 0x83;
  736. charCodeCategory.NameStart = 0x84;
  737. charCodeCategory.NonPrintable = 0x85;
  738. for (var i = 0; i < CATEGORY.length; i++) {
  739. switch (true) {
  740. case isWhiteSpace(i):
  741. CATEGORY[i] = charCodeCategory.WhiteSpace;
  742. break;
  743. case isDigit(i):
  744. CATEGORY[i] = charCodeCategory.Digit;
  745. break;
  746. case isNameStart(i):
  747. CATEGORY[i] = charCodeCategory.NameStart;
  748. break;
  749. case isNonPrintable(i):
  750. CATEGORY[i] = charCodeCategory.NonPrintable;
  751. break;
  752. default:
  753. CATEGORY[i] = i || charCodeCategory.Eof;
  754. }
  755. }
  756. function charCodeCategory(code) {
  757. return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart;
  758. }
  759. var charCodeDefinitions = {
  760. isDigit: isDigit,
  761. isHexDigit: isHexDigit,
  762. isUppercaseLetter: isUppercaseLetter,
  763. isLowercaseLetter: isLowercaseLetter,
  764. isLetter: isLetter,
  765. isNonAscii: isNonAscii,
  766. isNameStart: isNameStart,
  767. isName: isName,
  768. isNonPrintable: isNonPrintable,
  769. isNewline: isNewline,
  770. isWhiteSpace: isWhiteSpace,
  771. isValidEscape: isValidEscape,
  772. isIdentifierStart: isIdentifierStart,
  773. isNumberStart: isNumberStart,
  774. isBOM: isBOM,
  775. charCodeCategory: charCodeCategory
  776. };
  777. var isDigit$1 = charCodeDefinitions.isDigit;
  778. var isHexDigit$1 = charCodeDefinitions.isHexDigit;
  779. var isUppercaseLetter$1 = charCodeDefinitions.isUppercaseLetter;
  780. var isName$1 = charCodeDefinitions.isName;
  781. var isWhiteSpace$1 = charCodeDefinitions.isWhiteSpace;
  782. var isValidEscape$1 = charCodeDefinitions.isValidEscape;
  783. function getCharCode(source, offset) {
  784. return offset < source.length ? source.charCodeAt(offset) : 0;
  785. }
  786. function getNewlineLength(source, offset, code) {
  787. if (code === 13 /* \r */ && getCharCode(source, offset + 1) === 10 /* \n */) {
  788. return 2;
  789. }
  790. return 1;
  791. }
  792. function cmpChar(testStr, offset, referenceCode) {
  793. var code = testStr.charCodeAt(offset);
  794. // code.toLowerCase() for A..Z
  795. if (isUppercaseLetter$1(code)) {
  796. code = code | 32;
  797. }
  798. return code === referenceCode;
  799. }
  800. function cmpStr(testStr, start, end, referenceStr) {
  801. if (end - start !== referenceStr.length) {
  802. return false;
  803. }
  804. if (start < 0 || end > testStr.length) {
  805. return false;
  806. }
  807. for (var i = start; i < end; i++) {
  808. var testCode = testStr.charCodeAt(i);
  809. var referenceCode = referenceStr.charCodeAt(i - start);
  810. // testCode.toLowerCase() for A..Z
  811. if (isUppercaseLetter$1(testCode)) {
  812. testCode = testCode | 32;
  813. }
  814. if (testCode !== referenceCode) {
  815. return false;
  816. }
  817. }
  818. return true;
  819. }
  820. function findWhiteSpaceStart(source, offset) {
  821. for (; offset >= 0; offset--) {
  822. if (!isWhiteSpace$1(source.charCodeAt(offset))) {
  823. break;
  824. }
  825. }
  826. return offset + 1;
  827. }
  828. function findWhiteSpaceEnd(source, offset) {
  829. for (; offset < source.length; offset++) {
  830. if (!isWhiteSpace$1(source.charCodeAt(offset))) {
  831. break;
  832. }
  833. }
  834. return offset;
  835. }
  836. function findDecimalNumberEnd(source, offset) {
  837. for (; offset < source.length; offset++) {
  838. if (!isDigit$1(source.charCodeAt(offset))) {
  839. break;
  840. }
  841. }
  842. return offset;
  843. }
  844. // § 4.3.7. Consume an escaped code point
  845. function consumeEscaped(source, offset) {
  846. // It assumes that the U+005C REVERSE SOLIDUS (\) has already been consumed and
  847. // that the next input code point has already been verified to be part of a valid escape.
  848. offset += 2;
  849. // hex digit
  850. if (isHexDigit$1(getCharCode(source, offset - 1))) {
  851. // Consume as many hex digits as possible, but no more than 5.
  852. // Note that this means 1-6 hex digits have been consumed in total.
  853. for (var maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) {
  854. if (!isHexDigit$1(getCharCode(source, offset))) {
  855. break;
  856. }
  857. }
  858. // If the next input code point is whitespace, consume it as well.
  859. var code = getCharCode(source, offset);
  860. if (isWhiteSpace$1(code)) {
  861. offset += getNewlineLength(source, offset, code);
  862. }
  863. }
  864. return offset;
  865. }
  866. // §4.3.11. Consume a name
  867. // Note: This algorithm does not do the verification of the first few code points that are necessary
  868. // to ensure the returned code points would constitute an <ident-token>. If that is the intended use,
  869. // ensure that the stream starts with an identifier before calling this algorithm.
  870. function consumeName(source, offset) {
  871. // Let result initially be an empty string.
  872. // Repeatedly consume the next input code point from the stream:
  873. for (; offset < source.length; offset++) {
  874. var code = source.charCodeAt(offset);
  875. // name code point
  876. if (isName$1(code)) {
  877. // Append the code point to result.
  878. continue;
  879. }
  880. // the stream starts with a valid escape
  881. if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
  882. // Consume an escaped code point. Append the returned code point to result.
  883. offset = consumeEscaped(source, offset) - 1;
  884. continue;
  885. }
  886. // anything else
  887. // Reconsume the current input code point. Return result.
  888. break;
  889. }
  890. return offset;
  891. }
  892. // §4.3.12. Consume a number
  893. function consumeNumber(source, offset) {
  894. var code = source.charCodeAt(offset);
  895. // 2. If the next input code point is U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-),
  896. // consume it and append it to repr.
  897. if (code === 0x002B || code === 0x002D) {
  898. code = source.charCodeAt(offset += 1);
  899. }
  900. // 3. While the next input code point is a digit, consume it and append it to repr.
  901. if (isDigit$1(code)) {
  902. offset = findDecimalNumberEnd(source, offset + 1);
  903. code = source.charCodeAt(offset);
  904. }
  905. // 4. If the next 2 input code points are U+002E FULL STOP (.) followed by a digit, then:
  906. if (code === 0x002E && isDigit$1(source.charCodeAt(offset + 1))) {
  907. // 4.1 Consume them.
  908. // 4.2 Append them to repr.
  909. code = source.charCodeAt(offset += 2);
  910. // 4.3 Set type to "number".
  911. // TODO
  912. // 4.4 While the next input code point is a digit, consume it and append it to repr.
  913. offset = findDecimalNumberEnd(source, offset);
  914. }
  915. // 5. If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E)
  916. // or U+0065 LATIN SMALL LETTER E (e), ... , followed by a digit, then:
  917. if (cmpChar(source, offset, 101 /* e */)) {
  918. var sign = 0;
  919. code = source.charCodeAt(offset + 1);
  920. // ... optionally followed by U+002D HYPHEN-MINUS (-) or U+002B PLUS SIGN (+) ...
  921. if (code === 0x002D || code === 0x002B) {
  922. sign = 1;
  923. code = source.charCodeAt(offset + 2);
  924. }
  925. // ... followed by a digit
  926. if (isDigit$1(code)) {
  927. // 5.1 Consume them.
  928. // 5.2 Append them to repr.
  929. // 5.3 Set type to "number".
  930. // TODO
  931. // 5.4 While the next input code point is a digit, consume it and append it to repr.
  932. offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);
  933. }
  934. }
  935. return offset;
  936. }
  937. // § 4.3.14. Consume the remnants of a bad url
  938. // ... its sole use is to consume enough of the input stream to reach a recovery point
  939. // where normal tokenizing can resume.
  940. function consumeBadUrlRemnants(source, offset) {
  941. // Repeatedly consume the next input code point from the stream:
  942. for (; offset < source.length; offset++) {
  943. var code = source.charCodeAt(offset);
  944. // U+0029 RIGHT PARENTHESIS ())
  945. // EOF
  946. if (code === 0x0029) {
  947. // Return.
  948. offset++;
  949. break;
  950. }
  951. if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
  952. // Consume an escaped code point.
  953. // Note: This allows an escaped right parenthesis ("\)") to be encountered
  954. // without ending the <bad-url-token>. This is otherwise identical to
  955. // the "anything else" clause.
  956. offset = consumeEscaped(source, offset);
  957. }
  958. }
  959. return offset;
  960. }
  961. var utils = {
  962. consumeEscaped: consumeEscaped,
  963. consumeName: consumeName,
  964. consumeNumber: consumeNumber,
  965. consumeBadUrlRemnants: consumeBadUrlRemnants,
  966. cmpChar: cmpChar,
  967. cmpStr: cmpStr,
  968. getNewlineLength: getNewlineLength,
  969. findWhiteSpaceStart: findWhiteSpaceStart,
  970. findWhiteSpaceEnd: findWhiteSpaceEnd
  971. };
  972. var TYPE$1 = _const.TYPE;
  973. var NAME$1 = _const.NAME;
  974. var cmpStr$1 = utils.cmpStr;
  975. var EOF$1 = TYPE$1.EOF;
  976. var WHITESPACE = TYPE$1.WhiteSpace;
  977. var COMMENT = TYPE$1.Comment;
  978. var OFFSET_MASK = 0x00FFFFFF;
  979. var TYPE_SHIFT = 24;
  980. var TokenStream = function() {
  981. this.offsetAndType = null;
  982. this.balance = null;
  983. this.reset();
  984. };
  985. TokenStream.prototype = {
  986. reset: function() {
  987. this.eof = false;
  988. this.tokenIndex = -1;
  989. this.tokenType = 0;
  990. this.tokenStart = this.firstCharOffset;
  991. this.tokenEnd = this.firstCharOffset;
  992. },
  993. lookupType: function(offset) {
  994. offset += this.tokenIndex;
  995. if (offset < this.tokenCount) {
  996. return this.offsetAndType[offset] >> TYPE_SHIFT;
  997. }
  998. return EOF$1;
  999. },
  1000. lookupOffset: function(offset) {
  1001. offset += this.tokenIndex;
  1002. if (offset < this.tokenCount) {
  1003. return this.offsetAndType[offset - 1] & OFFSET_MASK;
  1004. }
  1005. return this.source.length;
  1006. },
  1007. lookupValue: function(offset, referenceStr) {
  1008. offset += this.tokenIndex;
  1009. if (offset < this.tokenCount) {
  1010. return cmpStr$1(
  1011. this.source,
  1012. this.offsetAndType[offset - 1] & OFFSET_MASK,
  1013. this.offsetAndType[offset] & OFFSET_MASK,
  1014. referenceStr
  1015. );
  1016. }
  1017. return false;
  1018. },
  1019. getTokenStart: function(tokenIndex) {
  1020. if (tokenIndex === this.tokenIndex) {
  1021. return this.tokenStart;
  1022. }
  1023. if (tokenIndex > 0) {
  1024. return tokenIndex < this.tokenCount
  1025. ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK
  1026. : this.offsetAndType[this.tokenCount] & OFFSET_MASK;
  1027. }
  1028. return this.firstCharOffset;
  1029. },
  1030. // TODO: -> skipUntilBalanced
  1031. getRawLength: function(startToken, mode) {
  1032. var cursor = startToken;
  1033. var balanceEnd;
  1034. var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK;
  1035. var type;
  1036. loop:
  1037. for (; cursor < this.tokenCount; cursor++) {
  1038. balanceEnd = this.balance[cursor];
  1039. // stop scanning on balance edge that points to offset before start token
  1040. if (balanceEnd < startToken) {
  1041. break loop;
  1042. }
  1043. type = this.offsetAndType[cursor] >> TYPE_SHIFT;
  1044. // check token is stop type
  1045. switch (mode(type, this.source, offset)) {
  1046. case 1:
  1047. break loop;
  1048. case 2:
  1049. cursor++;
  1050. break loop;
  1051. default:
  1052. offset = this.offsetAndType[cursor] & OFFSET_MASK;
  1053. // fast forward to the end of balanced block
  1054. if (this.balance[balanceEnd] === cursor) {
  1055. cursor = balanceEnd;
  1056. }
  1057. }
  1058. }
  1059. return cursor - this.tokenIndex;
  1060. },
  1061. isBalanceEdge: function(pos) {
  1062. return this.balance[this.tokenIndex] < pos;
  1063. },
  1064. isDelim: function(code, offset) {
  1065. if (offset) {
  1066. return (
  1067. this.lookupType(offset) === TYPE$1.Delim &&
  1068. this.source.charCodeAt(this.lookupOffset(offset)) === code
  1069. );
  1070. }
  1071. return (
  1072. this.tokenType === TYPE$1.Delim &&
  1073. this.source.charCodeAt(this.tokenStart) === code
  1074. );
  1075. },
  1076. getTokenValue: function() {
  1077. return this.source.substring(this.tokenStart, this.tokenEnd);
  1078. },
  1079. getTokenLength: function() {
  1080. return this.tokenEnd - this.tokenStart;
  1081. },
  1082. substrToCursor: function(start) {
  1083. return this.source.substring(start, this.tokenStart);
  1084. },
  1085. skipWS: function() {
  1086. for (var i = this.tokenIndex, skipTokenCount = 0; i < this.tokenCount; i++, skipTokenCount++) {
  1087. if ((this.offsetAndType[i] >> TYPE_SHIFT) !== WHITESPACE) {
  1088. break;
  1089. }
  1090. }
  1091. if (skipTokenCount > 0) {
  1092. this.skip(skipTokenCount);
  1093. }
  1094. },
  1095. skipSC: function() {
  1096. while (this.tokenType === WHITESPACE || this.tokenType === COMMENT) {
  1097. this.next();
  1098. }
  1099. },
  1100. skip: function(tokenCount) {
  1101. var next = this.tokenIndex + tokenCount;
  1102. if (next < this.tokenCount) {
  1103. this.tokenIndex = next;
  1104. this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;
  1105. next = this.offsetAndType[next];
  1106. this.tokenType = next >> TYPE_SHIFT;
  1107. this.tokenEnd = next & OFFSET_MASK;
  1108. } else {
  1109. this.tokenIndex = this.tokenCount;
  1110. this.next();
  1111. }
  1112. },
  1113. next: function() {
  1114. var next = this.tokenIndex + 1;
  1115. if (next < this.tokenCount) {
  1116. this.tokenIndex = next;
  1117. this.tokenStart = this.tokenEnd;
  1118. next = this.offsetAndType[next];
  1119. this.tokenType = next >> TYPE_SHIFT;
  1120. this.tokenEnd = next & OFFSET_MASK;
  1121. } else {
  1122. this.tokenIndex = this.tokenCount;
  1123. this.eof = true;
  1124. this.tokenType = EOF$1;
  1125. this.tokenStart = this.tokenEnd = this.source.length;
  1126. }
  1127. },
  1128. forEachToken(fn) {
  1129. for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {
  1130. var start = offset;
  1131. var item = this.offsetAndType[i];
  1132. var end = item & OFFSET_MASK;
  1133. var type = item >> TYPE_SHIFT;
  1134. offset = end;
  1135. fn(type, start, end, i);
  1136. }
  1137. },
  1138. dump() {
  1139. var tokens = new Array(this.tokenCount);
  1140. this.forEachToken((type, start, end, index) => {
  1141. tokens[index] = {
  1142. idx: index,
  1143. type: NAME$1[type],
  1144. chunk: this.source.substring(start, end),
  1145. balance: this.balance[index]
  1146. };
  1147. });
  1148. return tokens;
  1149. }
  1150. };
  1151. var TokenStream_1 = TokenStream;
  1152. function noop(value) {
  1153. return value;
  1154. }
  1155. function generateMultiplier(multiplier) {
  1156. if (multiplier.min === 0 && multiplier.max === 0) {
  1157. return '*';
  1158. }
  1159. if (multiplier.min === 0 && multiplier.max === 1) {
  1160. return '?';
  1161. }
  1162. if (multiplier.min === 1 && multiplier.max === 0) {
  1163. return multiplier.comma ? '#' : '+';
  1164. }
  1165. if (multiplier.min === 1 && multiplier.max === 1) {
  1166. return '';
  1167. }
  1168. return (
  1169. (multiplier.comma ? '#' : '') +
  1170. (multiplier.min === multiplier.max
  1171. ? '{' + multiplier.min + '}'
  1172. : '{' + multiplier.min + ',' + (multiplier.max !== 0 ? multiplier.max : '') + '}'
  1173. )
  1174. );
  1175. }
  1176. function generateTypeOpts(node) {
  1177. switch (node.type) {
  1178. case 'Range':
  1179. return (
  1180. ' [' +
  1181. (node.min === null ? '-∞' : node.min) +
  1182. ',' +
  1183. (node.max === null ? '∞' : node.max) +
  1184. ']'
  1185. );
  1186. default:
  1187. throw new Error('Unknown node type `' + node.type + '`');
  1188. }
  1189. }
  1190. function generateSequence(node, decorate, forceBraces, compact) {
  1191. var combinator = node.combinator === ' ' || compact ? node.combinator : ' ' + node.combinator + ' ';
  1192. var result = node.terms.map(function(term) {
  1193. return generate(term, decorate, forceBraces, compact);
  1194. }).join(combinator);
  1195. if (node.explicit || forceBraces) {
  1196. result = (compact || result[0] === ',' ? '[' : '[ ') + result + (compact ? ']' : ' ]');
  1197. }
  1198. return result;
  1199. }
  1200. function generate(node, decorate, forceBraces, compact) {
  1201. var result;
  1202. switch (node.type) {
  1203. case 'Group':
  1204. result =
  1205. generateSequence(node, decorate, forceBraces, compact) +
  1206. (node.disallowEmpty ? '!' : '');
  1207. break;
  1208. case 'Multiplier':
  1209. // return since node is a composition
  1210. return (
  1211. generate(node.term, decorate, forceBraces, compact) +
  1212. decorate(generateMultiplier(node), node)
  1213. );
  1214. case 'Type':
  1215. result = '<' + node.name + (node.opts ? decorate(generateTypeOpts(node.opts), node.opts) : '') + '>';
  1216. break;
  1217. case 'Property':
  1218. result = '<\'' + node.name + '\'>';
  1219. break;
  1220. case 'Keyword':
  1221. result = node.name;
  1222. break;
  1223. case 'AtKeyword':
  1224. result = '@' + node.name;
  1225. break;
  1226. case 'Function':
  1227. result = node.name + '(';
  1228. break;
  1229. case 'String':
  1230. case 'Token':
  1231. result = node.value;
  1232. break;
  1233. case 'Comma':
  1234. result = ',';
  1235. break;
  1236. default:
  1237. throw new Error('Unknown node type `' + node.type + '`');
  1238. }
  1239. return decorate(result, node);
  1240. }
  1241. var generate_1 = function(node, options) {
  1242. var decorate = noop;
  1243. var forceBraces = false;
  1244. var compact = false;
  1245. if (typeof options === 'function') {
  1246. decorate = options;
  1247. } else if (options) {
  1248. forceBraces = Boolean(options.forceBraces);
  1249. compact = Boolean(options.compact);
  1250. if (typeof options.decorate === 'function') {
  1251. decorate = options.decorate;
  1252. }
  1253. }
  1254. return generate(node, decorate, forceBraces, compact);
  1255. };
  1256. function fromMatchResult(matchResult) {
  1257. var tokens = matchResult.tokens;
  1258. var longestMatch = matchResult.longestMatch;
  1259. var node = longestMatch < tokens.length ? tokens[longestMatch].node : null;
  1260. var mismatchOffset = -1;
  1261. var entries = 0;
  1262. var css = '';
  1263. for (var i = 0; i < tokens.length; i++) {
  1264. if (i === longestMatch) {
  1265. mismatchOffset = css.length;
  1266. }
  1267. if (node !== null && tokens[i].node === node) {
  1268. if (i <= longestMatch) {
  1269. entries++;
  1270. } else {
  1271. entries = 0;
  1272. }
  1273. }
  1274. css += tokens[i].value;
  1275. }
  1276. return {
  1277. node: node,
  1278. css: css,
  1279. mismatchOffset: mismatchOffset === -1 ? css.length : mismatchOffset,
  1280. last: node === null || entries > 1
  1281. };
  1282. }
  1283. function getLocation(node, point) {
  1284. var loc = node && node.loc && node.loc[point];
  1285. if (loc) {
  1286. return {
  1287. offset: loc.offset,
  1288. line: loc.line,
  1289. column: loc.column
  1290. };
  1291. }
  1292. return null;
  1293. }
  1294. var SyntaxReferenceError = function(type, referenceName) {
  1295. var error = createCustomError(
  1296. 'SyntaxReferenceError',
  1297. type + (referenceName ? ' `' + referenceName + '`' : '')
  1298. );
  1299. error.reference = referenceName;
  1300. return error;
  1301. };
  1302. var MatchError = function(message, syntax, node, matchResult) {
  1303. var error = createCustomError('SyntaxMatchError', message);
  1304. var details = fromMatchResult(matchResult);
  1305. var mismatchOffset = details.mismatchOffset || 0;
  1306. var badNode = details.node || node;
  1307. var end = getLocation(badNode, 'end');
  1308. var start = details.last ? end : getLocation(badNode, 'start');
  1309. var css = details.css;
  1310. error.rawMessage = message;
  1311. error.syntax = syntax ? generate_1(syntax) : '<generic>';
  1312. error.css = css;
  1313. error.mismatchOffset = mismatchOffset;
  1314. error.loc = {
  1315. source: (badNode && badNode.loc && badNode.loc.source) || '<unknown>',
  1316. start: start,
  1317. end: end
  1318. };
  1319. error.line = start ? start.line : undefined;
  1320. error.column = start ? start.column : undefined;
  1321. error.offset = start ? start.offset : undefined;
  1322. error.message = message + '\n' +
  1323. ' syntax: ' + error.syntax + '\n' +
  1324. ' value: ' + (error.css || '<empty string>') + '\n' +
  1325. ' --------' + new Array(error.mismatchOffset + 1).join('-') + '^';
  1326. return error;
  1327. };
  1328. var error = {
  1329. SyntaxReferenceError: SyntaxReferenceError,
  1330. MatchError: MatchError
  1331. };
  1332. var hasOwnProperty = Object.prototype.hasOwnProperty;
  1333. var keywords = Object.create(null);
  1334. var properties = Object.create(null);
  1335. var HYPHENMINUS = 45; // '-'.charCodeAt()
  1336. function isCustomProperty(str, offset) {
  1337. offset = offset || 0;
  1338. return str.length - offset >= 2 &&
  1339. str.charCodeAt(offset) === HYPHENMINUS &&
  1340. str.charCodeAt(offset + 1) === HYPHENMINUS;
  1341. }
  1342. function getVendorPrefix(str, offset) {
  1343. offset = offset || 0;
  1344. // verdor prefix should be at least 3 chars length
  1345. if (str.length - offset >= 3) {
  1346. // vendor prefix starts with hyper minus following non-hyper minus
  1347. if (str.charCodeAt(offset) === HYPHENMINUS &&
  1348. str.charCodeAt(offset + 1) !== HYPHENMINUS) {
  1349. // vendor prefix should contain a hyper minus at the ending
  1350. var secondDashIndex = str.indexOf('-', offset + 2);
  1351. if (secondDashIndex !== -1) {
  1352. return str.substring(offset, secondDashIndex + 1);
  1353. }
  1354. }
  1355. }
  1356. return '';
  1357. }
  1358. function getKeywordDescriptor(keyword) {
  1359. if (hasOwnProperty.call(keywords, keyword)) {
  1360. return keywords[keyword];
  1361. }
  1362. var name = keyword.toLowerCase();
  1363. if (hasOwnProperty.call(keywords, name)) {
  1364. return keywords[keyword] = keywords[name];
  1365. }
  1366. var custom = isCustomProperty(name, 0);
  1367. var vendor = !custom ? getVendorPrefix(name, 0) : '';
  1368. return keywords[keyword] = Object.freeze({
  1369. basename: name.substr(vendor.length),
  1370. name: name,
  1371. vendor: vendor,
  1372. prefix: vendor,
  1373. custom: custom
  1374. });
  1375. }
  1376. function getPropertyDescriptor(property) {
  1377. if (hasOwnProperty.call(properties, property)) {
  1378. return properties[property];
  1379. }
  1380. var name = property;
  1381. var hack = property[0];
  1382. if (hack === '/') {
  1383. hack = property[1] === '/' ? '//' : '/';
  1384. } else if (hack !== '_' &&
  1385. hack !== '*' &&
  1386. hack !== '$' &&
  1387. hack !== '#' &&
  1388. hack !== '+' &&
  1389. hack !== '&') {
  1390. hack = '';
  1391. }
  1392. var custom = isCustomProperty(name, hack.length);
  1393. // re-use result when possible (the same as for lower case)
  1394. if (!custom) {
  1395. name = name.toLowerCase();
  1396. if (hasOwnProperty.call(properties, name)) {
  1397. return properties[property] = properties[name];
  1398. }
  1399. }
  1400. var vendor = !custom ? getVendorPrefix(name, hack.length) : '';
  1401. var prefix = name.substr(0, hack.length + vendor.length);
  1402. return properties[property] = Object.freeze({
  1403. basename: name.substr(prefix.length),
  1404. name: name.substr(hack.length),
  1405. hack: hack,
  1406. vendor: vendor,
  1407. prefix: prefix,
  1408. custom: custom
  1409. });
  1410. }
  1411. var names = {
  1412. keyword: getKeywordDescriptor,
  1413. property: getPropertyDescriptor,
  1414. isCustomProperty: isCustomProperty,
  1415. vendorPrefix: getVendorPrefix
  1416. };
  1417. var MIN_SIZE = 16 * 1024;
  1418. var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported
  1419. var adoptBuffer = function adoptBuffer(buffer, size) {
  1420. if (buffer === null || buffer.length < size) {
  1421. return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE));
  1422. }
  1423. return buffer;
  1424. };
  1425. var TYPE$2 = _const.TYPE;
  1426. var isNewline$1 = charCodeDefinitions.isNewline;
  1427. var isName$2 = charCodeDefinitions.isName;
  1428. var isValidEscape$2 = charCodeDefinitions.isValidEscape;
  1429. var isNumberStart$1 = charCodeDefinitions.isNumberStart;
  1430. var isIdentifierStart$1 = charCodeDefinitions.isIdentifierStart;
  1431. var charCodeCategory$1 = charCodeDefinitions.charCodeCategory;
  1432. var isBOM$1 = charCodeDefinitions.isBOM;
  1433. var cmpStr$2 = utils.cmpStr;
  1434. var getNewlineLength$1 = utils.getNewlineLength;
  1435. var findWhiteSpaceEnd$1 = utils.findWhiteSpaceEnd;
  1436. var consumeEscaped$1 = utils.consumeEscaped;
  1437. var consumeName$1 = utils.consumeName;
  1438. var consumeNumber$1 = utils.consumeNumber;
  1439. var consumeBadUrlRemnants$1 = utils.consumeBadUrlRemnants;
  1440. var OFFSET_MASK$1 = 0x00FFFFFF;
  1441. var TYPE_SHIFT$1 = 24;
  1442. function tokenize(source, stream) {
  1443. function getCharCode(offset) {
  1444. return offset < sourceLength ? source.charCodeAt(offset) : 0;
  1445. }
  1446. // § 4.3.3. Consume a numeric token
  1447. function consumeNumericToken() {
  1448. // Consume a number and let number be the result.
  1449. offset = consumeNumber$1(source, offset);
  1450. // If the next 3 input code points would start an identifier, then:
  1451. if (isIdentifierStart$1(getCharCode(offset), getCharCode(offset + 1), getCharCode(offset + 2))) {
  1452. // Create a <dimension-token> with the same value and type flag as number, and a unit set initially to the empty string.
  1453. // Consume a name. Set the <dimension-token>’s unit to the returned value.
  1454. // Return the <dimension-token>.
  1455. type = TYPE$2.Dimension;
  1456. offset = consumeName$1(source, offset);
  1457. return;
  1458. }
  1459. // Otherwise, if the next input code point is U+0025 PERCENTAGE SIGN (%), consume it.
  1460. if (getCharCode(offset) === 0x0025) {
  1461. // Create a <percentage-token> with the same value as number, and return it.
  1462. type = TYPE$2.Percentage;
  1463. offset++;
  1464. return;
  1465. }
  1466. // Otherwise, create a <number-token> with the same value and type flag as number, and return it.
  1467. type = TYPE$2.Number;
  1468. }
  1469. // § 4.3.4. Consume an ident-like token
  1470. function consumeIdentLikeToken() {
  1471. const nameStartOffset = offset;
  1472. // Consume a name, and let string be the result.
  1473. offset = consumeName$1(source, offset);
  1474. // If string’s value is an ASCII case-insensitive match for "url",
  1475. // and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.
  1476. if (cmpStr$2(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) {
  1477. // While the next two input code points are whitespace, consume the next input code point.
  1478. offset = findWhiteSpaceEnd$1(source, offset + 1);
  1479. // If the next one or two input code points are U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('),
  1480. // or whitespace followed by U+0022 QUOTATION MARK (") or U+0027 APOSTROPHE ('),
  1481. // then create a <function-token> with its value set to string and return it.
  1482. if (getCharCode(offset) === 0x0022 ||
  1483. getCharCode(offset) === 0x0027) {
  1484. type = TYPE$2.Function;
  1485. offset = nameStartOffset + 4;
  1486. return;
  1487. }
  1488. // Otherwise, consume a url token, and return it.
  1489. consumeUrlToken();
  1490. return;
  1491. }
  1492. // Otherwise, if the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.
  1493. // Create a <function-token> with its value set to string and return it.
  1494. if (getCharCode(offset) === 0x0028) {
  1495. type = TYPE$2.Function;
  1496. offset++;
  1497. return;
  1498. }
  1499. // Otherwise, create an <ident-token> with its value set to string and return it.
  1500. type = TYPE$2.Ident;
  1501. }
  1502. // § 4.3.5. Consume a string token
  1503. function consumeStringToken(endingCodePoint) {
  1504. // This algorithm may be called with an ending code point, which denotes the code point
  1505. // that ends the string. If an ending code point is not specified,
  1506. // the current input code point is used.
  1507. if (!endingCodePoint) {
  1508. endingCodePoint = getCharCode(offset++);
  1509. }
  1510. // Initially create a <string-token> with its value set to the empty string.
  1511. type = TYPE$2.String;
  1512. // Repeatedly consume the next input code point from the stream:
  1513. for (; offset < source.length; offset++) {
  1514. var code = source.charCodeAt(offset);
  1515. switch (charCodeCategory$1(code)) {
  1516. // ending code point
  1517. case endingCodePoint:
  1518. // Return the <string-token>.
  1519. offset++;
  1520. return;
  1521. // EOF
  1522. case charCodeCategory$1.Eof:
  1523. // This is a parse error. Return the <string-token>.
  1524. return;
  1525. // newline
  1526. case charCodeCategory$1.WhiteSpace:
  1527. if (isNewline$1(code)) {
  1528. // This is a parse error. Reconsume the current input code point,
  1529. // create a <bad-string-token>, and return it.
  1530. offset += getNewlineLength$1(source, offset, code);
  1531. type = TYPE$2.BadString;
  1532. return;
  1533. }
  1534. break;
  1535. // U+005C REVERSE SOLIDUS (\)
  1536. case 0x005C:
  1537. // If the next input code point is EOF, do nothing.
  1538. if (offset === source.length - 1) {
  1539. break;
  1540. }
  1541. var nextCode = getCharCode(offset + 1);
  1542. // Otherwise, if the next input code point is a newline, consume it.
  1543. if (isNewline$1(nextCode)) {
  1544. offset += getNewlineLength$1(source, offset + 1, nextCode);
  1545. } else if (isValidEscape$2(code, nextCode)) {
  1546. // Otherwise, (the stream starts with a valid escape) consume
  1547. // an escaped code point and append the returned code point to
  1548. // the <string-token>’s value.
  1549. offset = consumeEscaped$1(source, offset) - 1;
  1550. }
  1551. break;
  1552. // anything else
  1553. // Append the current input code point to the <string-token>’s value.
  1554. }
  1555. }
  1556. }
  1557. // § 4.3.6. Consume a url token
  1558. // Note: This algorithm assumes that the initial "url(" has already been consumed.
  1559. // This algorithm also assumes that it’s being called to consume an "unquoted" value, like url(foo).
  1560. // A quoted value, like url("foo"), is parsed as a <function-token>. Consume an ident-like token
  1561. // automatically handles this distinction; this algorithm shouldn’t be called directly otherwise.
  1562. function consumeUrlToken() {
  1563. // Initially create a <url-token> with its value set to the empty string.
  1564. type = TYPE$2.Url;
  1565. // Consume as much whitespace as possible.
  1566. offset = findWhiteSpaceEnd$1(source, offset);
  1567. // Repeatedly consume the next input code point from the stream:
  1568. for (; offset < source.length; offset++) {
  1569. var code = source.charCodeAt(offset);
  1570. switch (charCodeCategory$1(code)) {
  1571. // U+0029 RIGHT PARENTHESIS ())
  1572. case 0x0029:
  1573. // Return the <url-token>.
  1574. offset++;
  1575. return;
  1576. // EOF
  1577. case charCodeCategory$1.Eof:
  1578. // This is a parse error. Return the <url-token>.
  1579. return;
  1580. // whitespace
  1581. case charCodeCategory$1.WhiteSpace:
  1582. // Consume as much whitespace as possible.
  1583. offset = findWhiteSpaceEnd$1(source, offset);
  1584. // If the next input code point is U+0029 RIGHT PARENTHESIS ()) or EOF,
  1585. // consume it and return the <url-token>
  1586. // (if EOF was encountered, this is a parse error);
  1587. if (getCharCode(offset) === 0x0029 || offset >= source.length) {
  1588. if (offset < source.length) {
  1589. offset++;
  1590. }
  1591. return;
  1592. }
  1593. // otherwise, consume the remnants of a bad url, create a <bad-url-token>,
  1594. // and return it.
  1595. offset = consumeBadUrlRemnants$1(source, offset);
  1596. type = TYPE$2.BadUrl;
  1597. return;
  1598. // U+0022 QUOTATION MARK (")
  1599. // U+0027 APOSTROPHE (')
  1600. // U+0028 LEFT PARENTHESIS (()
  1601. // non-printable code point
  1602. case 0x0022:
  1603. case 0x0027:
  1604. case 0x0028:
  1605. case charCodeCategory$1.NonPrintable:
  1606. // This is a parse error. Consume the remnants of a bad url,
  1607. // create a <bad-url-token>, and return it.
  1608. offset = consumeBadUrlRemnants$1(source, offset);
  1609. type = TYPE$2.BadUrl;
  1610. return;
  1611. // U+005C REVERSE SOLIDUS (\)
  1612. case 0x005C:
  1613. // If the stream starts with a valid escape, consume an escaped code point and
  1614. // append the returned code point to the <url-token>’s value.
  1615. if (isValidEscape$2(code, getCharCode(offset + 1))) {
  1616. offset = consumeEscaped$1(source, offset) - 1;
  1617. break;
  1618. }
  1619. // Otherwise, this is a parse error. Consume the remnants of a bad url,
  1620. // create a <bad-url-token>, and return it.
  1621. offset = consumeBadUrlRemnants$1(source, offset);
  1622. type = TYPE$2.BadUrl;
  1623. return;
  1624. // anything else
  1625. // Append the current input code point to the <url-token>’s value.
  1626. }
  1627. }
  1628. }
  1629. if (!stream) {
  1630. stream = new TokenStream_1();
  1631. }
  1632. // ensure source is a string
  1633. source = String(source || '');
  1634. var sourceLength = source.length;
  1635. var offsetAndType = adoptBuffer(stream.offsetAndType, sourceLength + 1); // +1 because of eof-token
  1636. var balance = adoptBuffer(stream.balance, sourceLength + 1);
  1637. var tokenCount = 0;
  1638. var start = isBOM$1(getCharCode(0));
  1639. var offset = start;
  1640. var balanceCloseType = 0;
  1641. var balanceStart = 0;
  1642. var balancePrev = 0;
  1643. // https://drafts.csswg.org/css-syntax-3/#consume-token
  1644. // § 4.3.1. Consume a token
  1645. while (offset < sourceLength) {
  1646. var code = source.charCodeAt(offset);
  1647. var type = 0;
  1648. balance[tokenCount] = sourceLength;
  1649. switch (charCodeCategory$1(code)) {
  1650. // whitespace
  1651. case charCodeCategory$1.WhiteSpace:
  1652. // Consume as much whitespace as possible. Return a <whitespace-token>.
  1653. type = TYPE$2.WhiteSpace;
  1654. offset = findWhiteSpaceEnd$1(source, offset + 1);
  1655. break;
  1656. // U+0022 QUOTATION MARK (")
  1657. case 0x0022:
  1658. // Consume a string token and return it.
  1659. consumeStringToken();
  1660. break;
  1661. // U+0023 NUMBER SIGN (#)
  1662. case 0x0023:
  1663. // If the next input code point is a name code point or the next two input code points are a valid escape, then:
  1664. if (isName$2(getCharCode(offset + 1)) || isValidEscape$2(getCharCode(offset + 1), getCharCode(offset + 2))) {
  1665. // Create a <hash-token>.
  1666. type = TYPE$2.Hash;
  1667. // If the next 3 input code points would start an identifier, set the <hash-token>’s type flag to "id".
  1668. // if (isIdentifierStart(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {
  1669. // // TODO: set id flag
  1670. // }
  1671. // Consume a name, and set the <hash-token>’s value to the returned string.
  1672. offset = consumeName$1(source, offset + 1);
  1673. // Return the <hash-token>.
  1674. } else {
  1675. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1676. type = TYPE$2.Delim;
  1677. offset++;
  1678. }
  1679. break;
  1680. // U+0027 APOSTROPHE (')
  1681. case 0x0027:
  1682. // Consume a string token and return it.
  1683. consumeStringToken();
  1684. break;
  1685. // U+0028 LEFT PARENTHESIS (()
  1686. case 0x0028:
  1687. // Return a <(-token>.
  1688. type = TYPE$2.LeftParenthesis;
  1689. offset++;
  1690. break;
  1691. // U+0029 RIGHT PARENTHESIS ())
  1692. case 0x0029:
  1693. // Return a <)-token>.
  1694. type = TYPE$2.RightParenthesis;
  1695. offset++;
  1696. break;
  1697. // U+002B PLUS SIGN (+)
  1698. case 0x002B:
  1699. // If the input stream starts with a number, ...
  1700. if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
  1701. // ... reconsume the current input code point, consume a numeric token, and return it.
  1702. consumeNumericToken();
  1703. } else {
  1704. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1705. type = TYPE$2.Delim;
  1706. offset++;
  1707. }
  1708. break;
  1709. // U+002C COMMA (,)
  1710. case 0x002C:
  1711. // Return a <comma-token>.
  1712. type = TYPE$2.Comma;
  1713. offset++;
  1714. break;
  1715. // U+002D HYPHEN-MINUS (-)
  1716. case 0x002D:
  1717. // If the input stream starts with a number, reconsume the current input code point, consume a numeric token, and return it.
  1718. if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
  1719. consumeNumericToken();
  1720. } else {
  1721. // Otherwise, if the next 2 input code points are U+002D HYPHEN-MINUS U+003E GREATER-THAN SIGN (->), consume them and return a <CDC-token>.
  1722. if (getCharCode(offset + 1) === 0x002D &&
  1723. getCharCode(offset + 2) === 0x003E) {
  1724. type = TYPE$2.CDC;
  1725. offset = offset + 3;
  1726. } else {
  1727. // Otherwise, if the input stream starts with an identifier, ...
  1728. if (isIdentifierStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
  1729. // ... reconsume the current input code point, consume an ident-like token, and return it.
  1730. consumeIdentLikeToken();
  1731. } else {
  1732. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1733. type = TYPE$2.Delim;
  1734. offset++;
  1735. }
  1736. }
  1737. }
  1738. break;
  1739. // U+002E FULL STOP (.)
  1740. case 0x002E:
  1741. // If the input stream starts with a number, ...
  1742. if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
  1743. // ... reconsume the current input code point, consume a numeric token, and return it.
  1744. consumeNumericToken();
  1745. } else {
  1746. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1747. type = TYPE$2.Delim;
  1748. offset++;
  1749. }
  1750. break;
  1751. // U+002F SOLIDUS (/)
  1752. case 0x002F:
  1753. // If the next two input code point are U+002F SOLIDUS (/) followed by a U+002A ASTERISK (*),
  1754. if (getCharCode(offset + 1) === 0x002A) {
  1755. // ... consume them and all following code points up to and including the first U+002A ASTERISK (*)
  1756. // followed by a U+002F SOLIDUS (/), or up to an EOF code point.
  1757. type = TYPE$2.Comment;
  1758. offset = source.indexOf('*/', offset + 2) + 2;
  1759. if (offset === 1) {
  1760. offset = source.length;
  1761. }
  1762. } else {
  1763. type = TYPE$2.Delim;
  1764. offset++;
  1765. }
  1766. break;
  1767. // U+003A COLON (:)
  1768. case 0x003A:
  1769. // Return a <colon-token>.
  1770. type = TYPE$2.Colon;
  1771. offset++;
  1772. break;
  1773. // U+003B SEMICOLON (;)
  1774. case 0x003B:
  1775. // Return a <semicolon-token>.
  1776. type = TYPE$2.Semicolon;
  1777. offset++;
  1778. break;
  1779. // U+003C LESS-THAN SIGN (<)
  1780. case 0x003C:
  1781. // If the next 3 input code points are U+0021 EXCLAMATION MARK U+002D HYPHEN-MINUS U+002D HYPHEN-MINUS (!--), ...
  1782. if (getCharCode(offset + 1) === 0x0021 &&
  1783. getCharCode(offset + 2) === 0x002D &&
  1784. getCharCode(offset + 3) === 0x002D) {
  1785. // ... consume them and return a <CDO-token>.
  1786. type = TYPE$2.CDO;
  1787. offset = offset + 4;
  1788. } else {
  1789. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1790. type = TYPE$2.Delim;
  1791. offset++;
  1792. }
  1793. break;
  1794. // U+0040 COMMERCIAL AT (@)
  1795. case 0x0040:
  1796. // If the next 3 input code points would start an identifier, ...
  1797. if (isIdentifierStart$1(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {
  1798. // ... consume a name, create an <at-keyword-token> with its value set to the returned value, and return it.
  1799. type = TYPE$2.AtKeyword;
  1800. offset = consumeName$1(source, offset + 1);
  1801. } else {
  1802. // Otherwise, return a <delim-token> with its value set to the current input code point.
  1803. type = TYPE$2.Delim;
  1804. offset++;
  1805. }
  1806. break;
  1807. // U+005B LEFT SQUARE BRACKET ([)
  1808. case 0x005B:
  1809. // Return a <[-token>.
  1810. type = TYPE$2.LeftSquareBracket;
  1811. offset++;
  1812. break;
  1813. // U+005C REVERSE SOLIDUS (\)
  1814. case 0x005C:
  1815. // If the input stream starts with a valid escape, ...
  1816. if (isValidEscape$2(code, getCharCode(offset + 1))) {
  1817. // ... reconsume the current input code point, consume an ident-like token, and return it.
  1818. consumeIdentLikeToken();
  1819. } else {
  1820. // Otherwise, this is a parse error. Return a <delim-token> with its value set to the current input code point.
  1821. type = TYPE$2.Delim;
  1822. offset++;
  1823. }
  1824. break;
  1825. // U+005D RIGHT SQUARE BRACKET (])
  1826. case 0x005D:
  1827. // Return a <]-token>.
  1828. type = TYPE$2.RightSquareBracket;
  1829. offset++;
  1830. break;
  1831. // U+007B LEFT CURLY BRACKET ({)
  1832. case 0x007B:
  1833. // Return a <{-token>.
  1834. type = TYPE$2.LeftCurlyBracket;
  1835. offset++;
  1836. break;
  1837. // U+007D RIGHT CURLY BRACKET (})
  1838. case 0x007D:
  1839. // Return a <}-token>.
  1840. type = TYPE$2.RightCurlyBracket;
  1841. offset++;
  1842. break;
  1843. // digit
  1844. case charCodeCategory$1.Digit:
  1845. // Reconsume the current input code point, consume a numeric token, and return it.
  1846. consumeNumericToken();
  1847. break;
  1848. // name-start code point
  1849. case charCodeCategory$1.NameStart:
  1850. // Reconsume the current input code point, consume an ident-like token, and return it.
  1851. consumeIdentLikeToken();
  1852. break;
  1853. // EOF
  1854. case charCodeCategory$1.Eof:
  1855. // Return an <EOF-token>.
  1856. break;
  1857. // anything else
  1858. default:
  1859. // Return a <delim-token> with its value set to the current input code point.
  1860. type = TYPE$2.Delim;
  1861. offset++;
  1862. }
  1863. switch (type) {
  1864. case balanceCloseType:
  1865. balancePrev = balanceStart & OFFSET_MASK$1;
  1866. balanceStart = balance[balancePrev];
  1867. balanceCloseType = balanceStart >> TYPE_SHIFT$1;
  1868. balance[tokenCount] = balancePrev;
  1869. balance[balancePrev++] = tokenCount;
  1870. for (; balancePrev < tokenCount; balancePrev++) {
  1871. if (balance[balancePrev] === sourceLength) {
  1872. balance[balancePrev] = tokenCount;
  1873. }
  1874. }
  1875. break;
  1876. case TYPE$2.LeftParenthesis:
  1877. case TYPE$2.Function:
  1878. balance[tokenCount] = balanceStart;
  1879. balanceCloseType = TYPE$2.RightParenthesis;
  1880. balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
  1881. break;
  1882. case TYPE$2.LeftSquareBracket:
  1883. balance[tokenCount] = balanceStart;
  1884. balanceCloseType = TYPE$2.RightSquareBracket;
  1885. balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
  1886. break;
  1887. case TYPE$2.LeftCurlyBracket:
  1888. balance[tokenCount] = balanceStart;
  1889. balanceCloseType = TYPE$2.RightCurlyBracket;
  1890. balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
  1891. break;
  1892. }
  1893. offsetAndType[tokenCount++] = (type << TYPE_SHIFT$1) | offset;
  1894. }
  1895. // finalize buffers
  1896. offsetAndType[tokenCount] = (TYPE$2.EOF << TYPE_SHIFT$1) | offset; // <EOF-token>
  1897. balance[tokenCount] = sourceLength;
  1898. balance[sourceLength] = sourceLength; // prevents false positive balance match with any token
  1899. while (balanceStart !== 0) {
  1900. balancePrev = balanceStart & OFFSET_MASK$1;
  1901. balanceStart = balance[balancePrev];
  1902. balance[balancePrev] = sourceLength;
  1903. }
  1904. // update stream
  1905. stream.source = source;
  1906. stream.firstCharOffset = start;
  1907. stream.offsetAndType = offsetAndType;
  1908. stream.tokenCount = tokenCount;
  1909. stream.balance = balance;
  1910. stream.reset();
  1911. stream.next();
  1912. return stream;
  1913. }
  1914. // extend tokenizer with constants
  1915. Object.keys(_const).forEach(function(key) {
  1916. tokenize[key] = _const[key];
  1917. });
  1918. // extend tokenizer with static methods from utils
  1919. Object.keys(charCodeDefinitions).forEach(function(key) {
  1920. tokenize[key] = charCodeDefinitions[key];
  1921. });
  1922. Object.keys(utils).forEach(function(key) {
  1923. tokenize[key] = utils[key];
  1924. });
  1925. var tokenizer = tokenize;
  1926. var isDigit$2 = tokenizer.isDigit;
  1927. var cmpChar$1 = tokenizer.cmpChar;
  1928. var TYPE$3 = tokenizer.TYPE;
  1929. var DELIM = TYPE$3.Delim;
  1930. var WHITESPACE$1 = TYPE$3.WhiteSpace;
  1931. var COMMENT$1 = TYPE$3.Comment;
  1932. var IDENT = TYPE$3.Ident;
  1933. var NUMBER = TYPE$3.Number;
  1934. var DIMENSION = TYPE$3.Dimension;
  1935. var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
  1936. var HYPHENMINUS$1 = 0x002D; // U+002D HYPHEN-MINUS (-)
  1937. var N = 0x006E; // U+006E LATIN SMALL LETTER N (n)
  1938. var DISALLOW_SIGN = true;
  1939. var ALLOW_SIGN = false;
  1940. function isDelim(token, code) {
  1941. return token !== null && token.type === DELIM && token.value.charCodeAt(0) === code;
  1942. }
  1943. function skipSC(token, offset, getNextToken) {
  1944. while (token !== null && (token.type === WHITESPACE$1 || token.type === COMMENT$1)) {
  1945. token = getNextToken(++offset);
  1946. }
  1947. return offset;
  1948. }
  1949. function checkInteger(token, valueOffset, disallowSign, offset) {
  1950. if (!token) {
  1951. return 0;
  1952. }
  1953. var code = token.value.charCodeAt(valueOffset);
  1954. if (code === PLUSSIGN || code === HYPHENMINUS$1) {
  1955. if (disallowSign) {
  1956. // Number sign is not allowed
  1957. return 0;
  1958. }
  1959. valueOffset++;
  1960. }
  1961. for (; valueOffset < token.value.length; valueOffset++) {
  1962. if (!isDigit$2(token.value.charCodeAt(valueOffset))) {
  1963. // Integer is expected
  1964. return 0;
  1965. }
  1966. }
  1967. return offset + 1;
  1968. }
  1969. // ... <signed-integer>
  1970. // ... ['+' | '-'] <signless-integer>
  1971. function consumeB(token, offset_, getNextToken) {
  1972. var sign = false;
  1973. var offset = skipSC(token, offset_, getNextToken);
  1974. token = getNextToken(offset);
  1975. if (token === null) {
  1976. return offset_;
  1977. }
  1978. if (token.type !== NUMBER) {
  1979. if (isDelim(token, PLUSSIGN) || isDelim(token, HYPHENMINUS$1)) {
  1980. sign = true;
  1981. offset = skipSC(getNextToken(++offset), offset, getNextToken);
  1982. token = getNextToken(offset);
  1983. if (token === null && token.type !== NUMBER) {
  1984. return 0;
  1985. }
  1986. } else {
  1987. return offset_;
  1988. }
  1989. }
  1990. if (!sign) {
  1991. var code = token.value.charCodeAt(0);
  1992. if (code !== PLUSSIGN && code !== HYPHENMINUS$1) {
  1993. // Number sign is expected
  1994. return 0;
  1995. }
  1996. }
  1997. return checkInteger(token, sign ? 0 : 1, sign, offset);
  1998. }
  1999. // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb
  2000. var genericAnPlusB = function anPlusB(token, getNextToken) {
  2001. /* eslint-disable brace-style*/
  2002. var offset = 0;
  2003. if (!token) {
  2004. return 0;
  2005. }
  2006. // <integer>
  2007. if (token.type === NUMBER) {
  2008. return checkInteger(token, 0, ALLOW_SIGN, offset); // b
  2009. }
  2010. // -n
  2011. // -n <signed-integer>
  2012. // -n ['+' | '-'] <signless-integer>
  2013. // -n- <signless-integer>
  2014. // <dashndashdigit-ident>
  2015. else if (token.type === IDENT && token.value.charCodeAt(0) === HYPHENMINUS$1) {
  2016. // expect 1st char is N
  2017. if (!cmpChar$1(token.value, 1, N)) {
  2018. return 0;
  2019. }
  2020. switch (token.value.length) {
  2021. // -n
  2022. // -n <signed-integer>
  2023. // -n ['+' | '-'] <signless-integer>
  2024. case 2:
  2025. return consumeB(getNextToken(++offset), offset, getNextToken);
  2026. // -n- <signless-integer>
  2027. case 3:
  2028. if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
  2029. return 0;
  2030. }
  2031. offset = skipSC(getNextToken(++offset), offset, getNextToken);
  2032. token = getNextToken(offset);
  2033. return checkInteger(token, 0, DISALLOW_SIGN, offset);
  2034. // <dashndashdigit-ident>
  2035. default:
  2036. if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
  2037. return 0;
  2038. }
  2039. return checkInteger(token, 3, DISALLOW_SIGN, offset);
  2040. }
  2041. }
  2042. // '+'? n
  2043. // '+'? n <signed-integer>
  2044. // '+'? n ['+' | '-'] <signless-integer>
  2045. // '+'? n- <signless-integer>
  2046. // '+'? <ndashdigit-ident>
  2047. else if (token.type === IDENT || (isDelim(token, PLUSSIGN) && getNextToken(offset + 1).type === IDENT)) {
  2048. // just ignore a plus
  2049. if (token.type !== IDENT) {
  2050. token = getNextToken(++offset);
  2051. }
  2052. if (token === null || !cmpChar$1(token.value, 0, N)) {
  2053. return 0;
  2054. }
  2055. switch (token.value.length) {
  2056. // '+'? n
  2057. // '+'? n <signed-integer>
  2058. // '+'? n ['+' | '-'] <signless-integer>
  2059. case 1:
  2060. return consumeB(getNextToken(++offset), offset, getNextToken);
  2061. // '+'? n- <signless-integer>
  2062. case 2:
  2063. if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
  2064. return 0;
  2065. }
  2066. offset = skipSC(getNextToken(++offset), offset, getNextToken);
  2067. token = getNextToken(offset);
  2068. return checkInteger(token, 0, DISALLOW_SIGN, offset);
  2069. // '+'? <ndashdigit-ident>
  2070. default:
  2071. if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
  2072. return 0;
  2073. }
  2074. return checkInteger(token, 2, DISALLOW_SIGN, offset);
  2075. }
  2076. }
  2077. // <ndashdigit-dimension>
  2078. // <ndash-dimension> <signless-integer>
  2079. // <n-dimension>
  2080. // <n-dimension> <signed-integer>
  2081. // <n-dimension> ['+' | '-'] <signless-integer>
  2082. else if (token.type === DIMENSION) {
  2083. var code = token.value.charCodeAt(0);
  2084. var sign = code === PLUSSIGN || code === HYPHENMINUS$1 ? 1 : 0;
  2085. for (var i = sign; i < token.value.length; i++) {
  2086. if (!isDigit$2(token.value.charCodeAt(i))) {
  2087. break;
  2088. }
  2089. }
  2090. if (i === sign) {
  2091. // Integer is expected
  2092. return 0;
  2093. }
  2094. if (!cmpChar$1(token.value, i, N)) {
  2095. return 0;
  2096. }
  2097. // <n-dimension>
  2098. // <n-dimension> <signed-integer>
  2099. // <n-dimension> ['+' | '-'] <signless-integer>
  2100. if (i + 1 === token.value.length) {
  2101. return consumeB(getNextToken(++offset), offset, getNextToken);
  2102. } else {
  2103. if (token.value.charCodeAt(i + 1) !== HYPHENMINUS$1) {
  2104. return 0;
  2105. }
  2106. // <ndash-dimension> <signless-integer>
  2107. if (i + 2 === token.value.length) {
  2108. offset = skipSC(getNextToken(++offset), offset, getNextToken);
  2109. token = getNextToken(offset);
  2110. return checkInteger(token, 0, DISALLOW_SIGN, offset);
  2111. }
  2112. // <ndashdigit-dimension>
  2113. else {
  2114. return checkInteger(token, i + 2, DISALLOW_SIGN, offset);
  2115. }
  2116. }
  2117. }
  2118. return 0;
  2119. };
  2120. var isHexDigit$2 = tokenizer.isHexDigit;
  2121. var cmpChar$2 = tokenizer.cmpChar;
  2122. var TYPE$4 = tokenizer.TYPE;
  2123. var IDENT$1 = TYPE$4.Ident;
  2124. var DELIM$1 = TYPE$4.Delim;
  2125. var NUMBER$1 = TYPE$4.Number;
  2126. var DIMENSION$1 = TYPE$4.Dimension;
  2127. var PLUSSIGN$1 = 0x002B; // U+002B PLUS SIGN (+)
  2128. var HYPHENMINUS$2 = 0x002D; // U+002D HYPHEN-MINUS (-)
  2129. var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)
  2130. var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
  2131. function isDelim$1(token, code) {
  2132. return token !== null && token.type === DELIM$1 && token.value.charCodeAt(0) === code;
  2133. }
  2134. function startsWith(token, code) {
  2135. return token.value.charCodeAt(0) === code;
  2136. }
  2137. function hexSequence(token, offset, allowDash) {
  2138. for (var pos = offset, hexlen = 0; pos < token.value.length; pos++) {
  2139. var code = token.value.charCodeAt(pos);
  2140. if (code === HYPHENMINUS$2 && allowDash && hexlen !== 0) {
  2141. if (hexSequence(token, offset + hexlen + 1, false) > 0) {
  2142. return 6; // dissallow following question marks
  2143. }
  2144. return 0; // dash at the ending of a hex sequence is not allowed
  2145. }
  2146. if (!isHexDigit$2(code)) {
  2147. return 0; // not a hex digit
  2148. }
  2149. if (++hexlen > 6) {
  2150. return 0; // too many hex digits
  2151. } }
  2152. return hexlen;
  2153. }
  2154. function withQuestionMarkSequence(consumed, length, getNextToken) {
  2155. if (!consumed) {
  2156. return 0; // nothing consumed
  2157. }
  2158. while (isDelim$1(getNextToken(length), QUESTIONMARK)) {
  2159. if (++consumed > 6) {
  2160. return 0; // too many question marks
  2161. }
  2162. length++;
  2163. }
  2164. return length;
  2165. }
  2166. // https://drafts.csswg.org/css-syntax/#urange
  2167. // Informally, the <urange> production has three forms:
  2168. // U+0001
  2169. // Defines a range consisting of a single code point, in this case the code point "1".
  2170. // U+0001-00ff
  2171. // Defines a range of codepoints between the first and the second value, in this case
  2172. // the range between "1" and "ff" (255 in decimal) inclusive.
  2173. // U+00??
  2174. // Defines a range of codepoints where the "?" characters range over all hex digits,
  2175. // in this case defining the same as the value U+0000-00ff.
  2176. // In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat "?" as a hexadecimal digit).
  2177. //
  2178. // <urange> =
  2179. // u '+' <ident-token> '?'* |
  2180. // u <dimension-token> '?'* |
  2181. // u <number-token> '?'* |
  2182. // u <number-token> <dimension-token> |
  2183. // u <number-token> <number-token> |
  2184. // u '+' '?'+
  2185. var genericUrange = function urange(token, getNextToken) {
  2186. var length = 0;
  2187. // should start with `u` or `U`
  2188. if (token === null || token.type !== IDENT$1 || !cmpChar$2(token.value, 0, U)) {
  2189. return 0;
  2190. }
  2191. token = getNextToken(++length);
  2192. if (token === null) {
  2193. return 0;
  2194. }
  2195. // u '+' <ident-token> '?'*
  2196. // u '+' '?'+
  2197. if (isDelim$1(token, PLUSSIGN$1)) {
  2198. token = getNextToken(++length);
  2199. if (token === null) {
  2200. return 0;
  2201. }
  2202. if (token.type === IDENT$1) {
  2203. // u '+' <ident-token> '?'*
  2204. return withQuestionMarkSequence(hexSequence(token, 0, true), ++length, getNextToken);
  2205. }
  2206. if (isDelim$1(token, QUESTIONMARK)) {
  2207. // u '+' '?'+
  2208. return withQuestionMarkSequence(1, ++length, getNextToken);
  2209. }
  2210. // Hex digit or question mark is expected
  2211. return 0;
  2212. }
  2213. // u <number-token> '?'*
  2214. // u <number-token> <dimension-token>
  2215. // u <number-token> <number-token>
  2216. if (token.type === NUMBER$1) {
  2217. if (!startsWith(token, PLUSSIGN$1)) {
  2218. return 0;
  2219. }
  2220. var consumedHexLength = hexSequence(token, 1, true);
  2221. if (consumedHexLength === 0) {
  2222. return 0;
  2223. }
  2224. token = getNextToken(++length);
  2225. if (token === null) {
  2226. // u <number-token> <eof>
  2227. return length;
  2228. }
  2229. if (token.type === DIMENSION$1 || token.type === NUMBER$1) {
  2230. // u <number-token> <dimension-token>
  2231. // u <number-token> <number-token>
  2232. if (!startsWith(token, HYPHENMINUS$2) || !hexSequence(token, 1, false)) {
  2233. return 0;
  2234. }
  2235. return length + 1;
  2236. }
  2237. // u <number-token> '?'*
  2238. return withQuestionMarkSequence(consumedHexLength, length, getNextToken);
  2239. }
  2240. // u <dimension-token> '?'*
  2241. if (token.type === DIMENSION$1) {
  2242. if (!startsWith(token, PLUSSIGN$1)) {
  2243. return 0;
  2244. }
  2245. return withQuestionMarkSequence(hexSequence(token, 1, true), ++length, getNextToken);
  2246. }
  2247. return 0;
  2248. };
  2249. var isIdentifierStart$2 = tokenizer.isIdentifierStart;
  2250. var isHexDigit$3 = tokenizer.isHexDigit;
  2251. var isDigit$3 = tokenizer.isDigit;
  2252. var cmpStr$3 = tokenizer.cmpStr;
  2253. var consumeNumber$2 = tokenizer.consumeNumber;
  2254. var TYPE$5 = tokenizer.TYPE;
  2255. var cssWideKeywords = ['unset', 'initial', 'inherit'];
  2256. var calcFunctionNames = ['calc(', '-moz-calc(', '-webkit-calc('];
  2257. // https://www.w3.org/TR/css-values-3/#lengths
  2258. var LENGTH = {
  2259. // absolute length units
  2260. 'px': true,
  2261. 'mm': true,
  2262. 'cm': true,
  2263. 'in': true,
  2264. 'pt': true,
  2265. 'pc': true,
  2266. 'q': true,
  2267. // relative length units
  2268. 'em': true,
  2269. 'ex': true,
  2270. 'ch': true,
  2271. 'rem': true,
  2272. // viewport-percentage lengths
  2273. 'vh': true,
  2274. 'vw': true,
  2275. 'vmin': true,
  2276. 'vmax': true,
  2277. 'vm': true
  2278. };
  2279. var ANGLE = {
  2280. 'deg': true,
  2281. 'grad': true,
  2282. 'rad': true,
  2283. 'turn': true
  2284. };
  2285. var TIME = {
  2286. 's': true,
  2287. 'ms': true
  2288. };
  2289. var FREQUENCY = {
  2290. 'hz': true,
  2291. 'khz': true
  2292. };
  2293. // https://www.w3.org/TR/css-values-3/#resolution (https://drafts.csswg.org/css-values/#resolution)
  2294. var RESOLUTION = {
  2295. 'dpi': true,
  2296. 'dpcm': true,
  2297. 'dppx': true,
  2298. 'x': true // https://github.com/w3c/csswg-drafts/issues/461
  2299. };
  2300. // https://drafts.csswg.org/css-grid/#fr-unit
  2301. var FLEX = {
  2302. 'fr': true
  2303. };
  2304. // https://www.w3.org/TR/css3-speech/#mixing-props-voice-volume
  2305. var DECIBEL = {
  2306. 'db': true
  2307. };
  2308. // https://www.w3.org/TR/css3-speech/#voice-props-voice-pitch
  2309. var SEMITONES = {
  2310. 'st': true
  2311. };
  2312. // safe char code getter
  2313. function charCode(str, index) {
  2314. return index < str.length ? str.charCodeAt(index) : 0;
  2315. }
  2316. function eqStr(actual, expected) {
  2317. return cmpStr$3(actual, 0, actual.length, expected);
  2318. }
  2319. function eqStrAny(actual, expected) {
  2320. for (var i = 0; i < expected.length; i++) {
  2321. if (eqStr(actual, expected[i])) {
  2322. return true;
  2323. }
  2324. }
  2325. return false;
  2326. }
  2327. // IE postfix hack, i.e. 123\0 or 123px\9
  2328. function isPostfixIeHack(str, offset) {
  2329. if (offset !== str.length - 2) {
  2330. return false;
  2331. }
  2332. return (
  2333. str.charCodeAt(offset) === 0x005C && // U+005C REVERSE SOLIDUS (\)
  2334. isDigit$3(str.charCodeAt(offset + 1))
  2335. );
  2336. }
  2337. function outOfRange(opts, value, numEnd) {
  2338. if (opts && opts.type === 'Range') {
  2339. var num = Number(
  2340. numEnd !== undefined && numEnd !== value.length
  2341. ? value.substr(0, numEnd)
  2342. : value
  2343. );
  2344. if (isNaN(num)) {
  2345. return true;
  2346. }
  2347. if (opts.min !== null && num < opts.min) {
  2348. return true;
  2349. }
  2350. if (opts.max !== null && num > opts.max) {
  2351. return true;
  2352. }
  2353. }
  2354. return false;
  2355. }
  2356. function consumeFunction(token, getNextToken) {
  2357. var startIdx = token.index;
  2358. var length = 0;
  2359. // balanced token consuming
  2360. do {
  2361. length++;
  2362. if (token.balance <= startIdx) {
  2363. break;
  2364. }
  2365. } while (token = getNextToken(length));
  2366. return length;
  2367. }
  2368. // TODO: implement
  2369. // can be used wherever <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> values are allowed
  2370. // https://drafts.csswg.org/css-values/#calc-notation
  2371. function calc(next) {
  2372. return function(token, getNextToken, opts) {
  2373. if (token === null) {
  2374. return 0;
  2375. }
  2376. if (token.type === TYPE$5.Function && eqStrAny(token.value, calcFunctionNames)) {
  2377. return consumeFunction(token, getNextToken);
  2378. }
  2379. return next(token, getNextToken, opts);
  2380. };
  2381. }
  2382. function tokenType(expectedTokenType) {
  2383. return function(token) {
  2384. if (token === null || token.type !== expectedTokenType) {
  2385. return 0;
  2386. }
  2387. return 1;
  2388. };
  2389. }
  2390. function func(name) {
  2391. name = name + '(';
  2392. return function(token, getNextToken) {
  2393. if (token !== null && eqStr(token.value, name)) {
  2394. return consumeFunction(token, getNextToken);
  2395. }
  2396. return 0;
  2397. };
  2398. }
  2399. // =========================
  2400. // Complex types
  2401. //
  2402. // https://drafts.csswg.org/css-values-4/#custom-idents
  2403. // 4.2. Author-defined Identifiers: the <custom-ident> type
  2404. // Some properties accept arbitrary author-defined identifiers as a component value.
  2405. // This generic data type is denoted by <custom-ident>, and represents any valid CSS identifier
  2406. // that would not be misinterpreted as a pre-defined keyword in that property’s value definition.
  2407. //
  2408. // See also: https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident
  2409. function customIdent(token) {
  2410. if (token === null || token.type !== TYPE$5.Ident) {
  2411. return 0;
  2412. }
  2413. var name = token.value.toLowerCase();
  2414. // The CSS-wide keywords are not valid <custom-ident>s
  2415. if (eqStrAny(name, cssWideKeywords)) {
  2416. return 0;
  2417. }
  2418. // The default keyword is reserved and is also not a valid <custom-ident>
  2419. if (eqStr(name, 'default')) {
  2420. return 0;
  2421. }
  2422. // TODO: ignore property specific keywords (as described https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident)
  2423. // Specifications using <custom-ident> must specify clearly what other keywords
  2424. // are excluded from <custom-ident>, if any—for example by saying that any pre-defined keywords
  2425. // in that property’s value definition are excluded. Excluded keywords are excluded
  2426. // in all ASCII case permutations.
  2427. return 1;
  2428. }
  2429. // https://drafts.csswg.org/css-variables/#typedef-custom-property-name
  2430. // A custom property is any property whose name starts with two dashes (U+002D HYPHEN-MINUS), like --foo.
  2431. // The <custom-property-name> production corresponds to this: it’s defined as any valid identifier
  2432. // that starts with two dashes, except -- itself, which is reserved for future use by CSS.
  2433. // NOTE: Current implementation treat `--` as a valid name since most (all?) major browsers treat it as valid.
  2434. function customPropertyName(token) {
  2435. // ... defined as any valid identifier
  2436. if (token === null || token.type !== TYPE$5.Ident) {
  2437. return 0;
  2438. }
  2439. // ... that starts with two dashes (U+002D HYPHEN-MINUS)
  2440. if (charCode(token.value, 0) !== 0x002D || charCode(token.value, 1) !== 0x002D) {
  2441. return 0;
  2442. }
  2443. return 1;
  2444. }
  2445. // https://drafts.csswg.org/css-color-4/#hex-notation
  2446. // The syntax of a <hex-color> is a <hash-token> token whose value consists of 3, 4, 6, or 8 hexadecimal digits.
  2447. // In other words, a hex color is written as a hash character, "#", followed by some number of digits 0-9 or
  2448. // letters a-f (the case of the letters doesn’t matter - #00ff00 is identical to #00FF00).
  2449. function hexColor(token) {
  2450. if (token === null || token.type !== TYPE$5.Hash) {
  2451. return 0;
  2452. }
  2453. var length = token.value.length;
  2454. // valid values (length): #rgb (4), #rgba (5), #rrggbb (7), #rrggbbaa (9)
  2455. if (length !== 4 && length !== 5 && length !== 7 && length !== 9) {
  2456. return 0;
  2457. }
  2458. for (var i = 1; i < length; i++) {
  2459. if (!isHexDigit$3(token.value.charCodeAt(i))) {
  2460. return 0;
  2461. }
  2462. }
  2463. return 1;
  2464. }
  2465. function idSelector(token) {
  2466. if (token === null || token.type !== TYPE$5.Hash) {
  2467. return 0;
  2468. }
  2469. if (!isIdentifierStart$2(charCode(token.value, 1), charCode(token.value, 2), charCode(token.value, 3))) {
  2470. return 0;
  2471. }
  2472. return 1;
  2473. }
  2474. // https://drafts.csswg.org/css-syntax/#any-value
  2475. // It represents the entirety of what a valid declaration can have as its value.
  2476. function declarationValue(token, getNextToken) {
  2477. if (!token) {
  2478. return 0;
  2479. }
  2480. var length = 0;
  2481. var level = 0;
  2482. var startIdx = token.index;
  2483. // The <declaration-value> production matches any sequence of one or more tokens,
  2484. // so long as the sequence ...
  2485. scan:
  2486. do {
  2487. switch (token.type) {
  2488. // ... does not contain <bad-string-token>, <bad-url-token>,
  2489. case TYPE$5.BadString:
  2490. case TYPE$5.BadUrl:
  2491. break scan;
  2492. // ... unmatched <)-token>, <]-token>, or <}-token>,
  2493. case TYPE$5.RightCurlyBracket:
  2494. case TYPE$5.RightParenthesis:
  2495. case TYPE$5.RightSquareBracket:
  2496. if (token.balance > token.index || token.balance < startIdx) {
  2497. break scan;
  2498. }
  2499. level--;
  2500. break;
  2501. // ... or top-level <semicolon-token> tokens
  2502. case TYPE$5.Semicolon:
  2503. if (level === 0) {
  2504. break scan;
  2505. }
  2506. break;
  2507. // ... or <delim-token> tokens with a value of "!"
  2508. case TYPE$5.Delim:
  2509. if (token.value === '!' && level === 0) {
  2510. break scan;
  2511. }
  2512. break;
  2513. case TYPE$5.Function:
  2514. case TYPE$5.LeftParenthesis:
  2515. case TYPE$5.LeftSquareBracket:
  2516. case TYPE$5.LeftCurlyBracket:
  2517. level++;
  2518. break;
  2519. }
  2520. length++;
  2521. // until balance closing
  2522. if (token.balance <= startIdx) {
  2523. break;
  2524. }
  2525. } while (token = getNextToken(length));
  2526. return length;
  2527. }
  2528. // https://drafts.csswg.org/css-syntax/#any-value
  2529. // The <any-value> production is identical to <declaration-value>, but also
  2530. // allows top-level <semicolon-token> tokens and <delim-token> tokens
  2531. // with a value of "!". It represents the entirety of what valid CSS can be in any context.
  2532. function anyValue(token, getNextToken) {
  2533. if (!token) {
  2534. return 0;
  2535. }
  2536. var startIdx = token.index;
  2537. var length = 0;
  2538. // The <any-value> production matches any sequence of one or more tokens,
  2539. // so long as the sequence ...
  2540. scan:
  2541. do {
  2542. switch (token.type) {
  2543. // ... does not contain <bad-string-token>, <bad-url-token>,
  2544. case TYPE$5.BadString:
  2545. case TYPE$5.BadUrl:
  2546. break scan;
  2547. // ... unmatched <)-token>, <]-token>, or <}-token>,
  2548. case TYPE$5.RightCurlyBracket:
  2549. case TYPE$5.RightParenthesis:
  2550. case TYPE$5.RightSquareBracket:
  2551. if (token.balance > token.index || token.balance < startIdx) {
  2552. break scan;
  2553. }
  2554. break;
  2555. }
  2556. length++;
  2557. // until balance closing
  2558. if (token.balance <= startIdx) {
  2559. break;
  2560. }
  2561. } while (token = getNextToken(length));
  2562. return length;
  2563. }
  2564. // =========================
  2565. // Dimensions
  2566. //
  2567. function dimension(type) {
  2568. return function(token, getNextToken, opts) {
  2569. if (token === null || token.type !== TYPE$5.Dimension) {
  2570. return 0;
  2571. }
  2572. var numberEnd = consumeNumber$2(token.value, 0);
  2573. // check unit
  2574. if (type !== null) {
  2575. // check for IE postfix hack, i.e. 123px\0 or 123px\9
  2576. var reverseSolidusOffset = token.value.indexOf('\\', numberEnd);
  2577. var unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token.value, reverseSolidusOffset)
  2578. ? token.value.substr(numberEnd)
  2579. : token.value.substring(numberEnd, reverseSolidusOffset);
  2580. if (type.hasOwnProperty(unit.toLowerCase()) === false) {
  2581. return 0;
  2582. }
  2583. }
  2584. // check range if specified
  2585. if (outOfRange(opts, token.value, numberEnd)) {
  2586. return 0;
  2587. }
  2588. return 1;
  2589. };
  2590. }
  2591. // =========================
  2592. // Percentage
  2593. //
  2594. // §5.5. Percentages: the <percentage> type
  2595. // https://drafts.csswg.org/css-values-4/#percentages
  2596. function percentage(token, getNextToken, opts) {
  2597. // ... corresponds to the <percentage-token> production
  2598. if (token === null || token.type !== TYPE$5.Percentage) {
  2599. return 0;
  2600. }
  2601. // check range if specified
  2602. if (outOfRange(opts, token.value, token.value.length - 1)) {
  2603. return 0;
  2604. }
  2605. return 1;
  2606. }
  2607. // =========================
  2608. // Numeric
  2609. //
  2610. // https://drafts.csswg.org/css-values-4/#numbers
  2611. // The value <zero> represents a literal number with the value 0. Expressions that merely
  2612. // evaluate to a <number> with the value 0 (for example, calc(0)) do not match <zero>;
  2613. // only literal <number-token>s do.
  2614. function zero(next) {
  2615. if (typeof next !== 'function') {
  2616. next = function() {
  2617. return 0;
  2618. };
  2619. }
  2620. return function(token, getNextToken, opts) {
  2621. if (token !== null && token.type === TYPE$5.Number) {
  2622. if (Number(token.value) === 0) {
  2623. return 1;
  2624. }
  2625. }
  2626. return next(token, getNextToken, opts);
  2627. };
  2628. }
  2629. // § 5.3. Real Numbers: the <number> type
  2630. // https://drafts.csswg.org/css-values-4/#numbers
  2631. // Number values are denoted by <number>, and represent real numbers, possibly with a fractional component.
  2632. // ... It corresponds to the <number-token> production
  2633. function number(token, getNextToken, opts) {
  2634. if (token === null) {
  2635. return 0;
  2636. }
  2637. var numberEnd = consumeNumber$2(token.value, 0);
  2638. var isNumber = numberEnd === token.value.length;
  2639. if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) {
  2640. return 0;
  2641. }
  2642. // check range if specified
  2643. if (outOfRange(opts, token.value, numberEnd)) {
  2644. return 0;
  2645. }
  2646. return 1;
  2647. }
  2648. // §5.2. Integers: the <integer> type
  2649. // https://drafts.csswg.org/css-values-4/#integers
  2650. function integer(token, getNextToken, opts) {
  2651. // ... corresponds to a subset of the <number-token> production
  2652. if (token === null || token.type !== TYPE$5.Number) {
  2653. return 0;
  2654. }
  2655. // The first digit of an integer may be immediately preceded by `-` or `+` to indicate the integer’s sign.
  2656. var i = token.value.charCodeAt(0) === 0x002B || // U+002B PLUS SIGN (+)
  2657. token.value.charCodeAt(0) === 0x002D ? 1 : 0; // U+002D HYPHEN-MINUS (-)
  2658. // When written literally, an integer is one or more decimal digits 0 through 9 ...
  2659. for (; i < token.value.length; i++) {
  2660. if (!isDigit$3(token.value.charCodeAt(i))) {
  2661. return 0;
  2662. }
  2663. }
  2664. // check range if specified
  2665. if (outOfRange(opts, token.value, i)) {
  2666. return 0;
  2667. }
  2668. return 1;
  2669. }
  2670. var generic = {
  2671. // token types
  2672. 'ident-token': tokenType(TYPE$5.Ident),
  2673. 'function-token': tokenType(TYPE$5.Function),
  2674. 'at-keyword-token': tokenType(TYPE$5.AtKeyword),
  2675. 'hash-token': tokenType(TYPE$5.Hash),
  2676. 'string-token': tokenType(TYPE$5.String),
  2677. 'bad-string-token': tokenType(TYPE$5.BadString),
  2678. 'url-token': tokenType(TYPE$5.Url),
  2679. 'bad-url-token': tokenType(TYPE$5.BadUrl),
  2680. 'delim-token': tokenType(TYPE$5.Delim),
  2681. 'number-token': tokenType(TYPE$5.Number),
  2682. 'percentage-token': tokenType(TYPE$5.Percentage),
  2683. 'dimension-token': tokenType(TYPE$5.Dimension),
  2684. 'whitespace-token': tokenType(TYPE$5.WhiteSpace),
  2685. 'CDO-token': tokenType(TYPE$5.CDO),
  2686. 'CDC-token': tokenType(TYPE$5.CDC),
  2687. 'colon-token': tokenType(TYPE$5.Colon),
  2688. 'semicolon-token': tokenType(TYPE$5.Semicolon),
  2689. 'comma-token': tokenType(TYPE$5.Comma),
  2690. '[-token': tokenType(TYPE$5.LeftSquareBracket),
  2691. ']-token': tokenType(TYPE$5.RightSquareBracket),
  2692. '(-token': tokenType(TYPE$5.LeftParenthesis),
  2693. ')-token': tokenType(TYPE$5.RightParenthesis),
  2694. '{-token': tokenType(TYPE$5.LeftCurlyBracket),
  2695. '}-token': tokenType(TYPE$5.RightCurlyBracket),
  2696. // token type aliases
  2697. 'string': tokenType(TYPE$5.String),
  2698. 'ident': tokenType(TYPE$5.Ident),
  2699. // complex types
  2700. 'custom-ident': customIdent,
  2701. 'custom-property-name': customPropertyName,
  2702. 'hex-color': hexColor,
  2703. 'id-selector': idSelector, // element( <id-selector> )
  2704. 'an-plus-b': genericAnPlusB,
  2705. 'urange': genericUrange,
  2706. 'declaration-value': declarationValue,
  2707. 'any-value': anyValue,
  2708. // dimensions
  2709. 'dimension': calc(dimension(null)),
  2710. 'angle': calc(dimension(ANGLE)),
  2711. 'decibel': calc(dimension(DECIBEL)),
  2712. 'frequency': calc(dimension(FREQUENCY)),
  2713. 'flex': calc(dimension(FLEX)),
  2714. 'length': calc(zero(dimension(LENGTH))),
  2715. 'resolution': calc(dimension(RESOLUTION)),
  2716. 'semitones': calc(dimension(SEMITONES)),
  2717. 'time': calc(dimension(TIME)),
  2718. // percentage
  2719. 'percentage': calc(percentage),
  2720. // numeric
  2721. 'zero': zero(),
  2722. 'number': calc(number),
  2723. 'integer': calc(integer),
  2724. // old IE stuff
  2725. '-ms-legacy-expression': func('expression')
  2726. };
  2727. var _SyntaxError$1 = function SyntaxError(message, input, offset) {
  2728. var error = createCustomError('SyntaxError', message);
  2729. error.input = input;
  2730. error.offset = offset;
  2731. error.rawMessage = message;
  2732. error.message = error.rawMessage + '\n' +
  2733. ' ' + error.input + '\n' +
  2734. '--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
  2735. return error;
  2736. };
  2737. var TAB = 9;
  2738. var N$1 = 10;
  2739. var F = 12;
  2740. var R = 13;
  2741. var SPACE = 32;
  2742. var Tokenizer = function(str) {
  2743. this.str = str;
  2744. this.pos = 0;
  2745. };
  2746. Tokenizer.prototype = {
  2747. charCodeAt: function(pos) {
  2748. return pos < this.str.length ? this.str.charCodeAt(pos) : 0;
  2749. },
  2750. charCode: function() {
  2751. return this.charCodeAt(this.pos);
  2752. },
  2753. nextCharCode: function() {
  2754. return this.charCodeAt(this.pos + 1);
  2755. },
  2756. nextNonWsCode: function(pos) {
  2757. return this.charCodeAt(this.findWsEnd(pos));
  2758. },
  2759. findWsEnd: function(pos) {
  2760. for (; pos < this.str.length; pos++) {
  2761. var code = this.str.charCodeAt(pos);
  2762. if (code !== R && code !== N$1 && code !== F && code !== SPACE && code !== TAB) {
  2763. break;
  2764. }
  2765. }
  2766. return pos;
  2767. },
  2768. substringToPos: function(end) {
  2769. return this.str.substring(this.pos, this.pos = end);
  2770. },
  2771. eat: function(code) {
  2772. if (this.charCode() !== code) {
  2773. this.error('Expect `' + String.fromCharCode(code) + '`');
  2774. }
  2775. this.pos++;
  2776. },
  2777. peek: function() {
  2778. return this.pos < this.str.length ? this.str.charAt(this.pos++) : '';
  2779. },
  2780. error: function(message) {
  2781. throw new _SyntaxError$1(message, this.str, this.pos);
  2782. }
  2783. };
  2784. var tokenizer$1 = Tokenizer;
  2785. var TAB$1 = 9;
  2786. var N$2 = 10;
  2787. var F$1 = 12;
  2788. var R$1 = 13;
  2789. var SPACE$1 = 32;
  2790. var EXCLAMATIONMARK = 33; // !
  2791. var NUMBERSIGN = 35; // #
  2792. var AMPERSAND = 38; // &
  2793. var APOSTROPHE = 39; // '
  2794. var LEFTPARENTHESIS = 40; // (
  2795. var RIGHTPARENTHESIS = 41; // )
  2796. var ASTERISK = 42; // *
  2797. var PLUSSIGN$2 = 43; // +
  2798. var COMMA = 44; // ,
  2799. var HYPERMINUS = 45; // -
  2800. var LESSTHANSIGN = 60; // <
  2801. var GREATERTHANSIGN = 62; // >
  2802. var QUESTIONMARK$1 = 63; // ?
  2803. var COMMERCIALAT = 64; // @
  2804. var LEFTSQUAREBRACKET = 91; // [
  2805. var RIGHTSQUAREBRACKET = 93; // ]
  2806. var LEFTCURLYBRACKET = 123; // {
  2807. var VERTICALLINE = 124; // |
  2808. var RIGHTCURLYBRACKET = 125; // }
  2809. var INFINITY = 8734; // ∞
  2810. var NAME_CHAR = createCharMap(function(ch) {
  2811. return /[a-zA-Z0-9\-]/.test(ch);
  2812. });
  2813. var COMBINATOR_PRECEDENCE = {
  2814. ' ': 1,
  2815. '&&': 2,
  2816. '||': 3,
  2817. '|': 4
  2818. };
  2819. function createCharMap(fn) {
  2820. var array = typeof Uint32Array === 'function' ? new Uint32Array(128) : new Array(128);
  2821. for (var i = 0; i < 128; i++) {
  2822. array[i] = fn(String.fromCharCode(i)) ? 1 : 0;
  2823. }
  2824. return array;
  2825. }
  2826. function scanSpaces(tokenizer) {
  2827. return tokenizer.substringToPos(
  2828. tokenizer.findWsEnd(tokenizer.pos)
  2829. );
  2830. }
  2831. function scanWord(tokenizer) {
  2832. var end = tokenizer.pos;
  2833. for (; end < tokenizer.str.length; end++) {
  2834. var code = tokenizer.str.charCodeAt(end);
  2835. if (code >= 128 || NAME_CHAR[code] === 0) {
  2836. break;
  2837. }
  2838. }
  2839. if (tokenizer.pos === end) {
  2840. tokenizer.error('Expect a keyword');
  2841. }
  2842. return tokenizer.substringToPos(end);
  2843. }
  2844. function scanNumber(tokenizer) {
  2845. var end = tokenizer.pos;
  2846. for (; end < tokenizer.str.length; end++) {
  2847. var code = tokenizer.str.charCodeAt(end);
  2848. if (code < 48 || code > 57) {
  2849. break;
  2850. }
  2851. }
  2852. if (tokenizer.pos === end) {
  2853. tokenizer.error('Expect a number');
  2854. }
  2855. return tokenizer.substringToPos(end);
  2856. }
  2857. function scanString(tokenizer) {
  2858. var end = tokenizer.str.indexOf('\'', tokenizer.pos + 1);
  2859. if (end === -1) {
  2860. tokenizer.pos = tokenizer.str.length;
  2861. tokenizer.error('Expect an apostrophe');
  2862. }
  2863. return tokenizer.substringToPos(end + 1);
  2864. }
  2865. function readMultiplierRange(tokenizer) {
  2866. var min = null;
  2867. var max = null;
  2868. tokenizer.eat(LEFTCURLYBRACKET);
  2869. min = scanNumber(tokenizer);
  2870. if (tokenizer.charCode() === COMMA) {
  2871. tokenizer.pos++;
  2872. if (tokenizer.charCode() !== RIGHTCURLYBRACKET) {
  2873. max = scanNumber(tokenizer);
  2874. }
  2875. } else {
  2876. max = min;
  2877. }
  2878. tokenizer.eat(RIGHTCURLYBRACKET);
  2879. return {
  2880. min: Number(min),
  2881. max: max ? Number(max) : 0
  2882. };
  2883. }
  2884. function readMultiplier(tokenizer) {
  2885. var range = null;
  2886. var comma = false;
  2887. switch (tokenizer.charCode()) {
  2888. case ASTERISK:
  2889. tokenizer.pos++;
  2890. range = {
  2891. min: 0,
  2892. max: 0
  2893. };
  2894. break;
  2895. case PLUSSIGN$2:
  2896. tokenizer.pos++;
  2897. range = {
  2898. min: 1,
  2899. max: 0
  2900. };
  2901. break;
  2902. case QUESTIONMARK$1:
  2903. tokenizer.pos++;
  2904. range = {
  2905. min: 0,
  2906. max: 1
  2907. };
  2908. break;
  2909. case NUMBERSIGN:
  2910. tokenizer.pos++;
  2911. comma = true;
  2912. if (tokenizer.charCode() === LEFTCURLYBRACKET) {
  2913. range = readMultiplierRange(tokenizer);
  2914. } else {
  2915. range = {
  2916. min: 1,
  2917. max: 0
  2918. };
  2919. }
  2920. break;
  2921. case LEFTCURLYBRACKET:
  2922. range = readMultiplierRange(tokenizer);
  2923. break;
  2924. default:
  2925. return null;
  2926. }
  2927. return {
  2928. type: 'Multiplier',
  2929. comma: comma,
  2930. min: range.min,
  2931. max: range.max,
  2932. term: null
  2933. };
  2934. }
  2935. function maybeMultiplied(tokenizer, node) {
  2936. var multiplier = readMultiplier(tokenizer);
  2937. if (multiplier !== null) {
  2938. multiplier.term = node;
  2939. return multiplier;
  2940. }
  2941. return node;
  2942. }
  2943. function maybeToken(tokenizer) {
  2944. var ch = tokenizer.peek();
  2945. if (ch === '') {
  2946. return null;
  2947. }
  2948. return {
  2949. type: 'Token',
  2950. value: ch
  2951. };
  2952. }
  2953. function readProperty(tokenizer) {
  2954. var name;
  2955. tokenizer.eat(LESSTHANSIGN);
  2956. tokenizer.eat(APOSTROPHE);
  2957. name = scanWord(tokenizer);
  2958. tokenizer.eat(APOSTROPHE);
  2959. tokenizer.eat(GREATERTHANSIGN);
  2960. return maybeMultiplied(tokenizer, {
  2961. type: 'Property',
  2962. name: name
  2963. });
  2964. }
  2965. // https://drafts.csswg.org/css-values-3/#numeric-ranges
  2966. // 4.1. Range Restrictions and Range Definition Notation
  2967. //
  2968. // Range restrictions can be annotated in the numeric type notation using CSS bracketed
  2969. // range notation—[min,max]—within the angle brackets, after the identifying keyword,
  2970. // indicating a closed range between (and including) min and max.
  2971. // For example, <integer [0, 10]> indicates an integer between 0 and 10, inclusive.
  2972. function readTypeRange(tokenizer) {
  2973. // use null for Infinity to make AST format JSON serializable/deserializable
  2974. var min = null; // -Infinity
  2975. var max = null; // Infinity
  2976. var sign = 1;
  2977. tokenizer.eat(LEFTSQUAREBRACKET);
  2978. if (tokenizer.charCode() === HYPERMINUS) {
  2979. tokenizer.peek();
  2980. sign = -1;
  2981. }
  2982. if (sign == -1 && tokenizer.charCode() === INFINITY) {
  2983. tokenizer.peek();
  2984. } else {
  2985. min = sign * Number(scanNumber(tokenizer));
  2986. }
  2987. scanSpaces(tokenizer);
  2988. tokenizer.eat(COMMA);
  2989. scanSpaces(tokenizer);
  2990. if (tokenizer.charCode() === INFINITY) {
  2991. tokenizer.peek();
  2992. } else {
  2993. sign = 1;
  2994. if (tokenizer.charCode() === HYPERMINUS) {
  2995. tokenizer.peek();
  2996. sign = -1;
  2997. }
  2998. max = sign * Number(scanNumber(tokenizer));
  2999. }
  3000. tokenizer.eat(RIGHTSQUAREBRACKET);
  3001. // If no range is indicated, either by using the bracketed range notation
  3002. // or in the property description, then [−∞,∞] is assumed.
  3003. if (min === null && max === null) {
  3004. return null;
  3005. }
  3006. return {
  3007. type: 'Range',
  3008. min: min,
  3009. max: max
  3010. };
  3011. }
  3012. function readType(tokenizer) {
  3013. var name;
  3014. var opts = null;
  3015. tokenizer.eat(LESSTHANSIGN);
  3016. name = scanWord(tokenizer);
  3017. if (tokenizer.charCode() === LEFTPARENTHESIS &&
  3018. tokenizer.nextCharCode() === RIGHTPARENTHESIS) {
  3019. tokenizer.pos += 2;
  3020. name += '()';
  3021. }
  3022. if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) {
  3023. scanSpaces(tokenizer);
  3024. opts = readTypeRange(tokenizer);
  3025. }
  3026. tokenizer.eat(GREATERTHANSIGN);
  3027. return maybeMultiplied(tokenizer, {
  3028. type: 'Type',
  3029. name: name,
  3030. opts: opts
  3031. });
  3032. }
  3033. function readKeywordOrFunction(tokenizer) {
  3034. var name;
  3035. name = scanWord(tokenizer);
  3036. if (tokenizer.charCode() === LEFTPARENTHESIS) {
  3037. tokenizer.pos++;
  3038. return {
  3039. type: 'Function',
  3040. name: name
  3041. };
  3042. }
  3043. return maybeMultiplied(tokenizer, {
  3044. type: 'Keyword',
  3045. name: name
  3046. });
  3047. }
  3048. function regroupTerms(terms, combinators) {
  3049. function createGroup(terms, combinator) {
  3050. return {
  3051. type: 'Group',
  3052. terms: terms,
  3053. combinator: combinator,
  3054. disallowEmpty: false,
  3055. explicit: false
  3056. };
  3057. }
  3058. combinators = Object.keys(combinators).sort(function(a, b) {
  3059. return COMBINATOR_PRECEDENCE[a] - COMBINATOR_PRECEDENCE[b];
  3060. });
  3061. while (combinators.length > 0) {
  3062. var combinator = combinators.shift();
  3063. for (var i = 0, subgroupStart = 0; i < terms.length; i++) {
  3064. var term = terms[i];
  3065. if (term.type === 'Combinator') {
  3066. if (term.value === combinator) {
  3067. if (subgroupStart === -1) {
  3068. subgroupStart = i - 1;
  3069. }
  3070. terms.splice(i, 1);
  3071. i--;
  3072. } else {
  3073. if (subgroupStart !== -1 && i - subgroupStart > 1) {
  3074. terms.splice(
  3075. subgroupStart,
  3076. i - subgroupStart,
  3077. createGroup(terms.slice(subgroupStart, i), combinator)
  3078. );
  3079. i = subgroupStart + 1;
  3080. }
  3081. subgroupStart = -1;
  3082. }
  3083. }
  3084. }
  3085. if (subgroupStart !== -1 && combinators.length) {
  3086. terms.splice(
  3087. subgroupStart,
  3088. i - subgroupStart,
  3089. createGroup(terms.slice(subgroupStart, i), combinator)
  3090. );
  3091. }
  3092. }
  3093. return combinator;
  3094. }
  3095. function readImplicitGroup(tokenizer) {
  3096. var terms = [];
  3097. var combinators = {};
  3098. var token;
  3099. var prevToken = null;
  3100. var prevTokenPos = tokenizer.pos;
  3101. while (token = peek(tokenizer)) {
  3102. if (token.type !== 'Spaces') {
  3103. if (token.type === 'Combinator') {
  3104. // check for combinator in group beginning and double combinator sequence
  3105. if (prevToken === null || prevToken.type === 'Combinator') {
  3106. tokenizer.pos = prevTokenPos;
  3107. tokenizer.error('Unexpected combinator');
  3108. }
  3109. combinators[token.value] = true;
  3110. } else if (prevToken !== null && prevToken.type !== 'Combinator') {
  3111. combinators[' '] = true; // a b
  3112. terms.push({
  3113. type: 'Combinator',
  3114. value: ' '
  3115. });
  3116. }
  3117. terms.push(token);
  3118. prevToken = token;
  3119. prevTokenPos = tokenizer.pos;
  3120. }
  3121. }
  3122. // check for combinator in group ending
  3123. if (prevToken !== null && prevToken.type === 'Combinator') {
  3124. tokenizer.pos -= prevTokenPos;
  3125. tokenizer.error('Unexpected combinator');
  3126. }
  3127. return {
  3128. type: 'Group',
  3129. terms: terms,
  3130. combinator: regroupTerms(terms, combinators) || ' ',
  3131. disallowEmpty: false,
  3132. explicit: false
  3133. };
  3134. }
  3135. function readGroup(tokenizer) {
  3136. var result;
  3137. tokenizer.eat(LEFTSQUAREBRACKET);
  3138. result = readImplicitGroup(tokenizer);
  3139. tokenizer.eat(RIGHTSQUAREBRACKET);
  3140. result.explicit = true;
  3141. if (tokenizer.charCode() === EXCLAMATIONMARK) {
  3142. tokenizer.pos++;
  3143. result.disallowEmpty = true;
  3144. }
  3145. return result;
  3146. }
  3147. function peek(tokenizer) {
  3148. var code = tokenizer.charCode();
  3149. if (code < 128 && NAME_CHAR[code] === 1) {
  3150. return readKeywordOrFunction(tokenizer);
  3151. }
  3152. switch (code) {
  3153. case RIGHTSQUAREBRACKET:
  3154. // don't eat, stop scan a group
  3155. break;
  3156. case LEFTSQUAREBRACKET:
  3157. return maybeMultiplied(tokenizer, readGroup(tokenizer));
  3158. case LESSTHANSIGN:
  3159. return tokenizer.nextCharCode() === APOSTROPHE
  3160. ? readProperty(tokenizer)
  3161. : readType(tokenizer);
  3162. case VERTICALLINE:
  3163. return {
  3164. type: 'Combinator',
  3165. value: tokenizer.substringToPos(
  3166. tokenizer.nextCharCode() === VERTICALLINE
  3167. ? tokenizer.pos + 2
  3168. : tokenizer.pos + 1
  3169. )
  3170. };
  3171. case AMPERSAND:
  3172. tokenizer.pos++;
  3173. tokenizer.eat(AMPERSAND);
  3174. return {
  3175. type: 'Combinator',
  3176. value: '&&'
  3177. };
  3178. case COMMA:
  3179. tokenizer.pos++;
  3180. return {
  3181. type: 'Comma'
  3182. };
  3183. case APOSTROPHE:
  3184. return maybeMultiplied(tokenizer, {
  3185. type: 'String',
  3186. value: scanString(tokenizer)
  3187. });
  3188. case SPACE$1:
  3189. case TAB$1:
  3190. case N$2:
  3191. case R$1:
  3192. case F$1:
  3193. return {
  3194. type: 'Spaces',
  3195. value: scanSpaces(tokenizer)
  3196. };
  3197. case COMMERCIALAT:
  3198. code = tokenizer.nextCharCode();
  3199. if (code < 128 && NAME_CHAR[code] === 1) {
  3200. tokenizer.pos++;
  3201. return {
  3202. type: 'AtKeyword',
  3203. name: scanWord(tokenizer)
  3204. };
  3205. }
  3206. return maybeToken(tokenizer);
  3207. case ASTERISK:
  3208. case PLUSSIGN$2:
  3209. case QUESTIONMARK$1:
  3210. case NUMBERSIGN:
  3211. case EXCLAMATIONMARK:
  3212. // prohibited tokens (used as a multiplier start)
  3213. break;
  3214. case LEFTCURLYBRACKET:
  3215. // LEFTCURLYBRACKET is allowed since mdn/data uses it w/o quoting
  3216. // check next char isn't a number, because it's likely a disjoined multiplier
  3217. code = tokenizer.nextCharCode();
  3218. if (code < 48 || code > 57) {
  3219. return maybeToken(tokenizer);
  3220. }
  3221. break;
  3222. default:
  3223. return maybeToken(tokenizer);
  3224. }
  3225. }
  3226. function parse(source) {
  3227. var tokenizer = new tokenizer$1(source);
  3228. var result = readImplicitGroup(tokenizer);
  3229. if (tokenizer.pos !== source.length) {
  3230. tokenizer.error('Unexpected input');
  3231. }
  3232. // reduce redundant groups with single group term
  3233. if (result.terms.length === 1 && result.terms[0].type === 'Group') {
  3234. result = result.terms[0];
  3235. }
  3236. return result;
  3237. }
  3238. // warm up parse to elimitate code branches that never execute
  3239. // fix soft deoptimizations (insufficient type feedback)
  3240. parse('[a&&<b>#|<\'c\'>*||e() f{2} /,(% g#{1,2} h{2,})]!');
  3241. var parse_1 = parse;
  3242. var noop$1 = function() {};
  3243. function ensureFunction(value) {
  3244. return typeof value === 'function' ? value : noop$1;
  3245. }
  3246. var walk = function(node, options, context) {
  3247. function walk(node) {
  3248. enter.call(context, node);
  3249. switch (node.type) {
  3250. case 'Group':
  3251. node.terms.forEach(walk);
  3252. break;
  3253. case 'Multiplier':
  3254. walk(node.term);
  3255. break;
  3256. case 'Type':
  3257. case 'Property':
  3258. case 'Keyword':
  3259. case 'AtKeyword':
  3260. case 'Function':
  3261. case 'String':
  3262. case 'Token':
  3263. case 'Comma':
  3264. break;
  3265. default:
  3266. throw new Error('Unknown type: ' + node.type);
  3267. }
  3268. leave.call(context, node);
  3269. }
  3270. var enter = noop$1;
  3271. var leave = noop$1;
  3272. if (typeof options === 'function') {
  3273. enter = options;
  3274. } else if (options) {
  3275. enter = ensureFunction(options.enter);
  3276. leave = ensureFunction(options.leave);
  3277. }
  3278. if (enter === noop$1 && leave === noop$1) {
  3279. throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
  3280. }
  3281. walk(node);
  3282. };
  3283. var tokenStream = new TokenStream_1();
  3284. var astToTokens = {
  3285. decorator: function(handlers) {
  3286. var curNode = null;
  3287. var prev = { len: 0, node: null };
  3288. var nodes = [prev];
  3289. var buffer = '';
  3290. return {
  3291. children: handlers.children,
  3292. node: function(node) {
  3293. var tmp = curNode;
  3294. curNode = node;
  3295. handlers.node.call(this, node);
  3296. curNode = tmp;
  3297. },
  3298. chunk: function(chunk) {
  3299. buffer += chunk;
  3300. if (prev.node !== curNode) {
  3301. nodes.push({
  3302. len: chunk.length,
  3303. node: curNode
  3304. });
  3305. } else {
  3306. prev.len += chunk.length;
  3307. }
  3308. },
  3309. result: function() {
  3310. return prepareTokens(buffer, nodes);
  3311. }
  3312. };
  3313. }
  3314. };
  3315. function prepareTokens(str, nodes) {
  3316. var tokens = [];
  3317. var nodesOffset = 0;
  3318. var nodesIndex = 0;
  3319. var currentNode = nodes ? nodes[nodesIndex].node : null;
  3320. tokenizer(str, tokenStream);
  3321. while (!tokenStream.eof) {
  3322. if (nodes) {
  3323. while (nodesIndex < nodes.length && nodesOffset + nodes[nodesIndex].len <= tokenStream.tokenStart) {
  3324. nodesOffset += nodes[nodesIndex++].len;
  3325. currentNode = nodes[nodesIndex].node;
  3326. }
  3327. }
  3328. tokens.push({
  3329. type: tokenStream.tokenType,
  3330. value: tokenStream.getTokenValue(),
  3331. index: tokenStream.tokenIndex, // TODO: remove it, temporary solution
  3332. balance: tokenStream.balance[tokenStream.tokenIndex], // TODO: remove it, temporary solution
  3333. node: currentNode
  3334. });
  3335. tokenStream.next();
  3336. // console.log({ ...tokens[tokens.length - 1], node: undefined });
  3337. }
  3338. return tokens;
  3339. }
  3340. var prepareTokens_1 = function(value, syntax) {
  3341. if (typeof value === 'string') {
  3342. return prepareTokens(value, null);
  3343. }
  3344. return syntax.generate(value, astToTokens);
  3345. };
  3346. var MATCH = { type: 'Match' };
  3347. var MISMATCH = { type: 'Mismatch' };
  3348. var DISALLOW_EMPTY = { type: 'DisallowEmpty' };
  3349. var LEFTPARENTHESIS$1 = 40; // (
  3350. var RIGHTPARENTHESIS$1 = 41; // )
  3351. function createCondition(match, thenBranch, elseBranch) {
  3352. // reduce node count
  3353. if (thenBranch === MATCH && elseBranch === MISMATCH) {
  3354. return match;
  3355. }
  3356. if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) {
  3357. return match;
  3358. }
  3359. if (match.type === 'If' && match.else === MISMATCH && thenBranch === MATCH) {
  3360. thenBranch = match.then;
  3361. match = match.match;
  3362. }
  3363. return {
  3364. type: 'If',
  3365. match: match,
  3366. then: thenBranch,
  3367. else: elseBranch
  3368. };
  3369. }
  3370. function isFunctionType(name) {
  3371. return (
  3372. name.length > 2 &&
  3373. name.charCodeAt(name.length - 2) === LEFTPARENTHESIS$1 &&
  3374. name.charCodeAt(name.length - 1) === RIGHTPARENTHESIS$1
  3375. );
  3376. }
  3377. function isEnumCapatible(term) {
  3378. return (
  3379. term.type === 'Keyword' ||
  3380. term.type === 'AtKeyword' ||
  3381. term.type === 'Function' ||
  3382. term.type === 'Type' && isFunctionType(term.name)
  3383. );
  3384. }
  3385. function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) {
  3386. switch (combinator) {
  3387. case ' ':
  3388. // Juxtaposing components means that all of them must occur, in the given order.
  3389. //
  3390. // a b c
  3391. // =
  3392. // match a
  3393. // then match b
  3394. // then match c
  3395. // then MATCH
  3396. // else MISMATCH
  3397. // else MISMATCH
  3398. // else MISMATCH
  3399. var result = MATCH;
  3400. for (var i = terms.length - 1; i >= 0; i--) {
  3401. var term = terms[i];
  3402. result = createCondition(
  3403. term,
  3404. result,
  3405. MISMATCH
  3406. );
  3407. }
  3408. return result;
  3409. case '|':
  3410. // A bar (|) separates two or more alternatives: exactly one of them must occur.
  3411. //
  3412. // a | b | c
  3413. // =
  3414. // match a
  3415. // then MATCH
  3416. // else match b
  3417. // then MATCH
  3418. // else match c
  3419. // then MATCH
  3420. // else MISMATCH
  3421. var result = MISMATCH;
  3422. var map = null;
  3423. for (var i = terms.length - 1; i >= 0; i--) {
  3424. var term = terms[i];
  3425. // reduce sequence of keywords into a Enum
  3426. if (isEnumCapatible(term)) {
  3427. if (map === null && i > 0 && isEnumCapatible(terms[i - 1])) {
  3428. map = Object.create(null);
  3429. result = createCondition(
  3430. {
  3431. type: 'Enum',
  3432. map: map
  3433. },
  3434. MATCH,
  3435. result
  3436. );
  3437. }
  3438. if (map !== null) {
  3439. var key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase();
  3440. if (key in map === false) {
  3441. map[key] = term;
  3442. continue;
  3443. }
  3444. }
  3445. }
  3446. map = null;
  3447. // create a new conditonal node
  3448. result = createCondition(
  3449. term,
  3450. MATCH,
  3451. result
  3452. );
  3453. }
  3454. return result;
  3455. case '&&':
  3456. // A double ampersand (&&) separates two or more components,
  3457. // all of which must occur, in any order.
  3458. // Use MatchOnce for groups with a large number of terms,
  3459. // since &&-groups produces at least N!-node trees
  3460. if (terms.length > 5) {
  3461. return {
  3462. type: 'MatchOnce',
  3463. terms: terms,
  3464. all: true
  3465. };
  3466. }
  3467. // Use a combination tree for groups with small number of terms
  3468. //
  3469. // a && b && c
  3470. // =
  3471. // match a
  3472. // then [b && c]
  3473. // else match b
  3474. // then [a && c]
  3475. // else match c
  3476. // then [a && b]
  3477. // else MISMATCH
  3478. //
  3479. // a && b
  3480. // =
  3481. // match a
  3482. // then match b
  3483. // then MATCH
  3484. // else MISMATCH
  3485. // else match b
  3486. // then match a
  3487. // then MATCH
  3488. // else MISMATCH
  3489. // else MISMATCH
  3490. var result = MISMATCH;
  3491. for (var i = terms.length - 1; i >= 0; i--) {
  3492. var term = terms[i];
  3493. var thenClause;
  3494. if (terms.length > 1) {
  3495. thenClause = buildGroupMatchGraph(
  3496. combinator,
  3497. terms.filter(function(newGroupTerm) {
  3498. return newGroupTerm !== term;
  3499. }),
  3500. false
  3501. );
  3502. } else {
  3503. thenClause = MATCH;
  3504. }
  3505. result = createCondition(
  3506. term,
  3507. thenClause,
  3508. result
  3509. );
  3510. }
  3511. return result;
  3512. case '||':
  3513. // A double bar (||) separates two or more options:
  3514. // one or more of them must occur, in any order.
  3515. // Use MatchOnce for groups with a large number of terms,
  3516. // since ||-groups produces at least N!-node trees
  3517. if (terms.length > 5) {
  3518. return {
  3519. type: 'MatchOnce',
  3520. terms: terms,
  3521. all: false
  3522. };
  3523. }
  3524. // Use a combination tree for groups with small number of terms
  3525. //
  3526. // a || b || c
  3527. // =
  3528. // match a
  3529. // then [b || c]
  3530. // else match b
  3531. // then [a || c]
  3532. // else match c
  3533. // then [a || b]
  3534. // else MISMATCH
  3535. //
  3536. // a || b
  3537. // =
  3538. // match a
  3539. // then match b
  3540. // then MATCH
  3541. // else MATCH
  3542. // else match b
  3543. // then match a
  3544. // then MATCH
  3545. // else MATCH
  3546. // else MISMATCH
  3547. var result = atLeastOneTermMatched ? MATCH : MISMATCH;
  3548. for (var i = terms.length - 1; i >= 0; i--) {
  3549. var term = terms[i];
  3550. var thenClause;
  3551. if (terms.length > 1) {
  3552. thenClause = buildGroupMatchGraph(
  3553. combinator,
  3554. terms.filter(function(newGroupTerm) {
  3555. return newGroupTerm !== term;
  3556. }),
  3557. true
  3558. );
  3559. } else {
  3560. thenClause = MATCH;
  3561. }
  3562. result = createCondition(
  3563. term,
  3564. thenClause,
  3565. result
  3566. );
  3567. }
  3568. return result;
  3569. }
  3570. }
  3571. function buildMultiplierMatchGraph(node) {
  3572. var result = MATCH;
  3573. var matchTerm = buildMatchGraph(node.term);
  3574. if (node.max === 0) {
  3575. // disable repeating of empty match to prevent infinite loop
  3576. matchTerm = createCondition(
  3577. matchTerm,
  3578. DISALLOW_EMPTY,
  3579. MISMATCH
  3580. );
  3581. // an occurrence count is not limited, make a cycle;
  3582. // to collect more terms on each following matching mismatch
  3583. result = createCondition(
  3584. matchTerm,
  3585. null, // will be a loop
  3586. MISMATCH
  3587. );
  3588. result.then = createCondition(
  3589. MATCH,
  3590. MATCH,
  3591. result // make a loop
  3592. );
  3593. if (node.comma) {
  3594. result.then.else = createCondition(
  3595. { type: 'Comma', syntax: node },
  3596. result,
  3597. MISMATCH
  3598. );
  3599. }
  3600. } else {
  3601. // create a match node chain for [min .. max] interval with optional matches
  3602. for (var i = node.min || 1; i <= node.max; i++) {
  3603. if (node.comma && result !== MATCH) {
  3604. result = createCondition(
  3605. { type: 'Comma', syntax: node },
  3606. result,
  3607. MISMATCH
  3608. );
  3609. }
  3610. result = createCondition(
  3611. matchTerm,
  3612. createCondition(
  3613. MATCH,
  3614. MATCH,
  3615. result
  3616. ),
  3617. MISMATCH
  3618. );
  3619. }
  3620. }
  3621. if (node.min === 0) {
  3622. // allow zero match
  3623. result = createCondition(
  3624. MATCH,
  3625. MATCH,
  3626. result
  3627. );
  3628. } else {
  3629. // create a match node chain to collect [0 ... min - 1] required matches
  3630. for (var i = 0; i < node.min - 1; i++) {
  3631. if (node.comma && result !== MATCH) {
  3632. result = createCondition(
  3633. { type: 'Comma', syntax: node },
  3634. result,
  3635. MISMATCH
  3636. );
  3637. }
  3638. result = createCondition(
  3639. matchTerm,
  3640. result,
  3641. MISMATCH
  3642. );
  3643. }
  3644. }
  3645. return result;
  3646. }
  3647. function buildMatchGraph(node) {
  3648. if (typeof node === 'function') {
  3649. return {
  3650. type: 'Generic',
  3651. fn: node
  3652. };
  3653. }
  3654. switch (node.type) {
  3655. case 'Group':
  3656. var result = buildGroupMatchGraph(
  3657. node.combinator,
  3658. node.terms.map(buildMatchGraph),
  3659. false
  3660. );
  3661. if (node.disallowEmpty) {
  3662. result = createCondition(
  3663. result,
  3664. DISALLOW_EMPTY,
  3665. MISMATCH
  3666. );
  3667. }
  3668. return result;
  3669. case 'Multiplier':
  3670. return buildMultiplierMatchGraph(node);
  3671. case 'Type':
  3672. case 'Property':
  3673. return {
  3674. type: node.type,
  3675. name: node.name,
  3676. syntax: node
  3677. };
  3678. case 'Keyword':
  3679. return {
  3680. type: node.type,
  3681. name: node.name.toLowerCase(),
  3682. syntax: node
  3683. };
  3684. case 'AtKeyword':
  3685. return {
  3686. type: node.type,
  3687. name: '@' + node.name.toLowerCase(),
  3688. syntax: node
  3689. };
  3690. case 'Function':
  3691. return {
  3692. type: node.type,
  3693. name: node.name.toLowerCase() + '(',
  3694. syntax: node
  3695. };
  3696. case 'String':
  3697. // convert a one char length String to a Token
  3698. if (node.value.length === 3) {
  3699. return {
  3700. type: 'Token',
  3701. value: node.value.charAt(1),
  3702. syntax: node
  3703. };
  3704. }
  3705. // otherwise use it as is
  3706. return {
  3707. type: node.type,
  3708. value: node.value.substr(1, node.value.length - 2).replace(/\\'/g, '\''),
  3709. syntax: node
  3710. };
  3711. case 'Token':
  3712. return {
  3713. type: node.type,
  3714. value: node.value,
  3715. syntax: node
  3716. };
  3717. case 'Comma':
  3718. return {
  3719. type: node.type,
  3720. syntax: node
  3721. };
  3722. default:
  3723. throw new Error('Unknown node type:', node.type);
  3724. }
  3725. }
  3726. var matchGraph = {
  3727. MATCH: MATCH,
  3728. MISMATCH: MISMATCH,
  3729. DISALLOW_EMPTY: DISALLOW_EMPTY,
  3730. buildMatchGraph: function(syntaxTree, ref) {
  3731. if (typeof syntaxTree === 'string') {
  3732. syntaxTree = parse_1(syntaxTree);
  3733. }
  3734. return {
  3735. type: 'MatchGraph',
  3736. match: buildMatchGraph(syntaxTree),
  3737. syntax: ref || null,
  3738. source: syntaxTree
  3739. };
  3740. }
  3741. };
  3742. var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
  3743. var MATCH$1 = matchGraph.MATCH;
  3744. var MISMATCH$1 = matchGraph.MISMATCH;
  3745. var DISALLOW_EMPTY$1 = matchGraph.DISALLOW_EMPTY;
  3746. var TYPE$6 = _const.TYPE;
  3747. var STUB = 0;
  3748. var TOKEN = 1;
  3749. var OPEN_SYNTAX = 2;
  3750. var CLOSE_SYNTAX = 3;
  3751. var EXIT_REASON_MATCH = 'Match';
  3752. var EXIT_REASON_MISMATCH = 'Mismatch';
  3753. var EXIT_REASON_ITERATION_LIMIT = 'Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)';
  3754. var ITERATION_LIMIT = 15000;
  3755. var totalIterationCount = 0;
  3756. function reverseList(list) {
  3757. var prev = null;
  3758. var next = null;
  3759. var item = list;
  3760. while (item !== null) {
  3761. next = item.prev;
  3762. item.prev = prev;
  3763. prev = item;
  3764. item = next;
  3765. }
  3766. return prev;
  3767. }
  3768. function areStringsEqualCaseInsensitive(testStr, referenceStr) {
  3769. if (testStr.length !== referenceStr.length) {
  3770. return false;
  3771. }
  3772. for (var i = 0; i < testStr.length; i++) {
  3773. var testCode = testStr.charCodeAt(i);
  3774. var referenceCode = referenceStr.charCodeAt(i);
  3775. // testCode.toLowerCase() for U+0041 LATIN CAPITAL LETTER A (A) .. U+005A LATIN CAPITAL LETTER Z (Z).
  3776. if (testCode >= 0x0041 && testCode <= 0x005A) {
  3777. testCode = testCode | 32;
  3778. }
  3779. if (testCode !== referenceCode) {
  3780. return false;
  3781. }
  3782. }
  3783. return true;
  3784. }
  3785. function isContextEdgeDelim(token) {
  3786. if (token.type !== TYPE$6.Delim) {
  3787. return false;
  3788. }
  3789. // Fix matching for unicode-range: U+30??, U+FF00-FF9F
  3790. // Probably we need to check out previous match instead
  3791. return token.value !== '?';
  3792. }
  3793. function isCommaContextStart(token) {
  3794. if (token === null) {
  3795. return true;
  3796. }
  3797. return (
  3798. token.type === TYPE$6.Comma ||
  3799. token.type === TYPE$6.Function ||
  3800. token.type === TYPE$6.LeftParenthesis ||
  3801. token.type === TYPE$6.LeftSquareBracket ||
  3802. token.type === TYPE$6.LeftCurlyBracket ||
  3803. isContextEdgeDelim(token)
  3804. );
  3805. }
  3806. function isCommaContextEnd(token) {
  3807. if (token === null) {
  3808. return true;
  3809. }
  3810. return (
  3811. token.type === TYPE$6.RightParenthesis ||
  3812. token.type === TYPE$6.RightSquareBracket ||
  3813. token.type === TYPE$6.RightCurlyBracket ||
  3814. token.type === TYPE$6.Delim
  3815. );
  3816. }
  3817. function internalMatch(tokens, state, syntaxes) {
  3818. function moveToNextToken() {
  3819. do {
  3820. tokenIndex++;
  3821. token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
  3822. } while (token !== null && (token.type === TYPE$6.WhiteSpace || token.type === TYPE$6.Comment));
  3823. }
  3824. function getNextToken(offset) {
  3825. var nextIndex = tokenIndex + offset;
  3826. return nextIndex < tokens.length ? tokens[nextIndex] : null;
  3827. }
  3828. function stateSnapshotFromSyntax(nextState, prev) {
  3829. return {
  3830. nextState: nextState,
  3831. matchStack: matchStack,
  3832. syntaxStack: syntaxStack,
  3833. thenStack: thenStack,
  3834. tokenIndex: tokenIndex,
  3835. prev: prev
  3836. };
  3837. }
  3838. function pushThenStack(nextState) {
  3839. thenStack = {
  3840. nextState: nextState,
  3841. matchStack: matchStack,
  3842. syntaxStack: syntaxStack,
  3843. prev: thenStack
  3844. };
  3845. }
  3846. function pushElseStack(nextState) {
  3847. elseStack = stateSnapshotFromSyntax(nextState, elseStack);
  3848. }
  3849. function addTokenToMatch() {
  3850. matchStack = {
  3851. type: TOKEN,
  3852. syntax: state.syntax,
  3853. token: token,
  3854. prev: matchStack
  3855. };
  3856. moveToNextToken();
  3857. syntaxStash = null;
  3858. if (tokenIndex > longestMatch) {
  3859. longestMatch = tokenIndex;
  3860. }
  3861. }
  3862. function openSyntax() {
  3863. syntaxStack = {
  3864. syntax: state.syntax,
  3865. opts: state.syntax.opts || (syntaxStack !== null && syntaxStack.opts) || null,
  3866. prev: syntaxStack
  3867. };
  3868. matchStack = {
  3869. type: OPEN_SYNTAX,
  3870. syntax: state.syntax,
  3871. token: matchStack.token,
  3872. prev: matchStack
  3873. };
  3874. }
  3875. function closeSyntax() {
  3876. if (matchStack.type === OPEN_SYNTAX) {
  3877. matchStack = matchStack.prev;
  3878. } else {
  3879. matchStack = {
  3880. type: CLOSE_SYNTAX,
  3881. syntax: syntaxStack.syntax,
  3882. token: matchStack.token,
  3883. prev: matchStack
  3884. };
  3885. }
  3886. syntaxStack = syntaxStack.prev;
  3887. }
  3888. var syntaxStack = null;
  3889. var thenStack = null;
  3890. var elseStack = null;
  3891. // null – stashing allowed, nothing stashed
  3892. // false – stashing disabled, nothing stashed
  3893. // anithing else – fail stashable syntaxes, some syntax stashed
  3894. var syntaxStash = null;
  3895. var iterationCount = 0; // count iterations and prevent infinite loop
  3896. var exitReason = null;
  3897. var token = null;
  3898. var tokenIndex = -1;
  3899. var longestMatch = 0;
  3900. var matchStack = {
  3901. type: STUB,
  3902. syntax: null,
  3903. token: null,
  3904. prev: null
  3905. };
  3906. moveToNextToken();
  3907. while (exitReason === null && ++iterationCount < ITERATION_LIMIT) {
  3908. // function mapList(list, fn) {
  3909. // var result = [];
  3910. // while (list) {
  3911. // result.unshift(fn(list));
  3912. // list = list.prev;
  3913. // }
  3914. // return result;
  3915. // }
  3916. // console.log('--\n',
  3917. // '#' + iterationCount,
  3918. // require('util').inspect({
  3919. // match: mapList(matchStack, x => x.type === TOKEN ? x.token && x.token.value : x.syntax ? ({ [OPEN_SYNTAX]: '<', [CLOSE_SYNTAX]: '</' }[x.type] || x.type) + '!' + x.syntax.name : null),
  3920. // token: token && token.value,
  3921. // tokenIndex,
  3922. // syntax: syntax.type + (syntax.id ? ' #' + syntax.id : '')
  3923. // }, { depth: null })
  3924. // );
  3925. switch (state.type) {
  3926. case 'Match':
  3927. if (thenStack === null) {
  3928. // turn to MISMATCH when some tokens left unmatched
  3929. if (token !== null) {
  3930. // doesn't mismatch if just one token left and it's an IE hack
  3931. if (tokenIndex !== tokens.length - 1 || (token.value !== '\\0' && token.value !== '\\9')) {
  3932. state = MISMATCH$1;
  3933. break;
  3934. }
  3935. }
  3936. // break the main loop, return a result - MATCH
  3937. exitReason = EXIT_REASON_MATCH;
  3938. break;
  3939. }
  3940. // go to next syntax (`then` branch)
  3941. state = thenStack.nextState;
  3942. // check match is not empty
  3943. if (state === DISALLOW_EMPTY$1) {
  3944. if (thenStack.matchStack === matchStack) {
  3945. state = MISMATCH$1;
  3946. break;
  3947. } else {
  3948. state = MATCH$1;
  3949. }
  3950. }
  3951. // close syntax if needed
  3952. while (thenStack.syntaxStack !== syntaxStack) {
  3953. closeSyntax();
  3954. }
  3955. // pop stack
  3956. thenStack = thenStack.prev;
  3957. break;
  3958. case 'Mismatch':
  3959. // when some syntax is stashed
  3960. if (syntaxStash !== null && syntaxStash !== false) {
  3961. // there is no else branches or a branch reduce match stack
  3962. if (elseStack === null || tokenIndex > elseStack.tokenIndex) {
  3963. // restore state from the stash
  3964. elseStack = syntaxStash;
  3965. syntaxStash = false; // disable stashing
  3966. }
  3967. } else if (elseStack === null) {
  3968. // no else branches -> break the main loop
  3969. // return a result - MISMATCH
  3970. exitReason = EXIT_REASON_MISMATCH;
  3971. break;
  3972. }
  3973. // go to next syntax (`else` branch)
  3974. state = elseStack.nextState;
  3975. // restore all the rest stack states
  3976. thenStack = elseStack.thenStack;
  3977. syntaxStack = elseStack.syntaxStack;
  3978. matchStack = elseStack.matchStack;
  3979. tokenIndex = elseStack.tokenIndex;
  3980. token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
  3981. // pop stack
  3982. elseStack = elseStack.prev;
  3983. break;
  3984. case 'MatchGraph':
  3985. state = state.match;
  3986. break;
  3987. case 'If':
  3988. // IMPORTANT: else stack push must go first,
  3989. // since it stores the state of thenStack before changes
  3990. if (state.else !== MISMATCH$1) {
  3991. pushElseStack(state.else);
  3992. }
  3993. if (state.then !== MATCH$1) {
  3994. pushThenStack(state.then);
  3995. }
  3996. state = state.match;
  3997. break;
  3998. case 'MatchOnce':
  3999. state = {
  4000. type: 'MatchOnceBuffer',
  4001. syntax: state,
  4002. index: 0,
  4003. mask: 0
  4004. };
  4005. break;
  4006. case 'MatchOnceBuffer':
  4007. var terms = state.syntax.terms;
  4008. if (state.index === terms.length) {
  4009. // no matches at all or it's required all terms to be matched
  4010. if (state.mask === 0 || state.syntax.all) {
  4011. state = MISMATCH$1;
  4012. break;
  4013. }
  4014. // a partial match is ok
  4015. state = MATCH$1;
  4016. break;
  4017. }
  4018. // all terms are matched
  4019. if (state.mask === (1 << terms.length) - 1) {
  4020. state = MATCH$1;
  4021. break;
  4022. }
  4023. for (; state.index < terms.length; state.index++) {
  4024. var matchFlag = 1 << state.index;
  4025. if ((state.mask & matchFlag) === 0) {
  4026. // IMPORTANT: else stack push must go first,
  4027. // since it stores the state of thenStack before changes
  4028. pushElseStack(state);
  4029. pushThenStack({
  4030. type: 'AddMatchOnce',
  4031. syntax: state.syntax,
  4032. mask: state.mask | matchFlag
  4033. });
  4034. // match
  4035. state = terms[state.index++];
  4036. break;
  4037. }
  4038. }
  4039. break;
  4040. case 'AddMatchOnce':
  4041. state = {
  4042. type: 'MatchOnceBuffer',
  4043. syntax: state.syntax,
  4044. index: 0,
  4045. mask: state.mask
  4046. };
  4047. break;
  4048. case 'Enum':
  4049. if (token !== null) {
  4050. var name = token.value.toLowerCase();
  4051. // drop \0 and \9 hack from keyword name
  4052. if (name.indexOf('\\') !== -1) {
  4053. name = name.replace(/\\[09].*$/, '');
  4054. }
  4055. if (hasOwnProperty$1.call(state.map, name)) {
  4056. state = state.map[name];
  4057. break;
  4058. }
  4059. }
  4060. state = MISMATCH$1;
  4061. break;
  4062. case 'Generic':
  4063. var opts = syntaxStack !== null ? syntaxStack.opts : null;
  4064. var lastTokenIndex = tokenIndex + Math.floor(state.fn(token, getNextToken, opts));
  4065. if (!isNaN(lastTokenIndex) && lastTokenIndex > tokenIndex) {
  4066. while (tokenIndex < lastTokenIndex) {
  4067. addTokenToMatch();
  4068. }
  4069. state = MATCH$1;
  4070. } else {
  4071. state = MISMATCH$1;
  4072. }
  4073. break;
  4074. case 'Type':
  4075. case 'Property':
  4076. var syntaxDict = state.type === 'Type' ? 'types' : 'properties';
  4077. var dictSyntax = hasOwnProperty$1.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null;
  4078. if (!dictSyntax || !dictSyntax.match) {
  4079. throw new Error(
  4080. 'Bad syntax reference: ' +
  4081. (state.type === 'Type'
  4082. ? '<' + state.name + '>'
  4083. : '<\'' + state.name + '\'>')
  4084. );
  4085. }
  4086. // stash a syntax for types with low priority
  4087. if (syntaxStash !== false && token !== null && state.type === 'Type') {
  4088. var lowPriorityMatching =
  4089. // https://drafts.csswg.org/css-values-4/#custom-idents
  4090. // When parsing positionally-ambiguous keywords in a property value, a <custom-ident> production
  4091. // can only claim the keyword if no other unfulfilled production can claim it.
  4092. (state.name === 'custom-ident' && token.type === TYPE$6.Ident) ||
  4093. // https://drafts.csswg.org/css-values-4/#lengths
  4094. // ... if a `0` could be parsed as either a <number> or a <length> in a property (such as line-height),
  4095. // it must parse as a <number>
  4096. (state.name === 'length' && token.value === '0');
  4097. if (lowPriorityMatching) {
  4098. if (syntaxStash === null) {
  4099. syntaxStash = stateSnapshotFromSyntax(state, elseStack);
  4100. }
  4101. state = MISMATCH$1;
  4102. break;
  4103. }
  4104. }
  4105. openSyntax();
  4106. state = dictSyntax.match;
  4107. break;
  4108. case 'Keyword':
  4109. var name = state.name;
  4110. if (token !== null) {
  4111. var keywordName = token.value;
  4112. // drop \0 and \9 hack from keyword name
  4113. if (keywordName.indexOf('\\') !== -1) {
  4114. keywordName = keywordName.replace(/\\[09].*$/, '');
  4115. }
  4116. if (areStringsEqualCaseInsensitive(keywordName, name)) {
  4117. addTokenToMatch();
  4118. state = MATCH$1;
  4119. break;
  4120. }
  4121. }
  4122. state = MISMATCH$1;
  4123. break;
  4124. case 'AtKeyword':
  4125. case 'Function':
  4126. if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) {
  4127. addTokenToMatch();
  4128. state = MATCH$1;
  4129. break;
  4130. }
  4131. state = MISMATCH$1;
  4132. break;
  4133. case 'Token':
  4134. if (token !== null && token.value === state.value) {
  4135. addTokenToMatch();
  4136. state = MATCH$1;
  4137. break;
  4138. }
  4139. state = MISMATCH$1;
  4140. break;
  4141. case 'Comma':
  4142. if (token !== null && token.type === TYPE$6.Comma) {
  4143. if (isCommaContextStart(matchStack.token)) {
  4144. state = MISMATCH$1;
  4145. } else {
  4146. addTokenToMatch();
  4147. state = isCommaContextEnd(token) ? MISMATCH$1 : MATCH$1;
  4148. }
  4149. } else {
  4150. state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH$1 : MISMATCH$1;
  4151. }
  4152. break;
  4153. case 'String':
  4154. var string = '';
  4155. for (var lastTokenIndex = tokenIndex; lastTokenIndex < tokens.length && string.length < state.value.length; lastTokenIndex++) {
  4156. string += tokens[lastTokenIndex].value;
  4157. }
  4158. if (areStringsEqualCaseInsensitive(string, state.value)) {
  4159. while (tokenIndex < lastTokenIndex) {
  4160. addTokenToMatch();
  4161. }
  4162. state = MATCH$1;
  4163. } else {
  4164. state = MISMATCH$1;
  4165. }
  4166. break;
  4167. default:
  4168. throw new Error('Unknown node type: ' + state.type);
  4169. }
  4170. }
  4171. totalIterationCount += iterationCount;
  4172. switch (exitReason) {
  4173. case null:
  4174. console.warn('[csstree-match] BREAK after ' + ITERATION_LIMIT + ' iterations');
  4175. exitReason = EXIT_REASON_ITERATION_LIMIT;
  4176. matchStack = null;
  4177. break;
  4178. case EXIT_REASON_MATCH:
  4179. while (syntaxStack !== null) {
  4180. closeSyntax();
  4181. }
  4182. break;
  4183. default:
  4184. matchStack = null;
  4185. }
  4186. return {
  4187. tokens: tokens,
  4188. reason: exitReason,
  4189. iterations: iterationCount,
  4190. match: matchStack,
  4191. longestMatch: longestMatch
  4192. };
  4193. }
  4194. function matchAsList(tokens, matchGraph, syntaxes) {
  4195. var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
  4196. if (matchResult.match !== null) {
  4197. var item = reverseList(matchResult.match).prev;
  4198. matchResult.match = [];
  4199. while (item !== null) {
  4200. switch (item.type) {
  4201. case STUB:
  4202. break;
  4203. case OPEN_SYNTAX:
  4204. case CLOSE_SYNTAX:
  4205. matchResult.match.push({
  4206. type: item.type,
  4207. syntax: item.syntax
  4208. });
  4209. break;
  4210. default:
  4211. matchResult.match.push({
  4212. token: item.token.value,
  4213. node: item.token.node
  4214. });
  4215. break;
  4216. }
  4217. item = item.prev;
  4218. }
  4219. }
  4220. return matchResult;
  4221. }
  4222. function matchAsTree(tokens, matchGraph, syntaxes) {
  4223. var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
  4224. if (matchResult.match === null) {
  4225. return matchResult;
  4226. }
  4227. var item = matchResult.match;
  4228. var host = matchResult.match = {
  4229. syntax: matchGraph.syntax || null,
  4230. match: []
  4231. };
  4232. var hostStack = [host];
  4233. // revert a list and start with 2nd item since 1st is a stub item
  4234. item = reverseList(item).prev;
  4235. // build a tree
  4236. while (item !== null) {
  4237. switch (item.type) {
  4238. case OPEN_SYNTAX:
  4239. host.match.push(host = {
  4240. syntax: item.syntax,
  4241. match: []
  4242. });
  4243. hostStack.push(host);
  4244. break;
  4245. case CLOSE_SYNTAX:
  4246. hostStack.pop();
  4247. host = hostStack[hostStack.length - 1];
  4248. break;
  4249. default:
  4250. host.match.push({
  4251. syntax: item.syntax || null,
  4252. token: item.token.value,
  4253. node: item.token.node
  4254. });
  4255. }
  4256. item = item.prev;
  4257. }
  4258. return matchResult;
  4259. }
  4260. var match = {
  4261. matchAsList: matchAsList,
  4262. matchAsTree: matchAsTree,
  4263. getTotalIterationCount: function() {
  4264. return totalIterationCount;
  4265. }
  4266. };
  4267. function getTrace(node) {
  4268. function shouldPutToTrace(syntax) {
  4269. if (syntax === null) {
  4270. return false;
  4271. }
  4272. return (
  4273. syntax.type === 'Type' ||
  4274. syntax.type === 'Property' ||
  4275. syntax.type === 'Keyword'
  4276. );
  4277. }
  4278. function hasMatch(matchNode) {
  4279. if (Array.isArray(matchNode.match)) {
  4280. // use for-loop for better perfomance
  4281. for (var i = 0; i < matchNode.match.length; i++) {
  4282. if (hasMatch(matchNode.match[i])) {
  4283. if (shouldPutToTrace(matchNode.syntax)) {
  4284. result.unshift(matchNode.syntax);
  4285. }
  4286. return true;
  4287. }
  4288. }
  4289. } else if (matchNode.node === node) {
  4290. result = shouldPutToTrace(matchNode.syntax)
  4291. ? [matchNode.syntax]
  4292. : [];
  4293. return true;
  4294. }
  4295. return false;
  4296. }
  4297. var result = null;
  4298. if (this.matched !== null) {
  4299. hasMatch(this.matched);
  4300. }
  4301. return result;
  4302. }
  4303. function testNode(match, node, fn) {
  4304. var trace = getTrace.call(match, node);
  4305. if (trace === null) {
  4306. return false;
  4307. }
  4308. return trace.some(fn);
  4309. }
  4310. function isType(node, type) {
  4311. return testNode(this, node, function(matchNode) {
  4312. return matchNode.type === 'Type' && matchNode.name === type;
  4313. });
  4314. }
  4315. function isProperty(node, property) {
  4316. return testNode(this, node, function(matchNode) {
  4317. return matchNode.type === 'Property' && matchNode.name === property;
  4318. });
  4319. }
  4320. function isKeyword(node) {
  4321. return testNode(this, node, function(matchNode) {
  4322. return matchNode.type === 'Keyword';
  4323. });
  4324. }
  4325. var trace = {
  4326. getTrace: getTrace,
  4327. isType: isType,
  4328. isProperty: isProperty,
  4329. isKeyword: isKeyword
  4330. };
  4331. function getFirstMatchNode(matchNode) {
  4332. if ('node' in matchNode) {
  4333. return matchNode.node;
  4334. }
  4335. return getFirstMatchNode(matchNode.match[0]);
  4336. }
  4337. function getLastMatchNode(matchNode) {
  4338. if ('node' in matchNode) {
  4339. return matchNode.node;
  4340. }
  4341. return getLastMatchNode(matchNode.match[matchNode.match.length - 1]);
  4342. }
  4343. function matchFragments(lexer, ast, match, type, name) {
  4344. function findFragments(matchNode) {
  4345. if (matchNode.syntax !== null &&
  4346. matchNode.syntax.type === type &&
  4347. matchNode.syntax.name === name) {
  4348. var start = getFirstMatchNode(matchNode);
  4349. var end = getLastMatchNode(matchNode);
  4350. lexer.syntax.walk(ast, function(node, item, list) {
  4351. if (node === start) {
  4352. var nodes = new List_1();
  4353. do {
  4354. nodes.appendData(item.data);
  4355. if (item.data === end) {
  4356. break;
  4357. }
  4358. item = item.next;
  4359. } while (item !== null);
  4360. fragments.push({
  4361. parent: list,
  4362. nodes: nodes
  4363. });
  4364. }
  4365. });
  4366. }
  4367. if (Array.isArray(matchNode.match)) {
  4368. matchNode.match.forEach(findFragments);
  4369. }
  4370. }
  4371. var fragments = [];
  4372. if (match.matched !== null) {
  4373. findFragments(match.matched);
  4374. }
  4375. return fragments;
  4376. }
  4377. var search = {
  4378. matchFragments: matchFragments
  4379. };
  4380. var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
  4381. function isValidNumber(value) {
  4382. // Number.isInteger(value) && value >= 0
  4383. return (
  4384. typeof value === 'number' &&
  4385. isFinite(value) &&
  4386. Math.floor(value) === value &&
  4387. value >= 0
  4388. );
  4389. }
  4390. function isValidLocation(loc) {
  4391. return (
  4392. Boolean(loc) &&
  4393. isValidNumber(loc.offset) &&
  4394. isValidNumber(loc.line) &&
  4395. isValidNumber(loc.column)
  4396. );
  4397. }
  4398. function createNodeStructureChecker(type, fields) {
  4399. return function checkNode(node, warn) {
  4400. if (!node || node.constructor !== Object) {
  4401. return warn(node, 'Type of node should be an Object');
  4402. }
  4403. for (var key in node) {
  4404. var valid = true;
  4405. if (hasOwnProperty$2.call(node, key) === false) {
  4406. continue;
  4407. }
  4408. if (key === 'type') {
  4409. if (node.type !== type) {
  4410. warn(node, 'Wrong node type `' + node.type + '`, expected `' + type + '`');
  4411. }
  4412. } else if (key === 'loc') {
  4413. if (node.loc === null) {
  4414. continue;
  4415. } else if (node.loc && node.loc.constructor === Object) {
  4416. if (typeof node.loc.source !== 'string') {
  4417. key += '.source';
  4418. } else if (!isValidLocation(node.loc.start)) {
  4419. key += '.start';
  4420. } else if (!isValidLocation(node.loc.end)) {
  4421. key += '.end';
  4422. } else {
  4423. continue;
  4424. }
  4425. }
  4426. valid = false;
  4427. } else if (fields.hasOwnProperty(key)) {
  4428. for (var i = 0, valid = false; !valid && i < fields[key].length; i++) {
  4429. var fieldType = fields[key][i];
  4430. switch (fieldType) {
  4431. case String:
  4432. valid = typeof node[key] === 'string';
  4433. break;
  4434. case Boolean:
  4435. valid = typeof node[key] === 'boolean';
  4436. break;
  4437. case null:
  4438. valid = node[key] === null;
  4439. break;
  4440. default:
  4441. if (typeof fieldType === 'string') {
  4442. valid = node[key] && node[key].type === fieldType;
  4443. } else if (Array.isArray(fieldType)) {
  4444. valid = node[key] instanceof List_1;
  4445. }
  4446. }
  4447. }
  4448. } else {
  4449. warn(node, 'Unknown field `' + key + '` for ' + type + ' node type');
  4450. }
  4451. if (!valid) {
  4452. warn(node, 'Bad value for `' + type + '.' + key + '`');
  4453. }
  4454. }
  4455. for (var key in fields) {
  4456. if (hasOwnProperty$2.call(fields, key) &&
  4457. hasOwnProperty$2.call(node, key) === false) {
  4458. warn(node, 'Field `' + type + '.' + key + '` is missed');
  4459. }
  4460. }
  4461. };
  4462. }
  4463. function processStructure(name, nodeType) {
  4464. var structure = nodeType.structure;
  4465. var fields = {
  4466. type: String,
  4467. loc: true
  4468. };
  4469. var docs = {
  4470. type: '"' + name + '"'
  4471. };
  4472. for (var key in structure) {
  4473. if (hasOwnProperty$2.call(structure, key) === false) {
  4474. continue;
  4475. }
  4476. var docsTypes = [];
  4477. var fieldTypes = fields[key] = Array.isArray(structure[key])
  4478. ? structure[key].slice()
  4479. : [structure[key]];
  4480. for (var i = 0; i < fieldTypes.length; i++) {
  4481. var fieldType = fieldTypes[i];
  4482. if (fieldType === String || fieldType === Boolean) {
  4483. docsTypes.push(fieldType.name);
  4484. } else if (fieldType === null) {
  4485. docsTypes.push('null');
  4486. } else if (typeof fieldType === 'string') {
  4487. docsTypes.push('<' + fieldType + '>');
  4488. } else if (Array.isArray(fieldType)) {
  4489. docsTypes.push('List'); // TODO: use type enum
  4490. } else {
  4491. throw new Error('Wrong value `' + fieldType + '` in `' + name + '.' + key + '` structure definition');
  4492. }
  4493. }
  4494. docs[key] = docsTypes.join(' | ');
  4495. }
  4496. return {
  4497. docs: docs,
  4498. check: createNodeStructureChecker(name, fields)
  4499. };
  4500. }
  4501. var structure = {
  4502. getStructureFromConfig: function(config) {
  4503. var structure = {};
  4504. if (config.node) {
  4505. for (var name in config.node) {
  4506. if (hasOwnProperty$2.call(config.node, name)) {
  4507. var nodeType = config.node[name];
  4508. if (nodeType.structure) {
  4509. structure[name] = processStructure(name, nodeType);
  4510. } else {
  4511. throw new Error('Missed `structure` field in `' + name + '` node type definition');
  4512. }
  4513. }
  4514. }
  4515. }
  4516. return structure;
  4517. }
  4518. };
  4519. var SyntaxReferenceError$1 = error.SyntaxReferenceError;
  4520. var MatchError$1 = error.MatchError;
  4521. var buildMatchGraph$1 = matchGraph.buildMatchGraph;
  4522. var matchAsTree$1 = match.matchAsTree;
  4523. var getStructureFromConfig = structure.getStructureFromConfig;
  4524. var cssWideKeywords$1 = buildMatchGraph$1('inherit | initial | unset');
  4525. var cssWideKeywordsWithExpression = buildMatchGraph$1('inherit | initial | unset | <-ms-legacy-expression>');
  4526. function dumpMapSyntax(map, compact, syntaxAsAst) {
  4527. var result = {};
  4528. for (var name in map) {
  4529. if (map[name].syntax) {
  4530. result[name] = syntaxAsAst
  4531. ? map[name].syntax
  4532. : generate_1(map[name].syntax, { compact: compact });
  4533. }
  4534. }
  4535. return result;
  4536. }
  4537. function dumpAtruleMapSyntax(map, compact, syntaxAsAst) {
  4538. const result = {};
  4539. for (const [name, atrule] of Object.entries(map)) {
  4540. result[name] = {
  4541. prelude: atrule.prelude && (
  4542. syntaxAsAst
  4543. ? atrule.prelude.syntax
  4544. : generate_1(atrule.prelude.syntax, { compact })
  4545. ),
  4546. descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
  4547. };
  4548. }
  4549. return result;
  4550. }
  4551. function valueHasVar(tokens) {
  4552. for (var i = 0; i < tokens.length; i++) {
  4553. if (tokens[i].value.toLowerCase() === 'var(') {
  4554. return true;
  4555. }
  4556. }
  4557. return false;
  4558. }
  4559. function buildMatchResult(match, error, iterations) {
  4560. return {
  4561. matched: match,
  4562. iterations: iterations,
  4563. error: error,
  4564. getTrace: trace.getTrace,
  4565. isType: trace.isType,
  4566. isProperty: trace.isProperty,
  4567. isKeyword: trace.isKeyword
  4568. };
  4569. }
  4570. function matchSyntax(lexer, syntax, value, useCommon) {
  4571. var tokens = prepareTokens_1(value, lexer.syntax);
  4572. var result;
  4573. if (valueHasVar(tokens)) {
  4574. return buildMatchResult(null, new Error('Matching for a tree with var() is not supported'));
  4575. }
  4576. if (useCommon) {
  4577. result = matchAsTree$1(tokens, lexer.valueCommonSyntax, lexer);
  4578. }
  4579. if (!useCommon || !result.match) {
  4580. result = matchAsTree$1(tokens, syntax.match, lexer);
  4581. if (!result.match) {
  4582. return buildMatchResult(
  4583. null,
  4584. new MatchError$1(result.reason, syntax.syntax, value, result),
  4585. result.iterations
  4586. );
  4587. }
  4588. }
  4589. return buildMatchResult(result.match, null, result.iterations);
  4590. }
  4591. var Lexer = function(config, syntax, structure) {
  4592. this.valueCommonSyntax = cssWideKeywords$1;
  4593. this.syntax = syntax;
  4594. this.generic = false;
  4595. this.atrules = {};
  4596. this.properties = {};
  4597. this.types = {};
  4598. this.structure = structure || getStructureFromConfig(config);
  4599. if (config) {
  4600. if (config.types) {
  4601. for (var name in config.types) {
  4602. this.addType_(name, config.types[name]);
  4603. }
  4604. }
  4605. if (config.generic) {
  4606. this.generic = true;
  4607. for (var name in generic) {
  4608. this.addType_(name, generic[name]);
  4609. }
  4610. }
  4611. if (config.atrules) {
  4612. for (var name in config.atrules) {
  4613. this.addAtrule_(name, config.atrules[name]);
  4614. }
  4615. }
  4616. if (config.properties) {
  4617. for (var name in config.properties) {
  4618. this.addProperty_(name, config.properties[name]);
  4619. }
  4620. }
  4621. }
  4622. };
  4623. Lexer.prototype = {
  4624. structure: {},
  4625. checkStructure: function(ast) {
  4626. function collectWarning(node, message) {
  4627. warns.push({
  4628. node: node,
  4629. message: message
  4630. });
  4631. }
  4632. var structure = this.structure;
  4633. var warns = [];
  4634. this.syntax.walk(ast, function(node) {
  4635. if (structure.hasOwnProperty(node.type)) {
  4636. structure[node.type].check(node, collectWarning);
  4637. } else {
  4638. collectWarning(node, 'Unknown node type `' + node.type + '`');
  4639. }
  4640. });
  4641. return warns.length ? warns : false;
  4642. },
  4643. createDescriptor: function(syntax, type, name) {
  4644. var ref = {
  4645. type: type,
  4646. name: name
  4647. };
  4648. var descriptor = {
  4649. type: type,
  4650. name: name,
  4651. syntax: null,
  4652. match: null
  4653. };
  4654. if (typeof syntax === 'function') {
  4655. descriptor.match = buildMatchGraph$1(syntax, ref);
  4656. } else {
  4657. if (typeof syntax === 'string') {
  4658. // lazy parsing on first access
  4659. Object.defineProperty(descriptor, 'syntax', {
  4660. get: function() {
  4661. Object.defineProperty(descriptor, 'syntax', {
  4662. value: parse_1(syntax)
  4663. });
  4664. return descriptor.syntax;
  4665. }
  4666. });
  4667. } else {
  4668. descriptor.syntax = syntax;
  4669. }
  4670. // lazy graph build on first access
  4671. Object.defineProperty(descriptor, 'match', {
  4672. get: function() {
  4673. Object.defineProperty(descriptor, 'match', {
  4674. value: buildMatchGraph$1(descriptor.syntax, ref)
  4675. });
  4676. return descriptor.match;
  4677. }
  4678. });
  4679. }
  4680. return descriptor;
  4681. },
  4682. addAtrule_: function(name, syntax) {
  4683. this.atrules[name] = {
  4684. prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, 'AtrulePrelude', name) : null,
  4685. descriptors: syntax.descriptors
  4686. ? Object.keys(syntax.descriptors).reduce((res, name) => {
  4687. res[name] = this.createDescriptor(syntax.descriptors[name], 'AtruleDescriptor', name);
  4688. return res;
  4689. }, {})
  4690. : null
  4691. };
  4692. },
  4693. addProperty_: function(name, syntax) {
  4694. this.properties[name] = this.createDescriptor(syntax, 'Property', name);
  4695. },
  4696. addType_: function(name, syntax) {
  4697. this.types[name] = this.createDescriptor(syntax, 'Type', name);
  4698. if (syntax === generic['-ms-legacy-expression']) {
  4699. this.valueCommonSyntax = cssWideKeywordsWithExpression;
  4700. }
  4701. },
  4702. matchAtrulePrelude: function(atruleName, prelude) {
  4703. var atrule = names.keyword(atruleName);
  4704. var atrulePreludeSyntax = atrule.vendor
  4705. ? this.getAtrulePrelude(atrule.name) || this.getAtrulePrelude(atrule.basename)
  4706. : this.getAtrulePrelude(atrule.name);
  4707. if (!atrulePreludeSyntax) {
  4708. if (atrule.basename in this.atrules) {
  4709. return buildMatchResult(null, new Error('At-rule `' + atruleName + '` should not contain a prelude'));
  4710. }
  4711. return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName));
  4712. }
  4713. return matchSyntax(this, atrulePreludeSyntax, prelude, true);
  4714. },
  4715. matchAtruleDescriptor: function(atruleName, descriptorName, value) {
  4716. var atrule = names.keyword(atruleName);
  4717. var descriptor = names.keyword(descriptorName);
  4718. var atruleEntry = atrule.vendor
  4719. ? this.atrules[atrule.name] || this.atrules[atrule.basename]
  4720. : this.atrules[atrule.name];
  4721. if (!atruleEntry) {
  4722. return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName));
  4723. }
  4724. if (!atruleEntry.descriptors) {
  4725. return buildMatchResult(null, new Error('At-rule `' + atruleName + '` has no known descriptors'));
  4726. }
  4727. var atruleDescriptorSyntax = descriptor.vendor
  4728. ? atruleEntry.descriptors[descriptor.name] || atruleEntry.descriptors[descriptor.basename]
  4729. : atruleEntry.descriptors[descriptor.name];
  4730. if (!atruleDescriptorSyntax) {
  4731. return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule descriptor', descriptorName));
  4732. }
  4733. return matchSyntax(this, atruleDescriptorSyntax, value, true);
  4734. },
  4735. matchDeclaration: function(node) {
  4736. if (node.type !== 'Declaration') {
  4737. return buildMatchResult(null, new Error('Not a Declaration node'));
  4738. }
  4739. return this.matchProperty(node.property, node.value);
  4740. },
  4741. matchProperty: function(propertyName, value) {
  4742. var property = names.property(propertyName);
  4743. // don't match syntax for a custom property
  4744. if (property.custom) {
  4745. return buildMatchResult(null, new Error('Lexer matching doesn\'t applicable for custom properties'));
  4746. }
  4747. var propertySyntax = property.vendor
  4748. ? this.getProperty(property.name) || this.getProperty(property.basename)
  4749. : this.getProperty(property.name);
  4750. if (!propertySyntax) {
  4751. return buildMatchResult(null, new SyntaxReferenceError$1('Unknown property', propertyName));
  4752. }
  4753. return matchSyntax(this, propertySyntax, value, true);
  4754. },
  4755. matchType: function(typeName, value) {
  4756. var typeSyntax = this.getType(typeName);
  4757. if (!typeSyntax) {
  4758. return buildMatchResult(null, new SyntaxReferenceError$1('Unknown type', typeName));
  4759. }
  4760. return matchSyntax(this, typeSyntax, value, false);
  4761. },
  4762. match: function(syntax, value) {
  4763. if (typeof syntax !== 'string' && (!syntax || !syntax.type)) {
  4764. return buildMatchResult(null, new SyntaxReferenceError$1('Bad syntax'));
  4765. }
  4766. if (typeof syntax === 'string' || !syntax.match) {
  4767. syntax = this.createDescriptor(syntax, 'Type', 'anonymous');
  4768. }
  4769. return matchSyntax(this, syntax, value, false);
  4770. },
  4771. findValueFragments: function(propertyName, value, type, name) {
  4772. return search.matchFragments(this, value, this.matchProperty(propertyName, value), type, name);
  4773. },
  4774. findDeclarationValueFragments: function(declaration, type, name) {
  4775. return search.matchFragments(this, declaration.value, this.matchDeclaration(declaration), type, name);
  4776. },
  4777. findAllFragments: function(ast, type, name) {
  4778. var result = [];
  4779. this.syntax.walk(ast, {
  4780. visit: 'Declaration',
  4781. enter: function(declaration) {
  4782. result.push.apply(result, this.findDeclarationValueFragments(declaration, type, name));
  4783. }.bind(this)
  4784. });
  4785. return result;
  4786. },
  4787. getAtrulePrelude: function(atruleName) {
  4788. return this.atrules.hasOwnProperty(atruleName) ? this.atrules[atruleName].prelude : null;
  4789. },
  4790. getAtruleDescriptor: function(atruleName, name) {
  4791. return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators
  4792. ? this.atrules[atruleName].declarators[name] || null
  4793. : null;
  4794. },
  4795. getProperty: function(name) {
  4796. return this.properties.hasOwnProperty(name) ? this.properties[name] : null;
  4797. },
  4798. getType: function(name) {
  4799. return this.types.hasOwnProperty(name) ? this.types[name] : null;
  4800. },
  4801. validate: function() {
  4802. function validate(syntax, name, broken, descriptor) {
  4803. if (broken.hasOwnProperty(name)) {
  4804. return broken[name];
  4805. }
  4806. broken[name] = false;
  4807. if (descriptor.syntax !== null) {
  4808. walk(descriptor.syntax, function(node) {
  4809. if (node.type !== 'Type' && node.type !== 'Property') {
  4810. return;
  4811. }
  4812. var map = node.type === 'Type' ? syntax.types : syntax.properties;
  4813. var brokenMap = node.type === 'Type' ? brokenTypes : brokenProperties;
  4814. if (!map.hasOwnProperty(node.name) || validate(syntax, node.name, brokenMap, map[node.name])) {
  4815. broken[name] = true;
  4816. }
  4817. }, this);
  4818. }
  4819. }
  4820. var brokenTypes = {};
  4821. var brokenProperties = {};
  4822. for (var key in this.types) {
  4823. validate(this, key, brokenTypes, this.types[key]);
  4824. }
  4825. for (var key in this.properties) {
  4826. validate(this, key, brokenProperties, this.properties[key]);
  4827. }
  4828. brokenTypes = Object.keys(brokenTypes).filter(function(name) {
  4829. return brokenTypes[name];
  4830. });
  4831. brokenProperties = Object.keys(brokenProperties).filter(function(name) {
  4832. return brokenProperties[name];
  4833. });
  4834. if (brokenTypes.length || brokenProperties.length) {
  4835. return {
  4836. types: brokenTypes,
  4837. properties: brokenProperties
  4838. };
  4839. }
  4840. return null;
  4841. },
  4842. dump: function(syntaxAsAst, pretty) {
  4843. return {
  4844. generic: this.generic,
  4845. types: dumpMapSyntax(this.types, !pretty, syntaxAsAst),
  4846. properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst),
  4847. atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst)
  4848. };
  4849. },
  4850. toString: function() {
  4851. return JSON.stringify(this.dump());
  4852. }
  4853. };
  4854. var Lexer_1 = Lexer;
  4855. var definitionSyntax = {
  4856. SyntaxError: _SyntaxError$1,
  4857. parse: parse_1,
  4858. generate: generate_1,
  4859. walk: walk
  4860. };
  4861. var isBOM$2 = tokenizer.isBOM;
  4862. var N$3 = 10;
  4863. var F$2 = 12;
  4864. var R$2 = 13;
  4865. function computeLinesAndColumns(host, source) {
  4866. var sourceLength = source.length;
  4867. var lines = adoptBuffer(host.lines, sourceLength); // +1
  4868. var line = host.startLine;
  4869. var columns = adoptBuffer(host.columns, sourceLength);
  4870. var column = host.startColumn;
  4871. var startOffset = source.length > 0 ? isBOM$2(source.charCodeAt(0)) : 0;
  4872. for (var i = startOffset; i < sourceLength; i++) { // -1
  4873. var code = source.charCodeAt(i);
  4874. lines[i] = line;
  4875. columns[i] = column++;
  4876. if (code === N$3 || code === R$2 || code === F$2) {
  4877. if (code === R$2 && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$3) {
  4878. i++;
  4879. lines[i] = line;
  4880. columns[i] = column;
  4881. }
  4882. line++;
  4883. column = 1;
  4884. }
  4885. }
  4886. lines[i] = line;
  4887. columns[i] = column;
  4888. host.lines = lines;
  4889. host.columns = columns;
  4890. }
  4891. var OffsetToLocation = function() {
  4892. this.lines = null;
  4893. this.columns = null;
  4894. this.linesAndColumnsComputed = false;
  4895. };
  4896. OffsetToLocation.prototype = {
  4897. setSource: function(source, startOffset, startLine, startColumn) {
  4898. this.source = source;
  4899. this.startOffset = typeof startOffset === 'undefined' ? 0 : startOffset;
  4900. this.startLine = typeof startLine === 'undefined' ? 1 : startLine;
  4901. this.startColumn = typeof startColumn === 'undefined' ? 1 : startColumn;
  4902. this.linesAndColumnsComputed = false;
  4903. },
  4904. ensureLinesAndColumnsComputed: function() {
  4905. if (!this.linesAndColumnsComputed) {
  4906. computeLinesAndColumns(this, this.source);
  4907. this.linesAndColumnsComputed = true;
  4908. }
  4909. },
  4910. getLocation: function(offset, filename) {
  4911. this.ensureLinesAndColumnsComputed();
  4912. return {
  4913. source: filename,
  4914. offset: this.startOffset + offset,
  4915. line: this.lines[offset],
  4916. column: this.columns[offset]
  4917. };
  4918. },
  4919. getLocationRange: function(start, end, filename) {
  4920. this.ensureLinesAndColumnsComputed();
  4921. return {
  4922. source: filename,
  4923. start: {
  4924. offset: this.startOffset + start,
  4925. line: this.lines[start],
  4926. column: this.columns[start]
  4927. },
  4928. end: {
  4929. offset: this.startOffset + end,
  4930. line: this.lines[end],
  4931. column: this.columns[end]
  4932. }
  4933. };
  4934. }
  4935. };
  4936. var OffsetToLocation_1 = OffsetToLocation;
  4937. var TYPE$7 = tokenizer.TYPE;
  4938. var WHITESPACE$2 = TYPE$7.WhiteSpace;
  4939. var COMMENT$2 = TYPE$7.Comment;
  4940. var sequence = function readSequence(recognizer) {
  4941. var children = this.createList();
  4942. var child = null;
  4943. var context = {
  4944. recognizer: recognizer,
  4945. space: null,
  4946. ignoreWS: false,
  4947. ignoreWSAfter: false
  4948. };
  4949. this.scanner.skipSC();
  4950. while (!this.scanner.eof) {
  4951. switch (this.scanner.tokenType) {
  4952. case COMMENT$2:
  4953. this.scanner.next();
  4954. continue;
  4955. case WHITESPACE$2:
  4956. if (context.ignoreWS) {
  4957. this.scanner.next();
  4958. } else {
  4959. context.space = this.WhiteSpace();
  4960. }
  4961. continue;
  4962. }
  4963. child = recognizer.getNode.call(this, context);
  4964. if (child === undefined) {
  4965. break;
  4966. }
  4967. if (context.space !== null) {
  4968. children.push(context.space);
  4969. context.space = null;
  4970. }
  4971. children.push(child);
  4972. if (context.ignoreWSAfter) {
  4973. context.ignoreWSAfter = false;
  4974. context.ignoreWS = true;
  4975. } else {
  4976. context.ignoreWS = false;
  4977. }
  4978. }
  4979. return children;
  4980. };
  4981. var { findWhiteSpaceStart: findWhiteSpaceStart$1, cmpStr: cmpStr$4 } = utils;
  4982. var noop$2 = function() {};
  4983. var TYPE$8 = _const.TYPE;
  4984. var NAME$2 = _const.NAME;
  4985. var WHITESPACE$3 = TYPE$8.WhiteSpace;
  4986. var COMMENT$3 = TYPE$8.Comment;
  4987. var IDENT$2 = TYPE$8.Ident;
  4988. var FUNCTION = TYPE$8.Function;
  4989. var URL = TYPE$8.Url;
  4990. var HASH = TYPE$8.Hash;
  4991. var PERCENTAGE = TYPE$8.Percentage;
  4992. var NUMBER$2 = TYPE$8.Number;
  4993. var NUMBERSIGN$1 = 0x0023; // U+0023 NUMBER SIGN (#)
  4994. var NULL = 0;
  4995. function createParseContext(name) {
  4996. return function() {
  4997. return this[name]();
  4998. };
  4999. }
  5000. function processConfig(config) {
  5001. var parserConfig = {
  5002. context: {},
  5003. scope: {},
  5004. atrule: {},
  5005. pseudo: {}
  5006. };
  5007. if (config.parseContext) {
  5008. for (var name in config.parseContext) {
  5009. switch (typeof config.parseContext[name]) {
  5010. case 'function':
  5011. parserConfig.context[name] = config.parseContext[name];
  5012. break;
  5013. case 'string':
  5014. parserConfig.context[name] = createParseContext(config.parseContext[name]);
  5015. break;
  5016. }
  5017. }
  5018. }
  5019. if (config.scope) {
  5020. for (var name in config.scope) {
  5021. parserConfig.scope[name] = config.scope[name];
  5022. }
  5023. }
  5024. if (config.atrule) {
  5025. for (var name in config.atrule) {
  5026. var atrule = config.atrule[name];
  5027. if (atrule.parse) {
  5028. parserConfig.atrule[name] = atrule.parse;
  5029. }
  5030. }
  5031. }
  5032. if (config.pseudo) {
  5033. for (var name in config.pseudo) {
  5034. var pseudo = config.pseudo[name];
  5035. if (pseudo.parse) {
  5036. parserConfig.pseudo[name] = pseudo.parse;
  5037. }
  5038. }
  5039. }
  5040. if (config.node) {
  5041. for (var name in config.node) {
  5042. parserConfig[name] = config.node[name].parse;
  5043. }
  5044. }
  5045. return parserConfig;
  5046. }
  5047. var create = function createParser(config) {
  5048. var parser = {
  5049. scanner: new TokenStream_1(),
  5050. locationMap: new OffsetToLocation_1(),
  5051. filename: '<unknown>',
  5052. needPositions: false,
  5053. onParseError: noop$2,
  5054. onParseErrorThrow: false,
  5055. parseAtrulePrelude: true,
  5056. parseRulePrelude: true,
  5057. parseValue: true,
  5058. parseCustomProperty: false,
  5059. readSequence: sequence,
  5060. createList: function() {
  5061. return new List_1();
  5062. },
  5063. createSingleNodeList: function(node) {
  5064. return new List_1().appendData(node);
  5065. },
  5066. getFirstListNode: function(list) {
  5067. return list && list.first();
  5068. },
  5069. getLastListNode: function(list) {
  5070. return list.last();
  5071. },
  5072. parseWithFallback: function(consumer, fallback) {
  5073. var startToken = this.scanner.tokenIndex;
  5074. try {
  5075. return consumer.call(this);
  5076. } catch (e) {
  5077. if (this.onParseErrorThrow) {
  5078. throw e;
  5079. }
  5080. var fallbackNode = fallback.call(this, startToken);
  5081. this.onParseErrorThrow = true;
  5082. this.onParseError(e, fallbackNode);
  5083. this.onParseErrorThrow = false;
  5084. return fallbackNode;
  5085. }
  5086. },
  5087. lookupNonWSType: function(offset) {
  5088. do {
  5089. var type = this.scanner.lookupType(offset++);
  5090. if (type !== WHITESPACE$3) {
  5091. return type;
  5092. }
  5093. } while (type !== NULL);
  5094. return NULL;
  5095. },
  5096. eat: function(tokenType) {
  5097. if (this.scanner.tokenType !== tokenType) {
  5098. var offset = this.scanner.tokenStart;
  5099. var message = NAME$2[tokenType] + ' is expected';
  5100. // tweak message and offset
  5101. switch (tokenType) {
  5102. case IDENT$2:
  5103. // when identifier is expected but there is a function or url
  5104. if (this.scanner.tokenType === FUNCTION || this.scanner.tokenType === URL) {
  5105. offset = this.scanner.tokenEnd - 1;
  5106. message = 'Identifier is expected but function found';
  5107. } else {
  5108. message = 'Identifier is expected';
  5109. }
  5110. break;
  5111. case HASH:
  5112. if (this.scanner.isDelim(NUMBERSIGN$1)) {
  5113. this.scanner.next();
  5114. offset++;
  5115. message = 'Name is expected';
  5116. }
  5117. break;
  5118. case PERCENTAGE:
  5119. if (this.scanner.tokenType === NUMBER$2) {
  5120. offset = this.scanner.tokenEnd;
  5121. message = 'Percent sign is expected';
  5122. }
  5123. break;
  5124. default:
  5125. // when test type is part of another token show error for current position + 1
  5126. // e.g. eat(HYPHENMINUS) will fail on "-foo", but pointing on "-" is odd
  5127. if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === tokenType) {
  5128. offset = offset + 1;
  5129. }
  5130. }
  5131. this.error(message, offset);
  5132. }
  5133. this.scanner.next();
  5134. },
  5135. consume: function(tokenType) {
  5136. var value = this.scanner.getTokenValue();
  5137. this.eat(tokenType);
  5138. return value;
  5139. },
  5140. consumeFunctionName: function() {
  5141. var name = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1);
  5142. this.eat(FUNCTION);
  5143. return name;
  5144. },
  5145. getLocation: function(start, end) {
  5146. if (this.needPositions) {
  5147. return this.locationMap.getLocationRange(
  5148. start,
  5149. end,
  5150. this.filename
  5151. );
  5152. }
  5153. return null;
  5154. },
  5155. getLocationFromList: function(list) {
  5156. if (this.needPositions) {
  5157. var head = this.getFirstListNode(list);
  5158. var tail = this.getLastListNode(list);
  5159. return this.locationMap.getLocationRange(
  5160. head !== null ? head.loc.start.offset - this.locationMap.startOffset : this.scanner.tokenStart,
  5161. tail !== null ? tail.loc.end.offset - this.locationMap.startOffset : this.scanner.tokenStart,
  5162. this.filename
  5163. );
  5164. }
  5165. return null;
  5166. },
  5167. error: function(message, offset) {
  5168. var location = typeof offset !== 'undefined' && offset < this.scanner.source.length
  5169. ? this.locationMap.getLocation(offset)
  5170. : this.scanner.eof
  5171. ? this.locationMap.getLocation(findWhiteSpaceStart$1(this.scanner.source, this.scanner.source.length - 1))
  5172. : this.locationMap.getLocation(this.scanner.tokenStart);
  5173. throw new _SyntaxError(
  5174. message || 'Unexpected input',
  5175. this.scanner.source,
  5176. location.offset,
  5177. location.line,
  5178. location.column
  5179. );
  5180. }
  5181. };
  5182. config = processConfig(config || {});
  5183. for (var key in config) {
  5184. parser[key] = config[key];
  5185. }
  5186. return function(source, options) {
  5187. options = options || {};
  5188. var context = options.context || 'default';
  5189. var onComment = options.onComment;
  5190. var ast;
  5191. tokenizer(source, parser.scanner);
  5192. parser.locationMap.setSource(
  5193. source,
  5194. options.offset,
  5195. options.line,
  5196. options.column
  5197. );
  5198. parser.filename = options.filename || '<unknown>';
  5199. parser.needPositions = Boolean(options.positions);
  5200. parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop$2;
  5201. parser.onParseErrorThrow = false;
  5202. parser.parseAtrulePrelude = 'parseAtrulePrelude' in options ? Boolean(options.parseAtrulePrelude) : true;
  5203. parser.parseRulePrelude = 'parseRulePrelude' in options ? Boolean(options.parseRulePrelude) : true;
  5204. parser.parseValue = 'parseValue' in options ? Boolean(options.parseValue) : true;
  5205. parser.parseCustomProperty = 'parseCustomProperty' in options ? Boolean(options.parseCustomProperty) : false;
  5206. if (!parser.context.hasOwnProperty(context)) {
  5207. throw new Error('Unknown context `' + context + '`');
  5208. }
  5209. if (typeof onComment === 'function') {
  5210. parser.scanner.forEachToken((type, start, end) => {
  5211. if (type === COMMENT$3) {
  5212. const loc = parser.getLocation(start, end);
  5213. const value = cmpStr$4(source, end - 2, end, '*/')
  5214. ? source.slice(start + 2, end - 2)
  5215. : source.slice(start + 2, end);
  5216. onComment(value, loc);
  5217. }
  5218. });
  5219. }
  5220. ast = parser.context[context].call(parser, options);
  5221. if (!parser.scanner.eof) {
  5222. parser.error();
  5223. }
  5224. return ast;
  5225. };
  5226. };
  5227. /* -*- Mode: js; js-indent-level: 2; -*- */
  5228. /*
  5229. * Copyright 2011 Mozilla Foundation and contributors
  5230. * Licensed under the New BSD license. See LICENSE or:
  5231. * http://opensource.org/licenses/BSD-3-Clause
  5232. */
  5233. var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
  5234. /**
  5235. * Encode an integer in the range of 0 to 63 to a single base 64 digit.
  5236. */
  5237. var encode = function (number) {
  5238. if (0 <= number && number < intToCharMap.length) {
  5239. return intToCharMap[number];
  5240. }
  5241. throw new TypeError("Must be between 0 and 63: " + number);
  5242. };
  5243. /**
  5244. * Decode a single base 64 character code digit to an integer. Returns -1 on
  5245. * failure.
  5246. */
  5247. var decode = function (charCode) {
  5248. var bigA = 65; // 'A'
  5249. var bigZ = 90; // 'Z'
  5250. var littleA = 97; // 'a'
  5251. var littleZ = 122; // 'z'
  5252. var zero = 48; // '0'
  5253. var nine = 57; // '9'
  5254. var plus = 43; // '+'
  5255. var slash = 47; // '/'
  5256. var littleOffset = 26;
  5257. var numberOffset = 52;
  5258. // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
  5259. if (bigA <= charCode && charCode <= bigZ) {
  5260. return (charCode - bigA);
  5261. }
  5262. // 26 - 51: abcdefghijklmnopqrstuvwxyz
  5263. if (littleA <= charCode && charCode <= littleZ) {
  5264. return (charCode - littleA + littleOffset);
  5265. }
  5266. // 52 - 61: 0123456789
  5267. if (zero <= charCode && charCode <= nine) {
  5268. return (charCode - zero + numberOffset);
  5269. }
  5270. // 62: +
  5271. if (charCode == plus) {
  5272. return 62;
  5273. }
  5274. // 63: /
  5275. if (charCode == slash) {
  5276. return 63;
  5277. }
  5278. // Invalid base64 digit.
  5279. return -1;
  5280. };
  5281. var base64 = {
  5282. encode: encode,
  5283. decode: decode
  5284. };
  5285. /* -*- Mode: js; js-indent-level: 2; -*- */
  5286. /*
  5287. * Copyright 2011 Mozilla Foundation and contributors
  5288. * Licensed under the New BSD license. See LICENSE or:
  5289. * http://opensource.org/licenses/BSD-3-Clause
  5290. *
  5291. * Based on the Base 64 VLQ implementation in Closure Compiler:
  5292. * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
  5293. *
  5294. * Copyright 2011 The Closure Compiler Authors. All rights reserved.
  5295. * Redistribution and use in source and binary forms, with or without
  5296. * modification, are permitted provided that the following conditions are
  5297. * met:
  5298. *
  5299. * * Redistributions of source code must retain the above copyright
  5300. * notice, this list of conditions and the following disclaimer.
  5301. * * Redistributions in binary form must reproduce the above
  5302. * copyright notice, this list of conditions and the following
  5303. * disclaimer in the documentation and/or other materials provided
  5304. * with the distribution.
  5305. * * Neither the name of Google Inc. nor the names of its
  5306. * contributors may be used to endorse or promote products derived
  5307. * from this software without specific prior written permission.
  5308. *
  5309. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  5310. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5311. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  5312. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  5313. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  5314. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  5315. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  5316. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  5317. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  5318. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  5319. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  5320. */
  5321. // A single base 64 digit can contain 6 bits of data. For the base 64 variable
  5322. // length quantities we use in the source map spec, the first bit is the sign,
  5323. // the next four bits are the actual value, and the 6th bit is the
  5324. // continuation bit. The continuation bit tells us whether there are more
  5325. // digits in this value following this digit.
  5326. //
  5327. // Continuation
  5328. // | Sign
  5329. // | |
  5330. // V V
  5331. // 101011
  5332. var VLQ_BASE_SHIFT = 5;
  5333. // binary: 100000
  5334. var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
  5335. // binary: 011111
  5336. var VLQ_BASE_MASK = VLQ_BASE - 1;
  5337. // binary: 100000
  5338. var VLQ_CONTINUATION_BIT = VLQ_BASE;
  5339. /**
  5340. * Converts from a two-complement value to a value where the sign bit is
  5341. * placed in the least significant bit. For example, as decimals:
  5342. * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
  5343. * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
  5344. */
  5345. function toVLQSigned(aValue) {
  5346. return aValue < 0
  5347. ? ((-aValue) << 1) + 1
  5348. : (aValue << 1) + 0;
  5349. }
  5350. /**
  5351. * Converts to a two-complement value from a value where the sign bit is
  5352. * placed in the least significant bit. For example, as decimals:
  5353. * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
  5354. * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
  5355. */
  5356. function fromVLQSigned(aValue) {
  5357. var isNegative = (aValue & 1) === 1;
  5358. var shifted = aValue >> 1;
  5359. return isNegative
  5360. ? -shifted
  5361. : shifted;
  5362. }
  5363. /**
  5364. * Returns the base 64 VLQ encoded value.
  5365. */
  5366. var encode$1 = function base64VLQ_encode(aValue) {
  5367. var encoded = "";
  5368. var digit;
  5369. var vlq = toVLQSigned(aValue);
  5370. do {
  5371. digit = vlq & VLQ_BASE_MASK;
  5372. vlq >>>= VLQ_BASE_SHIFT;
  5373. if (vlq > 0) {
  5374. // There are still more digits in this value, so we must make sure the
  5375. // continuation bit is marked.
  5376. digit |= VLQ_CONTINUATION_BIT;
  5377. }
  5378. encoded += base64.encode(digit);
  5379. } while (vlq > 0);
  5380. return encoded;
  5381. };
  5382. /**
  5383. * Decodes the next base 64 VLQ value from the given string and returns the
  5384. * value and the rest of the string via the out parameter.
  5385. */
  5386. var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) {
  5387. var strLen = aStr.length;
  5388. var result = 0;
  5389. var shift = 0;
  5390. var continuation, digit;
  5391. do {
  5392. if (aIndex >= strLen) {
  5393. throw new Error("Expected more digits in base 64 VLQ value.");
  5394. }
  5395. digit = base64.decode(aStr.charCodeAt(aIndex++));
  5396. if (digit === -1) {
  5397. throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
  5398. }
  5399. continuation = !!(digit & VLQ_CONTINUATION_BIT);
  5400. digit &= VLQ_BASE_MASK;
  5401. result = result + (digit << shift);
  5402. shift += VLQ_BASE_SHIFT;
  5403. } while (continuation);
  5404. aOutParam.value = fromVLQSigned(result);
  5405. aOutParam.rest = aIndex;
  5406. };
  5407. var base64Vlq = {
  5408. encode: encode$1,
  5409. decode: decode$1
  5410. };
  5411. function createCommonjsModule(fn, module) {
  5412. return module = { exports: {} }, fn(module, module.exports), module.exports;
  5413. }
  5414. function getCjsExportFromNamespace (n) {
  5415. return n && n['default'] || n;
  5416. }
  5417. var util = createCommonjsModule(function (module, exports) {
  5418. /* -*- Mode: js; js-indent-level: 2; -*- */
  5419. /*
  5420. * Copyright 2011 Mozilla Foundation and contributors
  5421. * Licensed under the New BSD license. See LICENSE or:
  5422. * http://opensource.org/licenses/BSD-3-Clause
  5423. */
  5424. /**
  5425. * This is a helper function for getting values from parameter/options
  5426. * objects.
  5427. *
  5428. * @param args The object we are extracting values from
  5429. * @param name The name of the property we are getting.
  5430. * @param defaultValue An optional value to return if the property is missing
  5431. * from the object. If this is not specified and the property is missing, an
  5432. * error will be thrown.
  5433. */
  5434. function getArg(aArgs, aName, aDefaultValue) {
  5435. if (aName in aArgs) {
  5436. return aArgs[aName];
  5437. } else if (arguments.length === 3) {
  5438. return aDefaultValue;
  5439. } else {
  5440. throw new Error('"' + aName + '" is a required argument.');
  5441. }
  5442. }
  5443. exports.getArg = getArg;
  5444. var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
  5445. var dataUrlRegexp = /^data:.+\,.+$/;
  5446. function urlParse(aUrl) {
  5447. var match = aUrl.match(urlRegexp);
  5448. if (!match) {
  5449. return null;
  5450. }
  5451. return {
  5452. scheme: match[1],
  5453. auth: match[2],
  5454. host: match[3],
  5455. port: match[4],
  5456. path: match[5]
  5457. };
  5458. }
  5459. exports.urlParse = urlParse;
  5460. function urlGenerate(aParsedUrl) {
  5461. var url = '';
  5462. if (aParsedUrl.scheme) {
  5463. url += aParsedUrl.scheme + ':';
  5464. }
  5465. url += '//';
  5466. if (aParsedUrl.auth) {
  5467. url += aParsedUrl.auth + '@';
  5468. }
  5469. if (aParsedUrl.host) {
  5470. url += aParsedUrl.host;
  5471. }
  5472. if (aParsedUrl.port) {
  5473. url += ":" + aParsedUrl.port;
  5474. }
  5475. if (aParsedUrl.path) {
  5476. url += aParsedUrl.path;
  5477. }
  5478. return url;
  5479. }
  5480. exports.urlGenerate = urlGenerate;
  5481. /**
  5482. * Normalizes a path, or the path portion of a URL:
  5483. *
  5484. * - Replaces consecutive slashes with one slash.
  5485. * - Removes unnecessary '.' parts.
  5486. * - Removes unnecessary '<dir>/..' parts.
  5487. *
  5488. * Based on code in the Node.js 'path' core module.
  5489. *
  5490. * @param aPath The path or url to normalize.
  5491. */
  5492. function normalize(aPath) {
  5493. var path = aPath;
  5494. var url = urlParse(aPath);
  5495. if (url) {
  5496. if (!url.path) {
  5497. return aPath;
  5498. }
  5499. path = url.path;
  5500. }
  5501. var isAbsolute = exports.isAbsolute(path);
  5502. var parts = path.split(/\/+/);
  5503. for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
  5504. part = parts[i];
  5505. if (part === '.') {
  5506. parts.splice(i, 1);
  5507. } else if (part === '..') {
  5508. up++;
  5509. } else if (up > 0) {
  5510. if (part === '') {
  5511. // The first part is blank if the path is absolute. Trying to go
  5512. // above the root is a no-op. Therefore we can remove all '..' parts
  5513. // directly after the root.
  5514. parts.splice(i + 1, up);
  5515. up = 0;
  5516. } else {
  5517. parts.splice(i, 2);
  5518. up--;
  5519. }
  5520. }
  5521. }
  5522. path = parts.join('/');
  5523. if (path === '') {
  5524. path = isAbsolute ? '/' : '.';
  5525. }
  5526. if (url) {
  5527. url.path = path;
  5528. return urlGenerate(url);
  5529. }
  5530. return path;
  5531. }
  5532. exports.normalize = normalize;
  5533. /**
  5534. * Joins two paths/URLs.
  5535. *
  5536. * @param aRoot The root path or URL.
  5537. * @param aPath The path or URL to be joined with the root.
  5538. *
  5539. * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
  5540. * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
  5541. * first.
  5542. * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
  5543. * is updated with the result and aRoot is returned. Otherwise the result
  5544. * is returned.
  5545. * - If aPath is absolute, the result is aPath.
  5546. * - Otherwise the two paths are joined with a slash.
  5547. * - Joining for example 'http://' and 'www.example.com' is also supported.
  5548. */
  5549. function join(aRoot, aPath) {
  5550. if (aRoot === "") {
  5551. aRoot = ".";
  5552. }
  5553. if (aPath === "") {
  5554. aPath = ".";
  5555. }
  5556. var aPathUrl = urlParse(aPath);
  5557. var aRootUrl = urlParse(aRoot);
  5558. if (aRootUrl) {
  5559. aRoot = aRootUrl.path || '/';
  5560. }
  5561. // `join(foo, '//www.example.org')`
  5562. if (aPathUrl && !aPathUrl.scheme) {
  5563. if (aRootUrl) {
  5564. aPathUrl.scheme = aRootUrl.scheme;
  5565. }
  5566. return urlGenerate(aPathUrl);
  5567. }
  5568. if (aPathUrl || aPath.match(dataUrlRegexp)) {
  5569. return aPath;
  5570. }
  5571. // `join('http://', 'www.example.com')`
  5572. if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
  5573. aRootUrl.host = aPath;
  5574. return urlGenerate(aRootUrl);
  5575. }
  5576. var joined = aPath.charAt(0) === '/'
  5577. ? aPath
  5578. : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
  5579. if (aRootUrl) {
  5580. aRootUrl.path = joined;
  5581. return urlGenerate(aRootUrl);
  5582. }
  5583. return joined;
  5584. }
  5585. exports.join = join;
  5586. exports.isAbsolute = function (aPath) {
  5587. return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
  5588. };
  5589. /**
  5590. * Make a path relative to a URL or another path.
  5591. *
  5592. * @param aRoot The root path or URL.
  5593. * @param aPath The path or URL to be made relative to aRoot.
  5594. */
  5595. function relative(aRoot, aPath) {
  5596. if (aRoot === "") {
  5597. aRoot = ".";
  5598. }
  5599. aRoot = aRoot.replace(/\/$/, '');
  5600. // It is possible for the path to be above the root. In this case, simply
  5601. // checking whether the root is a prefix of the path won't work. Instead, we
  5602. // need to remove components from the root one by one, until either we find
  5603. // a prefix that fits, or we run out of components to remove.
  5604. var level = 0;
  5605. while (aPath.indexOf(aRoot + '/') !== 0) {
  5606. var index = aRoot.lastIndexOf("/");
  5607. if (index < 0) {
  5608. return aPath;
  5609. }
  5610. // If the only part of the root that is left is the scheme (i.e. http://,
  5611. // file:///, etc.), one or more slashes (/), or simply nothing at all, we
  5612. // have exhausted all components, so the path is not relative to the root.
  5613. aRoot = aRoot.slice(0, index);
  5614. if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
  5615. return aPath;
  5616. }
  5617. ++level;
  5618. }
  5619. // Make sure we add a "../" for each component we removed from the root.
  5620. return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
  5621. }
  5622. exports.relative = relative;
  5623. var supportsNullProto = (function () {
  5624. var obj = Object.create(null);
  5625. return !('__proto__' in obj);
  5626. }());
  5627. function identity (s) {
  5628. return s;
  5629. }
  5630. /**
  5631. * Because behavior goes wacky when you set `__proto__` on objects, we
  5632. * have to prefix all the strings in our set with an arbitrary character.
  5633. *
  5634. * See https://github.com/mozilla/source-map/pull/31 and
  5635. * https://github.com/mozilla/source-map/issues/30
  5636. *
  5637. * @param String aStr
  5638. */
  5639. function toSetString(aStr) {
  5640. if (isProtoString(aStr)) {
  5641. return '$' + aStr;
  5642. }
  5643. return aStr;
  5644. }
  5645. exports.toSetString = supportsNullProto ? identity : toSetString;
  5646. function fromSetString(aStr) {
  5647. if (isProtoString(aStr)) {
  5648. return aStr.slice(1);
  5649. }
  5650. return aStr;
  5651. }
  5652. exports.fromSetString = supportsNullProto ? identity : fromSetString;
  5653. function isProtoString(s) {
  5654. if (!s) {
  5655. return false;
  5656. }
  5657. var length = s.length;
  5658. if (length < 9 /* "__proto__".length */) {
  5659. return false;
  5660. }
  5661. if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
  5662. s.charCodeAt(length - 2) !== 95 /* '_' */ ||
  5663. s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
  5664. s.charCodeAt(length - 4) !== 116 /* 't' */ ||
  5665. s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
  5666. s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
  5667. s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
  5668. s.charCodeAt(length - 8) !== 95 /* '_' */ ||
  5669. s.charCodeAt(length - 9) !== 95 /* '_' */) {
  5670. return false;
  5671. }
  5672. for (var i = length - 10; i >= 0; i--) {
  5673. if (s.charCodeAt(i) !== 36 /* '$' */) {
  5674. return false;
  5675. }
  5676. }
  5677. return true;
  5678. }
  5679. /**
  5680. * Comparator between two mappings where the original positions are compared.
  5681. *
  5682. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  5683. * mappings with the same original source/line/column, but different generated
  5684. * line and column the same. Useful when searching for a mapping with a
  5685. * stubbed out mapping.
  5686. */
  5687. function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
  5688. var cmp = strcmp(mappingA.source, mappingB.source);
  5689. if (cmp !== 0) {
  5690. return cmp;
  5691. }
  5692. cmp = mappingA.originalLine - mappingB.originalLine;
  5693. if (cmp !== 0) {
  5694. return cmp;
  5695. }
  5696. cmp = mappingA.originalColumn - mappingB.originalColumn;
  5697. if (cmp !== 0 || onlyCompareOriginal) {
  5698. return cmp;
  5699. }
  5700. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  5701. if (cmp !== 0) {
  5702. return cmp;
  5703. }
  5704. cmp = mappingA.generatedLine - mappingB.generatedLine;
  5705. if (cmp !== 0) {
  5706. return cmp;
  5707. }
  5708. return strcmp(mappingA.name, mappingB.name);
  5709. }
  5710. exports.compareByOriginalPositions = compareByOriginalPositions;
  5711. /**
  5712. * Comparator between two mappings with deflated source and name indices where
  5713. * the generated positions are compared.
  5714. *
  5715. * Optionally pass in `true` as `onlyCompareGenerated` to consider two
  5716. * mappings with the same generated line and column, but different
  5717. * source/name/original line and column the same. Useful when searching for a
  5718. * mapping with a stubbed out mapping.
  5719. */
  5720. function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
  5721. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  5722. if (cmp !== 0) {
  5723. return cmp;
  5724. }
  5725. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  5726. if (cmp !== 0 || onlyCompareGenerated) {
  5727. return cmp;
  5728. }
  5729. cmp = strcmp(mappingA.source, mappingB.source);
  5730. if (cmp !== 0) {
  5731. return cmp;
  5732. }
  5733. cmp = mappingA.originalLine - mappingB.originalLine;
  5734. if (cmp !== 0) {
  5735. return cmp;
  5736. }
  5737. cmp = mappingA.originalColumn - mappingB.originalColumn;
  5738. if (cmp !== 0) {
  5739. return cmp;
  5740. }
  5741. return strcmp(mappingA.name, mappingB.name);
  5742. }
  5743. exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
  5744. function strcmp(aStr1, aStr2) {
  5745. if (aStr1 === aStr2) {
  5746. return 0;
  5747. }
  5748. if (aStr1 === null) {
  5749. return 1; // aStr2 !== null
  5750. }
  5751. if (aStr2 === null) {
  5752. return -1; // aStr1 !== null
  5753. }
  5754. if (aStr1 > aStr2) {
  5755. return 1;
  5756. }
  5757. return -1;
  5758. }
  5759. /**
  5760. * Comparator between two mappings with inflated source and name strings where
  5761. * the generated positions are compared.
  5762. */
  5763. function compareByGeneratedPositionsInflated(mappingA, mappingB) {
  5764. var cmp = mappingA.generatedLine - mappingB.generatedLine;
  5765. if (cmp !== 0) {
  5766. return cmp;
  5767. }
  5768. cmp = mappingA.generatedColumn - mappingB.generatedColumn;
  5769. if (cmp !== 0) {
  5770. return cmp;
  5771. }
  5772. cmp = strcmp(mappingA.source, mappingB.source);
  5773. if (cmp !== 0) {
  5774. return cmp;
  5775. }
  5776. cmp = mappingA.originalLine - mappingB.originalLine;
  5777. if (cmp !== 0) {
  5778. return cmp;
  5779. }
  5780. cmp = mappingA.originalColumn - mappingB.originalColumn;
  5781. if (cmp !== 0) {
  5782. return cmp;
  5783. }
  5784. return strcmp(mappingA.name, mappingB.name);
  5785. }
  5786. exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
  5787. /**
  5788. * Strip any JSON XSSI avoidance prefix from the string (as documented
  5789. * in the source maps specification), and then parse the string as
  5790. * JSON.
  5791. */
  5792. function parseSourceMapInput(str) {
  5793. return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
  5794. }
  5795. exports.parseSourceMapInput = parseSourceMapInput;
  5796. /**
  5797. * Compute the URL of a source given the the source root, the source's
  5798. * URL, and the source map's URL.
  5799. */
  5800. function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
  5801. sourceURL = sourceURL || '';
  5802. if (sourceRoot) {
  5803. // This follows what Chrome does.
  5804. if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
  5805. sourceRoot += '/';
  5806. }
  5807. // The spec says:
  5808. // Line 4: An optional source root, useful for relocating source
  5809. // files on a server or removing repeated values in the
  5810. // “sources” entry. This value is prepended to the individual
  5811. // entries in the “source” field.
  5812. sourceURL = sourceRoot + sourceURL;
  5813. }
  5814. // Historically, SourceMapConsumer did not take the sourceMapURL as
  5815. // a parameter. This mode is still somewhat supported, which is why
  5816. // this code block is conditional. However, it's preferable to pass
  5817. // the source map URL to SourceMapConsumer, so that this function
  5818. // can implement the source URL resolution algorithm as outlined in
  5819. // the spec. This block is basically the equivalent of:
  5820. // new URL(sourceURL, sourceMapURL).toString()
  5821. // ... except it avoids using URL, which wasn't available in the
  5822. // older releases of node still supported by this library.
  5823. //
  5824. // The spec says:
  5825. // If the sources are not absolute URLs after prepending of the
  5826. // “sourceRoot”, the sources are resolved relative to the
  5827. // SourceMap (like resolving script src in a html document).
  5828. if (sourceMapURL) {
  5829. var parsed = urlParse(sourceMapURL);
  5830. if (!parsed) {
  5831. throw new Error("sourceMapURL could not be parsed");
  5832. }
  5833. if (parsed.path) {
  5834. // Strip the last path component, but keep the "/".
  5835. var index = parsed.path.lastIndexOf('/');
  5836. if (index >= 0) {
  5837. parsed.path = parsed.path.substring(0, index + 1);
  5838. }
  5839. }
  5840. sourceURL = join(urlGenerate(parsed), sourceURL);
  5841. }
  5842. return normalize(sourceURL);
  5843. }
  5844. exports.computeSourceURL = computeSourceURL;
  5845. });
  5846. var util_1 = util.getArg;
  5847. var util_2 = util.urlParse;
  5848. var util_3 = util.urlGenerate;
  5849. var util_4 = util.normalize;
  5850. var util_5 = util.join;
  5851. var util_6 = util.isAbsolute;
  5852. var util_7 = util.relative;
  5853. var util_8 = util.toSetString;
  5854. var util_9 = util.fromSetString;
  5855. var util_10 = util.compareByOriginalPositions;
  5856. var util_11 = util.compareByGeneratedPositionsDeflated;
  5857. var util_12 = util.compareByGeneratedPositionsInflated;
  5858. var util_13 = util.parseSourceMapInput;
  5859. var util_14 = util.computeSourceURL;
  5860. /* -*- Mode: js; js-indent-level: 2; -*- */
  5861. /*
  5862. * Copyright 2011 Mozilla Foundation and contributors
  5863. * Licensed under the New BSD license. See LICENSE or:
  5864. * http://opensource.org/licenses/BSD-3-Clause
  5865. */
  5866. var has = Object.prototype.hasOwnProperty;
  5867. var hasNativeMap = typeof Map !== "undefined";
  5868. /**
  5869. * A data structure which is a combination of an array and a set. Adding a new
  5870. * member is O(1), testing for membership is O(1), and finding the index of an
  5871. * element is O(1). Removing elements from the set is not supported. Only
  5872. * strings are supported for membership.
  5873. */
  5874. function ArraySet() {
  5875. this._array = [];
  5876. this._set = hasNativeMap ? new Map() : Object.create(null);
  5877. }
  5878. /**
  5879. * Static method for creating ArraySet instances from an existing array.
  5880. */
  5881. ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
  5882. var set = new ArraySet();
  5883. for (var i = 0, len = aArray.length; i < len; i++) {
  5884. set.add(aArray[i], aAllowDuplicates);
  5885. }
  5886. return set;
  5887. };
  5888. /**
  5889. * Return how many unique items are in this ArraySet. If duplicates have been
  5890. * added, than those do not count towards the size.
  5891. *
  5892. * @returns Number
  5893. */
  5894. ArraySet.prototype.size = function ArraySet_size() {
  5895. return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
  5896. };
  5897. /**
  5898. * Add the given string to this set.
  5899. *
  5900. * @param String aStr
  5901. */
  5902. ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
  5903. var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
  5904. var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
  5905. var idx = this._array.length;
  5906. if (!isDuplicate || aAllowDuplicates) {
  5907. this._array.push(aStr);
  5908. }
  5909. if (!isDuplicate) {
  5910. if (hasNativeMap) {
  5911. this._set.set(aStr, idx);
  5912. } else {
  5913. this._set[sStr] = idx;
  5914. }
  5915. }
  5916. };
  5917. /**
  5918. * Is the given string a member of this set?
  5919. *
  5920. * @param String aStr
  5921. */
  5922. ArraySet.prototype.has = function ArraySet_has(aStr) {
  5923. if (hasNativeMap) {
  5924. return this._set.has(aStr);
  5925. } else {
  5926. var sStr = util.toSetString(aStr);
  5927. return has.call(this._set, sStr);
  5928. }
  5929. };
  5930. /**
  5931. * What is the index of the given string in the array?
  5932. *
  5933. * @param String aStr
  5934. */
  5935. ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
  5936. if (hasNativeMap) {
  5937. var idx = this._set.get(aStr);
  5938. if (idx >= 0) {
  5939. return idx;
  5940. }
  5941. } else {
  5942. var sStr = util.toSetString(aStr);
  5943. if (has.call(this._set, sStr)) {
  5944. return this._set[sStr];
  5945. }
  5946. }
  5947. throw new Error('"' + aStr + '" is not in the set.');
  5948. };
  5949. /**
  5950. * What is the element at the given index?
  5951. *
  5952. * @param Number aIdx
  5953. */
  5954. ArraySet.prototype.at = function ArraySet_at(aIdx) {
  5955. if (aIdx >= 0 && aIdx < this._array.length) {
  5956. return this._array[aIdx];
  5957. }
  5958. throw new Error('No element indexed by ' + aIdx);
  5959. };
  5960. /**
  5961. * Returns the array representation of this set (which has the proper indices
  5962. * indicated by indexOf). Note that this is a copy of the internal array used
  5963. * for storing the members so that no one can mess with internal state.
  5964. */
  5965. ArraySet.prototype.toArray = function ArraySet_toArray() {
  5966. return this._array.slice();
  5967. };
  5968. var ArraySet_1 = ArraySet;
  5969. var arraySet = {
  5970. ArraySet: ArraySet_1
  5971. };
  5972. /* -*- Mode: js; js-indent-level: 2; -*- */
  5973. /*
  5974. * Copyright 2014 Mozilla Foundation and contributors
  5975. * Licensed under the New BSD license. See LICENSE or:
  5976. * http://opensource.org/licenses/BSD-3-Clause
  5977. */
  5978. /**
  5979. * Determine whether mappingB is after mappingA with respect to generated
  5980. * position.
  5981. */
  5982. function generatedPositionAfter(mappingA, mappingB) {
  5983. // Optimized for most common case
  5984. var lineA = mappingA.generatedLine;
  5985. var lineB = mappingB.generatedLine;
  5986. var columnA = mappingA.generatedColumn;
  5987. var columnB = mappingB.generatedColumn;
  5988. return lineB > lineA || lineB == lineA && columnB >= columnA ||
  5989. util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
  5990. }
  5991. /**
  5992. * A data structure to provide a sorted view of accumulated mappings in a
  5993. * performance conscious manner. It trades a neglibable overhead in general
  5994. * case for a large speedup in case of mappings being added in order.
  5995. */
  5996. function MappingList() {
  5997. this._array = [];
  5998. this._sorted = true;
  5999. // Serves as infimum
  6000. this._last = {generatedLine: -1, generatedColumn: 0};
  6001. }
  6002. /**
  6003. * Iterate through internal items. This method takes the same arguments that
  6004. * `Array.prototype.forEach` takes.
  6005. *
  6006. * NOTE: The order of the mappings is NOT guaranteed.
  6007. */
  6008. MappingList.prototype.unsortedForEach =
  6009. function MappingList_forEach(aCallback, aThisArg) {
  6010. this._array.forEach(aCallback, aThisArg);
  6011. };
  6012. /**
  6013. * Add the given source mapping.
  6014. *
  6015. * @param Object aMapping
  6016. */
  6017. MappingList.prototype.add = function MappingList_add(aMapping) {
  6018. if (generatedPositionAfter(this._last, aMapping)) {
  6019. this._last = aMapping;
  6020. this._array.push(aMapping);
  6021. } else {
  6022. this._sorted = false;
  6023. this._array.push(aMapping);
  6024. }
  6025. };
  6026. /**
  6027. * Returns the flat, sorted array of mappings. The mappings are sorted by
  6028. * generated position.
  6029. *
  6030. * WARNING: This method returns internal data without copying, for
  6031. * performance. The return value must NOT be mutated, and should be treated as
  6032. * an immutable borrow. If you want to take ownership, you must make your own
  6033. * copy.
  6034. */
  6035. MappingList.prototype.toArray = function MappingList_toArray() {
  6036. if (!this._sorted) {
  6037. this._array.sort(util.compareByGeneratedPositionsInflated);
  6038. this._sorted = true;
  6039. }
  6040. return this._array;
  6041. };
  6042. var MappingList_1 = MappingList;
  6043. var mappingList = {
  6044. MappingList: MappingList_1
  6045. };
  6046. /* -*- Mode: js; js-indent-level: 2; -*- */
  6047. /*
  6048. * Copyright 2011 Mozilla Foundation and contributors
  6049. * Licensed under the New BSD license. See LICENSE or:
  6050. * http://opensource.org/licenses/BSD-3-Clause
  6051. */
  6052. var ArraySet$1 = arraySet.ArraySet;
  6053. var MappingList$1 = mappingList.MappingList;
  6054. /**
  6055. * An instance of the SourceMapGenerator represents a source map which is
  6056. * being built incrementally. You may pass an object with the following
  6057. * properties:
  6058. *
  6059. * - file: The filename of the generated source.
  6060. * - sourceRoot: A root for all relative URLs in this source map.
  6061. */
  6062. function SourceMapGenerator(aArgs) {
  6063. if (!aArgs) {
  6064. aArgs = {};
  6065. }
  6066. this._file = util.getArg(aArgs, 'file', null);
  6067. this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
  6068. this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
  6069. this._sources = new ArraySet$1();
  6070. this._names = new ArraySet$1();
  6071. this._mappings = new MappingList$1();
  6072. this._sourcesContents = null;
  6073. }
  6074. SourceMapGenerator.prototype._version = 3;
  6075. /**
  6076. * Creates a new SourceMapGenerator based on a SourceMapConsumer
  6077. *
  6078. * @param aSourceMapConsumer The SourceMap.
  6079. */
  6080. SourceMapGenerator.fromSourceMap =
  6081. function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
  6082. var sourceRoot = aSourceMapConsumer.sourceRoot;
  6083. var generator = new SourceMapGenerator({
  6084. file: aSourceMapConsumer.file,
  6085. sourceRoot: sourceRoot
  6086. });
  6087. aSourceMapConsumer.eachMapping(function (mapping) {
  6088. var newMapping = {
  6089. generated: {
  6090. line: mapping.generatedLine,
  6091. column: mapping.generatedColumn
  6092. }
  6093. };
  6094. if (mapping.source != null) {
  6095. newMapping.source = mapping.source;
  6096. if (sourceRoot != null) {
  6097. newMapping.source = util.relative(sourceRoot, newMapping.source);
  6098. }
  6099. newMapping.original = {
  6100. line: mapping.originalLine,
  6101. column: mapping.originalColumn
  6102. };
  6103. if (mapping.name != null) {
  6104. newMapping.name = mapping.name;
  6105. }
  6106. }
  6107. generator.addMapping(newMapping);
  6108. });
  6109. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  6110. var sourceRelative = sourceFile;
  6111. if (sourceRoot !== null) {
  6112. sourceRelative = util.relative(sourceRoot, sourceFile);
  6113. }
  6114. if (!generator._sources.has(sourceRelative)) {
  6115. generator._sources.add(sourceRelative);
  6116. }
  6117. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  6118. if (content != null) {
  6119. generator.setSourceContent(sourceFile, content);
  6120. }
  6121. });
  6122. return generator;
  6123. };
  6124. /**
  6125. * Add a single mapping from original source line and column to the generated
  6126. * source's line and column for this source map being created. The mapping
  6127. * object should have the following properties:
  6128. *
  6129. * - generated: An object with the generated line and column positions.
  6130. * - original: An object with the original line and column positions.
  6131. * - source: The original source file (relative to the sourceRoot).
  6132. * - name: An optional original token name for this mapping.
  6133. */
  6134. SourceMapGenerator.prototype.addMapping =
  6135. function SourceMapGenerator_addMapping(aArgs) {
  6136. var generated = util.getArg(aArgs, 'generated');
  6137. var original = util.getArg(aArgs, 'original', null);
  6138. var source = util.getArg(aArgs, 'source', null);
  6139. var name = util.getArg(aArgs, 'name', null);
  6140. if (!this._skipValidation) {
  6141. this._validateMapping(generated, original, source, name);
  6142. }
  6143. if (source != null) {
  6144. source = String(source);
  6145. if (!this._sources.has(source)) {
  6146. this._sources.add(source);
  6147. }
  6148. }
  6149. if (name != null) {
  6150. name = String(name);
  6151. if (!this._names.has(name)) {
  6152. this._names.add(name);
  6153. }
  6154. }
  6155. this._mappings.add({
  6156. generatedLine: generated.line,
  6157. generatedColumn: generated.column,
  6158. originalLine: original != null && original.line,
  6159. originalColumn: original != null && original.column,
  6160. source: source,
  6161. name: name
  6162. });
  6163. };
  6164. /**
  6165. * Set the source content for a source file.
  6166. */
  6167. SourceMapGenerator.prototype.setSourceContent =
  6168. function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
  6169. var source = aSourceFile;
  6170. if (this._sourceRoot != null) {
  6171. source = util.relative(this._sourceRoot, source);
  6172. }
  6173. if (aSourceContent != null) {
  6174. // Add the source content to the _sourcesContents map.
  6175. // Create a new _sourcesContents map if the property is null.
  6176. if (!this._sourcesContents) {
  6177. this._sourcesContents = Object.create(null);
  6178. }
  6179. this._sourcesContents[util.toSetString(source)] = aSourceContent;
  6180. } else if (this._sourcesContents) {
  6181. // Remove the source file from the _sourcesContents map.
  6182. // If the _sourcesContents map is empty, set the property to null.
  6183. delete this._sourcesContents[util.toSetString(source)];
  6184. if (Object.keys(this._sourcesContents).length === 0) {
  6185. this._sourcesContents = null;
  6186. }
  6187. }
  6188. };
  6189. /**
  6190. * Applies the mappings of a sub-source-map for a specific source file to the
  6191. * source map being generated. Each mapping to the supplied source file is
  6192. * rewritten using the supplied source map. Note: The resolution for the
  6193. * resulting mappings is the minimium of this map and the supplied map.
  6194. *
  6195. * @param aSourceMapConsumer The source map to be applied.
  6196. * @param aSourceFile Optional. The filename of the source file.
  6197. * If omitted, SourceMapConsumer's file property will be used.
  6198. * @param aSourceMapPath Optional. The dirname of the path to the source map
  6199. * to be applied. If relative, it is relative to the SourceMapConsumer.
  6200. * This parameter is needed when the two source maps aren't in the same
  6201. * directory, and the source map to be applied contains relative source
  6202. * paths. If so, those relative source paths need to be rewritten
  6203. * relative to the SourceMapGenerator.
  6204. */
  6205. SourceMapGenerator.prototype.applySourceMap =
  6206. function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
  6207. var sourceFile = aSourceFile;
  6208. // If aSourceFile is omitted, we will use the file property of the SourceMap
  6209. if (aSourceFile == null) {
  6210. if (aSourceMapConsumer.file == null) {
  6211. throw new Error(
  6212. 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
  6213. 'or the source map\'s "file" property. Both were omitted.'
  6214. );
  6215. }
  6216. sourceFile = aSourceMapConsumer.file;
  6217. }
  6218. var sourceRoot = this._sourceRoot;
  6219. // Make "sourceFile" relative if an absolute Url is passed.
  6220. if (sourceRoot != null) {
  6221. sourceFile = util.relative(sourceRoot, sourceFile);
  6222. }
  6223. // Applying the SourceMap can add and remove items from the sources and
  6224. // the names array.
  6225. var newSources = new ArraySet$1();
  6226. var newNames = new ArraySet$1();
  6227. // Find mappings for the "sourceFile"
  6228. this._mappings.unsortedForEach(function (mapping) {
  6229. if (mapping.source === sourceFile && mapping.originalLine != null) {
  6230. // Check if it can be mapped by the source map, then update the mapping.
  6231. var original = aSourceMapConsumer.originalPositionFor({
  6232. line: mapping.originalLine,
  6233. column: mapping.originalColumn
  6234. });
  6235. if (original.source != null) {
  6236. // Copy mapping
  6237. mapping.source = original.source;
  6238. if (aSourceMapPath != null) {
  6239. mapping.source = util.join(aSourceMapPath, mapping.source);
  6240. }
  6241. if (sourceRoot != null) {
  6242. mapping.source = util.relative(sourceRoot, mapping.source);
  6243. }
  6244. mapping.originalLine = original.line;
  6245. mapping.originalColumn = original.column;
  6246. if (original.name != null) {
  6247. mapping.name = original.name;
  6248. }
  6249. }
  6250. }
  6251. var source = mapping.source;
  6252. if (source != null && !newSources.has(source)) {
  6253. newSources.add(source);
  6254. }
  6255. var name = mapping.name;
  6256. if (name != null && !newNames.has(name)) {
  6257. newNames.add(name);
  6258. }
  6259. }, this);
  6260. this._sources = newSources;
  6261. this._names = newNames;
  6262. // Copy sourcesContents of applied map.
  6263. aSourceMapConsumer.sources.forEach(function (sourceFile) {
  6264. var content = aSourceMapConsumer.sourceContentFor(sourceFile);
  6265. if (content != null) {
  6266. if (aSourceMapPath != null) {
  6267. sourceFile = util.join(aSourceMapPath, sourceFile);
  6268. }
  6269. if (sourceRoot != null) {
  6270. sourceFile = util.relative(sourceRoot, sourceFile);
  6271. }
  6272. this.setSourceContent(sourceFile, content);
  6273. }
  6274. }, this);
  6275. };
  6276. /**
  6277. * A mapping can have one of the three levels of data:
  6278. *
  6279. * 1. Just the generated position.
  6280. * 2. The Generated position, original position, and original source.
  6281. * 3. Generated and original position, original source, as well as a name
  6282. * token.
  6283. *
  6284. * To maintain consistency, we validate that any new mapping being added falls
  6285. * in to one of these categories.
  6286. */
  6287. SourceMapGenerator.prototype._validateMapping =
  6288. function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
  6289. aName) {
  6290. // When aOriginal is truthy but has empty values for .line and .column,
  6291. // it is most likely a programmer error. In this case we throw a very
  6292. // specific error message to try to guide them the right way.
  6293. // For example: https://github.com/Polymer/polymer-bundler/pull/519
  6294. if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
  6295. throw new Error(
  6296. 'original.line and original.column are not numbers -- you probably meant to omit ' +
  6297. 'the original mapping entirely and only map the generated position. If so, pass ' +
  6298. 'null for the original mapping instead of an object with empty or null values.'
  6299. );
  6300. }
  6301. if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  6302. && aGenerated.line > 0 && aGenerated.column >= 0
  6303. && !aOriginal && !aSource && !aName) {
  6304. // Case 1.
  6305. return;
  6306. }
  6307. else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
  6308. && aOriginal && 'line' in aOriginal && 'column' in aOriginal
  6309. && aGenerated.line > 0 && aGenerated.column >= 0
  6310. && aOriginal.line > 0 && aOriginal.column >= 0
  6311. && aSource) {
  6312. // Cases 2 and 3.
  6313. return;
  6314. }
  6315. else {
  6316. throw new Error('Invalid mapping: ' + JSON.stringify({
  6317. generated: aGenerated,
  6318. source: aSource,
  6319. original: aOriginal,
  6320. name: aName
  6321. }));
  6322. }
  6323. };
  6324. /**
  6325. * Serialize the accumulated mappings in to the stream of base 64 VLQs
  6326. * specified by the source map format.
  6327. */
  6328. SourceMapGenerator.prototype._serializeMappings =
  6329. function SourceMapGenerator_serializeMappings() {
  6330. var previousGeneratedColumn = 0;
  6331. var previousGeneratedLine = 1;
  6332. var previousOriginalColumn = 0;
  6333. var previousOriginalLine = 0;
  6334. var previousName = 0;
  6335. var previousSource = 0;
  6336. var result = '';
  6337. var next;
  6338. var mapping;
  6339. var nameIdx;
  6340. var sourceIdx;
  6341. var mappings = this._mappings.toArray();
  6342. for (var i = 0, len = mappings.length; i < len; i++) {
  6343. mapping = mappings[i];
  6344. next = '';
  6345. if (mapping.generatedLine !== previousGeneratedLine) {
  6346. previousGeneratedColumn = 0;
  6347. while (mapping.generatedLine !== previousGeneratedLine) {
  6348. next += ';';
  6349. previousGeneratedLine++;
  6350. }
  6351. }
  6352. else {
  6353. if (i > 0) {
  6354. if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
  6355. continue;
  6356. }
  6357. next += ',';
  6358. }
  6359. }
  6360. next += base64Vlq.encode(mapping.generatedColumn
  6361. - previousGeneratedColumn);
  6362. previousGeneratedColumn = mapping.generatedColumn;
  6363. if (mapping.source != null) {
  6364. sourceIdx = this._sources.indexOf(mapping.source);
  6365. next += base64Vlq.encode(sourceIdx - previousSource);
  6366. previousSource = sourceIdx;
  6367. // lines are stored 0-based in SourceMap spec version 3
  6368. next += base64Vlq.encode(mapping.originalLine - 1
  6369. - previousOriginalLine);
  6370. previousOriginalLine = mapping.originalLine - 1;
  6371. next += base64Vlq.encode(mapping.originalColumn
  6372. - previousOriginalColumn);
  6373. previousOriginalColumn = mapping.originalColumn;
  6374. if (mapping.name != null) {
  6375. nameIdx = this._names.indexOf(mapping.name);
  6376. next += base64Vlq.encode(nameIdx - previousName);
  6377. previousName = nameIdx;
  6378. }
  6379. }
  6380. result += next;
  6381. }
  6382. return result;
  6383. };
  6384. SourceMapGenerator.prototype._generateSourcesContent =
  6385. function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
  6386. return aSources.map(function (source) {
  6387. if (!this._sourcesContents) {
  6388. return null;
  6389. }
  6390. if (aSourceRoot != null) {
  6391. source = util.relative(aSourceRoot, source);
  6392. }
  6393. var key = util.toSetString(source);
  6394. return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
  6395. ? this._sourcesContents[key]
  6396. : null;
  6397. }, this);
  6398. };
  6399. /**
  6400. * Externalize the source map.
  6401. */
  6402. SourceMapGenerator.prototype.toJSON =
  6403. function SourceMapGenerator_toJSON() {
  6404. var map = {
  6405. version: this._version,
  6406. sources: this._sources.toArray(),
  6407. names: this._names.toArray(),
  6408. mappings: this._serializeMappings()
  6409. };
  6410. if (this._file != null) {
  6411. map.file = this._file;
  6412. }
  6413. if (this._sourceRoot != null) {
  6414. map.sourceRoot = this._sourceRoot;
  6415. }
  6416. if (this._sourcesContents) {
  6417. map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
  6418. }
  6419. return map;
  6420. };
  6421. /**
  6422. * Render the source map being generated to a string.
  6423. */
  6424. SourceMapGenerator.prototype.toString =
  6425. function SourceMapGenerator_toString() {
  6426. return JSON.stringify(this.toJSON());
  6427. };
  6428. var SourceMapGenerator_1 = SourceMapGenerator;
  6429. var sourceMapGenerator = {
  6430. SourceMapGenerator: SourceMapGenerator_1
  6431. };
  6432. var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;
  6433. var trackNodes = {
  6434. Atrule: true,
  6435. Selector: true,
  6436. Declaration: true
  6437. };
  6438. var sourceMap = function generateSourceMap(handlers) {
  6439. var map = new SourceMapGenerator$1();
  6440. var line = 1;
  6441. var column = 0;
  6442. var generated = {
  6443. line: 1,
  6444. column: 0
  6445. };
  6446. var original = {
  6447. line: 0, // should be zero to add first mapping
  6448. column: 0
  6449. };
  6450. var sourceMappingActive = false;
  6451. var activatedGenerated = {
  6452. line: 1,
  6453. column: 0
  6454. };
  6455. var activatedMapping = {
  6456. generated: activatedGenerated
  6457. };
  6458. var handlersNode = handlers.node;
  6459. handlers.node = function(node) {
  6460. if (node.loc && node.loc.start && trackNodes.hasOwnProperty(node.type)) {
  6461. var nodeLine = node.loc.start.line;
  6462. var nodeColumn = node.loc.start.column - 1;
  6463. if (original.line !== nodeLine ||
  6464. original.column !== nodeColumn) {
  6465. original.line = nodeLine;
  6466. original.column = nodeColumn;
  6467. generated.line = line;
  6468. generated.column = column;
  6469. if (sourceMappingActive) {
  6470. sourceMappingActive = false;
  6471. if (generated.line !== activatedGenerated.line ||
  6472. generated.column !== activatedGenerated.column) {
  6473. map.addMapping(activatedMapping);
  6474. }
  6475. }
  6476. sourceMappingActive = true;
  6477. map.addMapping({
  6478. source: node.loc.source,
  6479. original: original,
  6480. generated: generated
  6481. });
  6482. }
  6483. }
  6484. handlersNode.call(this, node);
  6485. if (sourceMappingActive && trackNodes.hasOwnProperty(node.type)) {
  6486. activatedGenerated.line = line;
  6487. activatedGenerated.column = column;
  6488. }
  6489. };
  6490. var handlersChunk = handlers.chunk;
  6491. handlers.chunk = function(chunk) {
  6492. for (var i = 0; i < chunk.length; i++) {
  6493. if (chunk.charCodeAt(i) === 10) { // \n
  6494. line++;
  6495. column = 0;
  6496. } else {
  6497. column++;
  6498. }
  6499. }
  6500. handlersChunk(chunk);
  6501. };
  6502. var handlersResult = handlers.result;
  6503. handlers.result = function() {
  6504. if (sourceMappingActive) {
  6505. map.addMapping(activatedMapping);
  6506. }
  6507. return {
  6508. css: handlersResult(),
  6509. map: map
  6510. };
  6511. };
  6512. return handlers;
  6513. };
  6514. var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
  6515. function processChildren(node, delimeter) {
  6516. var list = node.children;
  6517. var prev = null;
  6518. if (typeof delimeter !== 'function') {
  6519. list.forEach(this.node, this);
  6520. } else {
  6521. list.forEach(function(node) {
  6522. if (prev !== null) {
  6523. delimeter.call(this, prev);
  6524. }
  6525. this.node(node);
  6526. prev = node;
  6527. }, this);
  6528. }
  6529. }
  6530. var create$1 = function createGenerator(config) {
  6531. function processNode(node) {
  6532. if (hasOwnProperty$3.call(types, node.type)) {
  6533. types[node.type].call(this, node);
  6534. } else {
  6535. throw new Error('Unknown node type: ' + node.type);
  6536. }
  6537. }
  6538. var types = {};
  6539. if (config.node) {
  6540. for (var name in config.node) {
  6541. types[name] = config.node[name].generate;
  6542. }
  6543. }
  6544. return function(node, options) {
  6545. var buffer = '';
  6546. var handlers = {
  6547. children: processChildren,
  6548. node: processNode,
  6549. chunk: function(chunk) {
  6550. buffer += chunk;
  6551. },
  6552. result: function() {
  6553. return buffer;
  6554. }
  6555. };
  6556. if (options) {
  6557. if (typeof options.decorator === 'function') {
  6558. handlers = options.decorator(handlers);
  6559. }
  6560. if (options.sourceMap) {
  6561. handlers = sourceMap(handlers);
  6562. }
  6563. }
  6564. handlers.node(node);
  6565. return handlers.result();
  6566. };
  6567. };
  6568. var create$2 = function createConvertors(walk) {
  6569. return {
  6570. fromPlainObject: function(ast) {
  6571. walk(ast, {
  6572. enter: function(node) {
  6573. if (node.children && node.children instanceof List_1 === false) {
  6574. node.children = new List_1().fromArray(node.children);
  6575. }
  6576. }
  6577. });
  6578. return ast;
  6579. },
  6580. toPlainObject: function(ast) {
  6581. walk(ast, {
  6582. leave: function(node) {
  6583. if (node.children && node.children instanceof List_1) {
  6584. node.children = node.children.toArray();
  6585. }
  6586. }
  6587. });
  6588. return ast;
  6589. }
  6590. };
  6591. };
  6592. var hasOwnProperty$4 = Object.prototype.hasOwnProperty;
  6593. var noop$3 = function() {};
  6594. function ensureFunction$1(value) {
  6595. return typeof value === 'function' ? value : noop$3;
  6596. }
  6597. function invokeForType(fn, type) {
  6598. return function(node, item, list) {
  6599. if (node.type === type) {
  6600. fn.call(this, node, item, list);
  6601. }
  6602. };
  6603. }
  6604. function getWalkersFromStructure(name, nodeType) {
  6605. var structure = nodeType.structure;
  6606. var walkers = [];
  6607. for (var key in structure) {
  6608. if (hasOwnProperty$4.call(structure, key) === false) {
  6609. continue;
  6610. }
  6611. var fieldTypes = structure[key];
  6612. var walker = {
  6613. name: key,
  6614. type: false,
  6615. nullable: false
  6616. };
  6617. if (!Array.isArray(structure[key])) {
  6618. fieldTypes = [structure[key]];
  6619. }
  6620. for (var i = 0; i < fieldTypes.length; i++) {
  6621. var fieldType = fieldTypes[i];
  6622. if (fieldType === null) {
  6623. walker.nullable = true;
  6624. } else if (typeof fieldType === 'string') {
  6625. walker.type = 'node';
  6626. } else if (Array.isArray(fieldType)) {
  6627. walker.type = 'list';
  6628. }
  6629. }
  6630. if (walker.type) {
  6631. walkers.push(walker);
  6632. }
  6633. }
  6634. if (walkers.length) {
  6635. return {
  6636. context: nodeType.walkContext,
  6637. fields: walkers
  6638. };
  6639. }
  6640. return null;
  6641. }
  6642. function getTypesFromConfig(config) {
  6643. var types = {};
  6644. for (var name in config.node) {
  6645. if (hasOwnProperty$4.call(config.node, name)) {
  6646. var nodeType = config.node[name];
  6647. if (!nodeType.structure) {
  6648. throw new Error('Missed `structure` field in `' + name + '` node type definition');
  6649. }
  6650. types[name] = getWalkersFromStructure(name, nodeType);
  6651. }
  6652. }
  6653. return types;
  6654. }
  6655. function createTypeIterator(config, reverse) {
  6656. var fields = config.fields.slice();
  6657. var contextName = config.context;
  6658. var useContext = typeof contextName === 'string';
  6659. if (reverse) {
  6660. fields.reverse();
  6661. }
  6662. return function(node, context, walk, walkReducer) {
  6663. var prevContextValue;
  6664. if (useContext) {
  6665. prevContextValue = context[contextName];
  6666. context[contextName] = node;
  6667. }
  6668. for (var i = 0; i < fields.length; i++) {
  6669. var field = fields[i];
  6670. var ref = node[field.name];
  6671. if (!field.nullable || ref) {
  6672. if (field.type === 'list') {
  6673. var breakWalk = reverse
  6674. ? ref.reduceRight(walkReducer, false)
  6675. : ref.reduce(walkReducer, false);
  6676. if (breakWalk) {
  6677. return true;
  6678. }
  6679. } else if (walk(ref)) {
  6680. return true;
  6681. }
  6682. }
  6683. }
  6684. if (useContext) {
  6685. context[contextName] = prevContextValue;
  6686. }
  6687. };
  6688. }
  6689. function createFastTraveralMap(iterators) {
  6690. return {
  6691. Atrule: {
  6692. StyleSheet: iterators.StyleSheet,
  6693. Atrule: iterators.Atrule,
  6694. Rule: iterators.Rule,
  6695. Block: iterators.Block
  6696. },
  6697. Rule: {
  6698. StyleSheet: iterators.StyleSheet,
  6699. Atrule: iterators.Atrule,
  6700. Rule: iterators.Rule,
  6701. Block: iterators.Block
  6702. },
  6703. Declaration: {
  6704. StyleSheet: iterators.StyleSheet,
  6705. Atrule: iterators.Atrule,
  6706. Rule: iterators.Rule,
  6707. Block: iterators.Block,
  6708. DeclarationList: iterators.DeclarationList
  6709. }
  6710. };
  6711. }
  6712. var create$3 = function createWalker(config) {
  6713. var types = getTypesFromConfig(config);
  6714. var iteratorsNatural = {};
  6715. var iteratorsReverse = {};
  6716. var breakWalk = Symbol('break-walk');
  6717. var skipNode = Symbol('skip-node');
  6718. for (var name in types) {
  6719. if (hasOwnProperty$4.call(types, name) && types[name] !== null) {
  6720. iteratorsNatural[name] = createTypeIterator(types[name], false);
  6721. iteratorsReverse[name] = createTypeIterator(types[name], true);
  6722. }
  6723. }
  6724. var fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural);
  6725. var fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse);
  6726. var walk = function(root, options) {
  6727. function walkNode(node, item, list) {
  6728. var enterRet = enter.call(context, node, item, list);
  6729. if (enterRet === breakWalk) {
  6730. debugger;
  6731. return true;
  6732. }
  6733. if (enterRet === skipNode) {
  6734. return false;
  6735. }
  6736. if (iterators.hasOwnProperty(node.type)) {
  6737. if (iterators[node.type](node, context, walkNode, walkReducer)) {
  6738. return true;
  6739. }
  6740. }
  6741. if (leave.call(context, node, item, list) === breakWalk) {
  6742. return true;
  6743. }
  6744. return false;
  6745. }
  6746. var walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list);
  6747. var enter = noop$3;
  6748. var leave = noop$3;
  6749. var iterators = iteratorsNatural;
  6750. var context = {
  6751. break: breakWalk,
  6752. skip: skipNode,
  6753. root: root,
  6754. stylesheet: null,
  6755. atrule: null,
  6756. atrulePrelude: null,
  6757. rule: null,
  6758. selector: null,
  6759. block: null,
  6760. declaration: null,
  6761. function: null
  6762. };
  6763. if (typeof options === 'function') {
  6764. enter = options;
  6765. } else if (options) {
  6766. enter = ensureFunction$1(options.enter);
  6767. leave = ensureFunction$1(options.leave);
  6768. if (options.reverse) {
  6769. iterators = iteratorsReverse;
  6770. }
  6771. if (options.visit) {
  6772. if (fastTraversalIteratorsNatural.hasOwnProperty(options.visit)) {
  6773. iterators = options.reverse
  6774. ? fastTraversalIteratorsReverse[options.visit]
  6775. : fastTraversalIteratorsNatural[options.visit];
  6776. } else if (!types.hasOwnProperty(options.visit)) {
  6777. throw new Error('Bad value `' + options.visit + '` for `visit` option (should be: ' + Object.keys(types).join(', ') + ')');
  6778. }
  6779. enter = invokeForType(enter, options.visit);
  6780. leave = invokeForType(leave, options.visit);
  6781. }
  6782. }
  6783. if (enter === noop$3 && leave === noop$3) {
  6784. throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
  6785. }
  6786. walkNode(root);
  6787. };
  6788. walk.break = breakWalk;
  6789. walk.skip = skipNode;
  6790. walk.find = function(ast, fn) {
  6791. var found = null;
  6792. walk(ast, function(node, item, list) {
  6793. if (fn.call(this, node, item, list)) {
  6794. found = node;
  6795. return breakWalk;
  6796. }
  6797. });
  6798. return found;
  6799. };
  6800. walk.findLast = function(ast, fn) {
  6801. var found = null;
  6802. walk(ast, {
  6803. reverse: true,
  6804. enter: function(node, item, list) {
  6805. if (fn.call(this, node, item, list)) {
  6806. found = node;
  6807. return breakWalk;
  6808. }
  6809. }
  6810. });
  6811. return found;
  6812. };
  6813. walk.findAll = function(ast, fn) {
  6814. var found = [];
  6815. walk(ast, function(node, item, list) {
  6816. if (fn.call(this, node, item, list)) {
  6817. found.push(node);
  6818. }
  6819. });
  6820. return found;
  6821. };
  6822. return walk;
  6823. };
  6824. var clone = function clone(node) {
  6825. var result = {};
  6826. for (var key in node) {
  6827. var value = node[key];
  6828. if (value) {
  6829. if (Array.isArray(value) || value instanceof List_1) {
  6830. value = value.map(clone);
  6831. } else if (value.constructor === Object) {
  6832. value = clone(value);
  6833. }
  6834. }
  6835. result[key] = value;
  6836. }
  6837. return result;
  6838. };
  6839. var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
  6840. var shape = {
  6841. generic: true,
  6842. types: {},
  6843. atrules: {},
  6844. properties: {},
  6845. parseContext: {},
  6846. scope: {},
  6847. atrule: ['parse'],
  6848. pseudo: ['parse'],
  6849. node: ['name', 'structure', 'parse', 'generate', 'walkContext']
  6850. };
  6851. function isObject(value) {
  6852. return value && value.constructor === Object;
  6853. }
  6854. function copy(value) {
  6855. if (isObject(value)) {
  6856. return Object.assign({}, value);
  6857. } else {
  6858. return value;
  6859. }
  6860. }
  6861. function extend(dest, src) {
  6862. for (var key in src) {
  6863. if (hasOwnProperty$5.call(src, key)) {
  6864. if (isObject(dest[key])) {
  6865. extend(dest[key], copy(src[key]));
  6866. } else {
  6867. dest[key] = copy(src[key]);
  6868. }
  6869. }
  6870. }
  6871. }
  6872. function mix(dest, src, shape) {
  6873. for (var key in shape) {
  6874. if (hasOwnProperty$5.call(shape, key) === false) {
  6875. continue;
  6876. }
  6877. if (shape[key] === true) {
  6878. if (key in src) {
  6879. if (hasOwnProperty$5.call(src, key)) {
  6880. dest[key] = copy(src[key]);
  6881. }
  6882. }
  6883. } else if (shape[key]) {
  6884. if (isObject(shape[key])) {
  6885. var res = {};
  6886. extend(res, dest[key]);
  6887. extend(res, src[key]);
  6888. dest[key] = res;
  6889. } else if (Array.isArray(shape[key])) {
  6890. var res = {};
  6891. var innerShape = shape[key].reduce(function(s, k) {
  6892. s[k] = true;
  6893. return s;
  6894. }, {});
  6895. for (var name in dest[key]) {
  6896. if (hasOwnProperty$5.call(dest[key], name)) {
  6897. res[name] = {};
  6898. if (dest[key] && dest[key][name]) {
  6899. mix(res[name], dest[key][name], innerShape);
  6900. }
  6901. }
  6902. }
  6903. for (var name in src[key]) {
  6904. if (hasOwnProperty$5.call(src[key], name)) {
  6905. if (!res[name]) {
  6906. res[name] = {};
  6907. }
  6908. if (src[key] && src[key][name]) {
  6909. mix(res[name], src[key][name], innerShape);
  6910. }
  6911. }
  6912. }
  6913. dest[key] = res;
  6914. }
  6915. }
  6916. }
  6917. return dest;
  6918. }
  6919. var mix_1 = function(dest, src) {
  6920. return mix(dest, src, shape);
  6921. };
  6922. function createSyntax(config) {
  6923. var parse = create(config);
  6924. var walk = create$3(config);
  6925. var generate = create$1(config);
  6926. var convert = create$2(walk);
  6927. var syntax = {
  6928. List: List_1,
  6929. SyntaxError: _SyntaxError,
  6930. TokenStream: TokenStream_1,
  6931. Lexer: Lexer_1,
  6932. vendorPrefix: names.vendorPrefix,
  6933. keyword: names.keyword,
  6934. property: names.property,
  6935. isCustomProperty: names.isCustomProperty,
  6936. definitionSyntax: definitionSyntax,
  6937. lexer: null,
  6938. createLexer: function(config) {
  6939. return new Lexer_1(config, syntax, syntax.lexer.structure);
  6940. },
  6941. tokenize: tokenizer,
  6942. parse: parse,
  6943. walk: walk,
  6944. generate: generate,
  6945. find: walk.find,
  6946. findLast: walk.findLast,
  6947. findAll: walk.findAll,
  6948. clone: clone,
  6949. fromPlainObject: convert.fromPlainObject,
  6950. toPlainObject: convert.toPlainObject,
  6951. createSyntax: function(config) {
  6952. return createSyntax(mix_1({}, config));
  6953. },
  6954. fork: function(extension) {
  6955. var base = mix_1({}, config); // copy of config
  6956. return createSyntax(
  6957. typeof extension === 'function'
  6958. ? extension(base, Object.assign)
  6959. : mix_1(base, extension)
  6960. );
  6961. }
  6962. };
  6963. syntax.lexer = new Lexer_1({
  6964. generic: true,
  6965. types: config.types,
  6966. atrules: config.atrules,
  6967. properties: config.properties,
  6968. node: config.node
  6969. }, syntax);
  6970. return syntax;
  6971. }
  6972. var create_1 = function(config) {
  6973. return createSyntax(mix_1({}, config));
  6974. };
  6975. var create$4 = {
  6976. create: create_1
  6977. };
  6978. var atRules = {
  6979. "@charset": {
  6980. syntax: "@charset \"<charset>\";",
  6981. groups: [
  6982. "CSS Charsets"
  6983. ],
  6984. status: "standard",
  6985. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@charset"
  6986. },
  6987. "@counter-style": {
  6988. syntax: "@counter-style <counter-style-name> {\n [ system: <counter-system>; ] ||\n [ symbols: <counter-symbols>; ] ||\n [ additive-symbols: <additive-symbols>; ] ||\n [ negative: <negative-symbol>; ] ||\n [ prefix: <prefix>; ] ||\n [ suffix: <suffix>; ] ||\n [ range: <range>; ] ||\n [ pad: <padding>; ] ||\n [ speak-as: <speak-as>; ] ||\n [ fallback: <counter-style-name>; ]\n}",
  6989. interfaces: [
  6990. "CSSCounterStyleRule"
  6991. ],
  6992. groups: [
  6993. "CSS Counter Styles"
  6994. ],
  6995. descriptors: {
  6996. "additive-symbols": {
  6997. syntax: "[ <integer> && <symbol> ]#",
  6998. media: "all",
  6999. initial: "N/A",
  7000. percentages: "no",
  7001. computed: "asSpecified",
  7002. order: "orderOfAppearance",
  7003. status: "standard"
  7004. },
  7005. fallback: {
  7006. syntax: "<counter-style-name>",
  7007. media: "all",
  7008. initial: "decimal",
  7009. percentages: "no",
  7010. computed: "asSpecified",
  7011. order: "uniqueOrder",
  7012. status: "standard"
  7013. },
  7014. negative: {
  7015. syntax: "<symbol> <symbol>?",
  7016. media: "all",
  7017. initial: "\"-\" hyphen-minus",
  7018. percentages: "no",
  7019. computed: "asSpecified",
  7020. order: "orderOfAppearance",
  7021. status: "standard"
  7022. },
  7023. pad: {
  7024. syntax: "<integer> && <symbol>",
  7025. media: "all",
  7026. initial: "0 \"\"",
  7027. percentages: "no",
  7028. computed: "asSpecified",
  7029. order: "uniqueOrder",
  7030. status: "standard"
  7031. },
  7032. prefix: {
  7033. syntax: "<symbol>",
  7034. media: "all",
  7035. initial: "\"\"",
  7036. percentages: "no",
  7037. computed: "asSpecified",
  7038. order: "uniqueOrder",
  7039. status: "standard"
  7040. },
  7041. range: {
  7042. syntax: "[ [ <integer> | infinite ]{2} ]# | auto",
  7043. media: "all",
  7044. initial: "auto",
  7045. percentages: "no",
  7046. computed: "asSpecified",
  7047. order: "orderOfAppearance",
  7048. status: "standard"
  7049. },
  7050. "speak-as": {
  7051. syntax: "auto | bullets | numbers | words | spell-out | <counter-style-name>",
  7052. media: "all",
  7053. initial: "auto",
  7054. percentages: "no",
  7055. computed: "asSpecified",
  7056. order: "uniqueOrder",
  7057. status: "standard"
  7058. },
  7059. suffix: {
  7060. syntax: "<symbol>",
  7061. media: "all",
  7062. initial: "\". \"",
  7063. percentages: "no",
  7064. computed: "asSpecified",
  7065. order: "uniqueOrder",
  7066. status: "standard"
  7067. },
  7068. symbols: {
  7069. syntax: "<symbol>+",
  7070. media: "all",
  7071. initial: "N/A",
  7072. percentages: "no",
  7073. computed: "asSpecified",
  7074. order: "orderOfAppearance",
  7075. status: "standard"
  7076. },
  7077. system: {
  7078. syntax: "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
  7079. media: "all",
  7080. initial: "symbolic",
  7081. percentages: "no",
  7082. computed: "asSpecified",
  7083. order: "uniqueOrder",
  7084. status: "standard"
  7085. }
  7086. },
  7087. status: "standard",
  7088. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
  7089. },
  7090. "@document": {
  7091. syntax: "@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\n <group-rule-body>\n}",
  7092. interfaces: [
  7093. "CSSGroupingRule",
  7094. "CSSConditionRule"
  7095. ],
  7096. groups: [
  7097. "CSS Conditional Rules"
  7098. ],
  7099. status: "nonstandard",
  7100. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@document"
  7101. },
  7102. "@font-face": {
  7103. syntax: "@font-face {\n [ font-family: <family-name>; ] ||\n [ src: <src>; ] ||\n [ unicode-range: <unicode-range>; ] ||\n [ font-variant: <font-variant>; ] ||\n [ font-feature-settings: <font-feature-settings>; ] ||\n [ font-variation-settings: <font-variation-settings>; ] ||\n [ font-stretch: <font-stretch>; ] ||\n [ font-weight: <font-weight>; ] ||\n [ font-style: <font-style>; ]\n}",
  7104. interfaces: [
  7105. "CSSFontFaceRule"
  7106. ],
  7107. groups: [
  7108. "CSS Fonts"
  7109. ],
  7110. descriptors: {
  7111. "font-display": {
  7112. syntax: "[ auto | block | swap | fallback | optional ]",
  7113. media: "visual",
  7114. percentages: "no",
  7115. initial: "auto",
  7116. computed: "asSpecified",
  7117. order: "uniqueOrder",
  7118. status: "experimental"
  7119. },
  7120. "font-family": {
  7121. syntax: "<family-name>",
  7122. media: "all",
  7123. initial: "n/a (required)",
  7124. percentages: "no",
  7125. computed: "asSpecified",
  7126. order: "uniqueOrder",
  7127. status: "standard"
  7128. },
  7129. "font-feature-settings": {
  7130. syntax: "normal | <feature-tag-value>#",
  7131. media: "all",
  7132. initial: "normal",
  7133. percentages: "no",
  7134. computed: "asSpecified",
  7135. order: "orderOfAppearance",
  7136. status: "standard"
  7137. },
  7138. "font-variation-settings": {
  7139. syntax: "normal | [ <string> <number> ]#",
  7140. media: "all",
  7141. initial: "normal",
  7142. percentages: "no",
  7143. computed: "asSpecified",
  7144. order: "orderOfAppearance",
  7145. status: "standard"
  7146. },
  7147. "font-stretch": {
  7148. syntax: "<font-stretch-absolute>{1,2}",
  7149. media: "all",
  7150. initial: "normal",
  7151. percentages: "no",
  7152. computed: "asSpecified",
  7153. order: "uniqueOrder",
  7154. status: "standard"
  7155. },
  7156. "font-style": {
  7157. syntax: "normal | italic | oblique <angle>{0,2}",
  7158. media: "all",
  7159. initial: "normal",
  7160. percentages: "no",
  7161. computed: "asSpecified",
  7162. order: "uniqueOrder",
  7163. status: "standard"
  7164. },
  7165. "font-weight": {
  7166. syntax: "<font-weight-absolute>{1,2}",
  7167. media: "all",
  7168. initial: "normal",
  7169. percentages: "no",
  7170. computed: "asSpecified",
  7171. order: "uniqueOrder",
  7172. status: "standard"
  7173. },
  7174. "font-variant": {
  7175. syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
  7176. media: "all",
  7177. initial: "normal",
  7178. percentages: "no",
  7179. computed: "asSpecified",
  7180. order: "orderOfAppearance",
  7181. status: "standard"
  7182. },
  7183. src: {
  7184. syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
  7185. media: "all",
  7186. initial: "n/a (required)",
  7187. percentages: "no",
  7188. computed: "asSpecified",
  7189. order: "orderOfAppearance",
  7190. status: "standard"
  7191. },
  7192. "unicode-range": {
  7193. syntax: "<unicode-range>#",
  7194. media: "all",
  7195. initial: "U+0-10FFFF",
  7196. percentages: "no",
  7197. computed: "asSpecified",
  7198. order: "orderOfAppearance",
  7199. status: "standard"
  7200. }
  7201. },
  7202. status: "standard",
  7203. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-face"
  7204. },
  7205. "@font-feature-values": {
  7206. syntax: "@font-feature-values <family-name># {\n <feature-value-block-list>\n}",
  7207. interfaces: [
  7208. "CSSFontFeatureValuesRule"
  7209. ],
  7210. groups: [
  7211. "CSS Fonts"
  7212. ],
  7213. status: "standard",
  7214. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
  7215. },
  7216. "@import": {
  7217. syntax: "@import [ <string> | <url> ] [ <media-query-list> ]?;",
  7218. groups: [
  7219. "Media Queries"
  7220. ],
  7221. status: "standard",
  7222. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@import"
  7223. },
  7224. "@keyframes": {
  7225. syntax: "@keyframes <keyframes-name> {\n <keyframe-block-list>\n}",
  7226. interfaces: [
  7227. "CSSKeyframeRule",
  7228. "CSSKeyframesRule"
  7229. ],
  7230. groups: [
  7231. "CSS Animations"
  7232. ],
  7233. status: "standard",
  7234. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
  7235. },
  7236. "@media": {
  7237. syntax: "@media <media-query-list> {\n <group-rule-body>\n}",
  7238. interfaces: [
  7239. "CSSGroupingRule",
  7240. "CSSConditionRule",
  7241. "CSSMediaRule",
  7242. "CSSCustomMediaRule"
  7243. ],
  7244. groups: [
  7245. "CSS Conditional Rules",
  7246. "Media Queries"
  7247. ],
  7248. status: "standard",
  7249. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@media"
  7250. },
  7251. "@namespace": {
  7252. syntax: "@namespace <namespace-prefix>? [ <string> | <url> ];",
  7253. groups: [
  7254. "CSS Namespaces"
  7255. ],
  7256. status: "standard",
  7257. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@namespace"
  7258. },
  7259. "@page": {
  7260. syntax: "@page <page-selector-list> {\n <page-body>\n}",
  7261. interfaces: [
  7262. "CSSPageRule"
  7263. ],
  7264. groups: [
  7265. "CSS Pages"
  7266. ],
  7267. descriptors: {
  7268. bleed: {
  7269. syntax: "auto | <length>",
  7270. media: [
  7271. "visual",
  7272. "paged"
  7273. ],
  7274. initial: "auto",
  7275. percentages: "no",
  7276. computed: "asSpecified",
  7277. order: "uniqueOrder",
  7278. status: "standard"
  7279. },
  7280. marks: {
  7281. syntax: "none | [ crop || cross ]",
  7282. media: [
  7283. "visual",
  7284. "paged"
  7285. ],
  7286. initial: "none",
  7287. percentages: "no",
  7288. computed: "asSpecified",
  7289. order: "orderOfAppearance",
  7290. status: "standard"
  7291. },
  7292. size: {
  7293. syntax: "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
  7294. media: [
  7295. "visual",
  7296. "paged"
  7297. ],
  7298. initial: "auto",
  7299. percentages: "no",
  7300. computed: "asSpecifiedRelativeToAbsoluteLengths",
  7301. order: "orderOfAppearance",
  7302. status: "standard"
  7303. }
  7304. },
  7305. status: "standard",
  7306. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@page"
  7307. },
  7308. "@supports": {
  7309. syntax: "@supports <supports-condition> {\n <group-rule-body>\n}",
  7310. interfaces: [
  7311. "CSSGroupingRule",
  7312. "CSSConditionRule",
  7313. "CSSSupportsRule"
  7314. ],
  7315. groups: [
  7316. "CSS Conditional Rules"
  7317. ],
  7318. status: "standard",
  7319. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@supports"
  7320. },
  7321. "@viewport": {
  7322. syntax: "@viewport {\n <group-rule-body>\n}",
  7323. interfaces: [
  7324. "CSSViewportRule"
  7325. ],
  7326. groups: [
  7327. "CSS Device Adaptation"
  7328. ],
  7329. descriptors: {
  7330. height: {
  7331. syntax: "<viewport-length>{1,2}",
  7332. media: [
  7333. "visual",
  7334. "continuous"
  7335. ],
  7336. initial: [
  7337. "min-height",
  7338. "max-height"
  7339. ],
  7340. percentages: [
  7341. "min-height",
  7342. "max-height"
  7343. ],
  7344. computed: [
  7345. "min-height",
  7346. "max-height"
  7347. ],
  7348. order: "orderOfAppearance",
  7349. status: "standard"
  7350. },
  7351. "max-height": {
  7352. syntax: "<viewport-length>",
  7353. media: [
  7354. "visual",
  7355. "continuous"
  7356. ],
  7357. initial: "auto",
  7358. percentages: "referToHeightOfInitialViewport",
  7359. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  7360. order: "uniqueOrder",
  7361. status: "standard"
  7362. },
  7363. "max-width": {
  7364. syntax: "<viewport-length>",
  7365. media: [
  7366. "visual",
  7367. "continuous"
  7368. ],
  7369. initial: "auto",
  7370. percentages: "referToWidthOfInitialViewport",
  7371. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  7372. order: "uniqueOrder",
  7373. status: "standard"
  7374. },
  7375. "max-zoom": {
  7376. syntax: "auto | <number> | <percentage>",
  7377. media: [
  7378. "visual",
  7379. "continuous"
  7380. ],
  7381. initial: "auto",
  7382. percentages: "the zoom factor itself",
  7383. computed: "autoNonNegativeOrPercentage",
  7384. order: "uniqueOrder",
  7385. status: "standard"
  7386. },
  7387. "min-height": {
  7388. syntax: "<viewport-length>",
  7389. media: [
  7390. "visual",
  7391. "continuous"
  7392. ],
  7393. initial: "auto",
  7394. percentages: "referToHeightOfInitialViewport",
  7395. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  7396. order: "uniqueOrder",
  7397. status: "standard"
  7398. },
  7399. "min-width": {
  7400. syntax: "<viewport-length>",
  7401. media: [
  7402. "visual",
  7403. "continuous"
  7404. ],
  7405. initial: "auto",
  7406. percentages: "referToWidthOfInitialViewport",
  7407. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  7408. order: "uniqueOrder",
  7409. status: "standard"
  7410. },
  7411. "min-zoom": {
  7412. syntax: "auto | <number> | <percentage>",
  7413. media: [
  7414. "visual",
  7415. "continuous"
  7416. ],
  7417. initial: "auto",
  7418. percentages: "the zoom factor itself",
  7419. computed: "autoNonNegativeOrPercentage",
  7420. order: "uniqueOrder",
  7421. status: "standard"
  7422. },
  7423. orientation: {
  7424. syntax: "auto | portrait | landscape",
  7425. media: [
  7426. "visual",
  7427. "continuous"
  7428. ],
  7429. initial: "auto",
  7430. percentages: "referToSizeOfBoundingBox",
  7431. computed: "asSpecified",
  7432. order: "uniqueOrder",
  7433. status: "standard"
  7434. },
  7435. "user-zoom": {
  7436. syntax: "zoom | fixed",
  7437. media: [
  7438. "visual",
  7439. "continuous"
  7440. ],
  7441. initial: "zoom",
  7442. percentages: "referToSizeOfBoundingBox",
  7443. computed: "asSpecified",
  7444. order: "uniqueOrder",
  7445. status: "standard"
  7446. },
  7447. "viewport-fit": {
  7448. syntax: "auto | contain | cover",
  7449. media: [
  7450. "visual",
  7451. "continuous"
  7452. ],
  7453. initial: "auto",
  7454. percentages: "no",
  7455. computed: "asSpecified",
  7456. order: "uniqueOrder",
  7457. status: "standard"
  7458. },
  7459. width: {
  7460. syntax: "<viewport-length>{1,2}",
  7461. media: [
  7462. "visual",
  7463. "continuous"
  7464. ],
  7465. initial: [
  7466. "min-width",
  7467. "max-width"
  7468. ],
  7469. percentages: [
  7470. "min-width",
  7471. "max-width"
  7472. ],
  7473. computed: [
  7474. "min-width",
  7475. "max-width"
  7476. ],
  7477. order: "orderOfAppearance",
  7478. status: "standard"
  7479. },
  7480. zoom: {
  7481. syntax: "auto | <number> | <percentage>",
  7482. media: [
  7483. "visual",
  7484. "continuous"
  7485. ],
  7486. initial: "auto",
  7487. percentages: "the zoom factor itself",
  7488. computed: "autoNonNegativeOrPercentage",
  7489. order: "uniqueOrder",
  7490. status: "standard"
  7491. }
  7492. },
  7493. status: "standard",
  7494. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@viewport"
  7495. }
  7496. };
  7497. var atRules$1 = /*#__PURE__*/Object.freeze({
  7498. __proto__: null,
  7499. 'default': atRules
  7500. });
  7501. var all = {
  7502. syntax: "initial | inherit | unset | revert",
  7503. media: "noPracticalMedia",
  7504. inherited: false,
  7505. animationType: "eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection",
  7506. percentages: "no",
  7507. groups: [
  7508. "CSS Miscellaneous"
  7509. ],
  7510. initial: "noPracticalInitialValue",
  7511. appliesto: "allElements",
  7512. computed: "asSpecifiedAppliesToEachProperty",
  7513. order: "uniqueOrder",
  7514. status: "standard",
  7515. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/all"
  7516. };
  7517. var animation = {
  7518. syntax: "<single-animation>#",
  7519. media: "visual",
  7520. inherited: false,
  7521. animationType: "discrete",
  7522. percentages: "no",
  7523. groups: [
  7524. "CSS Animations"
  7525. ],
  7526. initial: [
  7527. "animation-name",
  7528. "animation-duration",
  7529. "animation-timing-function",
  7530. "animation-delay",
  7531. "animation-iteration-count",
  7532. "animation-direction",
  7533. "animation-fill-mode",
  7534. "animation-play-state"
  7535. ],
  7536. appliesto: "allElementsAndPseudos",
  7537. computed: [
  7538. "animation-name",
  7539. "animation-duration",
  7540. "animation-timing-function",
  7541. "animation-delay",
  7542. "animation-direction",
  7543. "animation-iteration-count",
  7544. "animation-fill-mode",
  7545. "animation-play-state"
  7546. ],
  7547. order: "orderOfAppearance",
  7548. status: "standard",
  7549. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation"
  7550. };
  7551. var appearance = {
  7552. syntax: "none | auto | textfield | menulist-button | <compat-auto>",
  7553. media: "all",
  7554. inherited: false,
  7555. animationType: "discrete",
  7556. percentages: "no",
  7557. groups: [
  7558. "CSS Basic User Interface"
  7559. ],
  7560. initial: "auto",
  7561. appliesto: "allElements",
  7562. computed: "asSpecified",
  7563. order: "perGrammar",
  7564. status: "experimental",
  7565. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
  7566. };
  7567. var azimuth = {
  7568. syntax: "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
  7569. media: "aural",
  7570. inherited: true,
  7571. animationType: "discrete",
  7572. percentages: "no",
  7573. groups: [
  7574. "CSS Speech"
  7575. ],
  7576. initial: "center",
  7577. appliesto: "allElements",
  7578. computed: "normalizedAngle",
  7579. order: "orderOfAppearance",
  7580. status: "obsolete",
  7581. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/azimuth"
  7582. };
  7583. var background = {
  7584. syntax: "[ <bg-layer> , ]* <final-bg-layer>",
  7585. media: "visual",
  7586. inherited: false,
  7587. animationType: [
  7588. "background-color",
  7589. "background-image",
  7590. "background-clip",
  7591. "background-position",
  7592. "background-size",
  7593. "background-repeat",
  7594. "background-attachment"
  7595. ],
  7596. percentages: [
  7597. "background-position",
  7598. "background-size"
  7599. ],
  7600. groups: [
  7601. "CSS Backgrounds and Borders"
  7602. ],
  7603. initial: [
  7604. "background-image",
  7605. "background-position",
  7606. "background-size",
  7607. "background-repeat",
  7608. "background-origin",
  7609. "background-clip",
  7610. "background-attachment",
  7611. "background-color"
  7612. ],
  7613. appliesto: "allElements",
  7614. computed: [
  7615. "background-image",
  7616. "background-position",
  7617. "background-size",
  7618. "background-repeat",
  7619. "background-origin",
  7620. "background-clip",
  7621. "background-attachment",
  7622. "background-color"
  7623. ],
  7624. order: "orderOfAppearance",
  7625. alsoAppliesTo: [
  7626. "::first-letter",
  7627. "::first-line",
  7628. "::placeholder"
  7629. ],
  7630. status: "standard",
  7631. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background"
  7632. };
  7633. var border = {
  7634. syntax: "<line-width> || <line-style> || <color>",
  7635. media: "visual",
  7636. inherited: false,
  7637. animationType: [
  7638. "border-color",
  7639. "border-style",
  7640. "border-width"
  7641. ],
  7642. percentages: "no",
  7643. groups: [
  7644. "CSS Backgrounds and Borders"
  7645. ],
  7646. initial: [
  7647. "border-width",
  7648. "border-style",
  7649. "border-color"
  7650. ],
  7651. appliesto: "allElements",
  7652. computed: [
  7653. "border-width",
  7654. "border-style",
  7655. "border-color"
  7656. ],
  7657. order: "orderOfAppearance",
  7658. alsoAppliesTo: [
  7659. "::first-letter"
  7660. ],
  7661. status: "standard",
  7662. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border"
  7663. };
  7664. var bottom = {
  7665. syntax: "<length> | <percentage> | auto",
  7666. media: "visual",
  7667. inherited: false,
  7668. animationType: "lpc",
  7669. percentages: "referToContainingBlockHeight",
  7670. groups: [
  7671. "CSS Positioning"
  7672. ],
  7673. initial: "auto",
  7674. appliesto: "positionedElements",
  7675. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  7676. order: "uniqueOrder",
  7677. status: "standard",
  7678. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/bottom"
  7679. };
  7680. var clear = {
  7681. syntax: "none | left | right | both | inline-start | inline-end",
  7682. media: "visual",
  7683. inherited: false,
  7684. animationType: "discrete",
  7685. percentages: "no",
  7686. groups: [
  7687. "CSS Positioning"
  7688. ],
  7689. initial: "none",
  7690. appliesto: "blockLevelElements",
  7691. computed: "asSpecified",
  7692. order: "uniqueOrder",
  7693. status: "standard",
  7694. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clear"
  7695. };
  7696. var clip = {
  7697. syntax: "<shape> | auto",
  7698. media: "visual",
  7699. inherited: false,
  7700. animationType: "rectangle",
  7701. percentages: "no",
  7702. groups: [
  7703. "CSS Masking"
  7704. ],
  7705. initial: "auto",
  7706. appliesto: "absolutelyPositionedElements",
  7707. computed: "autoOrRectangle",
  7708. order: "uniqueOrder",
  7709. status: "standard",
  7710. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip"
  7711. };
  7712. var color = {
  7713. syntax: "<color>",
  7714. media: "visual",
  7715. inherited: true,
  7716. animationType: "color",
  7717. percentages: "no",
  7718. groups: [
  7719. "CSS Color"
  7720. ],
  7721. initial: "variesFromBrowserToBrowser",
  7722. appliesto: "allElements",
  7723. computed: "translucentValuesRGBAOtherwiseRGB",
  7724. order: "uniqueOrder",
  7725. alsoAppliesTo: [
  7726. "::first-letter",
  7727. "::first-line",
  7728. "::placeholder"
  7729. ],
  7730. status: "standard",
  7731. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color"
  7732. };
  7733. var columns = {
  7734. syntax: "<'column-width'> || <'column-count'>",
  7735. media: "visual",
  7736. inherited: false,
  7737. animationType: [
  7738. "column-width",
  7739. "column-count"
  7740. ],
  7741. percentages: "no",
  7742. groups: [
  7743. "CSS Columns"
  7744. ],
  7745. initial: [
  7746. "column-width",
  7747. "column-count"
  7748. ],
  7749. appliesto: "blockContainersExceptTableWrappers",
  7750. computed: [
  7751. "column-width",
  7752. "column-count"
  7753. ],
  7754. order: "perGrammar",
  7755. status: "standard",
  7756. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/columns"
  7757. };
  7758. var contain = {
  7759. syntax: "none | strict | content | [ size || layout || style || paint ]",
  7760. media: "all",
  7761. inherited: false,
  7762. animationType: "discrete",
  7763. percentages: "no",
  7764. groups: [
  7765. "CSS Containment"
  7766. ],
  7767. initial: "none",
  7768. appliesto: "allElements",
  7769. computed: "asSpecified",
  7770. order: "perGrammar",
  7771. status: "standard",
  7772. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain"
  7773. };
  7774. var content = {
  7775. syntax: "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
  7776. media: "all",
  7777. inherited: false,
  7778. animationType: "discrete",
  7779. percentages: "no",
  7780. groups: [
  7781. "CSS Generated Content"
  7782. ],
  7783. initial: "normal",
  7784. appliesto: "beforeAndAfterPseudos",
  7785. computed: "normalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified",
  7786. order: "uniqueOrder",
  7787. status: "standard",
  7788. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/content"
  7789. };
  7790. var cursor = {
  7791. syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ]",
  7792. media: [
  7793. "visual",
  7794. "interactive"
  7795. ],
  7796. inherited: true,
  7797. animationType: "discrete",
  7798. percentages: "no",
  7799. groups: [
  7800. "CSS Basic User Interface"
  7801. ],
  7802. initial: "auto",
  7803. appliesto: "allElements",
  7804. computed: "asSpecifiedURLsAbsolute",
  7805. order: "uniqueOrder",
  7806. status: "standard",
  7807. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cursor"
  7808. };
  7809. var direction = {
  7810. syntax: "ltr | rtl",
  7811. media: "visual",
  7812. inherited: true,
  7813. animationType: "discrete",
  7814. percentages: "no",
  7815. groups: [
  7816. "CSS Writing Modes"
  7817. ],
  7818. initial: "ltr",
  7819. appliesto: "allElements",
  7820. computed: "asSpecified",
  7821. order: "uniqueOrder",
  7822. status: "standard",
  7823. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/direction"
  7824. };
  7825. var display = {
  7826. syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
  7827. media: "all",
  7828. inherited: false,
  7829. animationType: "discrete",
  7830. percentages: "no",
  7831. groups: [
  7832. "CSS Display"
  7833. ],
  7834. initial: "inline",
  7835. appliesto: "allElements",
  7836. computed: "asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
  7837. order: "uniqueOrder",
  7838. status: "standard",
  7839. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/display"
  7840. };
  7841. var filter = {
  7842. syntax: "none | <filter-function-list>",
  7843. media: "visual",
  7844. inherited: false,
  7845. animationType: "filterList",
  7846. percentages: "no",
  7847. groups: [
  7848. "Filter Effects"
  7849. ],
  7850. initial: "none",
  7851. appliesto: "allElementsSVGContainerElements",
  7852. computed: "asSpecified",
  7853. order: "uniqueOrder",
  7854. status: "standard",
  7855. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/filter"
  7856. };
  7857. var flex = {
  7858. syntax: "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
  7859. media: "visual",
  7860. inherited: false,
  7861. animationType: [
  7862. "flex-grow",
  7863. "flex-shrink",
  7864. "flex-basis"
  7865. ],
  7866. percentages: "no",
  7867. groups: [
  7868. "CSS Flexible Box Layout"
  7869. ],
  7870. initial: [
  7871. "flex-grow",
  7872. "flex-shrink",
  7873. "flex-basis"
  7874. ],
  7875. appliesto: "flexItemsAndInFlowPseudos",
  7876. computed: [
  7877. "flex-grow",
  7878. "flex-shrink",
  7879. "flex-basis"
  7880. ],
  7881. order: "orderOfAppearance",
  7882. status: "standard",
  7883. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex"
  7884. };
  7885. var float = {
  7886. syntax: "left | right | none | inline-start | inline-end",
  7887. media: "visual",
  7888. inherited: false,
  7889. animationType: "discrete",
  7890. percentages: "no",
  7891. groups: [
  7892. "CSS Positioning"
  7893. ],
  7894. initial: "none",
  7895. appliesto: "allElementsNoEffectIfDisplayNone",
  7896. computed: "asSpecified",
  7897. order: "uniqueOrder",
  7898. status: "standard",
  7899. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/float"
  7900. };
  7901. var font = {
  7902. syntax: "[ [ <'font-style'> || <font-variant-css21> || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar",
  7903. media: "visual",
  7904. inherited: true,
  7905. animationType: [
  7906. "font-style",
  7907. "font-variant",
  7908. "font-weight",
  7909. "font-stretch",
  7910. "font-size",
  7911. "line-height",
  7912. "font-family"
  7913. ],
  7914. percentages: [
  7915. "font-size",
  7916. "line-height"
  7917. ],
  7918. groups: [
  7919. "CSS Fonts"
  7920. ],
  7921. initial: [
  7922. "font-style",
  7923. "font-variant",
  7924. "font-weight",
  7925. "font-stretch",
  7926. "font-size",
  7927. "line-height",
  7928. "font-family"
  7929. ],
  7930. appliesto: "allElements",
  7931. computed: [
  7932. "font-style",
  7933. "font-variant",
  7934. "font-weight",
  7935. "font-stretch",
  7936. "font-size",
  7937. "line-height",
  7938. "font-family"
  7939. ],
  7940. order: "orderOfAppearance",
  7941. alsoAppliesTo: [
  7942. "::first-letter",
  7943. "::first-line",
  7944. "::placeholder"
  7945. ],
  7946. status: "standard",
  7947. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font"
  7948. };
  7949. var gap = {
  7950. syntax: "<'row-gap'> <'column-gap'>?",
  7951. media: "visual",
  7952. inherited: false,
  7953. animationType: [
  7954. "row-gap",
  7955. "column-gap"
  7956. ],
  7957. percentages: "no",
  7958. groups: [
  7959. "CSS Box Alignment"
  7960. ],
  7961. initial: [
  7962. "row-gap",
  7963. "column-gap"
  7964. ],
  7965. appliesto: "multiColumnElementsFlexContainersGridContainers",
  7966. computed: [
  7967. "row-gap",
  7968. "column-gap"
  7969. ],
  7970. order: "uniqueOrder",
  7971. status: "standard",
  7972. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
  7973. };
  7974. var grid = {
  7975. syntax: "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
  7976. media: "visual",
  7977. inherited: false,
  7978. animationType: "discrete",
  7979. percentages: [
  7980. "grid-template-rows",
  7981. "grid-template-columns",
  7982. "grid-auto-rows",
  7983. "grid-auto-columns"
  7984. ],
  7985. groups: [
  7986. "CSS Grid Layout"
  7987. ],
  7988. initial: [
  7989. "grid-template-rows",
  7990. "grid-template-columns",
  7991. "grid-template-areas",
  7992. "grid-auto-rows",
  7993. "grid-auto-columns",
  7994. "grid-auto-flow",
  7995. "grid-column-gap",
  7996. "grid-row-gap",
  7997. "column-gap",
  7998. "row-gap"
  7999. ],
  8000. appliesto: "gridContainers",
  8001. computed: [
  8002. "grid-template-rows",
  8003. "grid-template-columns",
  8004. "grid-template-areas",
  8005. "grid-auto-rows",
  8006. "grid-auto-columns",
  8007. "grid-auto-flow",
  8008. "grid-column-gap",
  8009. "grid-row-gap",
  8010. "column-gap",
  8011. "row-gap"
  8012. ],
  8013. order: "uniqueOrder",
  8014. status: "standard",
  8015. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid"
  8016. };
  8017. var height = {
  8018. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  8019. media: "visual",
  8020. inherited: false,
  8021. animationType: "lpc",
  8022. percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock",
  8023. groups: [
  8024. "CSS Box Model"
  8025. ],
  8026. initial: "auto",
  8027. appliesto: "allElementsButNonReplacedAndTableColumns",
  8028. computed: "percentageAutoOrAbsoluteLength",
  8029. order: "uniqueOrder",
  8030. status: "standard",
  8031. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/height"
  8032. };
  8033. var hyphens = {
  8034. syntax: "none | manual | auto",
  8035. media: "visual",
  8036. inherited: true,
  8037. animationType: "discrete",
  8038. percentages: "no",
  8039. groups: [
  8040. "CSS Text"
  8041. ],
  8042. initial: "manual",
  8043. appliesto: "allElements",
  8044. computed: "asSpecified",
  8045. order: "uniqueOrder",
  8046. status: "standard",
  8047. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphens"
  8048. };
  8049. var inset = {
  8050. syntax: "<'top'>{1,4}",
  8051. media: "visual",
  8052. inherited: false,
  8053. animationType: "lpc",
  8054. percentages: "logicalHeightOfContainingBlock",
  8055. groups: [
  8056. "CSS Logical Properties"
  8057. ],
  8058. initial: "auto",
  8059. appliesto: "positionedElements",
  8060. computed: "sameAsBoxOffsets",
  8061. order: "uniqueOrder",
  8062. status: "standard",
  8063. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset"
  8064. };
  8065. var isolation = {
  8066. syntax: "auto | isolate",
  8067. media: "visual",
  8068. inherited: false,
  8069. animationType: "discrete",
  8070. percentages: "no",
  8071. groups: [
  8072. "Compositing and Blending"
  8073. ],
  8074. initial: "auto",
  8075. appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
  8076. computed: "asSpecified",
  8077. order: "uniqueOrder",
  8078. status: "standard",
  8079. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/isolation"
  8080. };
  8081. var left = {
  8082. syntax: "<length> | <percentage> | auto",
  8083. media: "visual",
  8084. inherited: false,
  8085. animationType: "lpc",
  8086. percentages: "referToWidthOfContainingBlock",
  8087. groups: [
  8088. "CSS Positioning"
  8089. ],
  8090. initial: "auto",
  8091. appliesto: "positionedElements",
  8092. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  8093. order: "uniqueOrder",
  8094. status: "standard",
  8095. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/left"
  8096. };
  8097. var margin = {
  8098. syntax: "[ <length> | <percentage> | auto ]{1,4}",
  8099. media: "visual",
  8100. inherited: false,
  8101. animationType: "length",
  8102. percentages: "referToWidthOfContainingBlock",
  8103. groups: [
  8104. "CSS Box Model"
  8105. ],
  8106. initial: [
  8107. "margin-bottom",
  8108. "margin-left",
  8109. "margin-right",
  8110. "margin-top"
  8111. ],
  8112. appliesto: "allElementsExceptTableDisplayTypes",
  8113. computed: [
  8114. "margin-bottom",
  8115. "margin-left",
  8116. "margin-right",
  8117. "margin-top"
  8118. ],
  8119. order: "uniqueOrder",
  8120. alsoAppliesTo: [
  8121. "::first-letter",
  8122. "::first-line"
  8123. ],
  8124. status: "standard",
  8125. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin"
  8126. };
  8127. var mask = {
  8128. syntax: "<mask-layer>#",
  8129. media: "visual",
  8130. inherited: false,
  8131. animationType: [
  8132. "mask-image",
  8133. "mask-mode",
  8134. "mask-repeat",
  8135. "mask-position",
  8136. "mask-clip",
  8137. "mask-origin",
  8138. "mask-size",
  8139. "mask-composite"
  8140. ],
  8141. percentages: [
  8142. "mask-position"
  8143. ],
  8144. groups: [
  8145. "CSS Masking"
  8146. ],
  8147. initial: [
  8148. "mask-image",
  8149. "mask-mode",
  8150. "mask-repeat",
  8151. "mask-position",
  8152. "mask-clip",
  8153. "mask-origin",
  8154. "mask-size",
  8155. "mask-composite"
  8156. ],
  8157. appliesto: "allElementsSVGContainerElements",
  8158. computed: [
  8159. "mask-image",
  8160. "mask-mode",
  8161. "mask-repeat",
  8162. "mask-position",
  8163. "mask-clip",
  8164. "mask-origin",
  8165. "mask-size",
  8166. "mask-composite"
  8167. ],
  8168. order: "perGrammar",
  8169. stacking: true,
  8170. status: "standard",
  8171. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
  8172. };
  8173. var offset = {
  8174. syntax: "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
  8175. media: "visual",
  8176. inherited: false,
  8177. animationType: [
  8178. "offset-position",
  8179. "offset-path",
  8180. "offset-distance",
  8181. "offset-anchor",
  8182. "offset-rotate"
  8183. ],
  8184. percentages: [
  8185. "offset-position",
  8186. "offset-distance",
  8187. "offset-anchor"
  8188. ],
  8189. groups: [
  8190. "CSS Motion Path"
  8191. ],
  8192. initial: [
  8193. "offset-position",
  8194. "offset-path",
  8195. "offset-distance",
  8196. "offset-anchor",
  8197. "offset-rotate"
  8198. ],
  8199. appliesto: "transformableElements",
  8200. computed: [
  8201. "offset-position",
  8202. "offset-path",
  8203. "offset-distance",
  8204. "offset-anchor",
  8205. "offset-rotate"
  8206. ],
  8207. order: "perGrammar",
  8208. stacking: true,
  8209. status: "standard",
  8210. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset"
  8211. };
  8212. var opacity = {
  8213. syntax: "<alpha-value>",
  8214. media: "visual",
  8215. inherited: false,
  8216. animationType: "number",
  8217. percentages: "no",
  8218. groups: [
  8219. "CSS Color"
  8220. ],
  8221. initial: "1.0",
  8222. appliesto: "allElements",
  8223. computed: "specifiedValueClipped0To1",
  8224. order: "uniqueOrder",
  8225. alsoAppliesTo: [
  8226. "::placeholder"
  8227. ],
  8228. status: "standard",
  8229. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/opacity"
  8230. };
  8231. var order = {
  8232. syntax: "<integer>",
  8233. media: "visual",
  8234. inherited: false,
  8235. animationType: "integer",
  8236. percentages: "no",
  8237. groups: [
  8238. "CSS Flexible Box Layout"
  8239. ],
  8240. initial: "0",
  8241. appliesto: "flexItemsGridItemsAbsolutelyPositionedContainerChildren",
  8242. computed: "asSpecified",
  8243. order: "uniqueOrder",
  8244. status: "standard",
  8245. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/order"
  8246. };
  8247. var orphans = {
  8248. syntax: "<integer>",
  8249. media: "visual",
  8250. inherited: true,
  8251. animationType: "discrete",
  8252. percentages: "no",
  8253. groups: [
  8254. "CSS Fragmentation"
  8255. ],
  8256. initial: "2",
  8257. appliesto: "blockContainerElements",
  8258. computed: "asSpecified",
  8259. order: "perGrammar",
  8260. status: "standard",
  8261. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/orphans"
  8262. };
  8263. var outline = {
  8264. syntax: "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
  8265. media: [
  8266. "visual",
  8267. "interactive"
  8268. ],
  8269. inherited: false,
  8270. animationType: [
  8271. "outline-color",
  8272. "outline-width",
  8273. "outline-style"
  8274. ],
  8275. percentages: "no",
  8276. groups: [
  8277. "CSS Basic User Interface"
  8278. ],
  8279. initial: [
  8280. "outline-color",
  8281. "outline-style",
  8282. "outline-width"
  8283. ],
  8284. appliesto: "allElements",
  8285. computed: [
  8286. "outline-color",
  8287. "outline-width",
  8288. "outline-style"
  8289. ],
  8290. order: "orderOfAppearance",
  8291. status: "standard",
  8292. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline"
  8293. };
  8294. var overflow = {
  8295. syntax: "[ visible | hidden | clip | scroll | auto ]{1,2}",
  8296. media: "visual",
  8297. inherited: false,
  8298. animationType: "discrete",
  8299. percentages: "no",
  8300. groups: [
  8301. "CSS Overflow"
  8302. ],
  8303. initial: "visible",
  8304. appliesto: "blockContainersFlexContainersGridContainers",
  8305. computed: [
  8306. "overflow-x",
  8307. "overflow-y"
  8308. ],
  8309. order: "uniqueOrder",
  8310. status: "standard",
  8311. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow"
  8312. };
  8313. var padding = {
  8314. syntax: "[ <length> | <percentage> ]{1,4}",
  8315. media: "visual",
  8316. inherited: false,
  8317. animationType: "length",
  8318. percentages: "referToWidthOfContainingBlock",
  8319. groups: [
  8320. "CSS Box Model"
  8321. ],
  8322. initial: [
  8323. "padding-bottom",
  8324. "padding-left",
  8325. "padding-right",
  8326. "padding-top"
  8327. ],
  8328. appliesto: "allElementsExceptInternalTableDisplayTypes",
  8329. computed: [
  8330. "padding-bottom",
  8331. "padding-left",
  8332. "padding-right",
  8333. "padding-top"
  8334. ],
  8335. order: "uniqueOrder",
  8336. alsoAppliesTo: [
  8337. "::first-letter",
  8338. "::first-line"
  8339. ],
  8340. status: "standard",
  8341. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding"
  8342. };
  8343. var perspective = {
  8344. syntax: "none | <length>",
  8345. media: "visual",
  8346. inherited: false,
  8347. animationType: "length",
  8348. percentages: "no",
  8349. groups: [
  8350. "CSS Transforms"
  8351. ],
  8352. initial: "none",
  8353. appliesto: "transformableElements",
  8354. computed: "absoluteLengthOrNone",
  8355. order: "uniqueOrder",
  8356. stacking: true,
  8357. status: "standard",
  8358. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective"
  8359. };
  8360. var position = {
  8361. syntax: "static | relative | absolute | sticky | fixed",
  8362. media: "visual",
  8363. inherited: false,
  8364. animationType: "discrete",
  8365. percentages: "no",
  8366. groups: [
  8367. "CSS Positioning"
  8368. ],
  8369. initial: "static",
  8370. appliesto: "allElements",
  8371. computed: "asSpecified",
  8372. order: "uniqueOrder",
  8373. stacking: true,
  8374. status: "standard",
  8375. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position"
  8376. };
  8377. var quotes = {
  8378. syntax: "none | auto | [ <string> <string> ]+",
  8379. media: "visual",
  8380. inherited: true,
  8381. animationType: "discrete",
  8382. percentages: "no",
  8383. groups: [
  8384. "CSS Generated Content"
  8385. ],
  8386. initial: "dependsOnUserAgent",
  8387. appliesto: "allElements",
  8388. computed: "asSpecified",
  8389. order: "uniqueOrder",
  8390. status: "standard",
  8391. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/quotes"
  8392. };
  8393. var resize = {
  8394. syntax: "none | both | horizontal | vertical | block | inline",
  8395. media: "visual",
  8396. inherited: false,
  8397. animationType: "discrete",
  8398. percentages: "no",
  8399. groups: [
  8400. "CSS Basic User Interface"
  8401. ],
  8402. initial: "none",
  8403. appliesto: "elementsWithOverflowNotVisibleAndReplacedElements",
  8404. computed: "asSpecified",
  8405. order: "uniqueOrder",
  8406. status: "standard",
  8407. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/resize"
  8408. };
  8409. var right = {
  8410. syntax: "<length> | <percentage> | auto",
  8411. media: "visual",
  8412. inherited: false,
  8413. animationType: "lpc",
  8414. percentages: "referToWidthOfContainingBlock",
  8415. groups: [
  8416. "CSS Positioning"
  8417. ],
  8418. initial: "auto",
  8419. appliesto: "positionedElements",
  8420. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  8421. order: "uniqueOrder",
  8422. status: "standard",
  8423. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/right"
  8424. };
  8425. var rotate = {
  8426. syntax: "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
  8427. media: "visual",
  8428. inherited: false,
  8429. animationType: "transform",
  8430. percentages: "no",
  8431. groups: [
  8432. "CSS Transforms"
  8433. ],
  8434. initial: "none",
  8435. appliesto: "transformableElements",
  8436. computed: "asSpecified",
  8437. order: "perGrammar",
  8438. stacking: true,
  8439. status: "standard",
  8440. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/rotate"
  8441. };
  8442. var scale = {
  8443. syntax: "none | <number>{1,3}",
  8444. media: "visual",
  8445. inherited: false,
  8446. animationType: "transform",
  8447. percentages: "no",
  8448. groups: [
  8449. "CSS Transforms"
  8450. ],
  8451. initial: "none",
  8452. appliesto: "transformableElements",
  8453. computed: "asSpecified",
  8454. order: "perGrammar",
  8455. stacking: true,
  8456. status: "standard",
  8457. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scale"
  8458. };
  8459. var top = {
  8460. syntax: "<length> | <percentage> | auto",
  8461. media: "visual",
  8462. inherited: false,
  8463. animationType: "lpc",
  8464. percentages: "referToContainingBlockHeight",
  8465. groups: [
  8466. "CSS Positioning"
  8467. ],
  8468. initial: "auto",
  8469. appliesto: "positionedElements",
  8470. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  8471. order: "uniqueOrder",
  8472. status: "standard",
  8473. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/top"
  8474. };
  8475. var transform = {
  8476. syntax: "none | <transform-list>",
  8477. media: "visual",
  8478. inherited: false,
  8479. animationType: "transform",
  8480. percentages: "referToSizeOfBoundingBox",
  8481. groups: [
  8482. "CSS Transforms"
  8483. ],
  8484. initial: "none",
  8485. appliesto: "transformableElements",
  8486. computed: "asSpecifiedRelativeToAbsoluteLengths",
  8487. order: "uniqueOrder",
  8488. stacking: true,
  8489. status: "standard",
  8490. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform"
  8491. };
  8492. var transition = {
  8493. syntax: "<single-transition>#",
  8494. media: "interactive",
  8495. inherited: false,
  8496. animationType: "discrete",
  8497. percentages: "no",
  8498. groups: [
  8499. "CSS Transitions"
  8500. ],
  8501. initial: [
  8502. "transition-delay",
  8503. "transition-duration",
  8504. "transition-property",
  8505. "transition-timing-function"
  8506. ],
  8507. appliesto: "allElementsAndPseudos",
  8508. computed: [
  8509. "transition-delay",
  8510. "transition-duration",
  8511. "transition-property",
  8512. "transition-timing-function"
  8513. ],
  8514. order: "orderOfAppearance",
  8515. status: "standard",
  8516. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition"
  8517. };
  8518. var translate = {
  8519. syntax: "none | <length-percentage> [ <length-percentage> <length>? ]?",
  8520. media: "visual",
  8521. inherited: false,
  8522. animationType: "transform",
  8523. percentages: "referToSizeOfBoundingBox",
  8524. groups: [
  8525. "CSS Transforms"
  8526. ],
  8527. initial: "none",
  8528. appliesto: "transformableElements",
  8529. computed: "asSpecifiedRelativeToAbsoluteLengths",
  8530. order: "perGrammar",
  8531. stacking: true,
  8532. status: "standard",
  8533. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/translate"
  8534. };
  8535. var visibility = {
  8536. syntax: "visible | hidden | collapse",
  8537. media: "visual",
  8538. inherited: true,
  8539. animationType: "visibility",
  8540. percentages: "no",
  8541. groups: [
  8542. "CSS Box Model"
  8543. ],
  8544. initial: "visible",
  8545. appliesto: "allElements",
  8546. computed: "asSpecified",
  8547. order: "uniqueOrder",
  8548. status: "standard",
  8549. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/visibility"
  8550. };
  8551. var widows = {
  8552. syntax: "<integer>",
  8553. media: "visual",
  8554. inherited: true,
  8555. animationType: "discrete",
  8556. percentages: "no",
  8557. groups: [
  8558. "CSS Fragmentation"
  8559. ],
  8560. initial: "2",
  8561. appliesto: "blockContainerElements",
  8562. computed: "asSpecified",
  8563. order: "perGrammar",
  8564. status: "standard",
  8565. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/widows"
  8566. };
  8567. var width = {
  8568. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  8569. media: "visual",
  8570. inherited: false,
  8571. animationType: "lpc",
  8572. percentages: "referToWidthOfContainingBlock",
  8573. groups: [
  8574. "CSS Box Model"
  8575. ],
  8576. initial: "auto",
  8577. appliesto: "allElementsButNonReplacedAndTableRows",
  8578. computed: "percentageAutoOrAbsoluteLength",
  8579. order: "lengthOrPercentageBeforeKeywordIfBothPresent",
  8580. status: "standard",
  8581. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/width"
  8582. };
  8583. var zoom = {
  8584. syntax: "normal | reset | <number> | <percentage>",
  8585. media: "visual",
  8586. inherited: false,
  8587. animationType: "integer",
  8588. percentages: "no",
  8589. groups: [
  8590. "Microsoft Extensions"
  8591. ],
  8592. initial: "normal",
  8593. appliesto: "allElements",
  8594. computed: "asSpecified",
  8595. order: "uniqueOrder",
  8596. status: "nonstandard",
  8597. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/zoom"
  8598. };
  8599. var properties$1 = {
  8600. "--*": {
  8601. syntax: "<declaration-value>",
  8602. media: "all",
  8603. inherited: true,
  8604. animationType: "discrete",
  8605. percentages: "no",
  8606. groups: [
  8607. "CSS Variables"
  8608. ],
  8609. initial: "seeProse",
  8610. appliesto: "allElements",
  8611. computed: "asSpecifiedWithVarsSubstituted",
  8612. order: "perGrammar",
  8613. status: "experimental",
  8614. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/--*"
  8615. },
  8616. "-ms-accelerator": {
  8617. syntax: "false | true",
  8618. media: "visual",
  8619. inherited: false,
  8620. animationType: "discrete",
  8621. percentages: "no",
  8622. groups: [
  8623. "Microsoft Extensions"
  8624. ],
  8625. initial: "false",
  8626. appliesto: "allElements",
  8627. computed: "asSpecified",
  8628. order: "uniqueOrder",
  8629. status: "nonstandard",
  8630. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"
  8631. },
  8632. "-ms-block-progression": {
  8633. syntax: "tb | rl | bt | lr",
  8634. media: "visual",
  8635. inherited: false,
  8636. animationType: "discrete",
  8637. percentages: "no",
  8638. groups: [
  8639. "Microsoft Extensions"
  8640. ],
  8641. initial: "tb",
  8642. appliesto: "allElements",
  8643. computed: "asSpecified",
  8644. order: "uniqueOrder",
  8645. status: "nonstandard",
  8646. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"
  8647. },
  8648. "-ms-content-zoom-chaining": {
  8649. syntax: "none | chained",
  8650. media: "interactive",
  8651. inherited: false,
  8652. animationType: "discrete",
  8653. percentages: "no",
  8654. groups: [
  8655. "Microsoft Extensions"
  8656. ],
  8657. initial: "none",
  8658. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8659. computed: "asSpecified",
  8660. order: "uniqueOrder",
  8661. status: "nonstandard",
  8662. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"
  8663. },
  8664. "-ms-content-zooming": {
  8665. syntax: "none | zoom",
  8666. media: "interactive",
  8667. inherited: false,
  8668. animationType: "discrete",
  8669. percentages: "no",
  8670. groups: [
  8671. "Microsoft Extensions"
  8672. ],
  8673. initial: "zoomForTheTopLevelNoneForTheRest",
  8674. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8675. computed: "asSpecified",
  8676. order: "uniqueOrder",
  8677. status: "nonstandard",
  8678. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"
  8679. },
  8680. "-ms-content-zoom-limit": {
  8681. syntax: "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
  8682. media: "interactive",
  8683. inherited: false,
  8684. animationType: "discrete",
  8685. percentages: [
  8686. "-ms-content-zoom-limit-max",
  8687. "-ms-content-zoom-limit-min"
  8688. ],
  8689. groups: [
  8690. "Microsoft Extensions"
  8691. ],
  8692. initial: [
  8693. "-ms-content-zoom-limit-max",
  8694. "-ms-content-zoom-limit-min"
  8695. ],
  8696. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8697. computed: [
  8698. "-ms-content-zoom-limit-max",
  8699. "-ms-content-zoom-limit-min"
  8700. ],
  8701. order: "uniqueOrder",
  8702. status: "nonstandard",
  8703. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"
  8704. },
  8705. "-ms-content-zoom-limit-max": {
  8706. syntax: "<percentage>",
  8707. media: "interactive",
  8708. inherited: false,
  8709. animationType: "discrete",
  8710. percentages: "maxZoomFactor",
  8711. groups: [
  8712. "Microsoft Extensions"
  8713. ],
  8714. initial: "400%",
  8715. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8716. computed: "asSpecified",
  8717. order: "uniqueOrder",
  8718. status: "nonstandard",
  8719. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"
  8720. },
  8721. "-ms-content-zoom-limit-min": {
  8722. syntax: "<percentage>",
  8723. media: "interactive",
  8724. inherited: false,
  8725. animationType: "discrete",
  8726. percentages: "minZoomFactor",
  8727. groups: [
  8728. "Microsoft Extensions"
  8729. ],
  8730. initial: "100%",
  8731. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8732. computed: "asSpecified",
  8733. order: "uniqueOrder",
  8734. status: "nonstandard",
  8735. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"
  8736. },
  8737. "-ms-content-zoom-snap": {
  8738. syntax: "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
  8739. media: "interactive",
  8740. inherited: false,
  8741. animationType: "discrete",
  8742. percentages: "no",
  8743. groups: [
  8744. "Microsoft Extensions"
  8745. ],
  8746. initial: [
  8747. "-ms-content-zoom-snap-type",
  8748. "-ms-content-zoom-snap-points"
  8749. ],
  8750. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8751. computed: [
  8752. "-ms-content-zoom-snap-type",
  8753. "-ms-content-zoom-snap-points"
  8754. ],
  8755. order: "uniqueOrder",
  8756. status: "nonstandard",
  8757. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"
  8758. },
  8759. "-ms-content-zoom-snap-points": {
  8760. syntax: "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
  8761. media: "interactive",
  8762. inherited: false,
  8763. animationType: "discrete",
  8764. percentages: "no",
  8765. groups: [
  8766. "Microsoft Extensions"
  8767. ],
  8768. initial: "snapInterval(0%, 100%)",
  8769. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8770. computed: "asSpecified",
  8771. order: "uniqueOrder",
  8772. status: "nonstandard",
  8773. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"
  8774. },
  8775. "-ms-content-zoom-snap-type": {
  8776. syntax: "none | proximity | mandatory",
  8777. media: "interactive",
  8778. inherited: false,
  8779. animationType: "discrete",
  8780. percentages: "no",
  8781. groups: [
  8782. "Microsoft Extensions"
  8783. ],
  8784. initial: "none",
  8785. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8786. computed: "asSpecified",
  8787. order: "uniqueOrder",
  8788. status: "nonstandard",
  8789. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"
  8790. },
  8791. "-ms-filter": {
  8792. syntax: "<string>",
  8793. media: "visual",
  8794. inherited: false,
  8795. animationType: "discrete",
  8796. percentages: "no",
  8797. groups: [
  8798. "Microsoft Extensions"
  8799. ],
  8800. initial: "\"\"",
  8801. appliesto: "allElements",
  8802. computed: "asSpecified",
  8803. order: "uniqueOrder",
  8804. status: "nonstandard",
  8805. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-filter"
  8806. },
  8807. "-ms-flow-from": {
  8808. syntax: "[ none | <custom-ident> ]#",
  8809. media: "visual",
  8810. inherited: false,
  8811. animationType: "discrete",
  8812. percentages: "no",
  8813. groups: [
  8814. "Microsoft Extensions"
  8815. ],
  8816. initial: "none",
  8817. appliesto: "nonReplacedElements",
  8818. computed: "asSpecified",
  8819. order: "uniqueOrder",
  8820. status: "nonstandard",
  8821. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"
  8822. },
  8823. "-ms-flow-into": {
  8824. syntax: "[ none | <custom-ident> ]#",
  8825. media: "visual",
  8826. inherited: false,
  8827. animationType: "discrete",
  8828. percentages: "no",
  8829. groups: [
  8830. "Microsoft Extensions"
  8831. ],
  8832. initial: "none",
  8833. appliesto: "iframeElements",
  8834. computed: "asSpecified",
  8835. order: "uniqueOrder",
  8836. status: "nonstandard",
  8837. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"
  8838. },
  8839. "-ms-grid-columns": {
  8840. syntax: "none | <track-list> | <auto-track-list>",
  8841. media: "visual",
  8842. inherited: false,
  8843. animationType: "simpleListOfLpcDifferenceLpc",
  8844. percentages: "referToDimensionOfContentArea",
  8845. groups: [
  8846. "CSS Grid Layout"
  8847. ],
  8848. initial: "none",
  8849. appliesto: "gridContainers",
  8850. computed: "asSpecifiedRelativeToAbsoluteLengths",
  8851. order: "uniqueOrder",
  8852. status: "nonstandard",
  8853. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"
  8854. },
  8855. "-ms-grid-rows": {
  8856. syntax: "none | <track-list> | <auto-track-list>",
  8857. media: "visual",
  8858. inherited: false,
  8859. animationType: "simpleListOfLpcDifferenceLpc",
  8860. percentages: "referToDimensionOfContentArea",
  8861. groups: [
  8862. "CSS Grid Layout"
  8863. ],
  8864. initial: "none",
  8865. appliesto: "gridContainers",
  8866. computed: "asSpecifiedRelativeToAbsoluteLengths",
  8867. order: "uniqueOrder",
  8868. status: "nonstandard",
  8869. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"
  8870. },
  8871. "-ms-high-contrast-adjust": {
  8872. syntax: "auto | none",
  8873. media: "visual",
  8874. inherited: true,
  8875. animationType: "discrete",
  8876. percentages: "no",
  8877. groups: [
  8878. "Microsoft Extensions"
  8879. ],
  8880. initial: "auto",
  8881. appliesto: "allElements",
  8882. computed: "asSpecified",
  8883. order: "uniqueOrder",
  8884. status: "nonstandard",
  8885. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"
  8886. },
  8887. "-ms-hyphenate-limit-chars": {
  8888. syntax: "auto | <integer>{1,3}",
  8889. media: "visual",
  8890. inherited: true,
  8891. animationType: "discrete",
  8892. percentages: "no",
  8893. groups: [
  8894. "Microsoft Extensions"
  8895. ],
  8896. initial: "auto",
  8897. appliesto: "allElements",
  8898. computed: "asSpecified",
  8899. order: "uniqueOrder",
  8900. status: "nonstandard",
  8901. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"
  8902. },
  8903. "-ms-hyphenate-limit-lines": {
  8904. syntax: "no-limit | <integer>",
  8905. media: "visual",
  8906. inherited: true,
  8907. animationType: "discrete",
  8908. percentages: "no",
  8909. groups: [
  8910. "Microsoft Extensions"
  8911. ],
  8912. initial: "no-limit",
  8913. appliesto: "blockContainerElements",
  8914. computed: "asSpecified",
  8915. order: "uniqueOrder",
  8916. status: "nonstandard",
  8917. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"
  8918. },
  8919. "-ms-hyphenate-limit-zone": {
  8920. syntax: "<percentage> | <length>",
  8921. media: "visual",
  8922. inherited: true,
  8923. animationType: "discrete",
  8924. percentages: "referToLineBoxWidth",
  8925. groups: [
  8926. "Microsoft Extensions"
  8927. ],
  8928. initial: "0",
  8929. appliesto: "blockContainerElements",
  8930. computed: "asSpecified",
  8931. order: "uniqueOrder",
  8932. status: "nonstandard",
  8933. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"
  8934. },
  8935. "-ms-ime-align": {
  8936. syntax: "auto | after",
  8937. media: "visual",
  8938. inherited: false,
  8939. animationType: "discrete",
  8940. percentages: "no",
  8941. groups: [
  8942. "Microsoft Extensions"
  8943. ],
  8944. initial: "auto",
  8945. appliesto: "allElements",
  8946. computed: "asSpecified",
  8947. order: "uniqueOrder",
  8948. status: "nonstandard",
  8949. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"
  8950. },
  8951. "-ms-overflow-style": {
  8952. syntax: "auto | none | scrollbar | -ms-autohiding-scrollbar",
  8953. media: "interactive",
  8954. inherited: true,
  8955. animationType: "discrete",
  8956. percentages: "no",
  8957. groups: [
  8958. "Microsoft Extensions"
  8959. ],
  8960. initial: "auto",
  8961. appliesto: "nonReplacedBlockAndInlineBlockElements",
  8962. computed: "asSpecified",
  8963. order: "uniqueOrder",
  8964. status: "nonstandard",
  8965. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"
  8966. },
  8967. "-ms-scrollbar-3dlight-color": {
  8968. syntax: "<color>",
  8969. media: "visual",
  8970. inherited: true,
  8971. animationType: "discrete",
  8972. percentages: "no",
  8973. groups: [
  8974. "Microsoft Extensions"
  8975. ],
  8976. initial: "dependsOnUserAgent",
  8977. appliesto: "allElements",
  8978. computed: "asSpecified",
  8979. order: "uniqueOrder",
  8980. status: "nonstandard",
  8981. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"
  8982. },
  8983. "-ms-scrollbar-arrow-color": {
  8984. syntax: "<color>",
  8985. media: "visual",
  8986. inherited: true,
  8987. animationType: "discrete",
  8988. percentages: "no",
  8989. groups: [
  8990. "Microsoft Extensions"
  8991. ],
  8992. initial: "ButtonText",
  8993. appliesto: "allElements",
  8994. computed: "asSpecified",
  8995. order: "uniqueOrder",
  8996. status: "nonstandard",
  8997. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"
  8998. },
  8999. "-ms-scrollbar-base-color": {
  9000. syntax: "<color>",
  9001. media: "visual",
  9002. inherited: true,
  9003. animationType: "discrete",
  9004. percentages: "no",
  9005. groups: [
  9006. "Microsoft Extensions"
  9007. ],
  9008. initial: "dependsOnUserAgent",
  9009. appliesto: "allElements",
  9010. computed: "asSpecified",
  9011. order: "uniqueOrder",
  9012. status: "nonstandard",
  9013. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"
  9014. },
  9015. "-ms-scrollbar-darkshadow-color": {
  9016. syntax: "<color>",
  9017. media: "visual",
  9018. inherited: true,
  9019. animationType: "discrete",
  9020. percentages: "no",
  9021. groups: [
  9022. "Microsoft Extensions"
  9023. ],
  9024. initial: "ThreeDDarkShadow",
  9025. appliesto: "allElements",
  9026. computed: "asSpecified",
  9027. order: "uniqueOrder",
  9028. status: "nonstandard",
  9029. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"
  9030. },
  9031. "-ms-scrollbar-face-color": {
  9032. syntax: "<color>",
  9033. media: "visual",
  9034. inherited: true,
  9035. animationType: "discrete",
  9036. percentages: "no",
  9037. groups: [
  9038. "Microsoft Extensions"
  9039. ],
  9040. initial: "ThreeDFace",
  9041. appliesto: "allElements",
  9042. computed: "asSpecified",
  9043. order: "uniqueOrder",
  9044. status: "nonstandard",
  9045. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"
  9046. },
  9047. "-ms-scrollbar-highlight-color": {
  9048. syntax: "<color>",
  9049. media: "visual",
  9050. inherited: true,
  9051. animationType: "discrete",
  9052. percentages: "no",
  9053. groups: [
  9054. "Microsoft Extensions"
  9055. ],
  9056. initial: "ThreeDHighlight",
  9057. appliesto: "allElements",
  9058. computed: "asSpecified",
  9059. order: "uniqueOrder",
  9060. status: "nonstandard",
  9061. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"
  9062. },
  9063. "-ms-scrollbar-shadow-color": {
  9064. syntax: "<color>",
  9065. media: "visual",
  9066. inherited: true,
  9067. animationType: "discrete",
  9068. percentages: "no",
  9069. groups: [
  9070. "Microsoft Extensions"
  9071. ],
  9072. initial: "ThreeDDarkShadow",
  9073. appliesto: "allElements",
  9074. computed: "asSpecified",
  9075. order: "uniqueOrder",
  9076. status: "nonstandard",
  9077. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"
  9078. },
  9079. "-ms-scrollbar-track-color": {
  9080. syntax: "<color>",
  9081. media: "visual",
  9082. inherited: true,
  9083. animationType: "discrete",
  9084. percentages: "no",
  9085. groups: [
  9086. "Microsoft Extensions"
  9087. ],
  9088. initial: "Scrollbar",
  9089. appliesto: "allElements",
  9090. computed: "asSpecified",
  9091. order: "uniqueOrder",
  9092. status: "nonstandard",
  9093. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
  9094. },
  9095. "-ms-scroll-chaining": {
  9096. syntax: "chained | none",
  9097. media: "interactive",
  9098. inherited: false,
  9099. animationType: "discrete",
  9100. percentages: "no",
  9101. groups: [
  9102. "Microsoft Extensions"
  9103. ],
  9104. initial: "chained",
  9105. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9106. computed: "asSpecified",
  9107. order: "uniqueOrder",
  9108. status: "nonstandard",
  9109. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"
  9110. },
  9111. "-ms-scroll-limit": {
  9112. syntax: "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
  9113. media: "interactive",
  9114. inherited: false,
  9115. animationType: "discrete",
  9116. percentages: "no",
  9117. groups: [
  9118. "Microsoft Extensions"
  9119. ],
  9120. initial: [
  9121. "-ms-scroll-limit-x-min",
  9122. "-ms-scroll-limit-y-min",
  9123. "-ms-scroll-limit-x-max",
  9124. "-ms-scroll-limit-y-max"
  9125. ],
  9126. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9127. computed: [
  9128. "-ms-scroll-limit-x-min",
  9129. "-ms-scroll-limit-y-min",
  9130. "-ms-scroll-limit-x-max",
  9131. "-ms-scroll-limit-y-max"
  9132. ],
  9133. order: "uniqueOrder",
  9134. status: "nonstandard",
  9135. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"
  9136. },
  9137. "-ms-scroll-limit-x-max": {
  9138. syntax: "auto | <length>",
  9139. media: "interactive",
  9140. inherited: false,
  9141. animationType: "discrete",
  9142. percentages: "no",
  9143. groups: [
  9144. "Microsoft Extensions"
  9145. ],
  9146. initial: "auto",
  9147. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9148. computed: "asSpecified",
  9149. order: "uniqueOrder",
  9150. status: "nonstandard",
  9151. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"
  9152. },
  9153. "-ms-scroll-limit-x-min": {
  9154. syntax: "<length>",
  9155. media: "interactive",
  9156. inherited: false,
  9157. animationType: "discrete",
  9158. percentages: "no",
  9159. groups: [
  9160. "Microsoft Extensions"
  9161. ],
  9162. initial: "0",
  9163. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9164. computed: "asSpecified",
  9165. order: "uniqueOrder",
  9166. status: "nonstandard",
  9167. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"
  9168. },
  9169. "-ms-scroll-limit-y-max": {
  9170. syntax: "auto | <length>",
  9171. media: "interactive",
  9172. inherited: false,
  9173. animationType: "discrete",
  9174. percentages: "no",
  9175. groups: [
  9176. "Microsoft Extensions"
  9177. ],
  9178. initial: "auto",
  9179. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9180. computed: "asSpecified",
  9181. order: "uniqueOrder",
  9182. status: "nonstandard",
  9183. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"
  9184. },
  9185. "-ms-scroll-limit-y-min": {
  9186. syntax: "<length>",
  9187. media: "interactive",
  9188. inherited: false,
  9189. animationType: "discrete",
  9190. percentages: "no",
  9191. groups: [
  9192. "Microsoft Extensions"
  9193. ],
  9194. initial: "0",
  9195. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9196. computed: "asSpecified",
  9197. order: "uniqueOrder",
  9198. status: "nonstandard",
  9199. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"
  9200. },
  9201. "-ms-scroll-rails": {
  9202. syntax: "none | railed",
  9203. media: "interactive",
  9204. inherited: false,
  9205. animationType: "discrete",
  9206. percentages: "no",
  9207. groups: [
  9208. "Microsoft Extensions"
  9209. ],
  9210. initial: "railed",
  9211. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9212. computed: "asSpecified",
  9213. order: "uniqueOrder",
  9214. status: "nonstandard",
  9215. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"
  9216. },
  9217. "-ms-scroll-snap-points-x": {
  9218. syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
  9219. media: "interactive",
  9220. inherited: false,
  9221. animationType: "discrete",
  9222. percentages: "no",
  9223. groups: [
  9224. "Microsoft Extensions"
  9225. ],
  9226. initial: "snapInterval(0px, 100%)",
  9227. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9228. computed: "asSpecified",
  9229. order: "uniqueOrder",
  9230. status: "nonstandard",
  9231. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"
  9232. },
  9233. "-ms-scroll-snap-points-y": {
  9234. syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
  9235. media: "interactive",
  9236. inherited: false,
  9237. animationType: "discrete",
  9238. percentages: "no",
  9239. groups: [
  9240. "Microsoft Extensions"
  9241. ],
  9242. initial: "snapInterval(0px, 100%)",
  9243. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9244. computed: "asSpecified",
  9245. order: "uniqueOrder",
  9246. status: "nonstandard",
  9247. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"
  9248. },
  9249. "-ms-scroll-snap-type": {
  9250. syntax: "none | proximity | mandatory",
  9251. media: "interactive",
  9252. inherited: false,
  9253. animationType: "discrete",
  9254. percentages: "no",
  9255. groups: [
  9256. "Microsoft Extensions"
  9257. ],
  9258. initial: "none",
  9259. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9260. computed: "asSpecified",
  9261. order: "uniqueOrder",
  9262. status: "nonstandard",
  9263. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"
  9264. },
  9265. "-ms-scroll-snap-x": {
  9266. syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
  9267. media: "interactive",
  9268. inherited: false,
  9269. animationType: "discrete",
  9270. percentages: "no",
  9271. groups: [
  9272. "Microsoft Extensions"
  9273. ],
  9274. initial: [
  9275. "-ms-scroll-snap-type",
  9276. "-ms-scroll-snap-points-x"
  9277. ],
  9278. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9279. computed: [
  9280. "-ms-scroll-snap-type",
  9281. "-ms-scroll-snap-points-x"
  9282. ],
  9283. order: "uniqueOrder",
  9284. status: "nonstandard",
  9285. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"
  9286. },
  9287. "-ms-scroll-snap-y": {
  9288. syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
  9289. media: "interactive",
  9290. inherited: false,
  9291. animationType: "discrete",
  9292. percentages: "no",
  9293. groups: [
  9294. "Microsoft Extensions"
  9295. ],
  9296. initial: [
  9297. "-ms-scroll-snap-type",
  9298. "-ms-scroll-snap-points-y"
  9299. ],
  9300. appliesto: "nonReplacedBlockAndInlineBlockElements",
  9301. computed: [
  9302. "-ms-scroll-snap-type",
  9303. "-ms-scroll-snap-points-y"
  9304. ],
  9305. order: "uniqueOrder",
  9306. status: "nonstandard",
  9307. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"
  9308. },
  9309. "-ms-scroll-translation": {
  9310. syntax: "none | vertical-to-horizontal",
  9311. media: "interactive",
  9312. inherited: true,
  9313. animationType: "discrete",
  9314. percentages: "no",
  9315. groups: [
  9316. "Microsoft Extensions"
  9317. ],
  9318. initial: "none",
  9319. appliesto: "allElements",
  9320. computed: "asSpecified",
  9321. order: "uniqueOrder",
  9322. status: "nonstandard",
  9323. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"
  9324. },
  9325. "-ms-text-autospace": {
  9326. syntax: "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
  9327. media: "visual",
  9328. inherited: false,
  9329. animationType: "discrete",
  9330. percentages: "no",
  9331. groups: [
  9332. "Microsoft Extensions"
  9333. ],
  9334. initial: "none",
  9335. appliesto: "allElements",
  9336. computed: "asSpecified",
  9337. order: "uniqueOrder",
  9338. status: "nonstandard",
  9339. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"
  9340. },
  9341. "-ms-touch-select": {
  9342. syntax: "grippers | none",
  9343. media: "interactive",
  9344. inherited: true,
  9345. animationType: "discrete",
  9346. percentages: "no",
  9347. groups: [
  9348. "Microsoft Extensions"
  9349. ],
  9350. initial: "grippers",
  9351. appliesto: "allElements",
  9352. computed: "asSpecified",
  9353. order: "uniqueOrder",
  9354. status: "nonstandard",
  9355. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"
  9356. },
  9357. "-ms-user-select": {
  9358. syntax: "none | element | text",
  9359. media: "interactive",
  9360. inherited: false,
  9361. animationType: "discrete",
  9362. percentages: "no",
  9363. groups: [
  9364. "Microsoft Extensions"
  9365. ],
  9366. initial: "text",
  9367. appliesto: "nonReplacedElements",
  9368. computed: "asSpecified",
  9369. order: "uniqueOrder",
  9370. status: "nonstandard",
  9371. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"
  9372. },
  9373. "-ms-wrap-flow": {
  9374. syntax: "auto | both | start | end | maximum | clear",
  9375. media: "visual",
  9376. inherited: false,
  9377. animationType: "discrete",
  9378. percentages: "no",
  9379. groups: [
  9380. "Microsoft Extensions"
  9381. ],
  9382. initial: "auto",
  9383. appliesto: "blockLevelElements",
  9384. computed: "asSpecified",
  9385. order: "uniqueOrder",
  9386. status: "nonstandard",
  9387. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"
  9388. },
  9389. "-ms-wrap-margin": {
  9390. syntax: "<length>",
  9391. media: "visual",
  9392. inherited: false,
  9393. animationType: "discrete",
  9394. percentages: "no",
  9395. groups: [
  9396. "Microsoft Extensions"
  9397. ],
  9398. initial: "0",
  9399. appliesto: "exclusionElements",
  9400. computed: "asSpecified",
  9401. order: "uniqueOrder",
  9402. status: "nonstandard",
  9403. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"
  9404. },
  9405. "-ms-wrap-through": {
  9406. syntax: "wrap | none",
  9407. media: "visual",
  9408. inherited: false,
  9409. animationType: "discrete",
  9410. percentages: "no",
  9411. groups: [
  9412. "Microsoft Extensions"
  9413. ],
  9414. initial: "wrap",
  9415. appliesto: "blockLevelElements",
  9416. computed: "asSpecified",
  9417. order: "uniqueOrder",
  9418. status: "nonstandard",
  9419. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"
  9420. },
  9421. "-moz-appearance": {
  9422. syntax: "none | button | button-arrow-down | button-arrow-next | button-arrow-previous | button-arrow-up | button-bevel | button-focus | caret | checkbox | checkbox-container | checkbox-label | checkmenuitem | dualbutton | groupbox | listbox | listitem | menuarrow | menubar | menucheckbox | menuimage | menuitem | menuitemtext | menulist | menulist-button | menulist-text | menulist-textfield | menupopup | menuradio | menuseparator | meterbar | meterchunk | progressbar | progressbar-vertical | progresschunk | progresschunk-vertical | radio | radio-container | radio-label | radiomenuitem | range | range-thumb | resizer | resizerpanel | scale-horizontal | scalethumbend | scalethumb-horizontal | scalethumbstart | scalethumbtick | scalethumb-vertical | scale-vertical | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | separator | sheet | spinner | spinner-downbutton | spinner-textfield | spinner-upbutton | splitter | statusbar | statusbarpanel | tab | tabpanel | tabpanels | tab-scroll-arrow-back | tab-scroll-arrow-forward | textfield | textfield-multiline | toolbar | toolbarbutton | toolbarbutton-dropdown | toolbargripper | toolbox | tooltip | treeheader | treeheadercell | treeheadersortarrow | treeitem | treeline | treetwisty | treetwistyopen | treeview | -moz-mac-unified-toolbar | -moz-win-borderless-glass | -moz-win-browsertabbar-toolbox | -moz-win-communicationstext | -moz-win-communications-toolbox | -moz-win-exclude-glass | -moz-win-glass | -moz-win-mediatext | -moz-win-media-toolbox | -moz-window-button-box | -moz-window-button-box-maximized | -moz-window-button-close | -moz-window-button-maximize | -moz-window-button-minimize | -moz-window-button-restore | -moz-window-frame-bottom | -moz-window-frame-left | -moz-window-frame-right | -moz-window-titlebar | -moz-window-titlebar-maximized",
  9423. media: "visual",
  9424. inherited: false,
  9425. animationType: "discrete",
  9426. percentages: "no",
  9427. groups: [
  9428. "Mozilla Extensions",
  9429. "WebKit Extensions"
  9430. ],
  9431. initial: "noneButOverriddenInUserAgentCSS",
  9432. appliesto: "allElements",
  9433. computed: "asSpecified",
  9434. order: "uniqueOrder",
  9435. status: "nonstandard",
  9436. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
  9437. },
  9438. "-moz-binding": {
  9439. syntax: "<url> | none",
  9440. media: "visual",
  9441. inherited: false,
  9442. animationType: "discrete",
  9443. percentages: "no",
  9444. groups: [
  9445. "Mozilla Extensions"
  9446. ],
  9447. initial: "none",
  9448. appliesto: "allElementsExceptGeneratedContentOrPseudoElements",
  9449. computed: "asSpecified",
  9450. order: "uniqueOrder",
  9451. status: "nonstandard",
  9452. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
  9453. },
  9454. "-moz-border-bottom-colors": {
  9455. syntax: "<color>+ | none",
  9456. media: "visual",
  9457. inherited: false,
  9458. animationType: "discrete",
  9459. percentages: "no",
  9460. groups: [
  9461. "Mozilla Extensions"
  9462. ],
  9463. initial: "none",
  9464. appliesto: "allElements",
  9465. computed: "asSpecified",
  9466. order: "uniqueOrder",
  9467. status: "nonstandard",
  9468. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
  9469. },
  9470. "-moz-border-left-colors": {
  9471. syntax: "<color>+ | none",
  9472. media: "visual",
  9473. inherited: false,
  9474. animationType: "discrete",
  9475. percentages: "no",
  9476. groups: [
  9477. "Mozilla Extensions"
  9478. ],
  9479. initial: "none",
  9480. appliesto: "allElements",
  9481. computed: "asSpecified",
  9482. order: "uniqueOrder",
  9483. status: "nonstandard",
  9484. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
  9485. },
  9486. "-moz-border-right-colors": {
  9487. syntax: "<color>+ | none",
  9488. media: "visual",
  9489. inherited: false,
  9490. animationType: "discrete",
  9491. percentages: "no",
  9492. groups: [
  9493. "Mozilla Extensions"
  9494. ],
  9495. initial: "none",
  9496. appliesto: "allElements",
  9497. computed: "asSpecified",
  9498. order: "uniqueOrder",
  9499. status: "nonstandard",
  9500. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
  9501. },
  9502. "-moz-border-top-colors": {
  9503. syntax: "<color>+ | none",
  9504. media: "visual",
  9505. inherited: false,
  9506. animationType: "discrete",
  9507. percentages: "no",
  9508. groups: [
  9509. "Mozilla Extensions"
  9510. ],
  9511. initial: "none",
  9512. appliesto: "allElements",
  9513. computed: "asSpecified",
  9514. order: "uniqueOrder",
  9515. status: "nonstandard",
  9516. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
  9517. },
  9518. "-moz-context-properties": {
  9519. syntax: "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
  9520. media: "visual",
  9521. inherited: true,
  9522. animationType: "discrete",
  9523. percentages: "no",
  9524. groups: [
  9525. "Mozilla Extensions"
  9526. ],
  9527. initial: "none",
  9528. appliesto: "allElementsThatCanReferenceImages",
  9529. computed: "asSpecified",
  9530. order: "uniqueOrder",
  9531. status: "nonstandard",
  9532. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
  9533. },
  9534. "-moz-float-edge": {
  9535. syntax: "border-box | content-box | margin-box | padding-box",
  9536. media: "visual",
  9537. inherited: false,
  9538. animationType: "discrete",
  9539. percentages: "no",
  9540. groups: [
  9541. "Mozilla Extensions"
  9542. ],
  9543. initial: "content-box",
  9544. appliesto: "allElements",
  9545. computed: "asSpecified",
  9546. order: "uniqueOrder",
  9547. status: "nonstandard",
  9548. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
  9549. },
  9550. "-moz-force-broken-image-icon": {
  9551. syntax: "<integer [0,1]>",
  9552. media: "visual",
  9553. inherited: false,
  9554. animationType: "discrete",
  9555. percentages: "no",
  9556. groups: [
  9557. "Mozilla Extensions"
  9558. ],
  9559. initial: "0",
  9560. appliesto: "images",
  9561. computed: "asSpecified",
  9562. order: "uniqueOrder",
  9563. status: "nonstandard",
  9564. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
  9565. },
  9566. "-moz-image-region": {
  9567. syntax: "<shape> | auto",
  9568. media: "visual",
  9569. inherited: true,
  9570. animationType: "discrete",
  9571. percentages: "no",
  9572. groups: [
  9573. "Mozilla Extensions"
  9574. ],
  9575. initial: "auto",
  9576. appliesto: "xulImageElements",
  9577. computed: "asSpecified",
  9578. order: "uniqueOrder",
  9579. status: "nonstandard",
  9580. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
  9581. },
  9582. "-moz-orient": {
  9583. syntax: "inline | block | horizontal | vertical",
  9584. media: "visual",
  9585. inherited: false,
  9586. animationType: "discrete",
  9587. percentages: "no",
  9588. groups: [
  9589. "Mozilla Extensions"
  9590. ],
  9591. initial: "inline",
  9592. appliesto: "anyElementEffectOnProgressAndMeter",
  9593. computed: "asSpecified",
  9594. order: "uniqueOrder",
  9595. status: "nonstandard",
  9596. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
  9597. },
  9598. "-moz-outline-radius": {
  9599. syntax: "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
  9600. media: "visual",
  9601. inherited: false,
  9602. animationType: [
  9603. "-moz-outline-radius-topleft",
  9604. "-moz-outline-radius-topright",
  9605. "-moz-outline-radius-bottomright",
  9606. "-moz-outline-radius-bottomleft"
  9607. ],
  9608. percentages: [
  9609. "-moz-outline-radius-topleft",
  9610. "-moz-outline-radius-topright",
  9611. "-moz-outline-radius-bottomright",
  9612. "-moz-outline-radius-bottomleft"
  9613. ],
  9614. groups: [
  9615. "Mozilla Extensions"
  9616. ],
  9617. initial: [
  9618. "-moz-outline-radius-topleft",
  9619. "-moz-outline-radius-topright",
  9620. "-moz-outline-radius-bottomright",
  9621. "-moz-outline-radius-bottomleft"
  9622. ],
  9623. appliesto: "allElements",
  9624. computed: [
  9625. "-moz-outline-radius-topleft",
  9626. "-moz-outline-radius-topright",
  9627. "-moz-outline-radius-bottomright",
  9628. "-moz-outline-radius-bottomleft"
  9629. ],
  9630. order: "uniqueOrder",
  9631. status: "nonstandard",
  9632. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
  9633. },
  9634. "-moz-outline-radius-bottomleft": {
  9635. syntax: "<outline-radius>",
  9636. media: "visual",
  9637. inherited: false,
  9638. animationType: "lpc",
  9639. percentages: "referToDimensionOfBorderBox",
  9640. groups: [
  9641. "Mozilla Extensions"
  9642. ],
  9643. initial: "0",
  9644. appliesto: "allElements",
  9645. computed: "asSpecified",
  9646. order: "uniqueOrder",
  9647. status: "nonstandard",
  9648. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
  9649. },
  9650. "-moz-outline-radius-bottomright": {
  9651. syntax: "<outline-radius>",
  9652. media: "visual",
  9653. inherited: false,
  9654. animationType: "lpc",
  9655. percentages: "referToDimensionOfBorderBox",
  9656. groups: [
  9657. "Mozilla Extensions"
  9658. ],
  9659. initial: "0",
  9660. appliesto: "allElements",
  9661. computed: "asSpecified",
  9662. order: "uniqueOrder",
  9663. status: "nonstandard",
  9664. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
  9665. },
  9666. "-moz-outline-radius-topleft": {
  9667. syntax: "<outline-radius>",
  9668. media: "visual",
  9669. inherited: false,
  9670. animationType: "lpc",
  9671. percentages: "referToDimensionOfBorderBox",
  9672. groups: [
  9673. "Mozilla Extensions"
  9674. ],
  9675. initial: "0",
  9676. appliesto: "allElements",
  9677. computed: "asSpecified",
  9678. order: "uniqueOrder",
  9679. status: "nonstandard",
  9680. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
  9681. },
  9682. "-moz-outline-radius-topright": {
  9683. syntax: "<outline-radius>",
  9684. media: "visual",
  9685. inherited: false,
  9686. animationType: "lpc",
  9687. percentages: "referToDimensionOfBorderBox",
  9688. groups: [
  9689. "Mozilla Extensions"
  9690. ],
  9691. initial: "0",
  9692. appliesto: "allElements",
  9693. computed: "asSpecified",
  9694. order: "uniqueOrder",
  9695. status: "nonstandard",
  9696. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
  9697. },
  9698. "-moz-stack-sizing": {
  9699. syntax: "ignore | stretch-to-fit",
  9700. media: "visual",
  9701. inherited: true,
  9702. animationType: "discrete",
  9703. percentages: "no",
  9704. groups: [
  9705. "Mozilla Extensions"
  9706. ],
  9707. initial: "stretch-to-fit",
  9708. appliesto: "allElements",
  9709. computed: "asSpecified",
  9710. order: "uniqueOrder",
  9711. status: "nonstandard",
  9712. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"
  9713. },
  9714. "-moz-text-blink": {
  9715. syntax: "none | blink",
  9716. media: "visual",
  9717. inherited: false,
  9718. animationType: "discrete",
  9719. percentages: "no",
  9720. groups: [
  9721. "Mozilla Extensions"
  9722. ],
  9723. initial: "none",
  9724. appliesto: "allElements",
  9725. computed: "asSpecified",
  9726. order: "uniqueOrder",
  9727. status: "nonstandard",
  9728. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
  9729. },
  9730. "-moz-user-focus": {
  9731. syntax: "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
  9732. media: "interactive",
  9733. inherited: false,
  9734. animationType: "discrete",
  9735. percentages: "no",
  9736. groups: [
  9737. "Mozilla Extensions"
  9738. ],
  9739. initial: "none",
  9740. appliesto: "allElements",
  9741. computed: "asSpecified",
  9742. order: "uniqueOrder",
  9743. status: "nonstandard",
  9744. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
  9745. },
  9746. "-moz-user-input": {
  9747. syntax: "auto | none | enabled | disabled",
  9748. media: "visual",
  9749. inherited: true,
  9750. animationType: "discrete",
  9751. percentages: "no",
  9752. groups: [
  9753. "Mozilla Extensions"
  9754. ],
  9755. initial: "auto",
  9756. appliesto: "allElements",
  9757. computed: "asSpecified",
  9758. order: "uniqueOrder",
  9759. status: "nonstandard",
  9760. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
  9761. },
  9762. "-moz-user-modify": {
  9763. syntax: "read-only | read-write | write-only",
  9764. media: "interactive",
  9765. inherited: true,
  9766. animationType: "discrete",
  9767. percentages: "no",
  9768. groups: [
  9769. "Mozilla Extensions"
  9770. ],
  9771. initial: "read-only",
  9772. appliesto: "allElements",
  9773. computed: "asSpecified",
  9774. order: "uniqueOrder",
  9775. status: "nonstandard",
  9776. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"
  9777. },
  9778. "-moz-window-dragging": {
  9779. syntax: "drag | no-drag",
  9780. media: "visual",
  9781. inherited: false,
  9782. animationType: "discrete",
  9783. percentages: "no",
  9784. groups: [
  9785. "Mozilla Extensions"
  9786. ],
  9787. initial: "drag",
  9788. appliesto: "allElementsCreatingNativeWindows",
  9789. computed: "asSpecified",
  9790. order: "uniqueOrder",
  9791. status: "nonstandard",
  9792. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"
  9793. },
  9794. "-moz-window-shadow": {
  9795. syntax: "default | menu | tooltip | sheet | none",
  9796. media: "visual",
  9797. inherited: false,
  9798. animationType: "discrete",
  9799. percentages: "no",
  9800. groups: [
  9801. "Mozilla Extensions"
  9802. ],
  9803. initial: "default",
  9804. appliesto: "allElementsCreatingNativeWindows",
  9805. computed: "asSpecified",
  9806. order: "uniqueOrder",
  9807. status: "nonstandard",
  9808. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
  9809. },
  9810. "-webkit-appearance": {
  9811. syntax: "none | button | button-bevel | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-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-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button",
  9812. media: "visual",
  9813. inherited: false,
  9814. animationType: "discrete",
  9815. percentages: "no",
  9816. groups: [
  9817. "WebKit Extensions"
  9818. ],
  9819. initial: "noneButOverriddenInUserAgentCSS",
  9820. appliesto: "allElements",
  9821. computed: "asSpecified",
  9822. order: "uniqueOrder",
  9823. status: "nonstandard",
  9824. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
  9825. },
  9826. "-webkit-border-before": {
  9827. syntax: "<'border-width'> || <'border-style'> || <'color'>",
  9828. media: "visual",
  9829. inherited: true,
  9830. animationType: "discrete",
  9831. percentages: [
  9832. "-webkit-border-before-width"
  9833. ],
  9834. groups: [
  9835. "WebKit Extensions"
  9836. ],
  9837. initial: [
  9838. "border-width",
  9839. "border-style",
  9840. "color"
  9841. ],
  9842. appliesto: "allElements",
  9843. computed: [
  9844. "border-width",
  9845. "border-style",
  9846. "color"
  9847. ],
  9848. order: "uniqueOrder",
  9849. status: "nonstandard",
  9850. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
  9851. },
  9852. "-webkit-border-before-color": {
  9853. syntax: "<'color'>",
  9854. media: "visual",
  9855. inherited: true,
  9856. animationType: "discrete",
  9857. percentages: "no",
  9858. groups: [
  9859. "WebKit Extensions"
  9860. ],
  9861. initial: "currentcolor",
  9862. appliesto: "allElements",
  9863. computed: "computedColor",
  9864. order: "uniqueOrder",
  9865. status: "nonstandard"
  9866. },
  9867. "-webkit-border-before-style": {
  9868. syntax: "<'border-style'>",
  9869. media: "visual",
  9870. inherited: true,
  9871. animationType: "discrete",
  9872. percentages: "no",
  9873. groups: [
  9874. "WebKit Extensions"
  9875. ],
  9876. initial: "none",
  9877. appliesto: "allElements",
  9878. computed: "asSpecified",
  9879. order: "uniqueOrder",
  9880. status: "nonstandard"
  9881. },
  9882. "-webkit-border-before-width": {
  9883. syntax: "<'border-width'>",
  9884. media: "visual",
  9885. inherited: true,
  9886. animationType: "discrete",
  9887. percentages: "logicalWidthOfContainingBlock",
  9888. groups: [
  9889. "WebKit Extensions"
  9890. ],
  9891. initial: "medium",
  9892. appliesto: "allElements",
  9893. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  9894. order: "uniqueOrder",
  9895. status: "nonstandard"
  9896. },
  9897. "-webkit-box-reflect": {
  9898. syntax: "[ above | below | right | left ]? <length>? <image>?",
  9899. media: "visual",
  9900. inherited: false,
  9901. animationType: "discrete",
  9902. percentages: "no",
  9903. groups: [
  9904. "WebKit Extensions"
  9905. ],
  9906. initial: "none",
  9907. appliesto: "allElements",
  9908. computed: "asSpecified",
  9909. order: "uniqueOrder",
  9910. status: "nonstandard",
  9911. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
  9912. },
  9913. "-webkit-line-clamp": {
  9914. syntax: "none | <integer>",
  9915. media: "visual",
  9916. inherited: false,
  9917. animationType: "byComputedValueType",
  9918. percentages: "no",
  9919. groups: [
  9920. "WebKit Extensions",
  9921. "CSS Overflow"
  9922. ],
  9923. initial: "none",
  9924. appliesto: "allElements",
  9925. computed: "asSpecified",
  9926. order: "uniqueOrder",
  9927. status: "standard",
  9928. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
  9929. },
  9930. "-webkit-mask": {
  9931. syntax: "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
  9932. media: "visual",
  9933. inherited: false,
  9934. animationType: "discrete",
  9935. percentages: "no",
  9936. groups: [
  9937. "WebKit Extensions"
  9938. ],
  9939. initial: [
  9940. "-webkit-mask-image",
  9941. "-webkit-mask-repeat",
  9942. "-webkit-mask-attachment",
  9943. "-webkit-mask-position",
  9944. "-webkit-mask-origin",
  9945. "-webkit-mask-clip"
  9946. ],
  9947. appliesto: "allElements",
  9948. computed: [
  9949. "-webkit-mask-image",
  9950. "-webkit-mask-repeat",
  9951. "-webkit-mask-attachment",
  9952. "-webkit-mask-position",
  9953. "-webkit-mask-origin",
  9954. "-webkit-mask-clip"
  9955. ],
  9956. order: "uniqueOrder",
  9957. status: "nonstandard",
  9958. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
  9959. },
  9960. "-webkit-mask-attachment": {
  9961. syntax: "<attachment>#",
  9962. media: "visual",
  9963. inherited: false,
  9964. animationType: "discrete",
  9965. percentages: "no",
  9966. groups: [
  9967. "WebKit Extensions"
  9968. ],
  9969. initial: "scroll",
  9970. appliesto: "allElements",
  9971. computed: "asSpecified",
  9972. order: "orderOfAppearance",
  9973. status: "nonstandard",
  9974. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
  9975. },
  9976. "-webkit-mask-clip": {
  9977. syntax: "[ <box> | border | padding | content | text ]#",
  9978. media: "visual",
  9979. inherited: false,
  9980. animationType: "discrete",
  9981. percentages: "no",
  9982. groups: [
  9983. "WebKit Extensions"
  9984. ],
  9985. initial: "border",
  9986. appliesto: "allElements",
  9987. computed: "asSpecified",
  9988. order: "orderOfAppearance",
  9989. status: "nonstandard",
  9990. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
  9991. },
  9992. "-webkit-mask-composite": {
  9993. syntax: "<composite-style>#",
  9994. media: "visual",
  9995. inherited: false,
  9996. animationType: "discrete",
  9997. percentages: "no",
  9998. groups: [
  9999. "WebKit Extensions"
  10000. ],
  10001. initial: "source-over",
  10002. appliesto: "allElements",
  10003. computed: "asSpecified",
  10004. order: "orderOfAppearance",
  10005. status: "nonstandard",
  10006. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
  10007. },
  10008. "-webkit-mask-image": {
  10009. syntax: "<mask-reference>#",
  10010. media: "visual",
  10011. inherited: false,
  10012. animationType: "discrete",
  10013. percentages: "no",
  10014. groups: [
  10015. "WebKit Extensions"
  10016. ],
  10017. initial: "none",
  10018. appliesto: "allElements",
  10019. computed: "absoluteURIOrNone",
  10020. order: "orderOfAppearance",
  10021. status: "nonstandard",
  10022. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
  10023. },
  10024. "-webkit-mask-origin": {
  10025. syntax: "[ <box> | border | padding | content ]#",
  10026. media: "visual",
  10027. inherited: false,
  10028. animationType: "discrete",
  10029. percentages: "no",
  10030. groups: [
  10031. "WebKit Extensions"
  10032. ],
  10033. initial: "padding",
  10034. appliesto: "allElements",
  10035. computed: "asSpecified",
  10036. order: "orderOfAppearance",
  10037. status: "nonstandard",
  10038. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
  10039. },
  10040. "-webkit-mask-position": {
  10041. syntax: "<position>#",
  10042. media: "visual",
  10043. inherited: false,
  10044. animationType: "discrete",
  10045. percentages: "referToSizeOfElement",
  10046. groups: [
  10047. "WebKit Extensions"
  10048. ],
  10049. initial: "0% 0%",
  10050. appliesto: "allElements",
  10051. computed: "absoluteLengthOrPercentage",
  10052. order: "orderOfAppearance",
  10053. status: "nonstandard",
  10054. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
  10055. },
  10056. "-webkit-mask-position-x": {
  10057. syntax: "[ <length-percentage> | left | center | right ]#",
  10058. media: "visual",
  10059. inherited: false,
  10060. animationType: "discrete",
  10061. percentages: "referToSizeOfElement",
  10062. groups: [
  10063. "WebKit Extensions"
  10064. ],
  10065. initial: "0%",
  10066. appliesto: "allElements",
  10067. computed: "absoluteLengthOrPercentage",
  10068. order: "orderOfAppearance",
  10069. status: "nonstandard",
  10070. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
  10071. },
  10072. "-webkit-mask-position-y": {
  10073. syntax: "[ <length-percentage> | top | center | bottom ]#",
  10074. media: "visual",
  10075. inherited: false,
  10076. animationType: "discrete",
  10077. percentages: "referToSizeOfElement",
  10078. groups: [
  10079. "WebKit Extensions"
  10080. ],
  10081. initial: "0%",
  10082. appliesto: "allElements",
  10083. computed: "absoluteLengthOrPercentage",
  10084. order: "orderOfAppearance",
  10085. status: "nonstandard",
  10086. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
  10087. },
  10088. "-webkit-mask-repeat": {
  10089. syntax: "<repeat-style>#",
  10090. media: "visual",
  10091. inherited: false,
  10092. animationType: "discrete",
  10093. percentages: "no",
  10094. groups: [
  10095. "WebKit Extensions"
  10096. ],
  10097. initial: "repeat",
  10098. appliesto: "allElements",
  10099. computed: "asSpecified",
  10100. order: "orderOfAppearance",
  10101. status: "nonstandard",
  10102. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
  10103. },
  10104. "-webkit-mask-repeat-x": {
  10105. syntax: "repeat | no-repeat | space | round",
  10106. media: "visual",
  10107. inherited: false,
  10108. animationType: "discrete",
  10109. percentages: "no",
  10110. groups: [
  10111. "WebKit Extensions"
  10112. ],
  10113. initial: "repeat",
  10114. appliesto: "allElements",
  10115. computed: "asSpecified",
  10116. order: "orderOfAppearance",
  10117. status: "nonstandard",
  10118. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
  10119. },
  10120. "-webkit-mask-repeat-y": {
  10121. syntax: "repeat | no-repeat | space | round",
  10122. media: "visual",
  10123. inherited: false,
  10124. animationType: "discrete",
  10125. percentages: "no",
  10126. groups: [
  10127. "WebKit Extensions"
  10128. ],
  10129. initial: "repeat",
  10130. appliesto: "allElements",
  10131. computed: "absoluteLengthOrPercentage",
  10132. order: "orderOfAppearance",
  10133. status: "nonstandard",
  10134. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
  10135. },
  10136. "-webkit-mask-size": {
  10137. syntax: "<bg-size>#",
  10138. media: "visual",
  10139. inherited: false,
  10140. animationType: "discrete",
  10141. percentages: "relativeToBackgroundPositioningArea",
  10142. groups: [
  10143. "WebKit Extensions"
  10144. ],
  10145. initial: "auto auto",
  10146. appliesto: "allElements",
  10147. computed: "asSpecified",
  10148. order: "orderOfAppearance",
  10149. status: "nonstandard",
  10150. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
  10151. },
  10152. "-webkit-overflow-scrolling": {
  10153. syntax: "auto | touch",
  10154. media: "visual",
  10155. inherited: true,
  10156. animationType: "discrete",
  10157. percentages: "no",
  10158. groups: [
  10159. "WebKit Extensions"
  10160. ],
  10161. initial: "auto",
  10162. appliesto: "scrollingBoxes",
  10163. computed: "asSpecified",
  10164. order: "orderOfAppearance",
  10165. status: "nonstandard",
  10166. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
  10167. },
  10168. "-webkit-tap-highlight-color": {
  10169. syntax: "<color>",
  10170. media: "visual",
  10171. inherited: false,
  10172. animationType: "discrete",
  10173. percentages: "no",
  10174. groups: [
  10175. "WebKit Extensions"
  10176. ],
  10177. initial: "black",
  10178. appliesto: "allElements",
  10179. computed: "asSpecified",
  10180. order: "uniqueOrder",
  10181. status: "nonstandard",
  10182. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
  10183. },
  10184. "-webkit-text-fill-color": {
  10185. syntax: "<color>",
  10186. media: "visual",
  10187. inherited: true,
  10188. animationType: "color",
  10189. percentages: "no",
  10190. groups: [
  10191. "WebKit Extensions"
  10192. ],
  10193. initial: "currentcolor",
  10194. appliesto: "allElements",
  10195. computed: "computedColor",
  10196. order: "uniqueOrder",
  10197. status: "nonstandard",
  10198. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
  10199. },
  10200. "-webkit-text-stroke": {
  10201. syntax: "<length> || <color>",
  10202. media: "visual",
  10203. inherited: true,
  10204. animationType: [
  10205. "-webkit-text-stroke-width",
  10206. "-webkit-text-stroke-color"
  10207. ],
  10208. percentages: "no",
  10209. groups: [
  10210. "WebKit Extensions"
  10211. ],
  10212. initial: [
  10213. "-webkit-text-stroke-width",
  10214. "-webkit-text-stroke-color"
  10215. ],
  10216. appliesto: "allElements",
  10217. computed: [
  10218. "-webkit-text-stroke-width",
  10219. "-webkit-text-stroke-color"
  10220. ],
  10221. order: "canonicalOrder",
  10222. status: "nonstandard",
  10223. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
  10224. },
  10225. "-webkit-text-stroke-color": {
  10226. syntax: "<color>",
  10227. media: "visual",
  10228. inherited: true,
  10229. animationType: "color",
  10230. percentages: "no",
  10231. groups: [
  10232. "WebKit Extensions"
  10233. ],
  10234. initial: "currentcolor",
  10235. appliesto: "allElements",
  10236. computed: "computedColor",
  10237. order: "uniqueOrder",
  10238. status: "nonstandard",
  10239. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
  10240. },
  10241. "-webkit-text-stroke-width": {
  10242. syntax: "<length>",
  10243. media: "visual",
  10244. inherited: true,
  10245. animationType: "discrete",
  10246. percentages: "no",
  10247. groups: [
  10248. "WebKit Extensions"
  10249. ],
  10250. initial: "0",
  10251. appliesto: "allElements",
  10252. computed: "absoluteLength",
  10253. order: "uniqueOrder",
  10254. status: "nonstandard",
  10255. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
  10256. },
  10257. "-webkit-touch-callout": {
  10258. syntax: "default | none",
  10259. media: "visual",
  10260. inherited: true,
  10261. animationType: "discrete",
  10262. percentages: "no",
  10263. groups: [
  10264. "WebKit Extensions"
  10265. ],
  10266. initial: "default",
  10267. appliesto: "allElements",
  10268. computed: "asSpecified",
  10269. order: "uniqueOrder",
  10270. status: "nonstandard",
  10271. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
  10272. },
  10273. "-webkit-user-modify": {
  10274. syntax: "read-only | read-write | read-write-plaintext-only",
  10275. media: "interactive",
  10276. inherited: true,
  10277. animationType: "discrete",
  10278. percentages: "no",
  10279. groups: [
  10280. "WebKit Extensions"
  10281. ],
  10282. initial: "read-only",
  10283. appliesto: "allElements",
  10284. computed: "asSpecified",
  10285. order: "uniqueOrder",
  10286. status: "nonstandard"
  10287. },
  10288. "align-content": {
  10289. syntax: "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
  10290. media: "visual",
  10291. inherited: false,
  10292. animationType: "discrete",
  10293. percentages: "no",
  10294. groups: [
  10295. "CSS Box Alignment"
  10296. ],
  10297. initial: "normal",
  10298. appliesto: "multilineFlexContainers",
  10299. computed: "asSpecified",
  10300. order: "uniqueOrder",
  10301. status: "standard",
  10302. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-content"
  10303. },
  10304. "align-items": {
  10305. syntax: "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
  10306. media: "visual",
  10307. inherited: false,
  10308. animationType: "discrete",
  10309. percentages: "no",
  10310. groups: [
  10311. "CSS Box Alignment"
  10312. ],
  10313. initial: "normal",
  10314. appliesto: "allElements",
  10315. computed: "asSpecified",
  10316. order: "uniqueOrder",
  10317. status: "standard",
  10318. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-items"
  10319. },
  10320. "align-self": {
  10321. syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
  10322. media: "visual",
  10323. inherited: false,
  10324. animationType: "discrete",
  10325. percentages: "no",
  10326. groups: [
  10327. "CSS Box Alignment"
  10328. ],
  10329. initial: "auto",
  10330. appliesto: "flexItemsGridItemsAndAbsolutelyPositionedBoxes",
  10331. computed: "autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent",
  10332. order: "uniqueOrder",
  10333. status: "standard",
  10334. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-self"
  10335. },
  10336. all: all,
  10337. animation: animation,
  10338. "animation-delay": {
  10339. syntax: "<time>#",
  10340. media: "visual",
  10341. inherited: false,
  10342. animationType: "discrete",
  10343. percentages: "no",
  10344. groups: [
  10345. "CSS Animations"
  10346. ],
  10347. initial: "0s",
  10348. appliesto: "allElementsAndPseudos",
  10349. computed: "asSpecified",
  10350. order: "uniqueOrder",
  10351. status: "standard",
  10352. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
  10353. },
  10354. "animation-direction": {
  10355. syntax: "<single-animation-direction>#",
  10356. media: "visual",
  10357. inherited: false,
  10358. animationType: "discrete",
  10359. percentages: "no",
  10360. groups: [
  10361. "CSS Animations"
  10362. ],
  10363. initial: "normal",
  10364. appliesto: "allElementsAndPseudos",
  10365. computed: "asSpecified",
  10366. order: "uniqueOrder",
  10367. status: "standard",
  10368. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
  10369. },
  10370. "animation-duration": {
  10371. syntax: "<time>#",
  10372. media: "visual",
  10373. inherited: false,
  10374. animationType: "discrete",
  10375. percentages: "no",
  10376. groups: [
  10377. "CSS Animations"
  10378. ],
  10379. initial: "0s",
  10380. appliesto: "allElementsAndPseudos",
  10381. computed: "asSpecified",
  10382. order: "uniqueOrder",
  10383. status: "standard",
  10384. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
  10385. },
  10386. "animation-fill-mode": {
  10387. syntax: "<single-animation-fill-mode>#",
  10388. media: "visual",
  10389. inherited: false,
  10390. animationType: "discrete",
  10391. percentages: "no",
  10392. groups: [
  10393. "CSS Animations"
  10394. ],
  10395. initial: "none",
  10396. appliesto: "allElementsAndPseudos",
  10397. computed: "asSpecified",
  10398. order: "uniqueOrder",
  10399. status: "standard",
  10400. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
  10401. },
  10402. "animation-iteration-count": {
  10403. syntax: "<single-animation-iteration-count>#",
  10404. media: "visual",
  10405. inherited: false,
  10406. animationType: "discrete",
  10407. percentages: "no",
  10408. groups: [
  10409. "CSS Animations"
  10410. ],
  10411. initial: "1",
  10412. appliesto: "allElementsAndPseudos",
  10413. computed: "asSpecified",
  10414. order: "uniqueOrder",
  10415. status: "standard",
  10416. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
  10417. },
  10418. "animation-name": {
  10419. syntax: "[ none | <keyframes-name> ]#",
  10420. media: "visual",
  10421. inherited: false,
  10422. animationType: "discrete",
  10423. percentages: "no",
  10424. groups: [
  10425. "CSS Animations"
  10426. ],
  10427. initial: "none",
  10428. appliesto: "allElementsAndPseudos",
  10429. computed: "asSpecified",
  10430. order: "uniqueOrder",
  10431. status: "standard",
  10432. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-name"
  10433. },
  10434. "animation-play-state": {
  10435. syntax: "<single-animation-play-state>#",
  10436. media: "visual",
  10437. inherited: false,
  10438. animationType: "discrete",
  10439. percentages: "no",
  10440. groups: [
  10441. "CSS Animations"
  10442. ],
  10443. initial: "running",
  10444. appliesto: "allElementsAndPseudos",
  10445. computed: "asSpecified",
  10446. order: "uniqueOrder",
  10447. status: "standard",
  10448. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
  10449. },
  10450. "animation-timing-function": {
  10451. syntax: "<timing-function>#",
  10452. media: "visual",
  10453. inherited: false,
  10454. animationType: "discrete",
  10455. percentages: "no",
  10456. groups: [
  10457. "CSS Animations"
  10458. ],
  10459. initial: "ease",
  10460. appliesto: "allElementsAndPseudos",
  10461. computed: "asSpecified",
  10462. order: "uniqueOrder",
  10463. status: "standard",
  10464. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
  10465. },
  10466. appearance: appearance,
  10467. "aspect-ratio": {
  10468. syntax: "auto | <ratio>",
  10469. media: "all",
  10470. inherited: false,
  10471. animationType: "discrete",
  10472. percentages: "no",
  10473. groups: [
  10474. "CSS Basic User Interface"
  10475. ],
  10476. initial: "auto",
  10477. appliesto: "allElementsExceptInlineBoxesAndInternalRubyOrTableBoxes",
  10478. computed: "asSpecified",
  10479. order: "perGrammar",
  10480. status: "experimental",
  10481. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
  10482. },
  10483. azimuth: azimuth,
  10484. "backdrop-filter": {
  10485. syntax: "none | <filter-function-list>",
  10486. media: "visual",
  10487. inherited: false,
  10488. animationType: "filterList",
  10489. percentages: "no",
  10490. groups: [
  10491. "Filter Effects"
  10492. ],
  10493. initial: "none",
  10494. appliesto: "allElementsSVGContainerElements",
  10495. computed: "asSpecified",
  10496. order: "uniqueOrder",
  10497. status: "standard",
  10498. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
  10499. },
  10500. "backface-visibility": {
  10501. syntax: "visible | hidden",
  10502. media: "visual",
  10503. inherited: false,
  10504. animationType: "discrete",
  10505. percentages: "no",
  10506. groups: [
  10507. "CSS Transforms"
  10508. ],
  10509. initial: "visible",
  10510. appliesto: "transformableElements",
  10511. computed: "asSpecified",
  10512. order: "uniqueOrder",
  10513. status: "standard",
  10514. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
  10515. },
  10516. background: background,
  10517. "background-attachment": {
  10518. syntax: "<attachment>#",
  10519. media: "visual",
  10520. inherited: false,
  10521. animationType: "discrete",
  10522. percentages: "no",
  10523. groups: [
  10524. "CSS Backgrounds and Borders"
  10525. ],
  10526. initial: "scroll",
  10527. appliesto: "allElements",
  10528. computed: "asSpecified",
  10529. order: "uniqueOrder",
  10530. alsoAppliesTo: [
  10531. "::first-letter",
  10532. "::first-line",
  10533. "::placeholder"
  10534. ],
  10535. status: "standard",
  10536. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
  10537. },
  10538. "background-blend-mode": {
  10539. syntax: "<blend-mode>#",
  10540. media: "none",
  10541. inherited: false,
  10542. animationType: "discrete",
  10543. percentages: "no",
  10544. groups: [
  10545. "Compositing and Blending"
  10546. ],
  10547. initial: "normal",
  10548. appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
  10549. computed: "asSpecified",
  10550. order: "uniqueOrder",
  10551. alsoAppliesTo: [
  10552. "::first-letter",
  10553. "::first-line",
  10554. "::placeholder"
  10555. ],
  10556. status: "standard",
  10557. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
  10558. },
  10559. "background-clip": {
  10560. syntax: "<box>#",
  10561. media: "visual",
  10562. inherited: false,
  10563. animationType: "discrete",
  10564. percentages: "no",
  10565. groups: [
  10566. "CSS Backgrounds and Borders"
  10567. ],
  10568. initial: "border-box",
  10569. appliesto: "allElements",
  10570. computed: "asSpecified",
  10571. order: "uniqueOrder",
  10572. alsoAppliesTo: [
  10573. "::first-letter",
  10574. "::first-line",
  10575. "::placeholder"
  10576. ],
  10577. status: "standard",
  10578. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-clip"
  10579. },
  10580. "background-color": {
  10581. syntax: "<color>",
  10582. media: "visual",
  10583. inherited: false,
  10584. animationType: "color",
  10585. percentages: "no",
  10586. groups: [
  10587. "CSS Backgrounds and Borders"
  10588. ],
  10589. initial: "transparent",
  10590. appliesto: "allElements",
  10591. computed: "computedColor",
  10592. order: "uniqueOrder",
  10593. alsoAppliesTo: [
  10594. "::first-letter",
  10595. "::first-line",
  10596. "::placeholder"
  10597. ],
  10598. status: "standard",
  10599. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-color"
  10600. },
  10601. "background-image": {
  10602. syntax: "<bg-image>#",
  10603. media: "visual",
  10604. inherited: false,
  10605. animationType: "discrete",
  10606. percentages: "no",
  10607. groups: [
  10608. "CSS Backgrounds and Borders"
  10609. ],
  10610. initial: "none",
  10611. appliesto: "allElements",
  10612. computed: "asSpecifiedURLsAbsolute",
  10613. order: "uniqueOrder",
  10614. alsoAppliesTo: [
  10615. "::first-letter",
  10616. "::first-line",
  10617. "::placeholder"
  10618. ],
  10619. status: "standard",
  10620. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-image"
  10621. },
  10622. "background-origin": {
  10623. syntax: "<box>#",
  10624. media: "visual",
  10625. inherited: false,
  10626. animationType: "discrete",
  10627. percentages: "no",
  10628. groups: [
  10629. "CSS Backgrounds and Borders"
  10630. ],
  10631. initial: "padding-box",
  10632. appliesto: "allElements",
  10633. computed: "asSpecified",
  10634. order: "uniqueOrder",
  10635. alsoAppliesTo: [
  10636. "::first-letter",
  10637. "::first-line",
  10638. "::placeholder"
  10639. ],
  10640. status: "standard",
  10641. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-origin"
  10642. },
  10643. "background-position": {
  10644. syntax: "<bg-position>#",
  10645. media: "visual",
  10646. inherited: false,
  10647. animationType: "repeatableListOfSimpleListOfLpc",
  10648. percentages: "referToSizeOfBackgroundPositioningAreaMinusBackgroundImageSize",
  10649. groups: [
  10650. "CSS Backgrounds and Borders"
  10651. ],
  10652. initial: "0% 0%",
  10653. appliesto: "allElements",
  10654. computed: "listEachItemTwoKeywordsOriginOffsets",
  10655. order: "uniqueOrder",
  10656. alsoAppliesTo: [
  10657. "::first-letter",
  10658. "::first-line",
  10659. "::placeholder"
  10660. ],
  10661. status: "standard",
  10662. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position"
  10663. },
  10664. "background-position-x": {
  10665. syntax: "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
  10666. media: "visual",
  10667. inherited: false,
  10668. animationType: "discrete",
  10669. percentages: "referToWidthOfBackgroundPositioningAreaMinusBackgroundImageHeight",
  10670. groups: [
  10671. "CSS Backgrounds and Borders"
  10672. ],
  10673. initial: "left",
  10674. appliesto: "allElements",
  10675. computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
  10676. order: "uniqueOrder",
  10677. status: "experimental",
  10678. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
  10679. },
  10680. "background-position-y": {
  10681. syntax: "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
  10682. media: "visual",
  10683. inherited: false,
  10684. animationType: "discrete",
  10685. percentages: "referToHeightOfBackgroundPositioningAreaMinusBackgroundImageHeight",
  10686. groups: [
  10687. "CSS Backgrounds and Borders"
  10688. ],
  10689. initial: "top",
  10690. appliesto: "allElements",
  10691. computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
  10692. order: "uniqueOrder",
  10693. status: "experimental",
  10694. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
  10695. },
  10696. "background-repeat": {
  10697. syntax: "<repeat-style>#",
  10698. media: "visual",
  10699. inherited: false,
  10700. animationType: "discrete",
  10701. percentages: "no",
  10702. groups: [
  10703. "CSS Backgrounds and Borders"
  10704. ],
  10705. initial: "repeat",
  10706. appliesto: "allElements",
  10707. computed: "listEachItemHasTwoKeywordsOnePerDimension",
  10708. order: "uniqueOrder",
  10709. alsoAppliesTo: [
  10710. "::first-letter",
  10711. "::first-line",
  10712. "::placeholder"
  10713. ],
  10714. status: "standard",
  10715. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
  10716. },
  10717. "background-size": {
  10718. syntax: "<bg-size>#",
  10719. media: "visual",
  10720. inherited: false,
  10721. animationType: "repeatableListOfSimpleListOfLpc",
  10722. percentages: "relativeToBackgroundPositioningArea",
  10723. groups: [
  10724. "CSS Backgrounds and Borders"
  10725. ],
  10726. initial: "auto auto",
  10727. appliesto: "allElements",
  10728. computed: "asSpecifiedRelativeToAbsoluteLengths",
  10729. order: "uniqueOrder",
  10730. alsoAppliesTo: [
  10731. "::first-letter",
  10732. "::first-line",
  10733. "::placeholder"
  10734. ],
  10735. status: "standard",
  10736. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-size"
  10737. },
  10738. "block-overflow": {
  10739. syntax: "clip | ellipsis | <string>",
  10740. media: "visual",
  10741. inherited: true,
  10742. animationType: "discrete",
  10743. percentages: "no",
  10744. groups: [
  10745. "CSS Overflow"
  10746. ],
  10747. initial: "clip",
  10748. appliesto: "blockContainers",
  10749. computed: "asSpecified",
  10750. order: "perGrammar",
  10751. status: "experimental"
  10752. },
  10753. "block-size": {
  10754. syntax: "<'width'>",
  10755. media: "visual",
  10756. inherited: false,
  10757. animationType: "lpc",
  10758. percentages: "blockSizeOfContainingBlock",
  10759. groups: [
  10760. "CSS Logical Properties"
  10761. ],
  10762. initial: "auto",
  10763. appliesto: "sameAsWidthAndHeight",
  10764. computed: "sameAsWidthAndHeight",
  10765. order: "uniqueOrder",
  10766. status: "standard",
  10767. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/block-size"
  10768. },
  10769. border: border,
  10770. "border-block": {
  10771. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  10772. media: "visual",
  10773. inherited: false,
  10774. animationType: "discrete",
  10775. percentages: "no",
  10776. groups: [
  10777. "CSS Logical Properties"
  10778. ],
  10779. initial: [
  10780. "border-top-width",
  10781. "border-top-style",
  10782. "border-top-color"
  10783. ],
  10784. appliesto: "allElements",
  10785. computed: [
  10786. "border-top-width",
  10787. "border-top-style",
  10788. "border-top-color"
  10789. ],
  10790. order: "uniqueOrder",
  10791. status: "standard",
  10792. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block"
  10793. },
  10794. "border-block-color": {
  10795. syntax: "<'border-top-color'>{1,2}",
  10796. media: "visual",
  10797. inherited: false,
  10798. animationType: "discrete",
  10799. percentages: "no",
  10800. groups: [
  10801. "CSS Logical Properties"
  10802. ],
  10803. initial: "currentcolor",
  10804. appliesto: "allElements",
  10805. computed: "computedColor",
  10806. order: "uniqueOrder",
  10807. status: "standard",
  10808. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
  10809. },
  10810. "border-block-style": {
  10811. syntax: "<'border-top-style'>",
  10812. media: "visual",
  10813. inherited: false,
  10814. animationType: "discrete",
  10815. percentages: "no",
  10816. groups: [
  10817. "CSS Logical Properties"
  10818. ],
  10819. initial: "none",
  10820. appliesto: "allElements",
  10821. computed: "asSpecified",
  10822. order: "uniqueOrder",
  10823. status: "standard",
  10824. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
  10825. },
  10826. "border-block-width": {
  10827. syntax: "<'border-top-width'>",
  10828. media: "visual",
  10829. inherited: false,
  10830. animationType: "discrete",
  10831. percentages: "logicalWidthOfContainingBlock",
  10832. groups: [
  10833. "CSS Logical Properties"
  10834. ],
  10835. initial: "medium",
  10836. appliesto: "allElements",
  10837. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  10838. order: "uniqueOrder",
  10839. status: "standard",
  10840. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
  10841. },
  10842. "border-block-end": {
  10843. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  10844. media: "visual",
  10845. inherited: false,
  10846. animationType: [
  10847. "border-block-end-color",
  10848. "border-block-end-style",
  10849. "border-block-end-width"
  10850. ],
  10851. percentages: "no",
  10852. groups: [
  10853. "CSS Logical Properties"
  10854. ],
  10855. initial: [
  10856. "border-top-width",
  10857. "border-top-style",
  10858. "border-top-color"
  10859. ],
  10860. appliesto: "allElements",
  10861. computed: [
  10862. "border-top-width",
  10863. "border-top-style",
  10864. "border-top-color"
  10865. ],
  10866. order: "uniqueOrder",
  10867. status: "standard",
  10868. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
  10869. },
  10870. "border-block-end-color": {
  10871. syntax: "<'border-top-color'>",
  10872. media: "visual",
  10873. inherited: false,
  10874. animationType: "color",
  10875. percentages: "no",
  10876. groups: [
  10877. "CSS Logical Properties"
  10878. ],
  10879. initial: "currentcolor",
  10880. appliesto: "allElements",
  10881. computed: "computedColor",
  10882. order: "uniqueOrder",
  10883. status: "standard",
  10884. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
  10885. },
  10886. "border-block-end-style": {
  10887. syntax: "<'border-top-style'>",
  10888. media: "visual",
  10889. inherited: false,
  10890. animationType: "discrete",
  10891. percentages: "no",
  10892. groups: [
  10893. "CSS Logical Properties"
  10894. ],
  10895. initial: "none",
  10896. appliesto: "allElements",
  10897. computed: "asSpecified",
  10898. order: "uniqueOrder",
  10899. status: "standard",
  10900. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
  10901. },
  10902. "border-block-end-width": {
  10903. syntax: "<'border-top-width'>",
  10904. media: "visual",
  10905. inherited: false,
  10906. animationType: "length",
  10907. percentages: "logicalWidthOfContainingBlock",
  10908. groups: [
  10909. "CSS Logical Properties"
  10910. ],
  10911. initial: "medium",
  10912. appliesto: "allElements",
  10913. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  10914. order: "uniqueOrder",
  10915. status: "standard",
  10916. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
  10917. },
  10918. "border-block-start": {
  10919. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  10920. media: "visual",
  10921. inherited: false,
  10922. animationType: [
  10923. "border-block-start-color",
  10924. "border-block-start-style",
  10925. "border-block-start-width"
  10926. ],
  10927. percentages: "no",
  10928. groups: [
  10929. "CSS Logical Properties"
  10930. ],
  10931. initial: [
  10932. "border-width",
  10933. "border-style",
  10934. "color"
  10935. ],
  10936. appliesto: "allElements",
  10937. computed: [
  10938. "border-width",
  10939. "border-style",
  10940. "border-block-start-color"
  10941. ],
  10942. order: "uniqueOrder",
  10943. status: "standard",
  10944. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
  10945. },
  10946. "border-block-start-color": {
  10947. syntax: "<'border-top-color'>",
  10948. media: "visual",
  10949. inherited: false,
  10950. animationType: "color",
  10951. percentages: "no",
  10952. groups: [
  10953. "CSS Logical Properties"
  10954. ],
  10955. initial: "currentcolor",
  10956. appliesto: "allElements",
  10957. computed: "computedColor",
  10958. order: "uniqueOrder",
  10959. status: "standard",
  10960. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
  10961. },
  10962. "border-block-start-style": {
  10963. syntax: "<'border-top-style'>",
  10964. media: "visual",
  10965. inherited: false,
  10966. animationType: "discrete",
  10967. percentages: "no",
  10968. groups: [
  10969. "CSS Logical Properties"
  10970. ],
  10971. initial: "none",
  10972. appliesto: "allElements",
  10973. computed: "asSpecified",
  10974. order: "uniqueOrder",
  10975. status: "standard",
  10976. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
  10977. },
  10978. "border-block-start-width": {
  10979. syntax: "<'border-top-width'>",
  10980. media: "visual",
  10981. inherited: false,
  10982. animationType: "length",
  10983. percentages: "logicalWidthOfContainingBlock",
  10984. groups: [
  10985. "CSS Logical Properties"
  10986. ],
  10987. initial: "medium",
  10988. appliesto: "allElements",
  10989. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  10990. order: "uniqueOrder",
  10991. status: "standard",
  10992. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
  10993. },
  10994. "border-bottom": {
  10995. syntax: "<line-width> || <line-style> || <color>",
  10996. media: "visual",
  10997. inherited: false,
  10998. animationType: [
  10999. "border-bottom-color",
  11000. "border-bottom-style",
  11001. "border-bottom-width"
  11002. ],
  11003. percentages: "no",
  11004. groups: [
  11005. "CSS Backgrounds and Borders"
  11006. ],
  11007. initial: [
  11008. "border-bottom-width",
  11009. "border-bottom-style",
  11010. "border-bottom-color"
  11011. ],
  11012. appliesto: "allElements",
  11013. computed: [
  11014. "border-bottom-width",
  11015. "border-bottom-style",
  11016. "border-bottom-color"
  11017. ],
  11018. order: "orderOfAppearance",
  11019. alsoAppliesTo: [
  11020. "::first-letter"
  11021. ],
  11022. status: "standard",
  11023. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
  11024. },
  11025. "border-bottom-color": {
  11026. syntax: "<'border-top-color'>",
  11027. media: "visual",
  11028. inherited: false,
  11029. animationType: "color",
  11030. percentages: "no",
  11031. groups: [
  11032. "CSS Backgrounds and Borders"
  11033. ],
  11034. initial: "currentcolor",
  11035. appliesto: "allElements",
  11036. computed: "computedColor",
  11037. order: "uniqueOrder",
  11038. alsoAppliesTo: [
  11039. "::first-letter"
  11040. ],
  11041. status: "standard",
  11042. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
  11043. },
  11044. "border-bottom-left-radius": {
  11045. syntax: "<length-percentage>{1,2}",
  11046. media: "visual",
  11047. inherited: false,
  11048. animationType: "lpc",
  11049. percentages: "referToDimensionOfBorderBox",
  11050. groups: [
  11051. "CSS Backgrounds and Borders"
  11052. ],
  11053. initial: "0",
  11054. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11055. computed: "twoAbsoluteLengthOrPercentages",
  11056. order: "uniqueOrder",
  11057. alsoAppliesTo: [
  11058. "::first-letter"
  11059. ],
  11060. status: "standard",
  11061. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
  11062. },
  11063. "border-bottom-right-radius": {
  11064. syntax: "<length-percentage>{1,2}",
  11065. media: "visual",
  11066. inherited: false,
  11067. animationType: "lpc",
  11068. percentages: "referToDimensionOfBorderBox",
  11069. groups: [
  11070. "CSS Backgrounds and Borders"
  11071. ],
  11072. initial: "0",
  11073. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11074. computed: "twoAbsoluteLengthOrPercentages",
  11075. order: "uniqueOrder",
  11076. alsoAppliesTo: [
  11077. "::first-letter"
  11078. ],
  11079. status: "standard",
  11080. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
  11081. },
  11082. "border-bottom-style": {
  11083. syntax: "<line-style>",
  11084. media: "visual",
  11085. inherited: false,
  11086. animationType: "discrete",
  11087. percentages: "no",
  11088. groups: [
  11089. "CSS Backgrounds and Borders"
  11090. ],
  11091. initial: "none",
  11092. appliesto: "allElements",
  11093. computed: "asSpecified",
  11094. order: "uniqueOrder",
  11095. alsoAppliesTo: [
  11096. "::first-letter"
  11097. ],
  11098. status: "standard",
  11099. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
  11100. },
  11101. "border-bottom-width": {
  11102. syntax: "<line-width>",
  11103. media: "visual",
  11104. inherited: false,
  11105. animationType: "length",
  11106. percentages: "no",
  11107. groups: [
  11108. "CSS Backgrounds and Borders"
  11109. ],
  11110. initial: "medium",
  11111. appliesto: "allElements",
  11112. computed: "absoluteLengthOr0IfBorderBottomStyleNoneOrHidden",
  11113. order: "uniqueOrder",
  11114. alsoAppliesTo: [
  11115. "::first-letter"
  11116. ],
  11117. status: "standard",
  11118. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
  11119. },
  11120. "border-collapse": {
  11121. syntax: "collapse | separate",
  11122. media: "visual",
  11123. inherited: true,
  11124. animationType: "discrete",
  11125. percentages: "no",
  11126. groups: [
  11127. "CSS Table"
  11128. ],
  11129. initial: "separate",
  11130. appliesto: "tableElements",
  11131. computed: "asSpecified",
  11132. order: "uniqueOrder",
  11133. status: "standard",
  11134. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
  11135. },
  11136. "border-color": {
  11137. syntax: "<color>{1,4}",
  11138. media: "visual",
  11139. inherited: false,
  11140. animationType: [
  11141. "border-bottom-color",
  11142. "border-left-color",
  11143. "border-right-color",
  11144. "border-top-color"
  11145. ],
  11146. percentages: "no",
  11147. groups: [
  11148. "CSS Backgrounds and Borders"
  11149. ],
  11150. initial: [
  11151. "border-top-color",
  11152. "border-right-color",
  11153. "border-bottom-color",
  11154. "border-left-color"
  11155. ],
  11156. appliesto: "allElements",
  11157. computed: [
  11158. "border-bottom-color",
  11159. "border-left-color",
  11160. "border-right-color",
  11161. "border-top-color"
  11162. ],
  11163. order: "uniqueOrder",
  11164. alsoAppliesTo: [
  11165. "::first-letter"
  11166. ],
  11167. status: "standard",
  11168. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-color"
  11169. },
  11170. "border-end-end-radius": {
  11171. syntax: "<length-percentage>{1,2}",
  11172. media: "visual",
  11173. inherited: false,
  11174. animationType: "lpc",
  11175. percentages: "referToDimensionOfBorderBox",
  11176. groups: [
  11177. "CSS Logical Properties"
  11178. ],
  11179. initial: "0",
  11180. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11181. computed: "twoAbsoluteLengthOrPercentages",
  11182. order: "uniqueOrder",
  11183. alsoAppliesTo: [
  11184. "::first-letter"
  11185. ],
  11186. status: "standard",
  11187. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
  11188. },
  11189. "border-end-start-radius": {
  11190. syntax: "<length-percentage>{1,2}",
  11191. media: "visual",
  11192. inherited: false,
  11193. animationType: "lpc",
  11194. percentages: "referToDimensionOfBorderBox",
  11195. groups: [
  11196. "CSS Logical Properties"
  11197. ],
  11198. initial: "0",
  11199. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11200. computed: "twoAbsoluteLengthOrPercentages",
  11201. order: "uniqueOrder",
  11202. alsoAppliesTo: [
  11203. "::first-letter"
  11204. ],
  11205. status: "standard",
  11206. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
  11207. },
  11208. "border-image": {
  11209. syntax: "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
  11210. media: "visual",
  11211. inherited: false,
  11212. animationType: "discrete",
  11213. percentages: [
  11214. "border-image-slice",
  11215. "border-image-width"
  11216. ],
  11217. groups: [
  11218. "CSS Backgrounds and Borders"
  11219. ],
  11220. initial: [
  11221. "border-image-source",
  11222. "border-image-slice",
  11223. "border-image-width",
  11224. "border-image-outset",
  11225. "border-image-repeat"
  11226. ],
  11227. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11228. computed: [
  11229. "border-image-outset",
  11230. "border-image-repeat",
  11231. "border-image-slice",
  11232. "border-image-source",
  11233. "border-image-width"
  11234. ],
  11235. order: "uniqueOrder",
  11236. alsoAppliesTo: [
  11237. "::first-letter"
  11238. ],
  11239. status: "standard",
  11240. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image"
  11241. },
  11242. "border-image-outset": {
  11243. syntax: "[ <length> | <number> ]{1,4}",
  11244. media: "visual",
  11245. inherited: false,
  11246. animationType: "byComputedValueType",
  11247. percentages: "no",
  11248. groups: [
  11249. "CSS Backgrounds and Borders"
  11250. ],
  11251. initial: "0",
  11252. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11253. computed: "asSpecifiedRelativeToAbsoluteLengths",
  11254. order: "uniqueOrder",
  11255. alsoAppliesTo: [
  11256. "::first-letter"
  11257. ],
  11258. status: "standard",
  11259. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
  11260. },
  11261. "border-image-repeat": {
  11262. syntax: "[ stretch | repeat | round | space ]{1,2}",
  11263. media: "visual",
  11264. inherited: false,
  11265. animationType: "discrete",
  11266. percentages: "no",
  11267. groups: [
  11268. "CSS Backgrounds and Borders"
  11269. ],
  11270. initial: "stretch",
  11271. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11272. computed: "asSpecified",
  11273. order: "uniqueOrder",
  11274. alsoAppliesTo: [
  11275. "::first-letter"
  11276. ],
  11277. status: "standard",
  11278. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
  11279. },
  11280. "border-image-slice": {
  11281. syntax: "<number-percentage>{1,4} && fill?",
  11282. media: "visual",
  11283. inherited: false,
  11284. animationType: "byComputedValueType",
  11285. percentages: "referToSizeOfBorderImage",
  11286. groups: [
  11287. "CSS Backgrounds and Borders"
  11288. ],
  11289. initial: "100%",
  11290. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11291. computed: "oneToFourPercentagesOrAbsoluteLengthsPlusFill",
  11292. order: "percentagesOrLengthsFollowedByFill",
  11293. alsoAppliesTo: [
  11294. "::first-letter"
  11295. ],
  11296. status: "standard",
  11297. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
  11298. },
  11299. "border-image-source": {
  11300. syntax: "none | <image>",
  11301. media: "visual",
  11302. inherited: false,
  11303. animationType: "discrete",
  11304. percentages: "no",
  11305. groups: [
  11306. "CSS Backgrounds and Borders"
  11307. ],
  11308. initial: "none",
  11309. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11310. computed: "noneOrImageWithAbsoluteURI",
  11311. order: "uniqueOrder",
  11312. alsoAppliesTo: [
  11313. "::first-letter"
  11314. ],
  11315. status: "standard",
  11316. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
  11317. },
  11318. "border-image-width": {
  11319. syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
  11320. media: "visual",
  11321. inherited: false,
  11322. animationType: "byComputedValueType",
  11323. percentages: "referToWidthOrHeightOfBorderImageArea",
  11324. groups: [
  11325. "CSS Backgrounds and Borders"
  11326. ],
  11327. initial: "1",
  11328. appliesto: "allElementsExceptTableElementsWhenCollapse",
  11329. computed: "asSpecifiedRelativeToAbsoluteLengths",
  11330. order: "uniqueOrder",
  11331. alsoAppliesTo: [
  11332. "::first-letter"
  11333. ],
  11334. status: "standard",
  11335. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
  11336. },
  11337. "border-inline": {
  11338. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  11339. media: "visual",
  11340. inherited: false,
  11341. animationType: "discrete",
  11342. percentages: "no",
  11343. groups: [
  11344. "CSS Logical Properties"
  11345. ],
  11346. initial: [
  11347. "border-top-width",
  11348. "border-top-style",
  11349. "border-top-color"
  11350. ],
  11351. appliesto: "allElements",
  11352. computed: [
  11353. "border-top-width",
  11354. "border-top-style",
  11355. "border-top-color"
  11356. ],
  11357. order: "uniqueOrder",
  11358. status: "standard",
  11359. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline"
  11360. },
  11361. "border-inline-end": {
  11362. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  11363. media: "visual",
  11364. inherited: false,
  11365. animationType: [
  11366. "border-inline-end-color",
  11367. "border-inline-end-style",
  11368. "border-inline-end-width"
  11369. ],
  11370. percentages: "no",
  11371. groups: [
  11372. "CSS Logical Properties"
  11373. ],
  11374. initial: [
  11375. "border-width",
  11376. "border-style",
  11377. "color"
  11378. ],
  11379. appliesto: "allElements",
  11380. computed: [
  11381. "border-width",
  11382. "border-style",
  11383. "border-inline-end-color"
  11384. ],
  11385. order: "uniqueOrder",
  11386. status: "standard",
  11387. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
  11388. },
  11389. "border-inline-color": {
  11390. syntax: "<'border-top-color'>{1,2}",
  11391. media: "visual",
  11392. inherited: false,
  11393. animationType: "discrete",
  11394. percentages: "no",
  11395. groups: [
  11396. "CSS Logical Properties"
  11397. ],
  11398. initial: "currentcolor",
  11399. appliesto: "allElements",
  11400. computed: "computedColor",
  11401. order: "uniqueOrder",
  11402. status: "standard",
  11403. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
  11404. },
  11405. "border-inline-style": {
  11406. syntax: "<'border-top-style'>",
  11407. media: "visual",
  11408. inherited: false,
  11409. animationType: "discrete",
  11410. percentages: "no",
  11411. groups: [
  11412. "CSS Logical Properties"
  11413. ],
  11414. initial: "none",
  11415. appliesto: "allElements",
  11416. computed: "asSpecified",
  11417. order: "uniqueOrder",
  11418. status: "standard",
  11419. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
  11420. },
  11421. "border-inline-width": {
  11422. syntax: "<'border-top-width'>",
  11423. media: "visual",
  11424. inherited: false,
  11425. animationType: "discrete",
  11426. percentages: "logicalWidthOfContainingBlock",
  11427. groups: [
  11428. "CSS Logical Properties"
  11429. ],
  11430. initial: "medium",
  11431. appliesto: "allElements",
  11432. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  11433. order: "uniqueOrder",
  11434. status: "standard",
  11435. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
  11436. },
  11437. "border-inline-end-color": {
  11438. syntax: "<'border-top-color'>",
  11439. media: "visual",
  11440. inherited: false,
  11441. animationType: "color",
  11442. percentages: "no",
  11443. groups: [
  11444. "CSS Logical Properties"
  11445. ],
  11446. initial: "currentcolor",
  11447. appliesto: "allElements",
  11448. computed: "computedColor",
  11449. order: "uniqueOrder",
  11450. status: "standard",
  11451. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
  11452. },
  11453. "border-inline-end-style": {
  11454. syntax: "<'border-top-style'>",
  11455. media: "visual",
  11456. inherited: false,
  11457. animationType: "discrete",
  11458. percentages: "no",
  11459. groups: [
  11460. "CSS Logical Properties"
  11461. ],
  11462. initial: "none",
  11463. appliesto: "allElements",
  11464. computed: "asSpecified",
  11465. order: "uniqueOrder",
  11466. status: "standard",
  11467. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
  11468. },
  11469. "border-inline-end-width": {
  11470. syntax: "<'border-top-width'>",
  11471. media: "visual",
  11472. inherited: false,
  11473. animationType: "length",
  11474. percentages: "logicalWidthOfContainingBlock",
  11475. groups: [
  11476. "CSS Logical Properties"
  11477. ],
  11478. initial: "medium",
  11479. appliesto: "allElements",
  11480. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  11481. order: "uniqueOrder",
  11482. status: "standard",
  11483. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
  11484. },
  11485. "border-inline-start": {
  11486. syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
  11487. media: "visual",
  11488. inherited: false,
  11489. animationType: [
  11490. "border-inline-start-color",
  11491. "border-inline-start-style",
  11492. "border-inline-start-width"
  11493. ],
  11494. percentages: "no",
  11495. groups: [
  11496. "CSS Logical Properties"
  11497. ],
  11498. initial: [
  11499. "border-width",
  11500. "border-style",
  11501. "color"
  11502. ],
  11503. appliesto: "allElements",
  11504. computed: [
  11505. "border-width",
  11506. "border-style",
  11507. "border-inline-start-color"
  11508. ],
  11509. order: "uniqueOrder",
  11510. status: "standard",
  11511. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
  11512. },
  11513. "border-inline-start-color": {
  11514. syntax: "<'border-top-color'>",
  11515. media: "visual",
  11516. inherited: false,
  11517. animationType: "color",
  11518. percentages: "no",
  11519. groups: [
  11520. "CSS Logical Properties"
  11521. ],
  11522. initial: "currentcolor",
  11523. appliesto: "allElements",
  11524. computed: "computedColor",
  11525. order: "uniqueOrder",
  11526. status: "standard",
  11527. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
  11528. },
  11529. "border-inline-start-style": {
  11530. syntax: "<'border-top-style'>",
  11531. media: "visual",
  11532. inherited: false,
  11533. animationType: "discrete",
  11534. percentages: "no",
  11535. groups: [
  11536. "CSS Logical Properties"
  11537. ],
  11538. initial: "none",
  11539. appliesto: "allElements",
  11540. computed: "asSpecified",
  11541. order: "uniqueOrder",
  11542. status: "standard",
  11543. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
  11544. },
  11545. "border-inline-start-width": {
  11546. syntax: "<'border-top-width'>",
  11547. media: "visual",
  11548. inherited: false,
  11549. animationType: "length",
  11550. percentages: "logicalWidthOfContainingBlock",
  11551. groups: [
  11552. "CSS Logical Properties"
  11553. ],
  11554. initial: "medium",
  11555. appliesto: "allElements",
  11556. computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
  11557. order: "uniqueOrder",
  11558. status: "standard",
  11559. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
  11560. },
  11561. "border-left": {
  11562. syntax: "<line-width> || <line-style> || <color>",
  11563. media: "visual",
  11564. inherited: false,
  11565. animationType: [
  11566. "border-left-color",
  11567. "border-left-style",
  11568. "border-left-width"
  11569. ],
  11570. percentages: "no",
  11571. groups: [
  11572. "CSS Backgrounds and Borders"
  11573. ],
  11574. initial: [
  11575. "border-left-width",
  11576. "border-left-style",
  11577. "border-left-color"
  11578. ],
  11579. appliesto: "allElements",
  11580. computed: [
  11581. "border-left-width",
  11582. "border-left-style",
  11583. "border-left-color"
  11584. ],
  11585. order: "orderOfAppearance",
  11586. alsoAppliesTo: [
  11587. "::first-letter"
  11588. ],
  11589. status: "standard",
  11590. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left"
  11591. },
  11592. "border-left-color": {
  11593. syntax: "<color>",
  11594. media: "visual",
  11595. inherited: false,
  11596. animationType: "color",
  11597. percentages: "no",
  11598. groups: [
  11599. "CSS Backgrounds and Borders"
  11600. ],
  11601. initial: "currentcolor",
  11602. appliesto: "allElements",
  11603. computed: "computedColor",
  11604. order: "uniqueOrder",
  11605. alsoAppliesTo: [
  11606. "::first-letter"
  11607. ],
  11608. status: "standard",
  11609. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
  11610. },
  11611. "border-left-style": {
  11612. syntax: "<line-style>",
  11613. media: "visual",
  11614. inherited: false,
  11615. animationType: "discrete",
  11616. percentages: "no",
  11617. groups: [
  11618. "CSS Backgrounds and Borders"
  11619. ],
  11620. initial: "none",
  11621. appliesto: "allElements",
  11622. computed: "asSpecified",
  11623. order: "uniqueOrder",
  11624. alsoAppliesTo: [
  11625. "::first-letter"
  11626. ],
  11627. status: "standard",
  11628. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
  11629. },
  11630. "border-left-width": {
  11631. syntax: "<line-width>",
  11632. media: "visual",
  11633. inherited: false,
  11634. animationType: "length",
  11635. percentages: "no",
  11636. groups: [
  11637. "CSS Backgrounds and Borders"
  11638. ],
  11639. initial: "medium",
  11640. appliesto: "allElements",
  11641. computed: "absoluteLengthOr0IfBorderLeftStyleNoneOrHidden",
  11642. order: "uniqueOrder",
  11643. alsoAppliesTo: [
  11644. "::first-letter"
  11645. ],
  11646. status: "standard",
  11647. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
  11648. },
  11649. "border-radius": {
  11650. syntax: "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
  11651. media: "visual",
  11652. inherited: false,
  11653. animationType: [
  11654. "border-top-left-radius",
  11655. "border-top-right-radius",
  11656. "border-bottom-right-radius",
  11657. "border-bottom-left-radius"
  11658. ],
  11659. percentages: "referToDimensionOfBorderBox",
  11660. groups: [
  11661. "CSS Backgrounds and Borders"
  11662. ],
  11663. initial: [
  11664. "border-top-left-radius",
  11665. "border-top-right-radius",
  11666. "border-bottom-right-radius",
  11667. "border-bottom-left-radius"
  11668. ],
  11669. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11670. computed: [
  11671. "border-bottom-left-radius",
  11672. "border-bottom-right-radius",
  11673. "border-top-left-radius",
  11674. "border-top-right-radius"
  11675. ],
  11676. order: "uniqueOrder",
  11677. alsoAppliesTo: [
  11678. "::first-letter"
  11679. ],
  11680. status: "standard",
  11681. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-radius"
  11682. },
  11683. "border-right": {
  11684. syntax: "<line-width> || <line-style> || <color>",
  11685. media: "visual",
  11686. inherited: false,
  11687. animationType: [
  11688. "border-right-color",
  11689. "border-right-style",
  11690. "border-right-width"
  11691. ],
  11692. percentages: "no",
  11693. groups: [
  11694. "CSS Backgrounds and Borders"
  11695. ],
  11696. initial: [
  11697. "border-right-width",
  11698. "border-right-style",
  11699. "border-right-color"
  11700. ],
  11701. appliesto: "allElements",
  11702. computed: [
  11703. "border-right-width",
  11704. "border-right-style",
  11705. "border-right-color"
  11706. ],
  11707. order: "orderOfAppearance",
  11708. alsoAppliesTo: [
  11709. "::first-letter"
  11710. ],
  11711. status: "standard",
  11712. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right"
  11713. },
  11714. "border-right-color": {
  11715. syntax: "<color>",
  11716. media: "visual",
  11717. inherited: false,
  11718. animationType: "color",
  11719. percentages: "no",
  11720. groups: [
  11721. "CSS Backgrounds and Borders"
  11722. ],
  11723. initial: "currentcolor",
  11724. appliesto: "allElements",
  11725. computed: "computedColor",
  11726. order: "uniqueOrder",
  11727. alsoAppliesTo: [
  11728. "::first-letter"
  11729. ],
  11730. status: "standard",
  11731. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
  11732. },
  11733. "border-right-style": {
  11734. syntax: "<line-style>",
  11735. media: "visual",
  11736. inherited: false,
  11737. animationType: "discrete",
  11738. percentages: "no",
  11739. groups: [
  11740. "CSS Backgrounds and Borders"
  11741. ],
  11742. initial: "none",
  11743. appliesto: "allElements",
  11744. computed: "asSpecified",
  11745. order: "uniqueOrder",
  11746. alsoAppliesTo: [
  11747. "::first-letter"
  11748. ],
  11749. status: "standard",
  11750. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
  11751. },
  11752. "border-right-width": {
  11753. syntax: "<line-width>",
  11754. media: "visual",
  11755. inherited: false,
  11756. animationType: "length",
  11757. percentages: "no",
  11758. groups: [
  11759. "CSS Backgrounds and Borders"
  11760. ],
  11761. initial: "medium",
  11762. appliesto: "allElements",
  11763. computed: "absoluteLengthOr0IfBorderRightStyleNoneOrHidden",
  11764. order: "uniqueOrder",
  11765. alsoAppliesTo: [
  11766. "::first-letter"
  11767. ],
  11768. status: "standard",
  11769. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
  11770. },
  11771. "border-spacing": {
  11772. syntax: "<length> <length>?",
  11773. media: "visual",
  11774. inherited: true,
  11775. animationType: "discrete",
  11776. percentages: "no",
  11777. groups: [
  11778. "CSS Table"
  11779. ],
  11780. initial: "0",
  11781. appliesto: "tableElements",
  11782. computed: "twoAbsoluteLengths",
  11783. order: "uniqueOrder",
  11784. status: "standard",
  11785. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
  11786. },
  11787. "border-start-end-radius": {
  11788. syntax: "<length-percentage>{1,2}",
  11789. media: "visual",
  11790. inherited: false,
  11791. animationType: "lpc",
  11792. percentages: "referToDimensionOfBorderBox",
  11793. groups: [
  11794. "CSS Logical Properties"
  11795. ],
  11796. initial: "0",
  11797. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11798. computed: "twoAbsoluteLengthOrPercentages",
  11799. order: "uniqueOrder",
  11800. alsoAppliesTo: [
  11801. "::first-letter"
  11802. ],
  11803. status: "standard",
  11804. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
  11805. },
  11806. "border-start-start-radius": {
  11807. syntax: "<length-percentage>{1,2}",
  11808. media: "visual",
  11809. inherited: false,
  11810. animationType: "lpc",
  11811. percentages: "referToDimensionOfBorderBox",
  11812. groups: [
  11813. "CSS Logical Properties"
  11814. ],
  11815. initial: "0",
  11816. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11817. computed: "twoAbsoluteLengthOrPercentages",
  11818. order: "uniqueOrder",
  11819. alsoAppliesTo: [
  11820. "::first-letter"
  11821. ],
  11822. status: "standard",
  11823. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
  11824. },
  11825. "border-style": {
  11826. syntax: "<line-style>{1,4}",
  11827. media: "visual",
  11828. inherited: false,
  11829. animationType: "discrete",
  11830. percentages: "no",
  11831. groups: [
  11832. "CSS Backgrounds and Borders"
  11833. ],
  11834. initial: [
  11835. "border-top-style",
  11836. "border-right-style",
  11837. "border-bottom-style",
  11838. "border-left-style"
  11839. ],
  11840. appliesto: "allElements",
  11841. computed: [
  11842. "border-bottom-style",
  11843. "border-left-style",
  11844. "border-right-style",
  11845. "border-top-style"
  11846. ],
  11847. order: "uniqueOrder",
  11848. alsoAppliesTo: [
  11849. "::first-letter"
  11850. ],
  11851. status: "standard",
  11852. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-style"
  11853. },
  11854. "border-top": {
  11855. syntax: "<line-width> || <line-style> || <color>",
  11856. media: "visual",
  11857. inherited: false,
  11858. animationType: [
  11859. "border-top-color",
  11860. "border-top-style",
  11861. "border-top-width"
  11862. ],
  11863. percentages: "no",
  11864. groups: [
  11865. "CSS Backgrounds and Borders"
  11866. ],
  11867. initial: [
  11868. "border-top-width",
  11869. "border-top-style",
  11870. "border-top-color"
  11871. ],
  11872. appliesto: "allElements",
  11873. computed: [
  11874. "border-top-width",
  11875. "border-top-style",
  11876. "border-top-color"
  11877. ],
  11878. order: "orderOfAppearance",
  11879. alsoAppliesTo: [
  11880. "::first-letter"
  11881. ],
  11882. status: "standard",
  11883. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top"
  11884. },
  11885. "border-top-color": {
  11886. syntax: "<color>",
  11887. media: "visual",
  11888. inherited: false,
  11889. animationType: "color",
  11890. percentages: "no",
  11891. groups: [
  11892. "CSS Backgrounds and Borders"
  11893. ],
  11894. initial: "currentcolor",
  11895. appliesto: "allElements",
  11896. computed: "computedColor",
  11897. order: "uniqueOrder",
  11898. alsoAppliesTo: [
  11899. "::first-letter"
  11900. ],
  11901. status: "standard",
  11902. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
  11903. },
  11904. "border-top-left-radius": {
  11905. syntax: "<length-percentage>{1,2}",
  11906. media: "visual",
  11907. inherited: false,
  11908. animationType: "lpc",
  11909. percentages: "referToDimensionOfBorderBox",
  11910. groups: [
  11911. "CSS Backgrounds and Borders"
  11912. ],
  11913. initial: "0",
  11914. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11915. computed: "twoAbsoluteLengthOrPercentages",
  11916. order: "uniqueOrder",
  11917. alsoAppliesTo: [
  11918. "::first-letter"
  11919. ],
  11920. status: "standard",
  11921. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
  11922. },
  11923. "border-top-right-radius": {
  11924. syntax: "<length-percentage>{1,2}",
  11925. media: "visual",
  11926. inherited: false,
  11927. animationType: "lpc",
  11928. percentages: "referToDimensionOfBorderBox",
  11929. groups: [
  11930. "CSS Backgrounds and Borders"
  11931. ],
  11932. initial: "0",
  11933. appliesto: "allElementsUAsNotRequiredWhenCollapse",
  11934. computed: "twoAbsoluteLengthOrPercentages",
  11935. order: "uniqueOrder",
  11936. alsoAppliesTo: [
  11937. "::first-letter"
  11938. ],
  11939. status: "standard",
  11940. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
  11941. },
  11942. "border-top-style": {
  11943. syntax: "<line-style>",
  11944. media: "visual",
  11945. inherited: false,
  11946. animationType: "discrete",
  11947. percentages: "no",
  11948. groups: [
  11949. "CSS Backgrounds and Borders"
  11950. ],
  11951. initial: "none",
  11952. appliesto: "allElements",
  11953. computed: "asSpecified",
  11954. order: "uniqueOrder",
  11955. alsoAppliesTo: [
  11956. "::first-letter"
  11957. ],
  11958. status: "standard",
  11959. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
  11960. },
  11961. "border-top-width": {
  11962. syntax: "<line-width>",
  11963. media: "visual",
  11964. inherited: false,
  11965. animationType: "length",
  11966. percentages: "no",
  11967. groups: [
  11968. "CSS Backgrounds and Borders"
  11969. ],
  11970. initial: "medium",
  11971. appliesto: "allElements",
  11972. computed: "absoluteLengthOr0IfBorderTopStyleNoneOrHidden",
  11973. order: "uniqueOrder",
  11974. alsoAppliesTo: [
  11975. "::first-letter"
  11976. ],
  11977. status: "standard",
  11978. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
  11979. },
  11980. "border-width": {
  11981. syntax: "<line-width>{1,4}",
  11982. media: "visual",
  11983. inherited: false,
  11984. animationType: [
  11985. "border-bottom-width",
  11986. "border-left-width",
  11987. "border-right-width",
  11988. "border-top-width"
  11989. ],
  11990. percentages: "no",
  11991. groups: [
  11992. "CSS Backgrounds and Borders"
  11993. ],
  11994. initial: [
  11995. "border-top-width",
  11996. "border-right-width",
  11997. "border-bottom-width",
  11998. "border-left-width"
  11999. ],
  12000. appliesto: "allElements",
  12001. computed: [
  12002. "border-bottom-width",
  12003. "border-left-width",
  12004. "border-right-width",
  12005. "border-top-width"
  12006. ],
  12007. order: "uniqueOrder",
  12008. alsoAppliesTo: [
  12009. "::first-letter"
  12010. ],
  12011. status: "standard",
  12012. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-width"
  12013. },
  12014. bottom: bottom,
  12015. "box-align": {
  12016. syntax: "start | center | end | baseline | stretch",
  12017. media: "visual",
  12018. inherited: false,
  12019. animationType: "discrete",
  12020. percentages: "no",
  12021. groups: [
  12022. "Mozilla Extensions",
  12023. "WebKit Extensions"
  12024. ],
  12025. initial: "stretch",
  12026. appliesto: "elementsWithDisplayBoxOrInlineBox",
  12027. computed: "asSpecified",
  12028. order: "uniqueOrder",
  12029. status: "nonstandard",
  12030. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-align"
  12031. },
  12032. "box-decoration-break": {
  12033. syntax: "slice | clone",
  12034. media: "visual",
  12035. inherited: false,
  12036. animationType: "discrete",
  12037. percentages: "no",
  12038. groups: [
  12039. "CSS Fragmentation"
  12040. ],
  12041. initial: "slice",
  12042. appliesto: "allElements",
  12043. computed: "asSpecified",
  12044. order: "uniqueOrder",
  12045. status: "standard",
  12046. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
  12047. },
  12048. "box-direction": {
  12049. syntax: "normal | reverse | inherit",
  12050. media: "visual",
  12051. inherited: false,
  12052. animationType: "discrete",
  12053. percentages: "no",
  12054. groups: [
  12055. "Mozilla Extensions",
  12056. "WebKit Extensions"
  12057. ],
  12058. initial: "normal",
  12059. appliesto: "elementsWithDisplayBoxOrInlineBox",
  12060. computed: "asSpecified",
  12061. order: "uniqueOrder",
  12062. status: "nonstandard",
  12063. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-direction"
  12064. },
  12065. "box-flex": {
  12066. syntax: "<number>",
  12067. media: "visual",
  12068. inherited: false,
  12069. animationType: "discrete",
  12070. percentages: "no",
  12071. groups: [
  12072. "Mozilla Extensions",
  12073. "WebKit Extensions"
  12074. ],
  12075. initial: "0",
  12076. appliesto: "directChildrenOfElementsWithDisplayMozBoxMozInlineBox",
  12077. computed: "asSpecified",
  12078. order: "uniqueOrder",
  12079. status: "nonstandard",
  12080. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex"
  12081. },
  12082. "box-flex-group": {
  12083. syntax: "<integer>",
  12084. media: "visual",
  12085. inherited: false,
  12086. animationType: "discrete",
  12087. percentages: "no",
  12088. groups: [
  12089. "Mozilla Extensions",
  12090. "WebKit Extensions"
  12091. ],
  12092. initial: "1",
  12093. appliesto: "inFlowChildrenOfBoxElements",
  12094. computed: "asSpecified",
  12095. order: "uniqueOrder",
  12096. status: "nonstandard",
  12097. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
  12098. },
  12099. "box-lines": {
  12100. syntax: "single | multiple",
  12101. media: "visual",
  12102. inherited: false,
  12103. animationType: "discrete",
  12104. percentages: "no",
  12105. groups: [
  12106. "Mozilla Extensions",
  12107. "WebKit Extensions"
  12108. ],
  12109. initial: "single",
  12110. appliesto: "boxElements",
  12111. computed: "asSpecified",
  12112. order: "uniqueOrder",
  12113. status: "nonstandard",
  12114. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-lines"
  12115. },
  12116. "box-ordinal-group": {
  12117. syntax: "<integer>",
  12118. media: "visual",
  12119. inherited: false,
  12120. animationType: "discrete",
  12121. percentages: "no",
  12122. groups: [
  12123. "Mozilla Extensions",
  12124. "WebKit Extensions"
  12125. ],
  12126. initial: "1",
  12127. appliesto: "childrenOfBoxElements",
  12128. computed: "asSpecified",
  12129. order: "uniqueOrder",
  12130. status: "nonstandard",
  12131. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
  12132. },
  12133. "box-orient": {
  12134. syntax: "horizontal | vertical | inline-axis | block-axis | inherit",
  12135. media: "visual",
  12136. inherited: false,
  12137. animationType: "discrete",
  12138. percentages: "no",
  12139. groups: [
  12140. "Mozilla Extensions",
  12141. "WebKit Extensions"
  12142. ],
  12143. initial: "inlineAxisHorizontalInXUL",
  12144. appliesto: "elementsWithDisplayBoxOrInlineBox",
  12145. computed: "asSpecified",
  12146. order: "uniqueOrder",
  12147. status: "nonstandard",
  12148. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-orient"
  12149. },
  12150. "box-pack": {
  12151. syntax: "start | center | end | justify",
  12152. media: "visual",
  12153. inherited: false,
  12154. animationType: "discrete",
  12155. percentages: "no",
  12156. groups: [
  12157. "Mozilla Extensions",
  12158. "WebKit Extensions"
  12159. ],
  12160. initial: "start",
  12161. appliesto: "elementsWithDisplayMozBoxMozInlineBox",
  12162. computed: "asSpecified",
  12163. order: "uniqueOrder",
  12164. status: "nonstandard",
  12165. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-pack"
  12166. },
  12167. "box-shadow": {
  12168. syntax: "none | <shadow>#",
  12169. media: "visual",
  12170. inherited: false,
  12171. animationType: "shadowList",
  12172. percentages: "no",
  12173. groups: [
  12174. "CSS Backgrounds and Borders"
  12175. ],
  12176. initial: "none",
  12177. appliesto: "allElements",
  12178. computed: "absoluteLengthsSpecifiedColorAsSpecified",
  12179. order: "uniqueOrder",
  12180. alsoAppliesTo: [
  12181. "::first-letter"
  12182. ],
  12183. status: "standard",
  12184. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
  12185. },
  12186. "box-sizing": {
  12187. syntax: "content-box | border-box",
  12188. media: "visual",
  12189. inherited: false,
  12190. animationType: "discrete",
  12191. percentages: "no",
  12192. groups: [
  12193. "CSS Basic User Interface"
  12194. ],
  12195. initial: "content-box",
  12196. appliesto: "allElementsAcceptingWidthOrHeight",
  12197. computed: "asSpecified",
  12198. order: "uniqueOrder",
  12199. status: "standard",
  12200. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
  12201. },
  12202. "break-after": {
  12203. syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
  12204. media: "visual",
  12205. inherited: false,
  12206. animationType: "discrete",
  12207. percentages: "no",
  12208. groups: [
  12209. "CSS Fragmentation"
  12210. ],
  12211. initial: "auto",
  12212. appliesto: "blockLevelElements",
  12213. computed: "asSpecified",
  12214. order: "uniqueOrder",
  12215. status: "standard",
  12216. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-after"
  12217. },
  12218. "break-before": {
  12219. syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
  12220. media: "visual",
  12221. inherited: false,
  12222. animationType: "discrete",
  12223. percentages: "no",
  12224. groups: [
  12225. "CSS Fragmentation"
  12226. ],
  12227. initial: "auto",
  12228. appliesto: "blockLevelElements",
  12229. computed: "asSpecified",
  12230. order: "uniqueOrder",
  12231. status: "standard",
  12232. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-before"
  12233. },
  12234. "break-inside": {
  12235. syntax: "auto | avoid | avoid-page | avoid-column | avoid-region",
  12236. media: "visual",
  12237. inherited: false,
  12238. animationType: "discrete",
  12239. percentages: "no",
  12240. groups: [
  12241. "CSS Fragmentation"
  12242. ],
  12243. initial: "auto",
  12244. appliesto: "blockLevelElements",
  12245. computed: "asSpecified",
  12246. order: "uniqueOrder",
  12247. status: "standard",
  12248. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-inside"
  12249. },
  12250. "caption-side": {
  12251. syntax: "top | bottom | block-start | block-end | inline-start | inline-end",
  12252. media: "visual",
  12253. inherited: true,
  12254. animationType: "discrete",
  12255. percentages: "no",
  12256. groups: [
  12257. "CSS Table"
  12258. ],
  12259. initial: "top",
  12260. appliesto: "tableCaptionElements",
  12261. computed: "asSpecified",
  12262. order: "uniqueOrder",
  12263. status: "standard",
  12264. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caption-side"
  12265. },
  12266. "caret-color": {
  12267. syntax: "auto | <color>",
  12268. media: "interactive",
  12269. inherited: true,
  12270. animationType: "color",
  12271. percentages: "no",
  12272. groups: [
  12273. "CSS Basic User Interface"
  12274. ],
  12275. initial: "auto",
  12276. appliesto: "allElements",
  12277. computed: "asAutoOrColor",
  12278. order: "perGrammar",
  12279. status: "standard",
  12280. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caret-color"
  12281. },
  12282. clear: clear,
  12283. clip: clip,
  12284. "clip-path": {
  12285. syntax: "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
  12286. media: "visual",
  12287. inherited: false,
  12288. animationType: "basicShapeOtherwiseNo",
  12289. percentages: "referToReferenceBoxWhenSpecifiedOtherwiseBorderBox",
  12290. groups: [
  12291. "CSS Masking"
  12292. ],
  12293. initial: "none",
  12294. appliesto: "allElementsSVGContainerElements",
  12295. computed: "asSpecifiedURLsAbsolute",
  12296. order: "uniqueOrder",
  12297. status: "standard",
  12298. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-path"
  12299. },
  12300. color: color,
  12301. "color-adjust": {
  12302. syntax: "economy | exact",
  12303. media: "visual",
  12304. inherited: true,
  12305. animationType: "discrete",
  12306. percentages: "no",
  12307. groups: [
  12308. "CSS Color"
  12309. ],
  12310. initial: "economy",
  12311. appliesto: "allElements",
  12312. computed: "asSpecified",
  12313. order: "perGrammar",
  12314. status: "standard",
  12315. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
  12316. },
  12317. "column-count": {
  12318. syntax: "<integer> | auto",
  12319. media: "visual",
  12320. inherited: false,
  12321. animationType: "integer",
  12322. percentages: "no",
  12323. groups: [
  12324. "CSS Columns"
  12325. ],
  12326. initial: "auto",
  12327. appliesto: "blockContainersExceptTableWrappers",
  12328. computed: "asSpecified",
  12329. order: "perGrammar",
  12330. status: "standard",
  12331. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-count"
  12332. },
  12333. "column-fill": {
  12334. syntax: "auto | balance | balance-all",
  12335. media: "visualInContinuousMediaNoEffectInOverflowColumns",
  12336. inherited: false,
  12337. animationType: "discrete",
  12338. percentages: "no",
  12339. groups: [
  12340. "CSS Columns"
  12341. ],
  12342. initial: "balance",
  12343. appliesto: "multicolElements",
  12344. computed: "asSpecified",
  12345. order: "perGrammar",
  12346. status: "standard",
  12347. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-fill"
  12348. },
  12349. "column-gap": {
  12350. syntax: "normal | <length-percentage>",
  12351. media: "visual",
  12352. inherited: false,
  12353. animationType: "lpc",
  12354. percentages: "referToDimensionOfContentArea",
  12355. groups: [
  12356. "CSS Box Alignment"
  12357. ],
  12358. initial: "normal",
  12359. appliesto: "multiColumnElementsFlexContainersGridContainers",
  12360. computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
  12361. order: "perGrammar",
  12362. status: "standard",
  12363. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
  12364. },
  12365. "column-rule": {
  12366. syntax: "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
  12367. media: "visual",
  12368. inherited: false,
  12369. animationType: [
  12370. "column-rule-color",
  12371. "column-rule-style",
  12372. "column-rule-width"
  12373. ],
  12374. percentages: "no",
  12375. groups: [
  12376. "CSS Columns"
  12377. ],
  12378. initial: [
  12379. "column-rule-width",
  12380. "column-rule-style",
  12381. "column-rule-color"
  12382. ],
  12383. appliesto: "multicolElements",
  12384. computed: [
  12385. "column-rule-color",
  12386. "column-rule-style",
  12387. "column-rule-width"
  12388. ],
  12389. order: "perGrammar",
  12390. status: "standard",
  12391. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule"
  12392. },
  12393. "column-rule-color": {
  12394. syntax: "<color>",
  12395. media: "visual",
  12396. inherited: false,
  12397. animationType: "color",
  12398. percentages: "no",
  12399. groups: [
  12400. "CSS Columns"
  12401. ],
  12402. initial: "currentcolor",
  12403. appliesto: "multicolElements",
  12404. computed: "computedColor",
  12405. order: "perGrammar",
  12406. status: "standard",
  12407. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
  12408. },
  12409. "column-rule-style": {
  12410. syntax: "<'border-style'>",
  12411. media: "visual",
  12412. inherited: false,
  12413. animationType: "discrete",
  12414. percentages: "no",
  12415. groups: [
  12416. "CSS Columns"
  12417. ],
  12418. initial: "none",
  12419. appliesto: "multicolElements",
  12420. computed: "asSpecified",
  12421. order: "perGrammar",
  12422. status: "standard",
  12423. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
  12424. },
  12425. "column-rule-width": {
  12426. syntax: "<'border-width'>",
  12427. media: "visual",
  12428. inherited: false,
  12429. animationType: "length",
  12430. percentages: "no",
  12431. groups: [
  12432. "CSS Columns"
  12433. ],
  12434. initial: "medium",
  12435. appliesto: "multicolElements",
  12436. computed: "absoluteLength0IfColumnRuleStyleNoneOrHidden",
  12437. order: "perGrammar",
  12438. status: "standard",
  12439. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
  12440. },
  12441. "column-span": {
  12442. syntax: "none | all",
  12443. media: "visual",
  12444. inherited: false,
  12445. animationType: "discrete",
  12446. percentages: "no",
  12447. groups: [
  12448. "CSS Columns"
  12449. ],
  12450. initial: "none",
  12451. appliesto: "inFlowBlockLevelElements",
  12452. computed: "asSpecified",
  12453. order: "perGrammar",
  12454. status: "standard",
  12455. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-span"
  12456. },
  12457. "column-width": {
  12458. syntax: "<length> | auto",
  12459. media: "visual",
  12460. inherited: false,
  12461. animationType: "length",
  12462. percentages: "no",
  12463. groups: [
  12464. "CSS Columns"
  12465. ],
  12466. initial: "auto",
  12467. appliesto: "blockContainersExceptTableWrappers",
  12468. computed: "absoluteLengthZeroOrLarger",
  12469. order: "perGrammar",
  12470. status: "standard",
  12471. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-width"
  12472. },
  12473. columns: columns,
  12474. contain: contain,
  12475. content: content,
  12476. "counter-increment": {
  12477. syntax: "[ <custom-ident> <integer>? ]+ | none",
  12478. media: "all",
  12479. inherited: false,
  12480. animationType: "discrete",
  12481. percentages: "no",
  12482. groups: [
  12483. "CSS Counter Styles"
  12484. ],
  12485. initial: "none",
  12486. appliesto: "allElements",
  12487. computed: "asSpecified",
  12488. order: "uniqueOrder",
  12489. status: "standard",
  12490. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
  12491. },
  12492. "counter-reset": {
  12493. syntax: "[ <custom-ident> <integer>? ]+ | none",
  12494. media: "all",
  12495. inherited: false,
  12496. animationType: "discrete",
  12497. percentages: "no",
  12498. groups: [
  12499. "CSS Counter Styles"
  12500. ],
  12501. initial: "none",
  12502. appliesto: "allElements",
  12503. computed: "asSpecified",
  12504. order: "uniqueOrder",
  12505. status: "standard",
  12506. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
  12507. },
  12508. "counter-set": {
  12509. syntax: "[ <custom-ident> <integer>? ]+ | none",
  12510. media: "all",
  12511. inherited: false,
  12512. animationType: "discrete",
  12513. percentages: "no",
  12514. groups: [
  12515. "CSS Counter Styles"
  12516. ],
  12517. initial: "none",
  12518. appliesto: "allElements",
  12519. computed: "asSpecified",
  12520. order: "uniqueOrder",
  12521. status: "standard",
  12522. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-set"
  12523. },
  12524. cursor: cursor,
  12525. direction: direction,
  12526. display: display,
  12527. "empty-cells": {
  12528. syntax: "show | hide",
  12529. media: "visual",
  12530. inherited: true,
  12531. animationType: "discrete",
  12532. percentages: "no",
  12533. groups: [
  12534. "CSS Table"
  12535. ],
  12536. initial: "show",
  12537. appliesto: "tableCellElements",
  12538. computed: "asSpecified",
  12539. order: "uniqueOrder",
  12540. status: "standard",
  12541. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
  12542. },
  12543. filter: filter,
  12544. flex: flex,
  12545. "flex-basis": {
  12546. syntax: "content | <'width'>",
  12547. media: "visual",
  12548. inherited: false,
  12549. animationType: "lpc",
  12550. percentages: "referToFlexContainersInnerMainSize",
  12551. groups: [
  12552. "CSS Flexible Box Layout"
  12553. ],
  12554. initial: "auto",
  12555. appliesto: "flexItemsAndInFlowPseudos",
  12556. computed: "asSpecifiedRelativeToAbsoluteLengths",
  12557. order: "lengthOrPercentageBeforeKeywordIfBothPresent",
  12558. status: "standard",
  12559. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
  12560. },
  12561. "flex-direction": {
  12562. syntax: "row | row-reverse | column | column-reverse",
  12563. media: "visual",
  12564. inherited: false,
  12565. animationType: "discrete",
  12566. percentages: "no",
  12567. groups: [
  12568. "CSS Flexible Box Layout"
  12569. ],
  12570. initial: "row",
  12571. appliesto: "flexContainers",
  12572. computed: "asSpecified",
  12573. order: "uniqueOrder",
  12574. status: "standard",
  12575. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
  12576. },
  12577. "flex-flow": {
  12578. syntax: "<'flex-direction'> || <'flex-wrap'>",
  12579. media: "visual",
  12580. inherited: false,
  12581. animationType: "discrete",
  12582. percentages: "no",
  12583. groups: [
  12584. "CSS Flexible Box Layout"
  12585. ],
  12586. initial: [
  12587. "flex-direction",
  12588. "flex-wrap"
  12589. ],
  12590. appliesto: "flexContainers",
  12591. computed: [
  12592. "flex-direction",
  12593. "flex-wrap"
  12594. ],
  12595. order: "orderOfAppearance",
  12596. status: "standard",
  12597. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
  12598. },
  12599. "flex-grow": {
  12600. syntax: "<number>",
  12601. media: "visual",
  12602. inherited: false,
  12603. animationType: "number",
  12604. percentages: "no",
  12605. groups: [
  12606. "CSS Flexible Box Layout"
  12607. ],
  12608. initial: "0",
  12609. appliesto: "flexItemsAndInFlowPseudos",
  12610. computed: "asSpecified",
  12611. order: "uniqueOrder",
  12612. status: "standard",
  12613. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
  12614. },
  12615. "flex-shrink": {
  12616. syntax: "<number>",
  12617. media: "visual",
  12618. inherited: false,
  12619. animationType: "number",
  12620. percentages: "no",
  12621. groups: [
  12622. "CSS Flexible Box Layout"
  12623. ],
  12624. initial: "1",
  12625. appliesto: "flexItemsAndInFlowPseudos",
  12626. computed: "asSpecified",
  12627. order: "uniqueOrder",
  12628. status: "standard",
  12629. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
  12630. },
  12631. "flex-wrap": {
  12632. syntax: "nowrap | wrap | wrap-reverse",
  12633. media: "visual",
  12634. inherited: false,
  12635. animationType: "discrete",
  12636. percentages: "no",
  12637. groups: [
  12638. "CSS Flexible Box Layout"
  12639. ],
  12640. initial: "nowrap",
  12641. appliesto: "flexContainers",
  12642. computed: "asSpecified",
  12643. order: "uniqueOrder",
  12644. status: "standard",
  12645. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
  12646. },
  12647. float: float,
  12648. font: font,
  12649. "font-family": {
  12650. syntax: "[ <family-name> | <generic-family> ]#",
  12651. media: "visual",
  12652. inherited: true,
  12653. animationType: "discrete",
  12654. percentages: "no",
  12655. groups: [
  12656. "CSS Fonts"
  12657. ],
  12658. initial: "dependsOnUserAgent",
  12659. appliesto: "allElements",
  12660. computed: "asSpecified",
  12661. order: "uniqueOrder",
  12662. alsoAppliesTo: [
  12663. "::first-letter",
  12664. "::first-line",
  12665. "::placeholder"
  12666. ],
  12667. status: "standard",
  12668. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-family"
  12669. },
  12670. "font-feature-settings": {
  12671. syntax: "normal | <feature-tag-value>#",
  12672. media: "visual",
  12673. inherited: true,
  12674. animationType: "discrete",
  12675. percentages: "no",
  12676. groups: [
  12677. "CSS Fonts"
  12678. ],
  12679. initial: "normal",
  12680. appliesto: "allElements",
  12681. computed: "asSpecified",
  12682. order: "uniqueOrder",
  12683. alsoAppliesTo: [
  12684. "::first-letter",
  12685. "::first-line",
  12686. "::placeholder"
  12687. ],
  12688. status: "standard",
  12689. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
  12690. },
  12691. "font-kerning": {
  12692. syntax: "auto | normal | none",
  12693. media: "visual",
  12694. inherited: true,
  12695. animationType: "discrete",
  12696. percentages: "no",
  12697. groups: [
  12698. "CSS Fonts"
  12699. ],
  12700. initial: "auto",
  12701. appliesto: "allElements",
  12702. computed: "asSpecified",
  12703. order: "uniqueOrder",
  12704. alsoAppliesTo: [
  12705. "::first-letter",
  12706. "::first-line",
  12707. "::placeholder"
  12708. ],
  12709. status: "standard",
  12710. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
  12711. },
  12712. "font-language-override": {
  12713. syntax: "normal | <string>",
  12714. media: "visual",
  12715. inherited: true,
  12716. animationType: "discrete",
  12717. percentages: "no",
  12718. groups: [
  12719. "CSS Fonts"
  12720. ],
  12721. initial: "normal",
  12722. appliesto: "allElements",
  12723. computed: "asSpecified",
  12724. order: "uniqueOrder",
  12725. alsoAppliesTo: [
  12726. "::first-letter",
  12727. "::first-line",
  12728. "::placeholder"
  12729. ],
  12730. status: "standard",
  12731. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
  12732. },
  12733. "font-optical-sizing": {
  12734. syntax: "auto | none",
  12735. media: "visual",
  12736. inherited: true,
  12737. animationType: "discrete",
  12738. percentages: "no",
  12739. groups: [
  12740. "CSS Fonts"
  12741. ],
  12742. initial: "auto",
  12743. appliesto: "allElements",
  12744. computed: "asSpecified",
  12745. order: "perGrammar",
  12746. alsoAppliesTo: [
  12747. "::first-letter",
  12748. "::first-line",
  12749. "::placeholder"
  12750. ],
  12751. status: "standard",
  12752. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
  12753. },
  12754. "font-variation-settings": {
  12755. syntax: "normal | [ <string> <number> ]#",
  12756. media: "visual",
  12757. inherited: true,
  12758. animationType: "transform",
  12759. percentages: "no",
  12760. groups: [
  12761. "CSS Fonts"
  12762. ],
  12763. initial: "normal",
  12764. appliesto: "allElements",
  12765. computed: "asSpecified",
  12766. order: "perGrammar",
  12767. alsoAppliesTo: [
  12768. "::first-letter",
  12769. "::first-line",
  12770. "::placeholder"
  12771. ],
  12772. status: "standard",
  12773. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
  12774. },
  12775. "font-size": {
  12776. syntax: "<absolute-size> | <relative-size> | <length-percentage>",
  12777. media: "visual",
  12778. inherited: true,
  12779. animationType: "length",
  12780. percentages: "referToParentElementsFontSize",
  12781. groups: [
  12782. "CSS Fonts"
  12783. ],
  12784. initial: "medium",
  12785. appliesto: "allElements",
  12786. computed: "asSpecifiedRelativeToAbsoluteLengths",
  12787. order: "uniqueOrder",
  12788. alsoAppliesTo: [
  12789. "::first-letter",
  12790. "::first-line",
  12791. "::placeholder"
  12792. ],
  12793. status: "standard",
  12794. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size"
  12795. },
  12796. "font-size-adjust": {
  12797. syntax: "none | <number>",
  12798. media: "visual",
  12799. inherited: true,
  12800. animationType: "number",
  12801. percentages: "no",
  12802. groups: [
  12803. "CSS Fonts"
  12804. ],
  12805. initial: "none",
  12806. appliesto: "allElements",
  12807. computed: "asSpecified",
  12808. order: "uniqueOrder",
  12809. alsoAppliesTo: [
  12810. "::first-letter",
  12811. "::first-line",
  12812. "::placeholder"
  12813. ],
  12814. status: "standard",
  12815. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
  12816. },
  12817. "font-smooth": {
  12818. syntax: "auto | never | always | <absolute-size> | <length>",
  12819. media: "visual",
  12820. inherited: true,
  12821. animationType: "discrete",
  12822. percentages: "no",
  12823. groups: [
  12824. "CSS Fonts"
  12825. ],
  12826. initial: "auto",
  12827. appliesto: "allElements",
  12828. computed: "asSpecified",
  12829. order: "uniqueOrder",
  12830. status: "nonstandard",
  12831. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
  12832. },
  12833. "font-stretch": {
  12834. syntax: "<font-stretch-absolute>",
  12835. media: "visual",
  12836. inherited: true,
  12837. animationType: "fontStretch",
  12838. percentages: "no",
  12839. groups: [
  12840. "CSS Fonts"
  12841. ],
  12842. initial: "normal",
  12843. appliesto: "allElements",
  12844. computed: "asSpecified",
  12845. order: "uniqueOrder",
  12846. alsoAppliesTo: [
  12847. "::first-letter",
  12848. "::first-line",
  12849. "::placeholder"
  12850. ],
  12851. status: "standard",
  12852. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
  12853. },
  12854. "font-style": {
  12855. syntax: "normal | italic | oblique <angle>?",
  12856. media: "visual",
  12857. inherited: true,
  12858. animationType: "discrete",
  12859. percentages: "no",
  12860. groups: [
  12861. "CSS Fonts"
  12862. ],
  12863. initial: "normal",
  12864. appliesto: "allElements",
  12865. computed: "asSpecified",
  12866. order: "uniqueOrder",
  12867. alsoAppliesTo: [
  12868. "::first-letter",
  12869. "::first-line",
  12870. "::placeholder"
  12871. ],
  12872. status: "standard",
  12873. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-style"
  12874. },
  12875. "font-synthesis": {
  12876. syntax: "none | [ weight || style ]",
  12877. media: "visual",
  12878. inherited: true,
  12879. animationType: "discrete",
  12880. percentages: "no",
  12881. groups: [
  12882. "CSS Fonts"
  12883. ],
  12884. initial: "weight style",
  12885. appliesto: "allElements",
  12886. computed: "asSpecified",
  12887. order: "orderOfAppearance",
  12888. alsoAppliesTo: [
  12889. "::first-letter",
  12890. "::first-line",
  12891. "::placeholder"
  12892. ],
  12893. status: "standard",
  12894. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
  12895. },
  12896. "font-variant": {
  12897. syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
  12898. media: "visual",
  12899. inherited: true,
  12900. animationType: "discrete",
  12901. percentages: "no",
  12902. groups: [
  12903. "CSS Fonts"
  12904. ],
  12905. initial: "normal",
  12906. appliesto: "allElements",
  12907. computed: "asSpecified",
  12908. order: "uniqueOrder",
  12909. alsoAppliesTo: [
  12910. "::first-letter",
  12911. "::first-line",
  12912. "::placeholder"
  12913. ],
  12914. status: "standard",
  12915. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant"
  12916. },
  12917. "font-variant-alternates": {
  12918. syntax: "normal | [ stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) ]",
  12919. media: "visual",
  12920. inherited: true,
  12921. animationType: "discrete",
  12922. percentages: "no",
  12923. groups: [
  12924. "CSS Fonts"
  12925. ],
  12926. initial: "normal",
  12927. appliesto: "allElements",
  12928. computed: "asSpecified",
  12929. order: "orderOfAppearance",
  12930. alsoAppliesTo: [
  12931. "::first-letter",
  12932. "::first-line",
  12933. "::placeholder"
  12934. ],
  12935. status: "standard",
  12936. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
  12937. },
  12938. "font-variant-caps": {
  12939. syntax: "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
  12940. media: "visual",
  12941. inherited: true,
  12942. animationType: "discrete",
  12943. percentages: "no",
  12944. groups: [
  12945. "CSS Fonts"
  12946. ],
  12947. initial: "normal",
  12948. appliesto: "allElements",
  12949. computed: "asSpecified",
  12950. order: "uniqueOrder",
  12951. alsoAppliesTo: [
  12952. "::first-letter",
  12953. "::first-line",
  12954. "::placeholder"
  12955. ],
  12956. status: "standard",
  12957. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
  12958. },
  12959. "font-variant-east-asian": {
  12960. syntax: "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
  12961. media: "visual",
  12962. inherited: true,
  12963. animationType: "discrete",
  12964. percentages: "no",
  12965. groups: [
  12966. "CSS Fonts"
  12967. ],
  12968. initial: "normal",
  12969. appliesto: "allElements",
  12970. computed: "asSpecified",
  12971. order: "orderOfAppearance",
  12972. alsoAppliesTo: [
  12973. "::first-letter",
  12974. "::first-line",
  12975. "::placeholder"
  12976. ],
  12977. status: "standard",
  12978. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
  12979. },
  12980. "font-variant-ligatures": {
  12981. syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
  12982. media: "visual",
  12983. inherited: true,
  12984. animationType: "discrete",
  12985. percentages: "no",
  12986. groups: [
  12987. "CSS Fonts"
  12988. ],
  12989. initial: "normal",
  12990. appliesto: "allElements",
  12991. computed: "asSpecified",
  12992. order: "orderOfAppearance",
  12993. alsoAppliesTo: [
  12994. "::first-letter",
  12995. "::first-line",
  12996. "::placeholder"
  12997. ],
  12998. status: "standard",
  12999. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
  13000. },
  13001. "font-variant-numeric": {
  13002. syntax: "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
  13003. media: "visual",
  13004. inherited: true,
  13005. animationType: "discrete",
  13006. percentages: "no",
  13007. groups: [
  13008. "CSS Fonts"
  13009. ],
  13010. initial: "normal",
  13011. appliesto: "allElements",
  13012. computed: "asSpecified",
  13013. order: "orderOfAppearance",
  13014. alsoAppliesTo: [
  13015. "::first-letter",
  13016. "::first-line",
  13017. "::placeholder"
  13018. ],
  13019. status: "standard",
  13020. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
  13021. },
  13022. "font-variant-position": {
  13023. syntax: "normal | sub | super",
  13024. media: "visual",
  13025. inherited: true,
  13026. animationType: "discrete",
  13027. percentages: "no",
  13028. groups: [
  13029. "CSS Fonts"
  13030. ],
  13031. initial: "normal",
  13032. appliesto: "allElements",
  13033. computed: "asSpecified",
  13034. order: "uniqueOrder",
  13035. alsoAppliesTo: [
  13036. "::first-letter",
  13037. "::first-line",
  13038. "::placeholder"
  13039. ],
  13040. status: "standard",
  13041. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
  13042. },
  13043. "font-weight": {
  13044. syntax: "<font-weight-absolute> | bolder | lighter",
  13045. media: "visual",
  13046. inherited: true,
  13047. animationType: "fontWeight",
  13048. percentages: "no",
  13049. groups: [
  13050. "CSS Fonts"
  13051. ],
  13052. initial: "normal",
  13053. appliesto: "allElements",
  13054. computed: "keywordOrNumericalValueBolderLighterTransformedToRealValue",
  13055. order: "uniqueOrder",
  13056. alsoAppliesTo: [
  13057. "::first-letter",
  13058. "::first-line",
  13059. "::placeholder"
  13060. ],
  13061. status: "standard",
  13062. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-weight"
  13063. },
  13064. gap: gap,
  13065. grid: grid,
  13066. "grid-area": {
  13067. syntax: "<grid-line> [ / <grid-line> ]{0,3}",
  13068. media: "visual",
  13069. inherited: false,
  13070. animationType: "discrete",
  13071. percentages: "no",
  13072. groups: [
  13073. "CSS Grid Layout"
  13074. ],
  13075. initial: [
  13076. "grid-row-start",
  13077. "grid-column-start",
  13078. "grid-row-end",
  13079. "grid-column-end"
  13080. ],
  13081. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13082. computed: [
  13083. "grid-row-start",
  13084. "grid-column-start",
  13085. "grid-row-end",
  13086. "grid-column-end"
  13087. ],
  13088. order: "uniqueOrder",
  13089. status: "standard",
  13090. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-area"
  13091. },
  13092. "grid-auto-columns": {
  13093. syntax: "<track-size>+",
  13094. media: "visual",
  13095. inherited: false,
  13096. animationType: "discrete",
  13097. percentages: "referToDimensionOfContentArea",
  13098. groups: [
  13099. "CSS Grid Layout"
  13100. ],
  13101. initial: "auto",
  13102. appliesto: "gridContainers",
  13103. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13104. order: "uniqueOrder",
  13105. status: "standard",
  13106. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
  13107. },
  13108. "grid-auto-flow": {
  13109. syntax: "[ row | column ] || dense",
  13110. media: "visual",
  13111. inherited: false,
  13112. animationType: "discrete",
  13113. percentages: "no",
  13114. groups: [
  13115. "CSS Grid Layout"
  13116. ],
  13117. initial: "row",
  13118. appliesto: "gridContainers",
  13119. computed: "asSpecified",
  13120. order: "uniqueOrder",
  13121. status: "standard",
  13122. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
  13123. },
  13124. "grid-auto-rows": {
  13125. syntax: "<track-size>+",
  13126. media: "visual",
  13127. inherited: false,
  13128. animationType: "discrete",
  13129. percentages: "referToDimensionOfContentArea",
  13130. groups: [
  13131. "CSS Grid Layout"
  13132. ],
  13133. initial: "auto",
  13134. appliesto: "gridContainers",
  13135. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13136. order: "uniqueOrder",
  13137. status: "standard",
  13138. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
  13139. },
  13140. "grid-column": {
  13141. syntax: "<grid-line> [ / <grid-line> ]?",
  13142. media: "visual",
  13143. inherited: false,
  13144. animationType: "discrete",
  13145. percentages: "no",
  13146. groups: [
  13147. "CSS Grid Layout"
  13148. ],
  13149. initial: [
  13150. "grid-column-start",
  13151. "grid-column-end"
  13152. ],
  13153. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13154. computed: [
  13155. "grid-column-start",
  13156. "grid-column-end"
  13157. ],
  13158. order: "uniqueOrder",
  13159. status: "standard",
  13160. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column"
  13161. },
  13162. "grid-column-end": {
  13163. syntax: "<grid-line>",
  13164. media: "visual",
  13165. inherited: false,
  13166. animationType: "discrete",
  13167. percentages: "no",
  13168. groups: [
  13169. "CSS Grid Layout"
  13170. ],
  13171. initial: "auto",
  13172. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13173. computed: "asSpecified",
  13174. order: "uniqueOrder",
  13175. status: "standard",
  13176. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
  13177. },
  13178. "grid-column-gap": {
  13179. syntax: "<length-percentage>",
  13180. media: "visual",
  13181. inherited: false,
  13182. animationType: "length",
  13183. percentages: "referToDimensionOfContentArea",
  13184. groups: [
  13185. "CSS Grid Layout"
  13186. ],
  13187. initial: "0",
  13188. appliesto: "gridContainers",
  13189. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13190. order: "uniqueOrder",
  13191. status: "obsolete",
  13192. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
  13193. },
  13194. "grid-column-start": {
  13195. syntax: "<grid-line>",
  13196. media: "visual",
  13197. inherited: false,
  13198. animationType: "discrete",
  13199. percentages: "no",
  13200. groups: [
  13201. "CSS Grid Layout"
  13202. ],
  13203. initial: "auto",
  13204. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13205. computed: "asSpecified",
  13206. order: "uniqueOrder",
  13207. status: "standard",
  13208. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
  13209. },
  13210. "grid-gap": {
  13211. syntax: "<'grid-row-gap'> <'grid-column-gap'>?",
  13212. media: "visual",
  13213. inherited: false,
  13214. animationType: [
  13215. "grid-row-gap",
  13216. "grid-column-gap"
  13217. ],
  13218. percentages: "no",
  13219. groups: [
  13220. "CSS Grid Layout"
  13221. ],
  13222. initial: [
  13223. "grid-row-gap",
  13224. "grid-column-gap"
  13225. ],
  13226. appliesto: "gridContainers",
  13227. computed: [
  13228. "grid-row-gap",
  13229. "grid-column-gap"
  13230. ],
  13231. order: "uniqueOrder",
  13232. status: "obsolete",
  13233. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
  13234. },
  13235. "grid-row": {
  13236. syntax: "<grid-line> [ / <grid-line> ]?",
  13237. media: "visual",
  13238. inherited: false,
  13239. animationType: "discrete",
  13240. percentages: "no",
  13241. groups: [
  13242. "CSS Grid Layout"
  13243. ],
  13244. initial: [
  13245. "grid-row-start",
  13246. "grid-row-end"
  13247. ],
  13248. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13249. computed: [
  13250. "grid-row-start",
  13251. "grid-row-end"
  13252. ],
  13253. order: "uniqueOrder",
  13254. status: "standard",
  13255. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row"
  13256. },
  13257. "grid-row-end": {
  13258. syntax: "<grid-line>",
  13259. media: "visual",
  13260. inherited: false,
  13261. animationType: "discrete",
  13262. percentages: "no",
  13263. groups: [
  13264. "CSS Grid Layout"
  13265. ],
  13266. initial: "auto",
  13267. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13268. computed: "asSpecified",
  13269. order: "uniqueOrder",
  13270. status: "standard",
  13271. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
  13272. },
  13273. "grid-row-gap": {
  13274. syntax: "<length-percentage>",
  13275. media: "visual",
  13276. inherited: false,
  13277. animationType: "length",
  13278. percentages: "referToDimensionOfContentArea",
  13279. groups: [
  13280. "CSS Grid Layout"
  13281. ],
  13282. initial: "0",
  13283. appliesto: "gridContainers",
  13284. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13285. order: "uniqueOrder",
  13286. status: "obsolete",
  13287. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
  13288. },
  13289. "grid-row-start": {
  13290. syntax: "<grid-line>",
  13291. media: "visual",
  13292. inherited: false,
  13293. animationType: "discrete",
  13294. percentages: "no",
  13295. groups: [
  13296. "CSS Grid Layout"
  13297. ],
  13298. initial: "auto",
  13299. appliesto: "gridItemsAndBoxesWithinGridContainer",
  13300. computed: "asSpecified",
  13301. order: "uniqueOrder",
  13302. status: "standard",
  13303. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
  13304. },
  13305. "grid-template": {
  13306. syntax: "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
  13307. media: "visual",
  13308. inherited: false,
  13309. animationType: "discrete",
  13310. percentages: [
  13311. "grid-template-columns",
  13312. "grid-template-rows"
  13313. ],
  13314. groups: [
  13315. "CSS Grid Layout"
  13316. ],
  13317. initial: [
  13318. "grid-template-columns",
  13319. "grid-template-rows",
  13320. "grid-template-areas"
  13321. ],
  13322. appliesto: "gridContainers",
  13323. computed: [
  13324. "grid-template-columns",
  13325. "grid-template-rows",
  13326. "grid-template-areas"
  13327. ],
  13328. order: "uniqueOrder",
  13329. status: "standard",
  13330. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template"
  13331. },
  13332. "grid-template-areas": {
  13333. syntax: "none | <string>+",
  13334. media: "visual",
  13335. inherited: false,
  13336. animationType: "discrete",
  13337. percentages: "no",
  13338. groups: [
  13339. "CSS Grid Layout"
  13340. ],
  13341. initial: "none",
  13342. appliesto: "gridContainers",
  13343. computed: "asSpecified",
  13344. order: "uniqueOrder",
  13345. status: "standard",
  13346. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
  13347. },
  13348. "grid-template-columns": {
  13349. syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
  13350. media: "visual",
  13351. inherited: false,
  13352. animationType: "simpleListOfLpcDifferenceLpc",
  13353. percentages: "referToDimensionOfContentArea",
  13354. groups: [
  13355. "CSS Grid Layout"
  13356. ],
  13357. initial: "none",
  13358. appliesto: "gridContainers",
  13359. computed: "asSpecifiedRelativeToAbsoluteLengths",
  13360. order: "uniqueOrder",
  13361. status: "standard",
  13362. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
  13363. },
  13364. "grid-template-rows": {
  13365. syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
  13366. media: "visual",
  13367. inherited: false,
  13368. animationType: "simpleListOfLpcDifferenceLpc",
  13369. percentages: "referToDimensionOfContentArea",
  13370. groups: [
  13371. "CSS Grid Layout"
  13372. ],
  13373. initial: "none",
  13374. appliesto: "gridContainers",
  13375. computed: "asSpecifiedRelativeToAbsoluteLengths",
  13376. order: "uniqueOrder",
  13377. status: "standard",
  13378. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
  13379. },
  13380. "hanging-punctuation": {
  13381. syntax: "none | [ first || [ force-end | allow-end ] || last ]",
  13382. media: "visual",
  13383. inherited: true,
  13384. animationType: "discrete",
  13385. percentages: "no",
  13386. groups: [
  13387. "CSS Text"
  13388. ],
  13389. initial: "none",
  13390. appliesto: "allElements",
  13391. computed: "asSpecified",
  13392. order: "uniqueOrder",
  13393. status: "standard",
  13394. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
  13395. },
  13396. height: height,
  13397. hyphens: hyphens,
  13398. "image-orientation": {
  13399. syntax: "from-image | <angle> | [ <angle>? flip ]",
  13400. media: "visual",
  13401. inherited: true,
  13402. animationType: "discrete",
  13403. percentages: "no",
  13404. groups: [
  13405. "CSS Images"
  13406. ],
  13407. initial: "0deg",
  13408. appliesto: "allElements",
  13409. computed: "angleRoundedToNextQuarter",
  13410. order: "uniqueOrder",
  13411. status: "standard",
  13412. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
  13413. },
  13414. "image-rendering": {
  13415. syntax: "auto | crisp-edges | pixelated",
  13416. media: "visual",
  13417. inherited: true,
  13418. animationType: "discrete",
  13419. percentages: "no",
  13420. groups: [
  13421. "CSS Images"
  13422. ],
  13423. initial: "auto",
  13424. appliesto: "allElements",
  13425. computed: "asSpecified",
  13426. order: "uniqueOrder",
  13427. status: "standard",
  13428. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
  13429. },
  13430. "image-resolution": {
  13431. syntax: "[ from-image || <resolution> ] && snap?",
  13432. media: "visual",
  13433. inherited: true,
  13434. animationType: "discrete",
  13435. percentages: "no",
  13436. groups: [
  13437. "CSS Images"
  13438. ],
  13439. initial: "1dppx",
  13440. appliesto: "allElements",
  13441. computed: "asSpecifiedWithExceptionOfResolution",
  13442. order: "uniqueOrder",
  13443. status: "experimental"
  13444. },
  13445. "ime-mode": {
  13446. syntax: "auto | normal | active | inactive | disabled",
  13447. media: "interactive",
  13448. inherited: false,
  13449. animationType: "discrete",
  13450. percentages: "no",
  13451. groups: [
  13452. "CSS Basic User Interface"
  13453. ],
  13454. initial: "auto",
  13455. appliesto: "textFields",
  13456. computed: "asSpecified",
  13457. order: "uniqueOrder",
  13458. status: "obsolete",
  13459. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
  13460. },
  13461. "initial-letter": {
  13462. syntax: "normal | [ <number> <integer>? ]",
  13463. media: "visual",
  13464. inherited: false,
  13465. animationType: "discrete",
  13466. percentages: "no",
  13467. groups: [
  13468. "CSS Inline"
  13469. ],
  13470. initial: "normal",
  13471. appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
  13472. computed: "asSpecified",
  13473. order: "uniqueOrder",
  13474. status: "experimental",
  13475. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
  13476. },
  13477. "initial-letter-align": {
  13478. syntax: "[ auto | alphabetic | hanging | ideographic ]",
  13479. media: "visual",
  13480. inherited: false,
  13481. animationType: "discrete",
  13482. percentages: "no",
  13483. groups: [
  13484. "CSS Inline"
  13485. ],
  13486. initial: "auto",
  13487. appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
  13488. computed: "asSpecified",
  13489. order: "uniqueOrder",
  13490. status: "experimental",
  13491. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
  13492. },
  13493. "inline-size": {
  13494. syntax: "<'width'>",
  13495. media: "visual",
  13496. inherited: false,
  13497. animationType: "lpc",
  13498. percentages: "inlineSizeOfContainingBlock",
  13499. groups: [
  13500. "CSS Logical Properties"
  13501. ],
  13502. initial: "auto",
  13503. appliesto: "sameAsWidthAndHeight",
  13504. computed: "sameAsWidthAndHeight",
  13505. order: "uniqueOrder",
  13506. status: "standard",
  13507. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inline-size"
  13508. },
  13509. inset: inset,
  13510. "inset-block": {
  13511. syntax: "<'top'>{1,2}",
  13512. media: "visual",
  13513. inherited: false,
  13514. animationType: "lpc",
  13515. percentages: "logicalHeightOfContainingBlock",
  13516. groups: [
  13517. "CSS Logical Properties"
  13518. ],
  13519. initial: "auto",
  13520. appliesto: "positionedElements",
  13521. computed: "sameAsBoxOffsets",
  13522. order: "uniqueOrder",
  13523. status: "standard",
  13524. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block"
  13525. },
  13526. "inset-block-end": {
  13527. syntax: "<'top'>",
  13528. media: "visual",
  13529. inherited: false,
  13530. animationType: "lpc",
  13531. percentages: "logicalHeightOfContainingBlock",
  13532. groups: [
  13533. "CSS Logical Properties"
  13534. ],
  13535. initial: "auto",
  13536. appliesto: "positionedElements",
  13537. computed: "sameAsBoxOffsets",
  13538. order: "uniqueOrder",
  13539. status: "standard",
  13540. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
  13541. },
  13542. "inset-block-start": {
  13543. syntax: "<'top'>",
  13544. media: "visual",
  13545. inherited: false,
  13546. animationType: "lpc",
  13547. percentages: "logicalHeightOfContainingBlock",
  13548. groups: [
  13549. "CSS Logical Properties"
  13550. ],
  13551. initial: "auto",
  13552. appliesto: "positionedElements",
  13553. computed: "sameAsBoxOffsets",
  13554. order: "uniqueOrder",
  13555. status: "standard",
  13556. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
  13557. },
  13558. "inset-inline": {
  13559. syntax: "<'top'>{1,2}",
  13560. media: "visual",
  13561. inherited: false,
  13562. animationType: "lpc",
  13563. percentages: "logicalWidthOfContainingBlock",
  13564. groups: [
  13565. "CSS Logical Properties"
  13566. ],
  13567. initial: "auto",
  13568. appliesto: "positionedElements",
  13569. computed: "sameAsBoxOffsets",
  13570. order: "uniqueOrder",
  13571. status: "standard",
  13572. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
  13573. },
  13574. "inset-inline-end": {
  13575. syntax: "<'top'>",
  13576. media: "visual",
  13577. inherited: false,
  13578. animationType: "lpc",
  13579. percentages: "logicalWidthOfContainingBlock",
  13580. groups: [
  13581. "CSS Logical Properties"
  13582. ],
  13583. initial: "auto",
  13584. appliesto: "positionedElements",
  13585. computed: "sameAsBoxOffsets",
  13586. order: "uniqueOrder",
  13587. status: "standard",
  13588. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
  13589. },
  13590. "inset-inline-start": {
  13591. syntax: "<'top'>",
  13592. media: "visual",
  13593. inherited: false,
  13594. animationType: "lpc",
  13595. percentages: "logicalWidthOfContainingBlock",
  13596. groups: [
  13597. "CSS Logical Properties"
  13598. ],
  13599. initial: "auto",
  13600. appliesto: "positionedElements",
  13601. computed: "sameAsBoxOffsets",
  13602. order: "uniqueOrder",
  13603. status: "standard",
  13604. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
  13605. },
  13606. isolation: isolation,
  13607. "justify-content": {
  13608. syntax: "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
  13609. media: "visual",
  13610. inherited: false,
  13611. animationType: "discrete",
  13612. percentages: "no",
  13613. groups: [
  13614. "CSS Box Alignment"
  13615. ],
  13616. initial: "normal",
  13617. appliesto: "flexContainers",
  13618. computed: "asSpecified",
  13619. order: "uniqueOrder",
  13620. status: "standard",
  13621. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-content"
  13622. },
  13623. "justify-items": {
  13624. syntax: "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
  13625. media: "visual",
  13626. inherited: false,
  13627. animationType: "discrete",
  13628. percentages: "no",
  13629. groups: [
  13630. "CSS Box Alignment"
  13631. ],
  13632. initial: "legacy",
  13633. appliesto: "allElements",
  13634. computed: "asSpecified",
  13635. order: "perGrammar",
  13636. status: "standard",
  13637. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-items"
  13638. },
  13639. "justify-self": {
  13640. syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
  13641. media: "visual",
  13642. inherited: false,
  13643. animationType: "discrete",
  13644. percentages: "no",
  13645. groups: [
  13646. "CSS Box Alignment"
  13647. ],
  13648. initial: "auto",
  13649. appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
  13650. computed: "asSpecified",
  13651. order: "uniqueOrder",
  13652. status: "standard",
  13653. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-self"
  13654. },
  13655. left: left,
  13656. "letter-spacing": {
  13657. syntax: "normal | <length>",
  13658. media: "visual",
  13659. inherited: true,
  13660. animationType: "length",
  13661. percentages: "no",
  13662. groups: [
  13663. "CSS Text"
  13664. ],
  13665. initial: "normal",
  13666. appliesto: "allElements",
  13667. computed: "optimumValueOfAbsoluteLengthOrNormal",
  13668. order: "uniqueOrder",
  13669. alsoAppliesTo: [
  13670. "::first-letter",
  13671. "::first-line"
  13672. ],
  13673. status: "standard",
  13674. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
  13675. },
  13676. "line-break": {
  13677. syntax: "auto | loose | normal | strict | anywhere",
  13678. media: "visual",
  13679. inherited: true,
  13680. animationType: "discrete",
  13681. percentages: "no",
  13682. groups: [
  13683. "CSS Text"
  13684. ],
  13685. initial: "auto",
  13686. appliesto: "allElements",
  13687. computed: "asSpecified",
  13688. order: "uniqueOrder",
  13689. status: "standard",
  13690. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-break"
  13691. },
  13692. "line-clamp": {
  13693. syntax: "none | <integer>",
  13694. media: "visual",
  13695. inherited: false,
  13696. animationType: "integer",
  13697. percentages: "no",
  13698. groups: [
  13699. "CSS Overflow"
  13700. ],
  13701. initial: "none",
  13702. appliesto: "blockContainersExceptMultiColumnContainers",
  13703. computed: "asSpecified",
  13704. order: "perGrammar",
  13705. status: "experimental"
  13706. },
  13707. "line-height": {
  13708. syntax: "normal | <number> | <length> | <percentage>",
  13709. media: "visual",
  13710. inherited: true,
  13711. animationType: "numberOrLength",
  13712. percentages: "referToElementFontSize",
  13713. groups: [
  13714. "CSS Fonts"
  13715. ],
  13716. initial: "normal",
  13717. appliesto: "allElements",
  13718. computed: "absoluteLengthOrAsSpecified",
  13719. order: "uniqueOrder",
  13720. alsoAppliesTo: [
  13721. "::first-letter",
  13722. "::first-line",
  13723. "::placeholder"
  13724. ],
  13725. status: "standard",
  13726. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height"
  13727. },
  13728. "line-height-step": {
  13729. syntax: "<length>",
  13730. media: "visual",
  13731. inherited: true,
  13732. animationType: "discrete",
  13733. percentages: "no",
  13734. groups: [
  13735. "CSS Fonts"
  13736. ],
  13737. initial: "0",
  13738. appliesto: "blockContainers",
  13739. computed: "absoluteLength",
  13740. order: "perGrammar",
  13741. status: "experimental",
  13742. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
  13743. },
  13744. "list-style": {
  13745. syntax: "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
  13746. media: "visual",
  13747. inherited: true,
  13748. animationType: "discrete",
  13749. percentages: "no",
  13750. groups: [
  13751. "CSS Lists and Counters"
  13752. ],
  13753. initial: [
  13754. "list-style-type",
  13755. "list-style-position",
  13756. "list-style-image"
  13757. ],
  13758. appliesto: "listItems",
  13759. computed: [
  13760. "list-style-image",
  13761. "list-style-position",
  13762. "list-style-type"
  13763. ],
  13764. order: "orderOfAppearance",
  13765. status: "standard",
  13766. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style"
  13767. },
  13768. "list-style-image": {
  13769. syntax: "<url> | none",
  13770. media: "visual",
  13771. inherited: true,
  13772. animationType: "discrete",
  13773. percentages: "no",
  13774. groups: [
  13775. "CSS Lists and Counters"
  13776. ],
  13777. initial: "none",
  13778. appliesto: "listItems",
  13779. computed: "noneOrImageWithAbsoluteURI",
  13780. order: "uniqueOrder",
  13781. status: "standard",
  13782. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
  13783. },
  13784. "list-style-position": {
  13785. syntax: "inside | outside",
  13786. media: "visual",
  13787. inherited: true,
  13788. animationType: "discrete",
  13789. percentages: "no",
  13790. groups: [
  13791. "CSS Lists and Counters"
  13792. ],
  13793. initial: "outside",
  13794. appliesto: "listItems",
  13795. computed: "asSpecified",
  13796. order: "uniqueOrder",
  13797. status: "standard",
  13798. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
  13799. },
  13800. "list-style-type": {
  13801. syntax: "<counter-style> | <string> | none",
  13802. media: "visual",
  13803. inherited: true,
  13804. animationType: "discrete",
  13805. percentages: "no",
  13806. groups: [
  13807. "CSS Lists and Counters"
  13808. ],
  13809. initial: "disc",
  13810. appliesto: "listItems",
  13811. computed: "asSpecified",
  13812. order: "uniqueOrder",
  13813. status: "standard",
  13814. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
  13815. },
  13816. margin: margin,
  13817. "margin-block": {
  13818. syntax: "<'margin-left'>{1,2}",
  13819. media: "visual",
  13820. inherited: false,
  13821. animationType: "discrete",
  13822. percentages: "dependsOnLayoutModel",
  13823. groups: [
  13824. "CSS Logical Properties"
  13825. ],
  13826. initial: "0",
  13827. appliesto: "sameAsMargin",
  13828. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13829. order: "uniqueOrder",
  13830. status: "standard",
  13831. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block"
  13832. },
  13833. "margin-block-end": {
  13834. syntax: "<'margin-left'>",
  13835. media: "visual",
  13836. inherited: false,
  13837. animationType: "length",
  13838. percentages: "dependsOnLayoutModel",
  13839. groups: [
  13840. "CSS Logical Properties"
  13841. ],
  13842. initial: "0",
  13843. appliesto: "sameAsMargin",
  13844. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13845. order: "uniqueOrder",
  13846. status: "standard",
  13847. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
  13848. },
  13849. "margin-block-start": {
  13850. syntax: "<'margin-left'>",
  13851. media: "visual",
  13852. inherited: false,
  13853. animationType: "length",
  13854. percentages: "dependsOnLayoutModel",
  13855. groups: [
  13856. "CSS Logical Properties"
  13857. ],
  13858. initial: "0",
  13859. appliesto: "sameAsMargin",
  13860. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13861. order: "uniqueOrder",
  13862. status: "standard",
  13863. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
  13864. },
  13865. "margin-bottom": {
  13866. syntax: "<length> | <percentage> | auto",
  13867. media: "visual",
  13868. inherited: false,
  13869. animationType: "length",
  13870. percentages: "referToWidthOfContainingBlock",
  13871. groups: [
  13872. "CSS Box Model"
  13873. ],
  13874. initial: "0",
  13875. appliesto: "allElementsExceptTableDisplayTypes",
  13876. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13877. order: "uniqueOrder",
  13878. alsoAppliesTo: [
  13879. "::first-letter",
  13880. "::first-line"
  13881. ],
  13882. status: "standard",
  13883. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
  13884. },
  13885. "margin-inline": {
  13886. syntax: "<'margin-left'>{1,2}",
  13887. media: "visual",
  13888. inherited: false,
  13889. animationType: "discrete",
  13890. percentages: "dependsOnLayoutModel",
  13891. groups: [
  13892. "CSS Logical Properties"
  13893. ],
  13894. initial: "0",
  13895. appliesto: "sameAsMargin",
  13896. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13897. order: "uniqueOrder",
  13898. status: "standard",
  13899. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
  13900. },
  13901. "margin-inline-end": {
  13902. syntax: "<'margin-left'>",
  13903. media: "visual",
  13904. inherited: false,
  13905. animationType: "length",
  13906. percentages: "dependsOnLayoutModel",
  13907. groups: [
  13908. "CSS Logical Properties"
  13909. ],
  13910. initial: "0",
  13911. appliesto: "sameAsMargin",
  13912. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13913. order: "uniqueOrder",
  13914. status: "standard",
  13915. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
  13916. },
  13917. "margin-inline-start": {
  13918. syntax: "<'margin-left'>",
  13919. media: "visual",
  13920. inherited: false,
  13921. animationType: "length",
  13922. percentages: "dependsOnLayoutModel",
  13923. groups: [
  13924. "CSS Logical Properties"
  13925. ],
  13926. initial: "0",
  13927. appliesto: "sameAsMargin",
  13928. computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
  13929. order: "uniqueOrder",
  13930. status: "standard",
  13931. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
  13932. },
  13933. "margin-left": {
  13934. syntax: "<length> | <percentage> | auto",
  13935. media: "visual",
  13936. inherited: false,
  13937. animationType: "length",
  13938. percentages: "referToWidthOfContainingBlock",
  13939. groups: [
  13940. "CSS Box Model"
  13941. ],
  13942. initial: "0",
  13943. appliesto: "allElementsExceptTableDisplayTypes",
  13944. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13945. order: "uniqueOrder",
  13946. alsoAppliesTo: [
  13947. "::first-letter",
  13948. "::first-line"
  13949. ],
  13950. status: "standard",
  13951. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-left"
  13952. },
  13953. "margin-right": {
  13954. syntax: "<length> | <percentage> | auto",
  13955. media: "visual",
  13956. inherited: false,
  13957. animationType: "length",
  13958. percentages: "referToWidthOfContainingBlock",
  13959. groups: [
  13960. "CSS Box Model"
  13961. ],
  13962. initial: "0",
  13963. appliesto: "allElementsExceptTableDisplayTypes",
  13964. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13965. order: "uniqueOrder",
  13966. alsoAppliesTo: [
  13967. "::first-letter",
  13968. "::first-line"
  13969. ],
  13970. status: "standard",
  13971. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-right"
  13972. },
  13973. "margin-top": {
  13974. syntax: "<length> | <percentage> | auto",
  13975. media: "visual",
  13976. inherited: false,
  13977. animationType: "length",
  13978. percentages: "referToWidthOfContainingBlock",
  13979. groups: [
  13980. "CSS Box Model"
  13981. ],
  13982. initial: "0",
  13983. appliesto: "allElementsExceptTableDisplayTypes",
  13984. computed: "percentageAsSpecifiedOrAbsoluteLength",
  13985. order: "uniqueOrder",
  13986. alsoAppliesTo: [
  13987. "::first-letter",
  13988. "::first-line"
  13989. ],
  13990. status: "standard",
  13991. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-top"
  13992. },
  13993. "margin-trim": {
  13994. syntax: "none | in-flow | all",
  13995. media: "visual",
  13996. inherited: false,
  13997. animationType: "discrete",
  13998. percentages: "no",
  13999. groups: [
  14000. "CSS Box Model"
  14001. ],
  14002. initial: "none",
  14003. appliesto: "blockContainersAndMultiColumnContainers",
  14004. computed: "asSpecified",
  14005. order: "perGrammar",
  14006. alsoAppliesTo: [
  14007. "::first-letter",
  14008. "::first-line"
  14009. ],
  14010. status: "experimental",
  14011. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
  14012. },
  14013. mask: mask,
  14014. "mask-border": {
  14015. syntax: "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
  14016. media: "visual",
  14017. inherited: false,
  14018. animationType: [
  14019. "mask-border-mode",
  14020. "mask-border-outset",
  14021. "mask-border-repeat",
  14022. "mask-border-slice",
  14023. "mask-border-source",
  14024. "mask-border-width"
  14025. ],
  14026. percentages: [
  14027. "mask-border-slice",
  14028. "mask-border-width"
  14029. ],
  14030. groups: [
  14031. "CSS Masking"
  14032. ],
  14033. initial: [
  14034. "mask-border-mode",
  14035. "mask-border-outset",
  14036. "mask-border-repeat",
  14037. "mask-border-slice",
  14038. "mask-border-source",
  14039. "mask-border-width"
  14040. ],
  14041. appliesto: "allElementsSVGContainerElements",
  14042. computed: [
  14043. "mask-border-mode",
  14044. "mask-border-outset",
  14045. "mask-border-repeat",
  14046. "mask-border-slice",
  14047. "mask-border-source",
  14048. "mask-border-width"
  14049. ],
  14050. order: "perGrammar",
  14051. stacking: true,
  14052. status: "standard",
  14053. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border"
  14054. },
  14055. "mask-border-mode": {
  14056. syntax: "luminance | alpha",
  14057. media: "visual",
  14058. inherited: false,
  14059. animationType: "discrete",
  14060. percentages: "no",
  14061. groups: [
  14062. "CSS Masking"
  14063. ],
  14064. initial: "alpha",
  14065. appliesto: "allElementsSVGContainerElements",
  14066. computed: "asSpecified",
  14067. order: "perGrammar",
  14068. status: "standard",
  14069. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"
  14070. },
  14071. "mask-border-outset": {
  14072. syntax: "[ <length> | <number> ]{1,4}",
  14073. media: "visual",
  14074. inherited: false,
  14075. animationType: "discrete",
  14076. percentages: "no",
  14077. groups: [
  14078. "CSS Masking"
  14079. ],
  14080. initial: "0",
  14081. appliesto: "allElementsSVGContainerElements",
  14082. computed: "asSpecifiedRelativeToAbsoluteLengths",
  14083. order: "perGrammar",
  14084. status: "standard",
  14085. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
  14086. },
  14087. "mask-border-repeat": {
  14088. syntax: "[ stretch | repeat | round | space ]{1,2}",
  14089. media: "visual",
  14090. inherited: false,
  14091. animationType: "discrete",
  14092. percentages: "no",
  14093. groups: [
  14094. "CSS Masking"
  14095. ],
  14096. initial: "stretch",
  14097. appliesto: "allElementsSVGContainerElements",
  14098. computed: "asSpecified",
  14099. order: "perGrammar",
  14100. status: "standard",
  14101. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
  14102. },
  14103. "mask-border-slice": {
  14104. syntax: "<number-percentage>{1,4} fill?",
  14105. media: "visual",
  14106. inherited: false,
  14107. animationType: "discrete",
  14108. percentages: "referToSizeOfMaskBorderImage",
  14109. groups: [
  14110. "CSS Masking"
  14111. ],
  14112. initial: "0",
  14113. appliesto: "allElementsSVGContainerElements",
  14114. computed: "asSpecified",
  14115. order: "perGrammar",
  14116. status: "standard",
  14117. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
  14118. },
  14119. "mask-border-source": {
  14120. syntax: "none | <image>",
  14121. media: "visual",
  14122. inherited: false,
  14123. animationType: "discrete",
  14124. percentages: "no",
  14125. groups: [
  14126. "CSS Masking"
  14127. ],
  14128. initial: "none",
  14129. appliesto: "allElementsSVGContainerElements",
  14130. computed: "asSpecifiedURLsAbsolute",
  14131. order: "perGrammar",
  14132. status: "standard",
  14133. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
  14134. },
  14135. "mask-border-width": {
  14136. syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
  14137. media: "visual",
  14138. inherited: false,
  14139. animationType: "discrete",
  14140. percentages: "relativeToMaskBorderImageArea",
  14141. groups: [
  14142. "CSS Masking"
  14143. ],
  14144. initial: "auto",
  14145. appliesto: "allElementsSVGContainerElements",
  14146. computed: "asSpecifiedRelativeToAbsoluteLengths",
  14147. order: "perGrammar",
  14148. status: "standard",
  14149. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
  14150. },
  14151. "mask-clip": {
  14152. syntax: "[ <geometry-box> | no-clip ]#",
  14153. media: "visual",
  14154. inherited: false,
  14155. animationType: "discrete",
  14156. percentages: "no",
  14157. groups: [
  14158. "CSS Masking"
  14159. ],
  14160. initial: "border-box",
  14161. appliesto: "allElementsSVGContainerElements",
  14162. computed: "asSpecified",
  14163. order: "perGrammar",
  14164. status: "standard",
  14165. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
  14166. },
  14167. "mask-composite": {
  14168. syntax: "<compositing-operator>#",
  14169. media: "visual",
  14170. inherited: false,
  14171. animationType: "discrete",
  14172. percentages: "no",
  14173. groups: [
  14174. "CSS Masking"
  14175. ],
  14176. initial: "add",
  14177. appliesto: "allElementsSVGContainerElements",
  14178. computed: "asSpecified",
  14179. order: "perGrammar",
  14180. status: "standard",
  14181. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
  14182. },
  14183. "mask-image": {
  14184. syntax: "<mask-reference>#",
  14185. media: "visual",
  14186. inherited: false,
  14187. animationType: "discrete",
  14188. percentages: "no",
  14189. groups: [
  14190. "CSS Masking"
  14191. ],
  14192. initial: "none",
  14193. appliesto: "allElementsSVGContainerElements",
  14194. computed: "asSpecifiedURLsAbsolute",
  14195. order: "perGrammar",
  14196. status: "standard",
  14197. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
  14198. },
  14199. "mask-mode": {
  14200. syntax: "<masking-mode>#",
  14201. media: "visual",
  14202. inherited: false,
  14203. animationType: "discrete",
  14204. percentages: "no",
  14205. groups: [
  14206. "CSS Masking"
  14207. ],
  14208. initial: "match-source",
  14209. appliesto: "allElementsSVGContainerElements",
  14210. computed: "asSpecified",
  14211. order: "perGrammar",
  14212. status: "standard",
  14213. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
  14214. },
  14215. "mask-origin": {
  14216. syntax: "<geometry-box>#",
  14217. media: "visual",
  14218. inherited: false,
  14219. animationType: "discrete",
  14220. percentages: "no",
  14221. groups: [
  14222. "CSS Masking"
  14223. ],
  14224. initial: "border-box",
  14225. appliesto: "allElementsSVGContainerElements",
  14226. computed: "asSpecified",
  14227. order: "perGrammar",
  14228. status: "standard",
  14229. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
  14230. },
  14231. "mask-position": {
  14232. syntax: "<position>#",
  14233. media: "visual",
  14234. inherited: false,
  14235. animationType: "repeatableListOfSimpleListOfLpc",
  14236. percentages: "referToSizeOfMaskPaintingArea",
  14237. groups: [
  14238. "CSS Masking"
  14239. ],
  14240. initial: "center",
  14241. appliesto: "allElementsSVGContainerElements",
  14242. computed: "consistsOfTwoKeywordsForOriginAndOffsets",
  14243. order: "perGrammar",
  14244. status: "standard",
  14245. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
  14246. },
  14247. "mask-repeat": {
  14248. syntax: "<repeat-style>#",
  14249. media: "visual",
  14250. inherited: false,
  14251. animationType: "discrete",
  14252. percentages: "no",
  14253. groups: [
  14254. "CSS Masking"
  14255. ],
  14256. initial: "no-repeat",
  14257. appliesto: "allElementsSVGContainerElements",
  14258. computed: "consistsOfTwoDimensionKeywords",
  14259. order: "perGrammar",
  14260. status: "standard",
  14261. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
  14262. },
  14263. "mask-size": {
  14264. syntax: "<bg-size>#",
  14265. media: "visual",
  14266. inherited: false,
  14267. animationType: "repeatableListOfSimpleListOfLpc",
  14268. percentages: "no",
  14269. groups: [
  14270. "CSS Masking"
  14271. ],
  14272. initial: "auto",
  14273. appliesto: "allElementsSVGContainerElements",
  14274. computed: "asSpecifiedRelativeToAbsoluteLengths",
  14275. order: "perGrammar",
  14276. status: "standard",
  14277. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
  14278. },
  14279. "mask-type": {
  14280. syntax: "luminance | alpha",
  14281. media: "visual",
  14282. inherited: false,
  14283. animationType: "discrete",
  14284. percentages: "no",
  14285. groups: [
  14286. "CSS Masking"
  14287. ],
  14288. initial: "luminance",
  14289. appliesto: "maskElements",
  14290. computed: "asSpecified",
  14291. order: "perGrammar",
  14292. status: "standard",
  14293. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-type"
  14294. },
  14295. "max-block-size": {
  14296. syntax: "<'max-width'>",
  14297. media: "visual",
  14298. inherited: false,
  14299. animationType: "lpc",
  14300. percentages: "blockSizeOfContainingBlock",
  14301. groups: [
  14302. "CSS Logical Properties"
  14303. ],
  14304. initial: "0",
  14305. appliesto: "sameAsWidthAndHeight",
  14306. computed: "sameAsMaxWidthAndMaxHeight",
  14307. order: "uniqueOrder",
  14308. status: "standard",
  14309. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
  14310. },
  14311. "max-height": {
  14312. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  14313. media: "visual",
  14314. inherited: false,
  14315. animationType: "lpc",
  14316. percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesNone",
  14317. groups: [
  14318. "CSS Box Model"
  14319. ],
  14320. initial: "none",
  14321. appliesto: "allElementsButNonReplacedAndTableColumns",
  14322. computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
  14323. order: "uniqueOrder",
  14324. status: "standard",
  14325. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-height"
  14326. },
  14327. "max-inline-size": {
  14328. syntax: "<'max-width'>",
  14329. media: "visual",
  14330. inherited: false,
  14331. animationType: "lpc",
  14332. percentages: "inlineSizeOfContainingBlock",
  14333. groups: [
  14334. "CSS Logical Properties"
  14335. ],
  14336. initial: "0",
  14337. appliesto: "sameAsWidthAndHeight",
  14338. computed: "sameAsMaxWidthAndMaxHeight",
  14339. order: "uniqueOrder",
  14340. status: "standard",
  14341. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
  14342. },
  14343. "max-lines": {
  14344. syntax: "none | <integer>",
  14345. media: "visual",
  14346. inherited: false,
  14347. animationType: "integer",
  14348. percentages: "no",
  14349. groups: [
  14350. "CSS Overflow"
  14351. ],
  14352. initial: "none",
  14353. appliesto: "blockContainersExceptMultiColumnContainers",
  14354. computed: "asSpecified",
  14355. order: "perGrammar",
  14356. status: "experimental"
  14357. },
  14358. "max-width": {
  14359. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  14360. media: "visual",
  14361. inherited: false,
  14362. animationType: "lpc",
  14363. percentages: "referToWidthOfContainingBlock",
  14364. groups: [
  14365. "CSS Box Model"
  14366. ],
  14367. initial: "none",
  14368. appliesto: "allElementsButNonReplacedAndTableRows",
  14369. computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
  14370. order: "uniqueOrder",
  14371. status: "standard",
  14372. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-width"
  14373. },
  14374. "min-block-size": {
  14375. syntax: "<'min-width'>",
  14376. media: "visual",
  14377. inherited: false,
  14378. animationType: "lpc",
  14379. percentages: "blockSizeOfContainingBlock",
  14380. groups: [
  14381. "CSS Logical Properties"
  14382. ],
  14383. initial: "0",
  14384. appliesto: "sameAsWidthAndHeight",
  14385. computed: "sameAsMinWidthAndMinHeight",
  14386. order: "uniqueOrder",
  14387. status: "standard",
  14388. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
  14389. },
  14390. "min-height": {
  14391. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  14392. media: "visual",
  14393. inherited: false,
  14394. animationType: "lpc",
  14395. percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentages0",
  14396. groups: [
  14397. "CSS Box Model"
  14398. ],
  14399. initial: "auto",
  14400. appliesto: "allElementsButNonReplacedAndTableColumns",
  14401. computed: "percentageAsSpecifiedOrAbsoluteLength",
  14402. order: "uniqueOrder",
  14403. status: "standard",
  14404. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-height"
  14405. },
  14406. "min-inline-size": {
  14407. syntax: "<'min-width'>",
  14408. media: "visual",
  14409. inherited: false,
  14410. animationType: "lpc",
  14411. percentages: "inlineSizeOfContainingBlock",
  14412. groups: [
  14413. "CSS Logical Properties"
  14414. ],
  14415. initial: "0",
  14416. appliesto: "sameAsWidthAndHeight",
  14417. computed: "sameAsMinWidthAndMinHeight",
  14418. order: "uniqueOrder",
  14419. status: "standard",
  14420. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
  14421. },
  14422. "min-width": {
  14423. syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
  14424. media: "visual",
  14425. inherited: false,
  14426. animationType: "lpc",
  14427. percentages: "referToWidthOfContainingBlock",
  14428. groups: [
  14429. "CSS Box Model"
  14430. ],
  14431. initial: "auto",
  14432. appliesto: "allElementsButNonReplacedAndTableRows",
  14433. computed: "percentageAsSpecifiedOrAbsoluteLength",
  14434. order: "uniqueOrder",
  14435. status: "standard",
  14436. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-width"
  14437. },
  14438. "mix-blend-mode": {
  14439. syntax: "<blend-mode>",
  14440. media: "visual",
  14441. inherited: false,
  14442. animationType: "discrete",
  14443. percentages: "no",
  14444. groups: [
  14445. "Compositing and Blending"
  14446. ],
  14447. initial: "normal",
  14448. appliesto: "allElements",
  14449. computed: "asSpecified",
  14450. order: "uniqueOrder",
  14451. stacking: true,
  14452. status: "standard",
  14453. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
  14454. },
  14455. "object-fit": {
  14456. syntax: "fill | contain | cover | none | scale-down",
  14457. media: "visual",
  14458. inherited: false,
  14459. animationType: "discrete",
  14460. percentages: "no",
  14461. groups: [
  14462. "CSS Images"
  14463. ],
  14464. initial: "fill",
  14465. appliesto: "replacedElements",
  14466. computed: "asSpecified",
  14467. order: "uniqueOrder",
  14468. status: "standard",
  14469. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-fit"
  14470. },
  14471. "object-position": {
  14472. syntax: "<position>",
  14473. media: "visual",
  14474. inherited: true,
  14475. animationType: "repeatableListOfSimpleListOfLpc",
  14476. percentages: "referToWidthAndHeightOfElement",
  14477. groups: [
  14478. "CSS Images"
  14479. ],
  14480. initial: "50% 50%",
  14481. appliesto: "replacedElements",
  14482. computed: "asSpecified",
  14483. order: "uniqueOrder",
  14484. status: "standard",
  14485. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-position"
  14486. },
  14487. offset: offset,
  14488. "offset-anchor": {
  14489. syntax: "auto | <position>",
  14490. media: "visual",
  14491. inherited: false,
  14492. animationType: "position",
  14493. percentages: "relativeToWidthAndHeight",
  14494. groups: [
  14495. "CSS Motion Path"
  14496. ],
  14497. initial: "auto",
  14498. appliesto: "transformableElements",
  14499. computed: "forLengthAbsoluteValueOtherwisePercentage",
  14500. order: "perGrammar",
  14501. status: "standard"
  14502. },
  14503. "offset-distance": {
  14504. syntax: "<length-percentage>",
  14505. media: "visual",
  14506. inherited: false,
  14507. animationType: "lpc",
  14508. percentages: "referToTotalPathLength",
  14509. groups: [
  14510. "CSS Motion Path"
  14511. ],
  14512. initial: "0",
  14513. appliesto: "transformableElements",
  14514. computed: "forLengthAbsoluteValueOtherwisePercentage",
  14515. order: "perGrammar",
  14516. status: "standard",
  14517. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
  14518. },
  14519. "offset-path": {
  14520. syntax: "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
  14521. media: "visual",
  14522. inherited: false,
  14523. animationType: "angleOrBasicShapeOrPath",
  14524. percentages: "no",
  14525. groups: [
  14526. "CSS Motion Path"
  14527. ],
  14528. initial: "none",
  14529. appliesto: "transformableElements",
  14530. computed: "asSpecified",
  14531. order: "perGrammar",
  14532. stacking: true,
  14533. status: "standard",
  14534. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-path"
  14535. },
  14536. "offset-position": {
  14537. syntax: "auto | <position>",
  14538. media: "visual",
  14539. inherited: false,
  14540. animationType: "position",
  14541. percentages: "referToSizeOfContainingBlock",
  14542. groups: [
  14543. "CSS Motion Path"
  14544. ],
  14545. initial: "auto",
  14546. appliesto: "transformableElements",
  14547. computed: "forLengthAbsoluteValueOtherwisePercentage",
  14548. order: "perGrammar",
  14549. status: "experimental"
  14550. },
  14551. "offset-rotate": {
  14552. syntax: "[ auto | reverse ] || <angle>",
  14553. media: "visual",
  14554. inherited: false,
  14555. animationType: "angleOrBasicShapeOrPath",
  14556. percentages: "no",
  14557. groups: [
  14558. "CSS Motion Path"
  14559. ],
  14560. initial: "auto",
  14561. appliesto: "transformableElements",
  14562. computed: "asSpecified",
  14563. order: "perGrammar",
  14564. status: "standard",
  14565. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
  14566. },
  14567. opacity: opacity,
  14568. order: order,
  14569. orphans: orphans,
  14570. outline: outline,
  14571. "outline-color": {
  14572. syntax: "<color> | invert",
  14573. media: [
  14574. "visual",
  14575. "interactive"
  14576. ],
  14577. inherited: false,
  14578. animationType: "color",
  14579. percentages: "no",
  14580. groups: [
  14581. "CSS Basic User Interface"
  14582. ],
  14583. initial: "invertOrCurrentColor",
  14584. appliesto: "allElements",
  14585. computed: "invertForTranslucentColorRGBAOtherwiseRGB",
  14586. order: "uniqueOrder",
  14587. status: "standard",
  14588. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-color"
  14589. },
  14590. "outline-offset": {
  14591. syntax: "<length>",
  14592. media: [
  14593. "visual",
  14594. "interactive"
  14595. ],
  14596. inherited: false,
  14597. animationType: "length",
  14598. percentages: "no",
  14599. groups: [
  14600. "CSS Basic User Interface"
  14601. ],
  14602. initial: "0",
  14603. appliesto: "allElements",
  14604. computed: "asSpecifiedRelativeToAbsoluteLengths",
  14605. order: "uniqueOrder",
  14606. status: "standard",
  14607. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
  14608. },
  14609. "outline-style": {
  14610. syntax: "auto | <'border-style'>",
  14611. media: [
  14612. "visual",
  14613. "interactive"
  14614. ],
  14615. inherited: false,
  14616. animationType: "discrete",
  14617. percentages: "no",
  14618. groups: [
  14619. "CSS Basic User Interface"
  14620. ],
  14621. initial: "none",
  14622. appliesto: "allElements",
  14623. computed: "asSpecified",
  14624. order: "uniqueOrder",
  14625. status: "standard",
  14626. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-style"
  14627. },
  14628. "outline-width": {
  14629. syntax: "<line-width>",
  14630. media: [
  14631. "visual",
  14632. "interactive"
  14633. ],
  14634. inherited: false,
  14635. animationType: "length",
  14636. percentages: "no",
  14637. groups: [
  14638. "CSS Basic User Interface"
  14639. ],
  14640. initial: "medium",
  14641. appliesto: "allElements",
  14642. computed: "absoluteLength0ForNone",
  14643. order: "uniqueOrder",
  14644. status: "standard",
  14645. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-width"
  14646. },
  14647. overflow: overflow,
  14648. "overflow-anchor": {
  14649. syntax: "auto | none",
  14650. media: "visual",
  14651. inherited: false,
  14652. animationType: "discrete",
  14653. percentages: "no",
  14654. groups: [
  14655. "CSS Scroll Anchoring"
  14656. ],
  14657. initial: "auto",
  14658. appliesto: "allElements",
  14659. computed: "asSpecified",
  14660. order: "perGrammar",
  14661. status: "standard"
  14662. },
  14663. "overflow-block": {
  14664. syntax: "visible | hidden | clip | scroll | auto",
  14665. media: "visual",
  14666. inherited: false,
  14667. animationType: "discrete",
  14668. percentages: "no",
  14669. groups: [
  14670. "CSS Overflow"
  14671. ],
  14672. initial: "auto",
  14673. appliesto: "blockContainersFlexContainersGridContainers",
  14674. computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
  14675. order: "perGrammar",
  14676. status: "standard"
  14677. },
  14678. "overflow-clip-box": {
  14679. syntax: "padding-box | content-box",
  14680. media: "visual",
  14681. inherited: false,
  14682. animationType: "discrete",
  14683. percentages: "no",
  14684. groups: [
  14685. "Mozilla Extensions"
  14686. ],
  14687. initial: "padding-box",
  14688. appliesto: "allElements",
  14689. computed: "asSpecified",
  14690. order: "uniqueOrder",
  14691. status: "nonstandard",
  14692. mdn_url: "https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"
  14693. },
  14694. "overflow-inline": {
  14695. syntax: "visible | hidden | clip | scroll | auto",
  14696. media: "visual",
  14697. inherited: false,
  14698. animationType: "discrete",
  14699. percentages: "no",
  14700. groups: [
  14701. "CSS Overflow"
  14702. ],
  14703. initial: "auto",
  14704. appliesto: "blockContainersFlexContainersGridContainers",
  14705. computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
  14706. order: "perGrammar",
  14707. status: "standard"
  14708. },
  14709. "overflow-wrap": {
  14710. syntax: "normal | break-word | anywhere",
  14711. media: "visual",
  14712. inherited: true,
  14713. animationType: "discrete",
  14714. percentages: "no",
  14715. groups: [
  14716. "CSS Text"
  14717. ],
  14718. initial: "normal",
  14719. appliesto: "nonReplacedInlineElements",
  14720. computed: "asSpecified",
  14721. order: "uniqueOrder",
  14722. status: "standard",
  14723. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
  14724. },
  14725. "overflow-x": {
  14726. syntax: "visible | hidden | clip | scroll | auto",
  14727. media: "visual",
  14728. inherited: false,
  14729. animationType: "discrete",
  14730. percentages: "no",
  14731. groups: [
  14732. "CSS Overflow"
  14733. ],
  14734. initial: "visible",
  14735. appliesto: "blockContainersFlexContainersGridContainers",
  14736. computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
  14737. order: "uniqueOrder",
  14738. status: "standard",
  14739. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
  14740. },
  14741. "overflow-y": {
  14742. syntax: "visible | hidden | clip | scroll | auto",
  14743. media: "visual",
  14744. inherited: false,
  14745. animationType: "discrete",
  14746. percentages: "no",
  14747. groups: [
  14748. "CSS Overflow"
  14749. ],
  14750. initial: "visible",
  14751. appliesto: "blockContainersFlexContainersGridContainers",
  14752. computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
  14753. order: "uniqueOrder",
  14754. status: "standard",
  14755. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
  14756. },
  14757. "overscroll-behavior": {
  14758. syntax: "[ contain | none | auto ]{1,2}",
  14759. media: "visual",
  14760. inherited: false,
  14761. animationType: "discrete",
  14762. percentages: "no",
  14763. groups: [
  14764. "CSS Box Model"
  14765. ],
  14766. initial: "auto",
  14767. appliesto: "nonReplacedBlockAndInlineBlockElements",
  14768. computed: "asSpecified",
  14769. order: "uniqueOrder",
  14770. status: "standard",
  14771. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
  14772. },
  14773. "overscroll-behavior-block": {
  14774. syntax: "contain | none | auto",
  14775. media: "visual",
  14776. inherited: false,
  14777. animationType: "discrete",
  14778. percentages: "no",
  14779. groups: [
  14780. "CSS Box Model"
  14781. ],
  14782. initial: "auto",
  14783. appliesto: "nonReplacedBlockAndInlineBlockElements",
  14784. computed: "asSpecified",
  14785. order: "uniqueOrder",
  14786. status: "standard",
  14787. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
  14788. },
  14789. "overscroll-behavior-inline": {
  14790. syntax: "contain | none | auto",
  14791. media: "visual",
  14792. inherited: false,
  14793. animationType: "discrete",
  14794. percentages: "no",
  14795. groups: [
  14796. "CSS Box Model"
  14797. ],
  14798. initial: "auto",
  14799. appliesto: "nonReplacedBlockAndInlineBlockElements",
  14800. computed: "asSpecified",
  14801. order: "uniqueOrder",
  14802. status: "standard",
  14803. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
  14804. },
  14805. "overscroll-behavior-x": {
  14806. syntax: "contain | none | auto",
  14807. media: "visual",
  14808. inherited: false,
  14809. animationType: "discrete",
  14810. percentages: "no",
  14811. groups: [
  14812. "CSS Box Model"
  14813. ],
  14814. initial: "auto",
  14815. appliesto: "nonReplacedBlockAndInlineBlockElements",
  14816. computed: "asSpecified",
  14817. order: "uniqueOrder",
  14818. status: "standard",
  14819. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
  14820. },
  14821. "overscroll-behavior-y": {
  14822. syntax: "contain | none | auto",
  14823. media: "visual",
  14824. inherited: false,
  14825. animationType: "discrete",
  14826. percentages: "no",
  14827. groups: [
  14828. "CSS Box Model"
  14829. ],
  14830. initial: "auto",
  14831. appliesto: "nonReplacedBlockAndInlineBlockElements",
  14832. computed: "asSpecified",
  14833. order: "uniqueOrder",
  14834. status: "standard",
  14835. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
  14836. },
  14837. padding: padding,
  14838. "padding-block": {
  14839. syntax: "<'padding-left'>{1,2}",
  14840. media: "visual",
  14841. inherited: false,
  14842. animationType: "discrete",
  14843. percentages: "logicalWidthOfContainingBlock",
  14844. groups: [
  14845. "CSS Logical Properties"
  14846. ],
  14847. initial: "0",
  14848. appliesto: "allElements",
  14849. computed: "asLength",
  14850. order: "uniqueOrder",
  14851. status: "standard",
  14852. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block"
  14853. },
  14854. "padding-block-end": {
  14855. syntax: "<'padding-left'>",
  14856. media: "visual",
  14857. inherited: false,
  14858. animationType: "length",
  14859. percentages: "logicalWidthOfContainingBlock",
  14860. groups: [
  14861. "CSS Logical Properties"
  14862. ],
  14863. initial: "0",
  14864. appliesto: "allElements",
  14865. computed: "asLength",
  14866. order: "uniqueOrder",
  14867. status: "standard",
  14868. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
  14869. },
  14870. "padding-block-start": {
  14871. syntax: "<'padding-left'>",
  14872. media: "visual",
  14873. inherited: false,
  14874. animationType: "length",
  14875. percentages: "logicalWidthOfContainingBlock",
  14876. groups: [
  14877. "CSS Logical Properties"
  14878. ],
  14879. initial: "0",
  14880. appliesto: "allElements",
  14881. computed: "asLength",
  14882. order: "uniqueOrder",
  14883. status: "standard",
  14884. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
  14885. },
  14886. "padding-bottom": {
  14887. syntax: "<length> | <percentage>",
  14888. media: "visual",
  14889. inherited: false,
  14890. animationType: "length",
  14891. percentages: "referToWidthOfContainingBlock",
  14892. groups: [
  14893. "CSS Box Model"
  14894. ],
  14895. initial: "0",
  14896. appliesto: "allElementsExceptInternalTableDisplayTypes",
  14897. computed: "percentageAsSpecifiedOrAbsoluteLength",
  14898. order: "uniqueOrder",
  14899. alsoAppliesTo: [
  14900. "::first-letter",
  14901. "::first-line"
  14902. ],
  14903. status: "standard",
  14904. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
  14905. },
  14906. "padding-inline": {
  14907. syntax: "<'padding-left'>{1,2}",
  14908. media: "visual",
  14909. inherited: false,
  14910. animationType: "discrete",
  14911. percentages: "logicalWidthOfContainingBlock",
  14912. groups: [
  14913. "CSS Logical Properties"
  14914. ],
  14915. initial: "0",
  14916. appliesto: "allElements",
  14917. computed: "asLength",
  14918. order: "uniqueOrder",
  14919. status: "standard",
  14920. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
  14921. },
  14922. "padding-inline-end": {
  14923. syntax: "<'padding-left'>",
  14924. media: "visual",
  14925. inherited: false,
  14926. animationType: "length",
  14927. percentages: "logicalWidthOfContainingBlock",
  14928. groups: [
  14929. "CSS Logical Properties"
  14930. ],
  14931. initial: "0",
  14932. appliesto: "allElements",
  14933. computed: "asLength",
  14934. order: "uniqueOrder",
  14935. status: "standard",
  14936. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
  14937. },
  14938. "padding-inline-start": {
  14939. syntax: "<'padding-left'>",
  14940. media: "visual",
  14941. inherited: false,
  14942. animationType: "length",
  14943. percentages: "logicalWidthOfContainingBlock",
  14944. groups: [
  14945. "CSS Logical Properties"
  14946. ],
  14947. initial: "0",
  14948. appliesto: "allElements",
  14949. computed: "asLength",
  14950. order: "uniqueOrder",
  14951. status: "standard",
  14952. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
  14953. },
  14954. "padding-left": {
  14955. syntax: "<length> | <percentage>",
  14956. media: "visual",
  14957. inherited: false,
  14958. animationType: "length",
  14959. percentages: "referToWidthOfContainingBlock",
  14960. groups: [
  14961. "CSS Box Model"
  14962. ],
  14963. initial: "0",
  14964. appliesto: "allElementsExceptInternalTableDisplayTypes",
  14965. computed: "percentageAsSpecifiedOrAbsoluteLength",
  14966. order: "uniqueOrder",
  14967. alsoAppliesTo: [
  14968. "::first-letter",
  14969. "::first-line"
  14970. ],
  14971. status: "standard",
  14972. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-left"
  14973. },
  14974. "padding-right": {
  14975. syntax: "<length> | <percentage>",
  14976. media: "visual",
  14977. inherited: false,
  14978. animationType: "length",
  14979. percentages: "referToWidthOfContainingBlock",
  14980. groups: [
  14981. "CSS Box Model"
  14982. ],
  14983. initial: "0",
  14984. appliesto: "allElementsExceptInternalTableDisplayTypes",
  14985. computed: "percentageAsSpecifiedOrAbsoluteLength",
  14986. order: "uniqueOrder",
  14987. alsoAppliesTo: [
  14988. "::first-letter",
  14989. "::first-line"
  14990. ],
  14991. status: "standard",
  14992. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-right"
  14993. },
  14994. "padding-top": {
  14995. syntax: "<length> | <percentage>",
  14996. media: "visual",
  14997. inherited: false,
  14998. animationType: "length",
  14999. percentages: "referToWidthOfContainingBlock",
  15000. groups: [
  15001. "CSS Box Model"
  15002. ],
  15003. initial: "0",
  15004. appliesto: "allElementsExceptInternalTableDisplayTypes",
  15005. computed: "percentageAsSpecifiedOrAbsoluteLength",
  15006. order: "uniqueOrder",
  15007. alsoAppliesTo: [
  15008. "::first-letter",
  15009. "::first-line"
  15010. ],
  15011. status: "standard",
  15012. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-top"
  15013. },
  15014. "page-break-after": {
  15015. syntax: "auto | always | avoid | left | right | recto | verso",
  15016. media: [
  15017. "visual",
  15018. "paged"
  15019. ],
  15020. inherited: false,
  15021. animationType: "discrete",
  15022. percentages: "no",
  15023. groups: [
  15024. "CSS Pages"
  15025. ],
  15026. initial: "auto",
  15027. appliesto: "blockElementsInNormalFlow",
  15028. computed: "asSpecified",
  15029. order: "uniqueOrder",
  15030. status: "standard",
  15031. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
  15032. },
  15033. "page-break-before": {
  15034. syntax: "auto | always | avoid | left | right | recto | verso",
  15035. media: [
  15036. "visual",
  15037. "paged"
  15038. ],
  15039. inherited: false,
  15040. animationType: "discrete",
  15041. percentages: "no",
  15042. groups: [
  15043. "CSS Pages"
  15044. ],
  15045. initial: "auto",
  15046. appliesto: "blockElementsInNormalFlow",
  15047. computed: "asSpecified",
  15048. order: "uniqueOrder",
  15049. status: "standard",
  15050. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
  15051. },
  15052. "page-break-inside": {
  15053. syntax: "auto | avoid",
  15054. media: [
  15055. "visual",
  15056. "paged"
  15057. ],
  15058. inherited: false,
  15059. animationType: "discrete",
  15060. percentages: "no",
  15061. groups: [
  15062. "CSS Pages"
  15063. ],
  15064. initial: "auto",
  15065. appliesto: "blockElementsInNormalFlow",
  15066. computed: "asSpecified",
  15067. order: "uniqueOrder",
  15068. status: "standard",
  15069. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
  15070. },
  15071. "paint-order": {
  15072. syntax: "normal | [ fill || stroke || markers ]",
  15073. media: "visual",
  15074. inherited: true,
  15075. animationType: "discrete",
  15076. percentages: "no",
  15077. groups: [
  15078. "CSS Text"
  15079. ],
  15080. initial: "normal",
  15081. appliesto: "textElements",
  15082. computed: "asSpecified",
  15083. order: "uniqueOrder",
  15084. status: "standard",
  15085. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/paint-order"
  15086. },
  15087. perspective: perspective,
  15088. "perspective-origin": {
  15089. syntax: "<position>",
  15090. media: "visual",
  15091. inherited: false,
  15092. animationType: "simpleListOfLpc",
  15093. percentages: "referToSizeOfBoundingBox",
  15094. groups: [
  15095. "CSS Transforms"
  15096. ],
  15097. initial: "50% 50%",
  15098. appliesto: "transformableElements",
  15099. computed: "forLengthAbsoluteValueOtherwisePercentage",
  15100. order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
  15101. status: "standard",
  15102. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
  15103. },
  15104. "place-content": {
  15105. syntax: "<'align-content'> <'justify-content'>?",
  15106. media: "visual",
  15107. inherited: false,
  15108. animationType: "discrete",
  15109. percentages: "no",
  15110. groups: [
  15111. "CSS Box Alignment"
  15112. ],
  15113. initial: "normal",
  15114. appliesto: "multilineFlexContainers",
  15115. computed: "asSpecified",
  15116. order: "uniqueOrder",
  15117. status: "standard",
  15118. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-content"
  15119. },
  15120. "place-items": {
  15121. syntax: "<'align-items'> <'justify-items'>?",
  15122. media: "visual",
  15123. inherited: false,
  15124. animationType: "discrete",
  15125. percentages: "no",
  15126. groups: [
  15127. "CSS Box Alignment"
  15128. ],
  15129. initial: [
  15130. "align-items",
  15131. "justify-items"
  15132. ],
  15133. appliesto: "allElements",
  15134. computed: [
  15135. "align-items",
  15136. "justify-items"
  15137. ],
  15138. order: "uniqueOrder",
  15139. status: "standard",
  15140. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-items"
  15141. },
  15142. "place-self": {
  15143. syntax: "<'align-self'> <'justify-self'>?",
  15144. media: "visual",
  15145. inherited: false,
  15146. animationType: "discrete",
  15147. percentages: "no",
  15148. groups: [
  15149. "CSS Box Alignment"
  15150. ],
  15151. initial: [
  15152. "align-self",
  15153. "justify-self"
  15154. ],
  15155. appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
  15156. computed: [
  15157. "align-self",
  15158. "justify-self"
  15159. ],
  15160. order: "uniqueOrder",
  15161. status: "standard",
  15162. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-self"
  15163. },
  15164. "pointer-events": {
  15165. syntax: "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
  15166. media: "visual",
  15167. inherited: true,
  15168. animationType: "discrete",
  15169. percentages: "no",
  15170. groups: [
  15171. "Pointer Events"
  15172. ],
  15173. initial: "auto",
  15174. appliesto: "allElements",
  15175. computed: "asSpecified",
  15176. order: "uniqueOrder",
  15177. status: "standard",
  15178. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
  15179. },
  15180. position: position,
  15181. quotes: quotes,
  15182. resize: resize,
  15183. right: right,
  15184. rotate: rotate,
  15185. "row-gap": {
  15186. syntax: "normal | <length-percentage>",
  15187. media: "visual",
  15188. inherited: false,
  15189. animationType: "lpc",
  15190. percentages: "referToDimensionOfContentArea",
  15191. groups: [
  15192. "CSS Box Alignment"
  15193. ],
  15194. initial: "normal",
  15195. appliesto: "multiColumnElementsFlexContainersGridContainers",
  15196. computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
  15197. order: "perGrammar",
  15198. status: "standard",
  15199. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
  15200. },
  15201. "ruby-align": {
  15202. syntax: "start | center | space-between | space-around",
  15203. media: "visual",
  15204. inherited: true,
  15205. animationType: "discrete",
  15206. percentages: "no",
  15207. groups: [
  15208. "CSS Ruby"
  15209. ],
  15210. initial: "space-around",
  15211. appliesto: "rubyBasesAnnotationsBaseAnnotationContainers",
  15212. computed: "asSpecified",
  15213. order: "uniqueOrder",
  15214. status: "experimental",
  15215. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
  15216. },
  15217. "ruby-merge": {
  15218. syntax: "separate | collapse | auto",
  15219. media: "visual",
  15220. inherited: true,
  15221. animationType: "discrete",
  15222. percentages: "no",
  15223. groups: [
  15224. "CSS Ruby"
  15225. ],
  15226. initial: "separate",
  15227. appliesto: "rubyAnnotationsContainers",
  15228. computed: "asSpecified",
  15229. order: "uniqueOrder",
  15230. status: "experimental"
  15231. },
  15232. "ruby-position": {
  15233. syntax: "over | under | inter-character",
  15234. media: "visual",
  15235. inherited: true,
  15236. animationType: "discrete",
  15237. percentages: "no",
  15238. groups: [
  15239. "CSS Ruby"
  15240. ],
  15241. initial: "over",
  15242. appliesto: "rubyAnnotationsContainers",
  15243. computed: "asSpecified",
  15244. order: "uniqueOrder",
  15245. status: "experimental",
  15246. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
  15247. },
  15248. scale: scale,
  15249. "scrollbar-color": {
  15250. syntax: "auto | dark | light | <color>{2}",
  15251. media: "visual",
  15252. inherited: true,
  15253. animationType: "color",
  15254. percentages: "no",
  15255. groups: [
  15256. "CSS Scrollbars"
  15257. ],
  15258. initial: "auto",
  15259. appliesto: "scrollingBoxes",
  15260. computed: "asSpecified",
  15261. order: "perGrammar",
  15262. status: "standard",
  15263. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
  15264. },
  15265. "scrollbar-width": {
  15266. syntax: "auto | thin | none",
  15267. media: "visual",
  15268. inherited: false,
  15269. animationType: "discrete",
  15270. percentages: "no",
  15271. groups: [
  15272. "CSS Scrollbars"
  15273. ],
  15274. initial: "auto",
  15275. appliesto: "scrollingBoxes",
  15276. computed: "asSpecified",
  15277. order: "perGrammar",
  15278. status: "standard",
  15279. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
  15280. },
  15281. "scroll-behavior": {
  15282. syntax: "auto | smooth",
  15283. media: "visual",
  15284. inherited: false,
  15285. animationType: "discrete",
  15286. percentages: "no",
  15287. groups: [
  15288. "CSSOM View"
  15289. ],
  15290. initial: "auto",
  15291. appliesto: "scrollingBoxes",
  15292. computed: "asSpecified",
  15293. order: "uniqueOrder",
  15294. status: "standard",
  15295. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
  15296. },
  15297. "scroll-margin": {
  15298. syntax: "<length>{1,4}",
  15299. media: "visual",
  15300. inherited: false,
  15301. animationType: "byComputedValueType",
  15302. percentages: "no",
  15303. groups: [
  15304. "CSS Scroll Snap"
  15305. ],
  15306. initial: "0",
  15307. appliesto: "allElements",
  15308. computed: "asSpecified",
  15309. order: "perGrammar",
  15310. status: "standard",
  15311. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
  15312. },
  15313. "scroll-margin-block": {
  15314. syntax: "<length>{1,2}",
  15315. media: "visual",
  15316. inherited: false,
  15317. animationType: "byComputedValueType",
  15318. percentages: "no",
  15319. groups: [
  15320. "CSS Scroll Snap"
  15321. ],
  15322. initial: "0",
  15323. appliesto: "allElements",
  15324. computed: "asSpecified",
  15325. order: "perGrammar",
  15326. status: "standard",
  15327. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
  15328. },
  15329. "scroll-margin-block-start": {
  15330. syntax: "<length>",
  15331. media: "visual",
  15332. inherited: false,
  15333. animationType: "byComputedValueType",
  15334. percentages: "no",
  15335. groups: [
  15336. "CSS Scroll Snap"
  15337. ],
  15338. initial: "0",
  15339. appliesto: "allElements",
  15340. computed: "asSpecified",
  15341. order: "perGrammar",
  15342. status: "standard",
  15343. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
  15344. },
  15345. "scroll-margin-block-end": {
  15346. syntax: "<length>",
  15347. media: "visual",
  15348. inherited: false,
  15349. animationType: "byComputedValueType",
  15350. percentages: "no",
  15351. groups: [
  15352. "CSS Scroll Snap"
  15353. ],
  15354. initial: "0",
  15355. appliesto: "allElements",
  15356. computed: "asSpecified",
  15357. order: "perGrammar",
  15358. status: "standard",
  15359. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
  15360. },
  15361. "scroll-margin-bottom": {
  15362. syntax: "<length>",
  15363. media: "visual",
  15364. inherited: false,
  15365. animationType: "byComputedValueType",
  15366. percentages: "no",
  15367. groups: [
  15368. "CSS Scroll Snap"
  15369. ],
  15370. initial: "0",
  15371. appliesto: "allElements",
  15372. computed: "asSpecified",
  15373. order: "perGrammar",
  15374. status: "standard",
  15375. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
  15376. },
  15377. "scroll-margin-inline": {
  15378. syntax: "<length>{1,2}",
  15379. media: "visual",
  15380. inherited: false,
  15381. animationType: "byComputedValueType",
  15382. percentages: "no",
  15383. groups: [
  15384. "CSS Scroll Snap"
  15385. ],
  15386. initial: "0",
  15387. appliesto: "allElements",
  15388. computed: "asSpecified",
  15389. order: "perGrammar",
  15390. status: "standard",
  15391. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
  15392. },
  15393. "scroll-margin-inline-start": {
  15394. syntax: "<length>",
  15395. media: "visual",
  15396. inherited: false,
  15397. animationType: "byComputedValueType",
  15398. percentages: "no",
  15399. groups: [
  15400. "CSS Scroll Snap"
  15401. ],
  15402. initial: "0",
  15403. appliesto: "allElements",
  15404. computed: "asSpecified",
  15405. order: "perGrammar",
  15406. status: "standard",
  15407. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
  15408. },
  15409. "scroll-margin-inline-end": {
  15410. syntax: "<length>",
  15411. media: "visual",
  15412. inherited: false,
  15413. animationType: "byComputedValueType",
  15414. percentages: "no",
  15415. groups: [
  15416. "CSS Scroll Snap"
  15417. ],
  15418. initial: "0",
  15419. appliesto: "allElements",
  15420. computed: "asSpecified",
  15421. order: "perGrammar",
  15422. status: "standard",
  15423. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
  15424. },
  15425. "scroll-margin-left": {
  15426. syntax: "<length>",
  15427. media: "visual",
  15428. inherited: false,
  15429. animationType: "byComputedValueType",
  15430. percentages: "no",
  15431. groups: [
  15432. "CSS Scroll Snap"
  15433. ],
  15434. initial: "0",
  15435. appliesto: "allElements",
  15436. computed: "asSpecified",
  15437. order: "perGrammar",
  15438. status: "standard",
  15439. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
  15440. },
  15441. "scroll-margin-right": {
  15442. syntax: "<length>",
  15443. media: "visual",
  15444. inherited: false,
  15445. animationType: "byComputedValueType",
  15446. percentages: "no",
  15447. groups: [
  15448. "CSS Scroll Snap"
  15449. ],
  15450. initial: "0",
  15451. appliesto: "allElements",
  15452. computed: "asSpecified",
  15453. order: "perGrammar",
  15454. status: "standard",
  15455. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
  15456. },
  15457. "scroll-margin-top": {
  15458. syntax: "<length>",
  15459. media: "visual",
  15460. inherited: false,
  15461. animationType: "byComputedValueType",
  15462. percentages: "no",
  15463. groups: [
  15464. "CSS Scroll Snap"
  15465. ],
  15466. initial: "0",
  15467. appliesto: "allElements",
  15468. computed: "asSpecified",
  15469. order: "perGrammar",
  15470. status: "standard",
  15471. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
  15472. },
  15473. "scroll-padding": {
  15474. syntax: "[ auto | <length-percentage> ]{1,4}",
  15475. media: "visual",
  15476. inherited: false,
  15477. animationType: "byComputedValueType",
  15478. percentages: "relativeToTheScrollContainersScrollport",
  15479. groups: [
  15480. "CSS Scroll Snap"
  15481. ],
  15482. initial: "auto",
  15483. appliesto: "scrollContainers",
  15484. computed: "asSpecified",
  15485. order: "perGrammar",
  15486. status: "standard",
  15487. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
  15488. },
  15489. "scroll-padding-block": {
  15490. syntax: "[ auto | <length-percentage> ]{1,2}",
  15491. media: "visual",
  15492. inherited: false,
  15493. animationType: "byComputedValueType",
  15494. percentages: "relativeToTheScrollContainersScrollport",
  15495. groups: [
  15496. "CSS Scroll Snap"
  15497. ],
  15498. initial: "auto",
  15499. appliesto: "scrollContainers",
  15500. computed: "asSpecified",
  15501. order: "perGrammar",
  15502. status: "standard",
  15503. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
  15504. },
  15505. "scroll-padding-block-start": {
  15506. syntax: "auto | <length-percentage>",
  15507. media: "visual",
  15508. inherited: false,
  15509. animationType: "byComputedValueType",
  15510. percentages: "relativeToTheScrollContainersScrollport",
  15511. groups: [
  15512. "CSS Scroll Snap"
  15513. ],
  15514. initial: "auto",
  15515. appliesto: "scrollContainers",
  15516. computed: "asSpecified",
  15517. order: "perGrammar",
  15518. status: "standard",
  15519. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
  15520. },
  15521. "scroll-padding-block-end": {
  15522. syntax: "auto | <length-percentage>",
  15523. media: "visual",
  15524. inherited: false,
  15525. animationType: "byComputedValueType",
  15526. percentages: "relativeToTheScrollContainersScrollport",
  15527. groups: [
  15528. "CSS Scroll Snap"
  15529. ],
  15530. initial: "auto",
  15531. appliesto: "scrollContainers",
  15532. computed: "asSpecified",
  15533. order: "perGrammar",
  15534. status: "standard",
  15535. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
  15536. },
  15537. "scroll-padding-bottom": {
  15538. syntax: "auto | <length-percentage>",
  15539. media: "visual",
  15540. inherited: false,
  15541. animationType: "byComputedValueType",
  15542. percentages: "relativeToTheScrollContainersScrollport",
  15543. groups: [
  15544. "CSS Scroll Snap"
  15545. ],
  15546. initial: "auto",
  15547. appliesto: "scrollContainers",
  15548. computed: "asSpecified",
  15549. order: "perGrammar",
  15550. status: "standard",
  15551. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
  15552. },
  15553. "scroll-padding-inline": {
  15554. syntax: "[ auto | <length-percentage> ]{1,2}",
  15555. media: "visual",
  15556. inherited: false,
  15557. animationType: "byComputedValueType",
  15558. percentages: "relativeToTheScrollContainersScrollport",
  15559. groups: [
  15560. "CSS Scroll Snap"
  15561. ],
  15562. initial: "auto",
  15563. appliesto: "scrollContainers",
  15564. computed: "asSpecified",
  15565. order: "perGrammar",
  15566. status: "standard",
  15567. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
  15568. },
  15569. "scroll-padding-inline-start": {
  15570. syntax: "auto | <length-percentage>",
  15571. media: "visual",
  15572. inherited: false,
  15573. animationType: "byComputedValueType",
  15574. percentages: "relativeToTheScrollContainersScrollport",
  15575. groups: [
  15576. "CSS Scroll Snap"
  15577. ],
  15578. initial: "auto",
  15579. appliesto: "scrollContainers",
  15580. computed: "asSpecified",
  15581. order: "perGrammar",
  15582. status: "standard",
  15583. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
  15584. },
  15585. "scroll-padding-inline-end": {
  15586. syntax: "auto | <length-percentage>",
  15587. media: "visual",
  15588. inherited: false,
  15589. animationType: "byComputedValueType",
  15590. percentages: "relativeToTheScrollContainersScrollport",
  15591. groups: [
  15592. "CSS Scroll Snap"
  15593. ],
  15594. initial: "auto",
  15595. appliesto: "scrollContainers",
  15596. computed: "asSpecified",
  15597. order: "perGrammar",
  15598. status: "standard",
  15599. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
  15600. },
  15601. "scroll-padding-left": {
  15602. syntax: "auto | <length-percentage>",
  15603. media: "visual",
  15604. inherited: false,
  15605. animationType: "byComputedValueType",
  15606. percentages: "relativeToTheScrollContainersScrollport",
  15607. groups: [
  15608. "CSS Scroll Snap"
  15609. ],
  15610. initial: "auto",
  15611. appliesto: "scrollContainers",
  15612. computed: "asSpecified",
  15613. order: "perGrammar",
  15614. status: "standard",
  15615. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
  15616. },
  15617. "scroll-padding-right": {
  15618. syntax: "auto | <length-percentage>",
  15619. media: "visual",
  15620. inherited: false,
  15621. animationType: "byComputedValueType",
  15622. percentages: "relativeToTheScrollContainersScrollport",
  15623. groups: [
  15624. "CSS Scroll Snap"
  15625. ],
  15626. initial: "auto",
  15627. appliesto: "scrollContainers",
  15628. computed: "asSpecified",
  15629. order: "perGrammar",
  15630. status: "standard",
  15631. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
  15632. },
  15633. "scroll-padding-top": {
  15634. syntax: "auto | <length-percentage>",
  15635. media: "visual",
  15636. inherited: false,
  15637. animationType: "byComputedValueType",
  15638. percentages: "relativeToTheScrollContainersScrollport",
  15639. groups: [
  15640. "CSS Scroll Snap"
  15641. ],
  15642. initial: "auto",
  15643. appliesto: "scrollContainers",
  15644. computed: "asSpecified",
  15645. order: "perGrammar",
  15646. status: "standard",
  15647. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
  15648. },
  15649. "scroll-snap-align": {
  15650. syntax: "[ none | start | end | center ]{1,2}",
  15651. media: "visual",
  15652. inherited: false,
  15653. animationType: "discrete",
  15654. percentages: "no",
  15655. groups: [
  15656. "CSS Scroll Snap"
  15657. ],
  15658. initial: "none",
  15659. appliesto: "allElements",
  15660. computed: "asSpecified",
  15661. order: "perGrammar",
  15662. status: "standard",
  15663. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
  15664. },
  15665. "scroll-snap-coordinate": {
  15666. syntax: "none | <position>#",
  15667. media: "interactive",
  15668. inherited: false,
  15669. animationType: "position",
  15670. percentages: "referToBorderBox",
  15671. groups: [
  15672. "CSS Scroll Snap"
  15673. ],
  15674. initial: "none",
  15675. appliesto: "allElements",
  15676. computed: "asSpecifiedRelativeToAbsoluteLengths",
  15677. order: "uniqueOrder",
  15678. status: "obsolete",
  15679. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
  15680. },
  15681. "scroll-snap-destination": {
  15682. syntax: "<position>",
  15683. media: "interactive",
  15684. inherited: false,
  15685. animationType: "position",
  15686. percentages: "relativeToScrollContainerPaddingBoxAxis",
  15687. groups: [
  15688. "CSS Scroll Snap"
  15689. ],
  15690. initial: "0px 0px",
  15691. appliesto: "scrollContainers",
  15692. computed: "asSpecifiedRelativeToAbsoluteLengths",
  15693. order: "uniqueOrder",
  15694. status: "obsolete",
  15695. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
  15696. },
  15697. "scroll-snap-points-x": {
  15698. syntax: "none | repeat( <length-percentage> )",
  15699. media: "interactive",
  15700. inherited: false,
  15701. animationType: "discrete",
  15702. percentages: "relativeToScrollContainerPaddingBoxAxis",
  15703. groups: [
  15704. "CSS Scroll Snap"
  15705. ],
  15706. initial: "none",
  15707. appliesto: "scrollContainers",
  15708. computed: "asSpecifiedRelativeToAbsoluteLengths",
  15709. order: "uniqueOrder",
  15710. status: "obsolete",
  15711. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
  15712. },
  15713. "scroll-snap-points-y": {
  15714. syntax: "none | repeat( <length-percentage> )",
  15715. media: "interactive",
  15716. inherited: false,
  15717. animationType: "discrete",
  15718. percentages: "relativeToScrollContainerPaddingBoxAxis",
  15719. groups: [
  15720. "CSS Scroll Snap"
  15721. ],
  15722. initial: "none",
  15723. appliesto: "scrollContainers",
  15724. computed: "asSpecifiedRelativeToAbsoluteLengths",
  15725. order: "uniqueOrder",
  15726. status: "obsolete",
  15727. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
  15728. },
  15729. "scroll-snap-stop": {
  15730. syntax: "normal | always",
  15731. media: "visual",
  15732. inherited: false,
  15733. animationType: "discrete",
  15734. percentages: "no",
  15735. groups: [
  15736. "CSS Scroll Snap"
  15737. ],
  15738. initial: "normal",
  15739. appliesto: "allElements",
  15740. computed: "asSpecified",
  15741. order: "perGrammar",
  15742. status: "standard",
  15743. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
  15744. },
  15745. "scroll-snap-type": {
  15746. syntax: "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
  15747. media: "interactive",
  15748. inherited: false,
  15749. animationType: "discrete",
  15750. percentages: "no",
  15751. groups: [
  15752. "CSS Scroll Snap"
  15753. ],
  15754. initial: "none",
  15755. appliesto: "allElements",
  15756. computed: "asSpecified",
  15757. order: "uniqueOrder",
  15758. status: "standard",
  15759. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
  15760. },
  15761. "scroll-snap-type-x": {
  15762. syntax: "none | mandatory | proximity",
  15763. media: "interactive",
  15764. inherited: false,
  15765. animationType: "discrete",
  15766. percentages: "no",
  15767. groups: [
  15768. "CSS Scroll Snap"
  15769. ],
  15770. initial: "none",
  15771. appliesto: "scrollContainers",
  15772. computed: "asSpecified",
  15773. order: "uniqueOrder",
  15774. status: "obsolete",
  15775. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
  15776. },
  15777. "scroll-snap-type-y": {
  15778. syntax: "none | mandatory | proximity",
  15779. media: "interactive",
  15780. inherited: false,
  15781. animationType: "discrete",
  15782. percentages: "no",
  15783. groups: [
  15784. "CSS Scroll Snap"
  15785. ],
  15786. initial: "none",
  15787. appliesto: "scrollContainers",
  15788. computed: "asSpecified",
  15789. order: "uniqueOrder",
  15790. status: "obsolete",
  15791. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
  15792. },
  15793. "shape-image-threshold": {
  15794. syntax: "<alpha-value>",
  15795. media: "visual",
  15796. inherited: false,
  15797. animationType: "number",
  15798. percentages: "no",
  15799. groups: [
  15800. "CSS Shapes"
  15801. ],
  15802. initial: "0.0",
  15803. appliesto: "floats",
  15804. computed: "specifiedValueNumberClipped0To1",
  15805. order: "uniqueOrder",
  15806. status: "standard",
  15807. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
  15808. },
  15809. "shape-margin": {
  15810. syntax: "<length-percentage>",
  15811. media: "visual",
  15812. inherited: false,
  15813. animationType: "lpc",
  15814. percentages: "referToWidthOfContainingBlock",
  15815. groups: [
  15816. "CSS Shapes"
  15817. ],
  15818. initial: "0",
  15819. appliesto: "floats",
  15820. computed: "asSpecifiedRelativeToAbsoluteLengths",
  15821. order: "uniqueOrder",
  15822. status: "standard",
  15823. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
  15824. },
  15825. "shape-outside": {
  15826. syntax: "none | <shape-box> || <basic-shape> | <image>",
  15827. media: "visual",
  15828. inherited: false,
  15829. animationType: "basicShapeOtherwiseNo",
  15830. percentages: "no",
  15831. groups: [
  15832. "CSS Shapes"
  15833. ],
  15834. initial: "none",
  15835. appliesto: "floats",
  15836. computed: "asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified",
  15837. order: "uniqueOrder",
  15838. status: "standard",
  15839. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
  15840. },
  15841. "tab-size": {
  15842. syntax: "<integer> | <length>",
  15843. media: "visual",
  15844. inherited: true,
  15845. animationType: "length",
  15846. percentages: "no",
  15847. groups: [
  15848. "CSS Text"
  15849. ],
  15850. initial: "8",
  15851. appliesto: "blockContainers",
  15852. computed: "specifiedIntegerOrAbsoluteLength",
  15853. order: "uniqueOrder",
  15854. status: "standard",
  15855. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/tab-size"
  15856. },
  15857. "table-layout": {
  15858. syntax: "auto | fixed",
  15859. media: "visual",
  15860. inherited: false,
  15861. animationType: "discrete",
  15862. percentages: "no",
  15863. groups: [
  15864. "CSS Table"
  15865. ],
  15866. initial: "auto",
  15867. appliesto: "tableElements",
  15868. computed: "asSpecified",
  15869. order: "uniqueOrder",
  15870. status: "standard",
  15871. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/table-layout"
  15872. },
  15873. "text-align": {
  15874. syntax: "start | end | left | right | center | justify | match-parent",
  15875. media: "visual",
  15876. inherited: true,
  15877. animationType: "discrete",
  15878. percentages: "no",
  15879. groups: [
  15880. "CSS Text"
  15881. ],
  15882. initial: "startOrNamelessValueIfLTRRightIfRTL",
  15883. appliesto: "blockContainers",
  15884. computed: "asSpecifiedExceptMatchParent",
  15885. order: "orderOfAppearance",
  15886. alsoAppliesTo: [
  15887. "::placeholder"
  15888. ],
  15889. status: "standard",
  15890. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align"
  15891. },
  15892. "text-align-last": {
  15893. syntax: "auto | start | end | left | right | center | justify",
  15894. media: "visual",
  15895. inherited: true,
  15896. animationType: "discrete",
  15897. percentages: "no",
  15898. groups: [
  15899. "CSS Text"
  15900. ],
  15901. initial: "auto",
  15902. appliesto: "blockContainers",
  15903. computed: "asSpecified",
  15904. order: "uniqueOrder",
  15905. status: "standard",
  15906. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
  15907. },
  15908. "text-combine-upright": {
  15909. syntax: "none | all | [ digits <integer>? ]",
  15910. media: "visual",
  15911. inherited: true,
  15912. animationType: "notAnimatable",
  15913. percentages: "no",
  15914. groups: [
  15915. "CSS Writing Modes"
  15916. ],
  15917. initial: "none",
  15918. appliesto: "nonReplacedInlineElements",
  15919. computed: "keywordPlusIntegerIfDigits",
  15920. order: "uniqueOrder",
  15921. status: "standard",
  15922. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
  15923. },
  15924. "text-decoration": {
  15925. syntax: "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
  15926. media: "visual",
  15927. inherited: false,
  15928. animationType: [
  15929. "text-decoration-color",
  15930. "text-decoration-style",
  15931. "text-decoration-line",
  15932. "text-decoration-thickness"
  15933. ],
  15934. percentages: "no",
  15935. groups: [
  15936. "CSS Text Decoration"
  15937. ],
  15938. initial: [
  15939. "text-decoration-color",
  15940. "text-decoration-style",
  15941. "text-decoration-line"
  15942. ],
  15943. appliesto: "allElements",
  15944. computed: [
  15945. "text-decoration-line",
  15946. "text-decoration-style",
  15947. "text-decoration-color",
  15948. "text-decoration-thickness"
  15949. ],
  15950. order: "orderOfAppearance",
  15951. alsoAppliesTo: [
  15952. "::first-letter",
  15953. "::first-line",
  15954. "::placeholder"
  15955. ],
  15956. status: "standard",
  15957. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
  15958. },
  15959. "text-decoration-color": {
  15960. syntax: "<color>",
  15961. media: "visual",
  15962. inherited: false,
  15963. animationType: "color",
  15964. percentages: "no",
  15965. groups: [
  15966. "CSS Text Decoration"
  15967. ],
  15968. initial: "currentcolor",
  15969. appliesto: "allElements",
  15970. computed: "computedColor",
  15971. order: "uniqueOrder",
  15972. alsoAppliesTo: [
  15973. "::first-letter",
  15974. "::first-line",
  15975. "::placeholder"
  15976. ],
  15977. status: "standard",
  15978. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
  15979. },
  15980. "text-decoration-line": {
  15981. syntax: "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
  15982. media: "visual",
  15983. inherited: false,
  15984. animationType: "discrete",
  15985. percentages: "no",
  15986. groups: [
  15987. "CSS Text Decoration"
  15988. ],
  15989. initial: "none",
  15990. appliesto: "allElements",
  15991. computed: "asSpecified",
  15992. order: "orderOfAppearance",
  15993. alsoAppliesTo: [
  15994. "::first-letter",
  15995. "::first-line",
  15996. "::placeholder"
  15997. ],
  15998. status: "standard",
  15999. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
  16000. },
  16001. "text-decoration-skip": {
  16002. syntax: "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
  16003. media: "visual",
  16004. inherited: true,
  16005. animationType: "discrete",
  16006. percentages: "no",
  16007. groups: [
  16008. "CSS Text Decoration"
  16009. ],
  16010. initial: "objects",
  16011. appliesto: "allElements",
  16012. computed: "asSpecified",
  16013. order: "orderOfAppearance",
  16014. status: "experimental",
  16015. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
  16016. },
  16017. "text-decoration-skip-ink": {
  16018. syntax: "auto | all | none",
  16019. media: "visual",
  16020. inherited: true,
  16021. animationType: "discrete",
  16022. percentages: "no",
  16023. groups: [
  16024. "CSS Text Decoration"
  16025. ],
  16026. initial: "auto",
  16027. appliesto: "allElements",
  16028. computed: "asSpecified",
  16029. order: "orderOfAppearance",
  16030. status: "standard",
  16031. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
  16032. },
  16033. "text-decoration-style": {
  16034. syntax: "solid | double | dotted | dashed | wavy",
  16035. media: "visual",
  16036. inherited: false,
  16037. animationType: "discrete",
  16038. percentages: "no",
  16039. groups: [
  16040. "CSS Text Decoration"
  16041. ],
  16042. initial: "solid",
  16043. appliesto: "allElements",
  16044. computed: "asSpecified",
  16045. order: "uniqueOrder",
  16046. alsoAppliesTo: [
  16047. "::first-letter",
  16048. "::first-line",
  16049. "::placeholder"
  16050. ],
  16051. status: "standard",
  16052. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
  16053. },
  16054. "text-decoration-thickness": {
  16055. syntax: "auto | from-font | <length> | <percentage> ",
  16056. media: "visual",
  16057. inherited: false,
  16058. animationType: "byComputedValueType",
  16059. percentages: "referToElementFontSize",
  16060. groups: [
  16061. "CSS Text Decoration"
  16062. ],
  16063. initial: "auto",
  16064. appliesto: "allElements",
  16065. computed: "asSpecified",
  16066. order: "uniqueOrder",
  16067. alsoAppliesTo: [
  16068. "::first-letter",
  16069. "::first-line",
  16070. "::placeholder"
  16071. ],
  16072. status: "standard",
  16073. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
  16074. },
  16075. "text-emphasis": {
  16076. syntax: "<'text-emphasis-style'> || <'text-emphasis-color'>",
  16077. media: "visual",
  16078. inherited: false,
  16079. animationType: [
  16080. "text-emphasis-color",
  16081. "text-emphasis-style"
  16082. ],
  16083. percentages: "no",
  16084. groups: [
  16085. "CSS Text Decoration"
  16086. ],
  16087. initial: [
  16088. "text-emphasis-style",
  16089. "text-emphasis-color"
  16090. ],
  16091. appliesto: "allElements",
  16092. computed: [
  16093. "text-emphasis-style",
  16094. "text-emphasis-color"
  16095. ],
  16096. order: "orderOfAppearance",
  16097. status: "standard",
  16098. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
  16099. },
  16100. "text-emphasis-color": {
  16101. syntax: "<color>",
  16102. media: "visual",
  16103. inherited: false,
  16104. animationType: "color",
  16105. percentages: "no",
  16106. groups: [
  16107. "CSS Text Decoration"
  16108. ],
  16109. initial: "currentcolor",
  16110. appliesto: "allElements",
  16111. computed: "computedColor",
  16112. order: "uniqueOrder",
  16113. status: "standard",
  16114. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
  16115. },
  16116. "text-emphasis-position": {
  16117. syntax: "[ over | under ] && [ right | left ]",
  16118. media: "visual",
  16119. inherited: false,
  16120. animationType: "discrete",
  16121. percentages: "no",
  16122. groups: [
  16123. "CSS Text Decoration"
  16124. ],
  16125. initial: "over right",
  16126. appliesto: "allElements",
  16127. computed: "asSpecified",
  16128. order: "uniqueOrder",
  16129. status: "standard",
  16130. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
  16131. },
  16132. "text-emphasis-style": {
  16133. syntax: "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
  16134. media: "visual",
  16135. inherited: false,
  16136. animationType: "discrete",
  16137. percentages: "no",
  16138. groups: [
  16139. "CSS Text Decoration"
  16140. ],
  16141. initial: "none",
  16142. appliesto: "allElements",
  16143. computed: "asSpecified",
  16144. order: "uniqueOrder",
  16145. status: "standard",
  16146. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
  16147. },
  16148. "text-indent": {
  16149. syntax: "<length-percentage> && hanging? && each-line?",
  16150. media: "visual",
  16151. inherited: true,
  16152. animationType: "lpc",
  16153. percentages: "referToWidthOfContainingBlock",
  16154. groups: [
  16155. "CSS Text"
  16156. ],
  16157. initial: "0",
  16158. appliesto: "blockContainers",
  16159. computed: "percentageOrAbsoluteLengthPlusKeywords",
  16160. order: "lengthOrPercentageBeforeKeywords",
  16161. status: "standard",
  16162. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-indent"
  16163. },
  16164. "text-justify": {
  16165. syntax: "auto | inter-character | inter-word | none",
  16166. media: "visual",
  16167. inherited: true,
  16168. animationType: "discrete",
  16169. percentages: "no",
  16170. groups: [
  16171. "CSS Text"
  16172. ],
  16173. initial: "auto",
  16174. appliesto: "inlineLevelAndTableCellElements",
  16175. computed: "asSpecified",
  16176. order: "uniqueOrder",
  16177. status: "standard",
  16178. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-justify"
  16179. },
  16180. "text-orientation": {
  16181. syntax: "mixed | upright | sideways",
  16182. media: "visual",
  16183. inherited: true,
  16184. animationType: "discrete",
  16185. percentages: "no",
  16186. groups: [
  16187. "CSS Writing Modes"
  16188. ],
  16189. initial: "mixed",
  16190. appliesto: "allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns",
  16191. computed: "asSpecified",
  16192. order: "uniqueOrder",
  16193. status: "standard",
  16194. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
  16195. },
  16196. "text-overflow": {
  16197. syntax: "[ clip | ellipsis | <string> ]{1,2}",
  16198. media: "visual",
  16199. inherited: false,
  16200. animationType: "discrete",
  16201. percentages: "no",
  16202. groups: [
  16203. "CSS Basic User Interface"
  16204. ],
  16205. initial: "clip",
  16206. appliesto: "blockContainerElements",
  16207. computed: "asSpecified",
  16208. order: "uniqueOrder",
  16209. alsoAppliesTo: [
  16210. "::placeholder"
  16211. ],
  16212. status: "standard",
  16213. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
  16214. },
  16215. "text-rendering": {
  16216. syntax: "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
  16217. media: "visual",
  16218. inherited: true,
  16219. animationType: "discrete",
  16220. percentages: "no",
  16221. groups: [
  16222. "CSS Miscellaneous"
  16223. ],
  16224. initial: "auto",
  16225. appliesto: "textElements",
  16226. computed: "asSpecified",
  16227. order: "uniqueOrder",
  16228. status: "standard",
  16229. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
  16230. },
  16231. "text-shadow": {
  16232. syntax: "none | <shadow-t>#",
  16233. media: "visual",
  16234. inherited: true,
  16235. animationType: "shadowList",
  16236. percentages: "no",
  16237. groups: [
  16238. "CSS Text Decoration"
  16239. ],
  16240. initial: "none",
  16241. appliesto: "allElements",
  16242. computed: "colorPlusThreeAbsoluteLengths",
  16243. order: "uniqueOrder",
  16244. alsoAppliesTo: [
  16245. "::first-letter",
  16246. "::first-line",
  16247. "::placeholder"
  16248. ],
  16249. status: "standard",
  16250. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
  16251. },
  16252. "text-size-adjust": {
  16253. syntax: "none | auto | <percentage>",
  16254. media: "visual",
  16255. inherited: true,
  16256. animationType: "discrete",
  16257. percentages: "referToSizeOfFont",
  16258. groups: [
  16259. "CSS Text"
  16260. ],
  16261. initial: "autoForSmartphoneBrowsersSupportingInflation",
  16262. appliesto: "allElements",
  16263. computed: "asSpecified",
  16264. order: "uniqueOrder",
  16265. status: "experimental",
  16266. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
  16267. },
  16268. "text-transform": {
  16269. syntax: "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
  16270. media: "visual",
  16271. inherited: true,
  16272. animationType: "discrete",
  16273. percentages: "no",
  16274. groups: [
  16275. "CSS Text"
  16276. ],
  16277. initial: "none",
  16278. appliesto: "allElements",
  16279. computed: "asSpecified",
  16280. order: "uniqueOrder",
  16281. alsoAppliesTo: [
  16282. "::first-letter",
  16283. "::first-line",
  16284. "::placeholder"
  16285. ],
  16286. status: "standard",
  16287. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-transform"
  16288. },
  16289. "text-underline-offset": {
  16290. syntax: "auto | <length> | <percentage> ",
  16291. media: "visual",
  16292. inherited: true,
  16293. animationType: "byComputedValueType",
  16294. percentages: "referToElementFontSize",
  16295. groups: [
  16296. "CSS Text Decoration"
  16297. ],
  16298. initial: "auto",
  16299. appliesto: "allElements",
  16300. computed: "asSpecified",
  16301. order: "uniqueOrder",
  16302. alsoAppliesTo: [
  16303. "::first-letter",
  16304. "::first-line",
  16305. "::placeholder"
  16306. ],
  16307. status: "standard",
  16308. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
  16309. },
  16310. "text-underline-position": {
  16311. syntax: "auto | from-font | [ under || [ left | right ] ]",
  16312. media: "visual",
  16313. inherited: true,
  16314. animationType: "discrete",
  16315. percentages: "no",
  16316. groups: [
  16317. "CSS Text Decoration"
  16318. ],
  16319. initial: "auto",
  16320. appliesto: "allElements",
  16321. computed: "asSpecified",
  16322. order: "orderOfAppearance",
  16323. status: "standard",
  16324. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
  16325. },
  16326. top: top,
  16327. "touch-action": {
  16328. syntax: "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
  16329. media: "visual",
  16330. inherited: false,
  16331. animationType: "discrete",
  16332. percentages: "no",
  16333. groups: [
  16334. "Pointer Events"
  16335. ],
  16336. initial: "auto",
  16337. appliesto: "allElementsExceptNonReplacedInlineElementsTableRowsColumnsRowColumnGroups",
  16338. computed: "asSpecified",
  16339. order: "uniqueOrder",
  16340. status: "standard",
  16341. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/touch-action"
  16342. },
  16343. transform: transform,
  16344. "transform-box": {
  16345. syntax: "content-box | border-box | fill-box | stroke-box | view-box",
  16346. media: "visual",
  16347. inherited: false,
  16348. animationType: "discrete",
  16349. percentages: "no",
  16350. groups: [
  16351. "CSS Transforms"
  16352. ],
  16353. initial: "view-box",
  16354. appliesto: "transformableElements",
  16355. computed: "asSpecified",
  16356. order: "perGrammar",
  16357. status: "standard",
  16358. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-box"
  16359. },
  16360. "transform-origin": {
  16361. syntax: "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
  16362. media: "visual",
  16363. inherited: false,
  16364. animationType: "simpleListOfLpc",
  16365. percentages: "referToSizeOfBoundingBox",
  16366. groups: [
  16367. "CSS Transforms"
  16368. ],
  16369. initial: "50% 50% 0",
  16370. appliesto: "transformableElements",
  16371. computed: "forLengthAbsoluteValueOtherwisePercentage",
  16372. order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
  16373. status: "standard",
  16374. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
  16375. },
  16376. "transform-style": {
  16377. syntax: "flat | preserve-3d",
  16378. media: "visual",
  16379. inherited: false,
  16380. animationType: "discrete",
  16381. percentages: "no",
  16382. groups: [
  16383. "CSS Transforms"
  16384. ],
  16385. initial: "flat",
  16386. appliesto: "transformableElements",
  16387. computed: "asSpecified",
  16388. order: "uniqueOrder",
  16389. stacking: true,
  16390. status: "standard",
  16391. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-style"
  16392. },
  16393. transition: transition,
  16394. "transition-delay": {
  16395. syntax: "<time>#",
  16396. media: "interactive",
  16397. inherited: false,
  16398. animationType: "discrete",
  16399. percentages: "no",
  16400. groups: [
  16401. "CSS Transitions"
  16402. ],
  16403. initial: "0s",
  16404. appliesto: "allElementsAndPseudos",
  16405. computed: "asSpecified",
  16406. order: "uniqueOrder",
  16407. status: "standard",
  16408. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
  16409. },
  16410. "transition-duration": {
  16411. syntax: "<time>#",
  16412. media: "interactive",
  16413. inherited: false,
  16414. animationType: "discrete",
  16415. percentages: "no",
  16416. groups: [
  16417. "CSS Transitions"
  16418. ],
  16419. initial: "0s",
  16420. appliesto: "allElementsAndPseudos",
  16421. computed: "asSpecified",
  16422. order: "uniqueOrder",
  16423. status: "standard",
  16424. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
  16425. },
  16426. "transition-property": {
  16427. syntax: "none | <single-transition-property>#",
  16428. media: "visual",
  16429. inherited: false,
  16430. animationType: "discrete",
  16431. percentages: "no",
  16432. groups: [
  16433. "CSS Transitions"
  16434. ],
  16435. initial: "all",
  16436. appliesto: "allElementsAndPseudos",
  16437. computed: "asSpecified",
  16438. order: "uniqueOrder",
  16439. status: "standard",
  16440. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-property"
  16441. },
  16442. "transition-timing-function": {
  16443. syntax: "<timing-function>#",
  16444. media: "interactive",
  16445. inherited: false,
  16446. animationType: "discrete",
  16447. percentages: "no",
  16448. groups: [
  16449. "CSS Transitions"
  16450. ],
  16451. initial: "ease",
  16452. appliesto: "allElementsAndPseudos",
  16453. computed: "asSpecified",
  16454. order: "uniqueOrder",
  16455. status: "standard",
  16456. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
  16457. },
  16458. translate: translate,
  16459. "unicode-bidi": {
  16460. syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext",
  16461. media: "visual",
  16462. inherited: false,
  16463. animationType: "discrete",
  16464. percentages: "no",
  16465. groups: [
  16466. "CSS Writing Modes"
  16467. ],
  16468. initial: "normal",
  16469. appliesto: "allElementsSomeValuesNoEffectOnNonInlineElements",
  16470. computed: "asSpecified",
  16471. order: "uniqueOrder",
  16472. status: "standard",
  16473. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
  16474. },
  16475. "user-select": {
  16476. syntax: "auto | text | none | contain | all",
  16477. media: "visual",
  16478. inherited: false,
  16479. animationType: "discrete",
  16480. percentages: "no",
  16481. groups: [
  16482. "CSS Basic User Interface"
  16483. ],
  16484. initial: "auto",
  16485. appliesto: "allElements",
  16486. computed: "asSpecified",
  16487. order: "uniqueOrder",
  16488. status: "nonstandard",
  16489. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/user-select"
  16490. },
  16491. "vertical-align": {
  16492. syntax: "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
  16493. media: "visual",
  16494. inherited: false,
  16495. animationType: "length",
  16496. percentages: "referToLineHeight",
  16497. groups: [
  16498. "CSS Table"
  16499. ],
  16500. initial: "baseline",
  16501. appliesto: "inlineLevelAndTableCellElements",
  16502. computed: "absoluteLengthOrKeyword",
  16503. order: "uniqueOrder",
  16504. alsoAppliesTo: [
  16505. "::first-letter",
  16506. "::first-line",
  16507. "::placeholder"
  16508. ],
  16509. status: "standard",
  16510. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
  16511. },
  16512. visibility: visibility,
  16513. "white-space": {
  16514. syntax: "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
  16515. media: "visual",
  16516. inherited: true,
  16517. animationType: "discrete",
  16518. percentages: "no",
  16519. groups: [
  16520. "CSS Text"
  16521. ],
  16522. initial: "normal",
  16523. appliesto: "allElements",
  16524. computed: "asSpecified",
  16525. order: "uniqueOrder",
  16526. status: "standard",
  16527. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/white-space"
  16528. },
  16529. widows: widows,
  16530. width: width,
  16531. "will-change": {
  16532. syntax: "auto | <animateable-feature>#",
  16533. media: "all",
  16534. inherited: false,
  16535. animationType: "discrete",
  16536. percentages: "no",
  16537. groups: [
  16538. "CSS Will Change"
  16539. ],
  16540. initial: "auto",
  16541. appliesto: "allElements",
  16542. computed: "asSpecified",
  16543. order: "uniqueOrder",
  16544. status: "standard",
  16545. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/will-change"
  16546. },
  16547. "word-break": {
  16548. syntax: "normal | break-all | keep-all | break-word",
  16549. media: "visual",
  16550. inherited: true,
  16551. animationType: "discrete",
  16552. percentages: "no",
  16553. groups: [
  16554. "CSS Text"
  16555. ],
  16556. initial: "normal",
  16557. appliesto: "allElements",
  16558. computed: "asSpecified",
  16559. order: "uniqueOrder",
  16560. status: "standard",
  16561. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-break"
  16562. },
  16563. "word-spacing": {
  16564. syntax: "normal | <length-percentage>",
  16565. media: "visual",
  16566. inherited: true,
  16567. animationType: "length",
  16568. percentages: "referToWidthOfAffectedGlyph",
  16569. groups: [
  16570. "CSS Text"
  16571. ],
  16572. initial: "normal",
  16573. appliesto: "allElements",
  16574. computed: "optimumMinAndMaxValueOfAbsoluteLengthPercentageOrNormal",
  16575. order: "uniqueOrder",
  16576. alsoAppliesTo: [
  16577. "::first-letter",
  16578. "::first-line",
  16579. "::placeholder"
  16580. ],
  16581. status: "standard",
  16582. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
  16583. },
  16584. "word-wrap": {
  16585. syntax: "normal | break-word",
  16586. media: "visual",
  16587. inherited: true,
  16588. animationType: "discrete",
  16589. percentages: "no",
  16590. groups: [
  16591. "CSS Text"
  16592. ],
  16593. initial: "normal",
  16594. appliesto: "nonReplacedInlineElements",
  16595. computed: "asSpecified",
  16596. order: "uniqueOrder",
  16597. status: "standard",
  16598. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
  16599. },
  16600. "writing-mode": {
  16601. syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
  16602. media: "visual",
  16603. inherited: true,
  16604. animationType: "discrete",
  16605. percentages: "no",
  16606. groups: [
  16607. "CSS Writing Modes"
  16608. ],
  16609. initial: "horizontal-tb",
  16610. appliesto: "allElementsExceptTableRowColumnGroupsTableRowsColumns",
  16611. computed: "asSpecified",
  16612. order: "uniqueOrder",
  16613. status: "standard",
  16614. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
  16615. },
  16616. "z-index": {
  16617. syntax: "auto | <integer>",
  16618. media: "visual",
  16619. inherited: false,
  16620. animationType: "integer",
  16621. percentages: "no",
  16622. groups: [
  16623. "CSS Positioning"
  16624. ],
  16625. initial: "auto",
  16626. appliesto: "positionedElements",
  16627. computed: "asSpecified",
  16628. order: "uniqueOrder",
  16629. stacking: true,
  16630. status: "standard",
  16631. mdn_url: "https://developer.mozilla.org/docs/Web/CSS/z-index"
  16632. },
  16633. zoom: zoom
  16634. };
  16635. var properties$2 = /*#__PURE__*/Object.freeze({
  16636. __proto__: null,
  16637. all: all,
  16638. animation: animation,
  16639. appearance: appearance,
  16640. azimuth: azimuth,
  16641. background: background,
  16642. border: border,
  16643. bottom: bottom,
  16644. clear: clear,
  16645. clip: clip,
  16646. color: color,
  16647. columns: columns,
  16648. contain: contain,
  16649. content: content,
  16650. cursor: cursor,
  16651. direction: direction,
  16652. display: display,
  16653. filter: filter,
  16654. flex: flex,
  16655. float: float,
  16656. font: font,
  16657. gap: gap,
  16658. grid: grid,
  16659. height: height,
  16660. hyphens: hyphens,
  16661. inset: inset,
  16662. isolation: isolation,
  16663. left: left,
  16664. margin: margin,
  16665. mask: mask,
  16666. offset: offset,
  16667. opacity: opacity,
  16668. order: order,
  16669. orphans: orphans,
  16670. outline: outline,
  16671. overflow: overflow,
  16672. padding: padding,
  16673. perspective: perspective,
  16674. position: position,
  16675. quotes: quotes,
  16676. resize: resize,
  16677. right: right,
  16678. rotate: rotate,
  16679. scale: scale,
  16680. top: top,
  16681. transform: transform,
  16682. transition: transition,
  16683. translate: translate,
  16684. visibility: visibility,
  16685. widows: widows,
  16686. width: width,
  16687. zoom: zoom,
  16688. 'default': properties$1
  16689. });
  16690. var attachment = {
  16691. syntax: "scroll | fixed | local"
  16692. };
  16693. var box = {
  16694. syntax: "border-box | padding-box | content-box"
  16695. };
  16696. var color$1 = {
  16697. syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>"
  16698. };
  16699. var combinator = {
  16700. syntax: "'>' | '+' | '~' | [ '||' ]"
  16701. };
  16702. var gradient = {
  16703. syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>"
  16704. };
  16705. var hue = {
  16706. syntax: "<number> | <angle>"
  16707. };
  16708. var image = {
  16709. syntax: "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"
  16710. };
  16711. var nth = {
  16712. syntax: "<an-plus-b> | even | odd"
  16713. };
  16714. var position$1 = {
  16715. syntax: "[ [ left | center | right ] || [ top | center | bottom ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]? | [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]"
  16716. };
  16717. var quote = {
  16718. syntax: "open-quote | close-quote | no-open-quote | no-close-quote"
  16719. };
  16720. var shadow = {
  16721. syntax: "inset? && <length>{2,4} && <color>?"
  16722. };
  16723. var shape$1 = {
  16724. syntax: "rect(<top>, <right>, <bottom>, <left>)"
  16725. };
  16726. var size = {
  16727. syntax: "closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"
  16728. };
  16729. var symbol = {
  16730. syntax: "<string> | <image> | <custom-ident>"
  16731. };
  16732. var target = {
  16733. syntax: "<target-counter()> | <target-counters()> | <target-text()>"
  16734. };
  16735. var syntaxes = {
  16736. "absolute-size": {
  16737. syntax: "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large"
  16738. },
  16739. "alpha-value": {
  16740. syntax: "<number> | <percentage>"
  16741. },
  16742. "angle-percentage": {
  16743. syntax: "<angle> | <percentage>"
  16744. },
  16745. "angular-color-hint": {
  16746. syntax: "<angle-percentage>"
  16747. },
  16748. "angular-color-stop": {
  16749. syntax: "<color> && <color-stop-angle>?"
  16750. },
  16751. "angular-color-stop-list": {
  16752. syntax: "[ <angular-color-stop> [, <angular-color-hint>]? ]# , <angular-color-stop>"
  16753. },
  16754. "animateable-feature": {
  16755. syntax: "scroll-position | contents | <custom-ident>"
  16756. },
  16757. attachment: attachment,
  16758. "attr()": {
  16759. syntax: "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )"
  16760. },
  16761. "attr-matcher": {
  16762. syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='"
  16763. },
  16764. "attr-modifier": {
  16765. syntax: "i | s"
  16766. },
  16767. "attribute-selector": {
  16768. syntax: "'[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'"
  16769. },
  16770. "auto-repeat": {
  16771. syntax: "repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
  16772. },
  16773. "auto-track-list": {
  16774. syntax: "[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>? <auto-repeat>\n[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?"
  16775. },
  16776. "baseline-position": {
  16777. syntax: "[ first | last ]? baseline"
  16778. },
  16779. "basic-shape": {
  16780. syntax: "<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>"
  16781. },
  16782. "bg-image": {
  16783. syntax: "none | <image>"
  16784. },
  16785. "bg-layer": {
  16786. syntax: "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
  16787. },
  16788. "bg-position": {
  16789. syntax: "[ [ left | center | right | top | bottom | <length-percentage> ] | [ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ] | [ center | [ left | right ] <length-percentage>? ] && [ center | [ top | bottom ] <length-percentage>? ] ]"
  16790. },
  16791. "bg-size": {
  16792. syntax: "[ <length-percentage> | auto ]{1,2} | cover | contain"
  16793. },
  16794. "blur()": {
  16795. syntax: "blur( <length> )"
  16796. },
  16797. "blend-mode": {
  16798. syntax: "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
  16799. },
  16800. box: box,
  16801. "brightness()": {
  16802. syntax: "brightness( <number-percentage> )"
  16803. },
  16804. "calc()": {
  16805. syntax: "calc( <calc-sum> )"
  16806. },
  16807. "calc-sum": {
  16808. syntax: "<calc-product> [ [ '+' | '-' ] <calc-product> ]*"
  16809. },
  16810. "calc-product": {
  16811. syntax: "<calc-value> [ '*' <calc-value> | '/' <number> ]*"
  16812. },
  16813. "calc-value": {
  16814. syntax: "<number> | <dimension> | <percentage> | ( <calc-sum> )"
  16815. },
  16816. "cf-final-image": {
  16817. syntax: "<image> | <color>"
  16818. },
  16819. "cf-mixing-image": {
  16820. syntax: "<percentage>? && <image>"
  16821. },
  16822. "circle()": {
  16823. syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )"
  16824. },
  16825. "clamp()": {
  16826. syntax: "clamp( <calc-sum>#{3} )"
  16827. },
  16828. "class-selector": {
  16829. syntax: "'.' <ident-token>"
  16830. },
  16831. "clip-source": {
  16832. syntax: "<url>"
  16833. },
  16834. color: color$1,
  16835. "color-stop": {
  16836. syntax: "<color-stop-length> | <color-stop-angle>"
  16837. },
  16838. "color-stop-angle": {
  16839. syntax: "<angle-percentage>{1,2}"
  16840. },
  16841. "color-stop-length": {
  16842. syntax: "<length-percentage>{1,2}"
  16843. },
  16844. "color-stop-list": {
  16845. syntax: "[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>"
  16846. },
  16847. combinator: combinator,
  16848. "common-lig-values": {
  16849. syntax: "[ common-ligatures | no-common-ligatures ]"
  16850. },
  16851. "compat-auto": {
  16852. syntax: "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button"
  16853. },
  16854. "composite-style": {
  16855. syntax: "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor"
  16856. },
  16857. "compositing-operator": {
  16858. syntax: "add | subtract | intersect | exclude"
  16859. },
  16860. "compound-selector": {
  16861. syntax: "[ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!"
  16862. },
  16863. "compound-selector-list": {
  16864. syntax: "<compound-selector>#"
  16865. },
  16866. "complex-selector": {
  16867. syntax: "<compound-selector> [ <combinator>? <compound-selector> ]*"
  16868. },
  16869. "complex-selector-list": {
  16870. syntax: "<complex-selector>#"
  16871. },
  16872. "conic-gradient()": {
  16873. syntax: "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )"
  16874. },
  16875. "contextual-alt-values": {
  16876. syntax: "[ contextual | no-contextual ]"
  16877. },
  16878. "content-distribution": {
  16879. syntax: "space-between | space-around | space-evenly | stretch"
  16880. },
  16881. "content-list": {
  16882. syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> ]+"
  16883. },
  16884. "content-position": {
  16885. syntax: "center | start | end | flex-start | flex-end"
  16886. },
  16887. "content-replacement": {
  16888. syntax: "<image>"
  16889. },
  16890. "contrast()": {
  16891. syntax: "contrast( [ <number-percentage> ] )"
  16892. },
  16893. "counter()": {
  16894. syntax: "counter( <custom-ident>, <counter-style>? )"
  16895. },
  16896. "counter-style": {
  16897. syntax: "<counter-style-name> | symbols()"
  16898. },
  16899. "counter-style-name": {
  16900. syntax: "<custom-ident>"
  16901. },
  16902. "counters()": {
  16903. syntax: "counters( <custom-ident>, <string>, <counter-style>? )"
  16904. },
  16905. "cross-fade()": {
  16906. syntax: "cross-fade( <cf-mixing-image> , <cf-final-image>? )"
  16907. },
  16908. "cubic-bezier-timing-function": {
  16909. syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
  16910. },
  16911. "deprecated-system-color": {
  16912. syntax: "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"
  16913. },
  16914. "discretionary-lig-values": {
  16915. syntax: "[ discretionary-ligatures | no-discretionary-ligatures ]"
  16916. },
  16917. "display-box": {
  16918. syntax: "contents | none"
  16919. },
  16920. "display-inside": {
  16921. syntax: "flow | flow-root | table | flex | grid | ruby"
  16922. },
  16923. "display-internal": {
  16924. syntax: "table-row-group | table-header-group | table-footer-group | table-row | table-cell | table-column-group | table-column | table-caption | ruby-base | ruby-text | ruby-base-container | ruby-text-container"
  16925. },
  16926. "display-legacy": {
  16927. syntax: "inline-block | inline-list-item | inline-table | inline-flex | inline-grid"
  16928. },
  16929. "display-listitem": {
  16930. syntax: "<display-outside>? && [ flow | flow-root ]? && list-item"
  16931. },
  16932. "display-outside": {
  16933. syntax: "block | inline | run-in"
  16934. },
  16935. "drop-shadow()": {
  16936. syntax: "drop-shadow( <length>{2,3} <color>? )"
  16937. },
  16938. "east-asian-variant-values": {
  16939. syntax: "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]"
  16940. },
  16941. "east-asian-width-values": {
  16942. syntax: "[ full-width | proportional-width ]"
  16943. },
  16944. "element()": {
  16945. syntax: "element( <id-selector> )"
  16946. },
  16947. "ellipse()": {
  16948. syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"
  16949. },
  16950. "ending-shape": {
  16951. syntax: "circle | ellipse"
  16952. },
  16953. "env()": {
  16954. syntax: "env( <custom-ident> , <declaration-value>? )"
  16955. },
  16956. "explicit-track-list": {
  16957. syntax: "[ <line-names>? <track-size> ]+ <line-names>?"
  16958. },
  16959. "family-name": {
  16960. syntax: "<string> | <custom-ident>+"
  16961. },
  16962. "feature-tag-value": {
  16963. syntax: "<string> [ <integer> | on | off ]?"
  16964. },
  16965. "feature-type": {
  16966. syntax: "@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation"
  16967. },
  16968. "feature-value-block": {
  16969. syntax: "<feature-type> '{' <feature-value-declaration-list> '}'"
  16970. },
  16971. "feature-value-block-list": {
  16972. syntax: "<feature-value-block>+"
  16973. },
  16974. "feature-value-declaration": {
  16975. syntax: "<custom-ident>: <integer>+;"
  16976. },
  16977. "feature-value-declaration-list": {
  16978. syntax: "<feature-value-declaration>"
  16979. },
  16980. "feature-value-name": {
  16981. syntax: "<custom-ident>"
  16982. },
  16983. "fill-rule": {
  16984. syntax: "nonzero | evenodd"
  16985. },
  16986. "filter-function": {
  16987. syntax: "<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>"
  16988. },
  16989. "filter-function-list": {
  16990. syntax: "[ <filter-function> | <url> ]+"
  16991. },
  16992. "final-bg-layer": {
  16993. syntax: "<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
  16994. },
  16995. "fit-content()": {
  16996. syntax: "fit-content( [ <length> | <percentage> ] )"
  16997. },
  16998. "fixed-breadth": {
  16999. syntax: "<length-percentage>"
  17000. },
  17001. "fixed-repeat": {
  17002. syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
  17003. },
  17004. "fixed-size": {
  17005. syntax: "<fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )"
  17006. },
  17007. "font-stretch-absolute": {
  17008. syntax: "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage>"
  17009. },
  17010. "font-variant-css21": {
  17011. syntax: "[ normal | small-caps ]"
  17012. },
  17013. "font-weight-absolute": {
  17014. syntax: "normal | bold | <number [1,1000]>"
  17015. },
  17016. "frequency-percentage": {
  17017. syntax: "<frequency> | <percentage>"
  17018. },
  17019. "general-enclosed": {
  17020. syntax: "[ <function-token> <any-value> ) ] | ( <ident> <any-value> )"
  17021. },
  17022. "generic-family": {
  17023. syntax: "serif | sans-serif | cursive | fantasy | monospace"
  17024. },
  17025. "generic-name": {
  17026. syntax: "serif | sans-serif | cursive | fantasy | monospace"
  17027. },
  17028. "geometry-box": {
  17029. syntax: "<shape-box> | fill-box | stroke-box | view-box"
  17030. },
  17031. gradient: gradient,
  17032. "grayscale()": {
  17033. syntax: "grayscale( <number-percentage> )"
  17034. },
  17035. "grid-line": {
  17036. syntax: "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"
  17037. },
  17038. "historical-lig-values": {
  17039. syntax: "[ historical-ligatures | no-historical-ligatures ]"
  17040. },
  17041. "hsl()": {
  17042. syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"
  17043. },
  17044. "hsla()": {
  17045. syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"
  17046. },
  17047. hue: hue,
  17048. "hue-rotate()": {
  17049. syntax: "hue-rotate( <angle> )"
  17050. },
  17051. "id-selector": {
  17052. syntax: "<hash-token>"
  17053. },
  17054. image: image,
  17055. "image()": {
  17056. syntax: "image( <image-tags>? [ <image-src>? , <color>? ]! )"
  17057. },
  17058. "image-set()": {
  17059. syntax: "image-set( <image-set-option># )"
  17060. },
  17061. "image-set-option": {
  17062. syntax: "[ <image> | <string> ] <resolution>"
  17063. },
  17064. "image-src": {
  17065. syntax: "<url> | <string>"
  17066. },
  17067. "image-tags": {
  17068. syntax: "ltr | rtl"
  17069. },
  17070. "inflexible-breadth": {
  17071. syntax: "<length> | <percentage> | min-content | max-content | auto"
  17072. },
  17073. "inset()": {
  17074. syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
  17075. },
  17076. "invert()": {
  17077. syntax: "invert( <number-percentage> )"
  17078. },
  17079. "keyframes-name": {
  17080. syntax: "<custom-ident> | <string>"
  17081. },
  17082. "keyframe-block": {
  17083. syntax: "<keyframe-selector># {\n <declaration-list>\n}"
  17084. },
  17085. "keyframe-block-list": {
  17086. syntax: "<keyframe-block>+"
  17087. },
  17088. "keyframe-selector": {
  17089. syntax: "from | to | <percentage>"
  17090. },
  17091. "leader()": {
  17092. syntax: "leader( <leader-type> )"
  17093. },
  17094. "leader-type": {
  17095. syntax: "dotted | solid | space | <string>"
  17096. },
  17097. "length-percentage": {
  17098. syntax: "<length> | <percentage>"
  17099. },
  17100. "line-names": {
  17101. syntax: "'[' <custom-ident>* ']'"
  17102. },
  17103. "line-name-list": {
  17104. syntax: "[ <line-names> | <name-repeat> ]+"
  17105. },
  17106. "line-style": {
  17107. syntax: "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset"
  17108. },
  17109. "line-width": {
  17110. syntax: "<length> | thin | medium | thick"
  17111. },
  17112. "linear-color-hint": {
  17113. syntax: "<length-percentage>"
  17114. },
  17115. "linear-color-stop": {
  17116. syntax: "<color> <color-stop-length>?"
  17117. },
  17118. "linear-gradient()": {
  17119. syntax: "linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
  17120. },
  17121. "mask-layer": {
  17122. syntax: "<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>"
  17123. },
  17124. "mask-position": {
  17125. syntax: "[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?"
  17126. },
  17127. "mask-reference": {
  17128. syntax: "none | <image> | <mask-source>"
  17129. },
  17130. "mask-source": {
  17131. syntax: "<url>"
  17132. },
  17133. "masking-mode": {
  17134. syntax: "alpha | luminance | match-source"
  17135. },
  17136. "matrix()": {
  17137. syntax: "matrix( <number>#{6} )"
  17138. },
  17139. "matrix3d()": {
  17140. syntax: "matrix3d( <number>#{16} )"
  17141. },
  17142. "max()": {
  17143. syntax: "max( <calc-sum># )"
  17144. },
  17145. "media-and": {
  17146. syntax: "<media-in-parens> [ and <media-in-parens> ]+"
  17147. },
  17148. "media-condition": {
  17149. syntax: "<media-not> | <media-and> | <media-or> | <media-in-parens>"
  17150. },
  17151. "media-condition-without-or": {
  17152. syntax: "<media-not> | <media-and> | <media-in-parens>"
  17153. },
  17154. "media-feature": {
  17155. syntax: "( [ <mf-plain> | <mf-boolean> | <mf-range> ] )"
  17156. },
  17157. "media-in-parens": {
  17158. syntax: "( <media-condition> ) | <media-feature> | <general-enclosed>"
  17159. },
  17160. "media-not": {
  17161. syntax: "not <media-in-parens>"
  17162. },
  17163. "media-or": {
  17164. syntax: "<media-in-parens> [ or <media-in-parens> ]+"
  17165. },
  17166. "media-query": {
  17167. syntax: "<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?"
  17168. },
  17169. "media-query-list": {
  17170. syntax: "<media-query>#"
  17171. },
  17172. "media-type": {
  17173. syntax: "<ident>"
  17174. },
  17175. "mf-boolean": {
  17176. syntax: "<mf-name>"
  17177. },
  17178. "mf-name": {
  17179. syntax: "<ident>"
  17180. },
  17181. "mf-plain": {
  17182. syntax: "<mf-name> : <mf-value>"
  17183. },
  17184. "mf-range": {
  17185. syntax: "<mf-name> [ '<' | '>' ]? '='? <mf-value>\n| <mf-value> [ '<' | '>' ]? '='? <mf-name>\n| <mf-value> '<' '='? <mf-name> '<' '='? <mf-value>\n| <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>"
  17186. },
  17187. "mf-value": {
  17188. syntax: "<number> | <dimension> | <ident> | <ratio>"
  17189. },
  17190. "min()": {
  17191. syntax: "min( <calc-sum># )"
  17192. },
  17193. "minmax()": {
  17194. syntax: "minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"
  17195. },
  17196. "named-color": {
  17197. syntax: "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen"
  17198. },
  17199. "namespace-prefix": {
  17200. syntax: "<ident>"
  17201. },
  17202. "ns-prefix": {
  17203. syntax: "[ <ident-token> | '*' ]? '|'"
  17204. },
  17205. "number-percentage": {
  17206. syntax: "<number> | <percentage>"
  17207. },
  17208. "numeric-figure-values": {
  17209. syntax: "[ lining-nums | oldstyle-nums ]"
  17210. },
  17211. "numeric-fraction-values": {
  17212. syntax: "[ diagonal-fractions | stacked-fractions ]"
  17213. },
  17214. "numeric-spacing-values": {
  17215. syntax: "[ proportional-nums | tabular-nums ]"
  17216. },
  17217. nth: nth,
  17218. "opacity()": {
  17219. syntax: "opacity( [ <number-percentage> ] )"
  17220. },
  17221. "overflow-position": {
  17222. syntax: "unsafe | safe"
  17223. },
  17224. "outline-radius": {
  17225. syntax: "<length> | <percentage>"
  17226. },
  17227. "page-body": {
  17228. syntax: "<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"
  17229. },
  17230. "page-margin-box": {
  17231. syntax: "<page-margin-box-type> '{' <declaration-list> '}'"
  17232. },
  17233. "page-margin-box-type": {
  17234. syntax: "@top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @left-top | @left-middle | @left-bottom | @right-top | @right-middle | @right-bottom"
  17235. },
  17236. "page-selector-list": {
  17237. syntax: "[ <page-selector># ]?"
  17238. },
  17239. "page-selector": {
  17240. syntax: "<pseudo-page>+ | <ident> <pseudo-page>*"
  17241. },
  17242. "path()": {
  17243. syntax: "path( [ <fill-rule>, ]? <string> )"
  17244. },
  17245. "paint()": {
  17246. syntax: "paint( <ident>, <declaration-value>? )"
  17247. },
  17248. "perspective()": {
  17249. syntax: "perspective( <length> )"
  17250. },
  17251. "polygon()": {
  17252. syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"
  17253. },
  17254. position: position$1,
  17255. "pseudo-class-selector": {
  17256. syntax: "':' <ident-token> | ':' <function-token> <any-value> ')'"
  17257. },
  17258. "pseudo-element-selector": {
  17259. syntax: "':' <pseudo-class-selector>"
  17260. },
  17261. "pseudo-page": {
  17262. syntax: ": [ left | right | first | blank ]"
  17263. },
  17264. quote: quote,
  17265. "radial-gradient()": {
  17266. syntax: "radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
  17267. },
  17268. "relative-selector": {
  17269. syntax: "<combinator>? <complex-selector>"
  17270. },
  17271. "relative-selector-list": {
  17272. syntax: "<relative-selector>#"
  17273. },
  17274. "relative-size": {
  17275. syntax: "larger | smaller"
  17276. },
  17277. "repeat-style": {
  17278. syntax: "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"
  17279. },
  17280. "repeating-linear-gradient()": {
  17281. syntax: "repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
  17282. },
  17283. "repeating-radial-gradient()": {
  17284. syntax: "repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
  17285. },
  17286. "rgb()": {
  17287. syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"
  17288. },
  17289. "rgba()": {
  17290. syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"
  17291. },
  17292. "rotate()": {
  17293. syntax: "rotate( [ <angle> | <zero> ] )"
  17294. },
  17295. "rotate3d()": {
  17296. syntax: "rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"
  17297. },
  17298. "rotateX()": {
  17299. syntax: "rotateX( [ <angle> | <zero> ] )"
  17300. },
  17301. "rotateY()": {
  17302. syntax: "rotateY( [ <angle> | <zero> ] )"
  17303. },
  17304. "rotateZ()": {
  17305. syntax: "rotateZ( [ <angle> | <zero> ] )"
  17306. },
  17307. "saturate()": {
  17308. syntax: "saturate( <number-percentage> )"
  17309. },
  17310. "scale()": {
  17311. syntax: "scale( <number> , <number>? )"
  17312. },
  17313. "scale3d()": {
  17314. syntax: "scale3d( <number> , <number> , <number> )"
  17315. },
  17316. "scaleX()": {
  17317. syntax: "scaleX( <number> )"
  17318. },
  17319. "scaleY()": {
  17320. syntax: "scaleY( <number> )"
  17321. },
  17322. "scaleZ()": {
  17323. syntax: "scaleZ( <number> )"
  17324. },
  17325. "self-position": {
  17326. syntax: "center | start | end | self-start | self-end | flex-start | flex-end"
  17327. },
  17328. "shape-radius": {
  17329. syntax: "<length-percentage> | closest-side | farthest-side"
  17330. },
  17331. "skew()": {
  17332. syntax: "skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"
  17333. },
  17334. "skewX()": {
  17335. syntax: "skewX( [ <angle> | <zero> ] )"
  17336. },
  17337. "skewY()": {
  17338. syntax: "skewY( [ <angle> | <zero> ] )"
  17339. },
  17340. "sepia()": {
  17341. syntax: "sepia( <number-percentage> )"
  17342. },
  17343. shadow: shadow,
  17344. "shadow-t": {
  17345. syntax: "[ <length>{2,3} && <color>? ]"
  17346. },
  17347. shape: shape$1,
  17348. "shape-box": {
  17349. syntax: "<box> | margin-box"
  17350. },
  17351. "side-or-corner": {
  17352. syntax: "[ left | right ] || [ top | bottom ]"
  17353. },
  17354. "single-animation": {
  17355. syntax: "<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"
  17356. },
  17357. "single-animation-direction": {
  17358. syntax: "normal | reverse | alternate | alternate-reverse"
  17359. },
  17360. "single-animation-fill-mode": {
  17361. syntax: "none | forwards | backwards | both"
  17362. },
  17363. "single-animation-iteration-count": {
  17364. syntax: "infinite | <number>"
  17365. },
  17366. "single-animation-play-state": {
  17367. syntax: "running | paused"
  17368. },
  17369. "single-transition": {
  17370. syntax: "[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"
  17371. },
  17372. "single-transition-property": {
  17373. syntax: "all | <custom-ident>"
  17374. },
  17375. size: size,
  17376. "step-position": {
  17377. syntax: "jump-start | jump-end | jump-none | jump-both | start | end"
  17378. },
  17379. "step-timing-function": {
  17380. syntax: "step-start | step-end | steps(<integer>[, <step-position>]?)"
  17381. },
  17382. "subclass-selector": {
  17383. syntax: "<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"
  17384. },
  17385. "supports-condition": {
  17386. syntax: "not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"
  17387. },
  17388. "supports-in-parens": {
  17389. syntax: "( <supports-condition> ) | <supports-feature> | <general-enclosed>"
  17390. },
  17391. "supports-feature": {
  17392. syntax: "<supports-decl> | <supports-selector-fn>"
  17393. },
  17394. "supports-decl": {
  17395. syntax: "( <declaration> )"
  17396. },
  17397. "supports-selector-fn": {
  17398. syntax: "selector( <complex-selector> )"
  17399. },
  17400. symbol: symbol,
  17401. target: target,
  17402. "target-counter()": {
  17403. syntax: "target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"
  17404. },
  17405. "target-counters()": {
  17406. syntax: "target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"
  17407. },
  17408. "target-text()": {
  17409. syntax: "target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"
  17410. },
  17411. "time-percentage": {
  17412. syntax: "<time> | <percentage>"
  17413. },
  17414. "timing-function": {
  17415. syntax: "linear | <cubic-bezier-timing-function> | <step-timing-function>"
  17416. },
  17417. "track-breadth": {
  17418. syntax: "<length-percentage> | <flex> | min-content | max-content | auto"
  17419. },
  17420. "track-list": {
  17421. syntax: "[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"
  17422. },
  17423. "track-repeat": {
  17424. syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"
  17425. },
  17426. "track-size": {
  17427. syntax: "<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"
  17428. },
  17429. "transform-function": {
  17430. syntax: "<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"
  17431. },
  17432. "transform-list": {
  17433. syntax: "<transform-function>+"
  17434. },
  17435. "translate()": {
  17436. syntax: "translate( <length-percentage> , <length-percentage>? )"
  17437. },
  17438. "translate3d()": {
  17439. syntax: "translate3d( <length-percentage> , <length-percentage> , <length> )"
  17440. },
  17441. "translateX()": {
  17442. syntax: "translateX( <length-percentage> )"
  17443. },
  17444. "translateY()": {
  17445. syntax: "translateY( <length-percentage> )"
  17446. },
  17447. "translateZ()": {
  17448. syntax: "translateZ( <length> )"
  17449. },
  17450. "type-or-unit": {
  17451. syntax: "string | color | url | integer | number | length | angle | time | frequency | cap | ch | em | ex | ic | lh | rlh | rem | vb | vi | vw | vh | vmin | vmax | mm | Q | cm | in | pt | pc | px | deg | grad | rad | turn | ms | s | Hz | kHz | %"
  17452. },
  17453. "type-selector": {
  17454. syntax: "<wq-name> | <ns-prefix>? '*'"
  17455. },
  17456. "var()": {
  17457. syntax: "var( <custom-property-name> , <declaration-value>? )"
  17458. },
  17459. "viewport-length": {
  17460. syntax: "auto | <length-percentage>"
  17461. },
  17462. "wq-name": {
  17463. syntax: "<ns-prefix>? <ident-token>"
  17464. }
  17465. };
  17466. var syntaxes$1 = /*#__PURE__*/Object.freeze({
  17467. __proto__: null,
  17468. attachment: attachment,
  17469. box: box,
  17470. color: color$1,
  17471. combinator: combinator,
  17472. gradient: gradient,
  17473. hue: hue,
  17474. image: image,
  17475. nth: nth,
  17476. position: position$1,
  17477. quote: quote,
  17478. shadow: shadow,
  17479. shape: shape$1,
  17480. size: size,
  17481. symbol: symbol,
  17482. target: target,
  17483. 'default': syntaxes
  17484. });
  17485. var properties$3 = {
  17486. "-moz-background-clip": {
  17487. comment: "deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
  17488. syntax: "padding | border"
  17489. },
  17490. "-moz-border-radius-bottomleft": {
  17491. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",
  17492. syntax: "<'border-bottom-left-radius'>"
  17493. },
  17494. "-moz-border-radius-bottomright": {
  17495. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
  17496. syntax: "<'border-bottom-right-radius'>"
  17497. },
  17498. "-moz-border-radius-topleft": {
  17499. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",
  17500. syntax: "<'border-top-left-radius'>"
  17501. },
  17502. "-moz-border-radius-topright": {
  17503. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
  17504. syntax: "<'border-bottom-right-radius'>"
  17505. },
  17506. "-moz-control-character-visibility": {
  17507. comment: "firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",
  17508. syntax: "visible | hidden"
  17509. },
  17510. "-moz-osx-font-smoothing": {
  17511. comment: "misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
  17512. syntax: "auto | grayscale"
  17513. },
  17514. "-moz-user-select": {
  17515. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
  17516. syntax: "none | text | all | -moz-none"
  17517. },
  17518. "-ms-flex-align": {
  17519. comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
  17520. syntax: "start | end | center | baseline | stretch"
  17521. },
  17522. "-ms-flex-item-align": {
  17523. comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
  17524. syntax: "auto | start | end | center | baseline | stretch"
  17525. },
  17526. "-ms-flex-line-pack": {
  17527. comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",
  17528. syntax: "start | end | center | justify | distribute | stretch"
  17529. },
  17530. "-ms-flex-negative": {
  17531. comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
  17532. syntax: "<'flex-shrink'>"
  17533. },
  17534. "-ms-flex-pack": {
  17535. comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",
  17536. syntax: "start | end | center | justify | distribute"
  17537. },
  17538. "-ms-flex-order": {
  17539. comment: "misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",
  17540. syntax: "<integer>"
  17541. },
  17542. "-ms-flex-positive": {
  17543. comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
  17544. syntax: "<'flex-grow'>"
  17545. },
  17546. "-ms-flex-preferred-size": {
  17547. comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
  17548. syntax: "<'flex-basis'>"
  17549. },
  17550. "-ms-interpolation-mode": {
  17551. comment: "https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",
  17552. syntax: "nearest-neighbor | bicubic"
  17553. },
  17554. "-ms-grid-column-align": {
  17555. comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",
  17556. syntax: "start | end | center | stretch"
  17557. },
  17558. "-ms-grid-row-align": {
  17559. comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",
  17560. syntax: "start | end | center | stretch"
  17561. },
  17562. "-ms-hyphenate-limit-last": {
  17563. comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",
  17564. syntax: "none | always | column | page | spread"
  17565. },
  17566. "-webkit-appearance": {
  17567. comment: "webkit specific keywords",
  17568. references: [
  17569. "http://css-infos.net/property/-webkit-appearance"
  17570. ],
  17571. syntax: "none | button | button-bevel | caps-lock-indicator | caret | checkbox | default-button | inner-spin-button | listbox | listitem | media-controls-background | media-controls-fullscreen-background | media-current-time-display | media-enter-fullscreen-button | media-exit-fullscreen-button | media-fullscreen-button | media-mute-button | media-overlay-play-button | media-play-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-sliderthumb | menulist | menulist-button | menulist-text | menulist-textfield | meter | progress-bar | progress-bar-value | push-button | radio | scrollbarbutton-down | scrollbarbutton-left | scrollbarbutton-right | scrollbarbutton-up | scrollbargripper-horizontal | scrollbargripper-vertical | scrollbarthumb-horizontal | scrollbarthumb-vertical | scrollbartrack-horizontal | scrollbartrack-vertical | searchfield | searchfield-cancel-button | searchfield-decoration | searchfield-results-button | searchfield-results-decoration | slider-horizontal | slider-vertical | sliderthumb-horizontal | sliderthumb-vertical | square-button | textarea | textfield | -apple-pay-button"
  17572. },
  17573. "-webkit-background-clip": {
  17574. comment: "https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
  17575. syntax: "[ <box> | border | padding | content | text ]#"
  17576. },
  17577. "-webkit-column-break-after": {
  17578. comment: "added, http://help.dottoro.com/lcrthhhv.php",
  17579. syntax: "always | auto | avoid"
  17580. },
  17581. "-webkit-column-break-before": {
  17582. comment: "added, http://help.dottoro.com/lcxquvkf.php",
  17583. syntax: "always | auto | avoid"
  17584. },
  17585. "-webkit-column-break-inside": {
  17586. comment: "added, http://help.dottoro.com/lclhnthl.php",
  17587. syntax: "always | auto | avoid"
  17588. },
  17589. "-webkit-font-smoothing": {
  17590. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
  17591. syntax: "auto | none | antialiased | subpixel-antialiased"
  17592. },
  17593. "-webkit-mask-box-image": {
  17594. comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
  17595. syntax: "[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"
  17596. },
  17597. "-webkit-print-color-adjust": {
  17598. comment: "missed",
  17599. references: [
  17600. "https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"
  17601. ],
  17602. syntax: "economy | exact"
  17603. },
  17604. "-webkit-text-security": {
  17605. comment: "missed; http://help.dottoro.com/lcbkewgt.php",
  17606. syntax: "none | circle | disc | square"
  17607. },
  17608. "-webkit-user-drag": {
  17609. comment: "missed; http://help.dottoro.com/lcbixvwm.php",
  17610. syntax: "none | element | auto"
  17611. },
  17612. "-webkit-user-select": {
  17613. comment: "auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
  17614. syntax: "auto | none | text | all"
  17615. },
  17616. "alignment-baseline": {
  17617. comment: "added SVG property",
  17618. references: [
  17619. "https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"
  17620. ],
  17621. syntax: "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"
  17622. },
  17623. "baseline-shift": {
  17624. comment: "added SVG property",
  17625. references: [
  17626. "https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"
  17627. ],
  17628. syntax: "baseline | sub | super | <svg-length>"
  17629. },
  17630. behavior: {
  17631. comment: "added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",
  17632. syntax: "<url>+"
  17633. },
  17634. "clip-rule": {
  17635. comment: "added SVG property",
  17636. references: [
  17637. "https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"
  17638. ],
  17639. syntax: "nonzero | evenodd"
  17640. },
  17641. cue: {
  17642. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17643. syntax: "<'cue-before'> <'cue-after'>?"
  17644. },
  17645. "cue-after": {
  17646. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17647. syntax: "<url> <decibel>? | none"
  17648. },
  17649. "cue-before": {
  17650. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17651. syntax: "<url> <decibel>? | none"
  17652. },
  17653. cursor: {
  17654. comment: "added legacy keywords: hand, -webkit-grab. -webkit-grabbing, -webkit-zoom-in, -webkit-zoom-out, -moz-grab, -moz-grabbing, -moz-zoom-in, -moz-zoom-out",
  17655. references: [
  17656. "https://www.sitepoint.com/css3-cursor-styles/"
  17657. ],
  17658. syntax: "[ [ <url> [ <x> <y> ]? , ]* [ auto | default | none | context-menu | help | pointer | progress | wait | cell | crosshair | text | vertical-text | alias | copy | move | no-drop | not-allowed | e-resize | n-resize | ne-resize | nw-resize | s-resize | se-resize | sw-resize | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing | hand | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out | -moz-grab | -moz-grabbing | -moz-zoom-in | -moz-zoom-out ] ]"
  17659. },
  17660. display: {
  17661. comment: "extended with -ms-flexbox",
  17662. syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> | <-non-standard-display>"
  17663. },
  17664. position: {
  17665. comment: "extended with -webkit-sticky",
  17666. syntax: "static | relative | absolute | sticky | fixed | -webkit-sticky"
  17667. },
  17668. "dominant-baseline": {
  17669. comment: "added SVG property",
  17670. references: [
  17671. "https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"
  17672. ],
  17673. syntax: "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"
  17674. },
  17675. "image-rendering": {
  17676. comment: "extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",
  17677. references: [
  17678. "https://developer.mozilla.org/en/docs/Web/CSS/image-rendering",
  17679. "https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"
  17680. ],
  17681. syntax: "auto | crisp-edges | pixelated | optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"
  17682. },
  17683. fill: {
  17684. comment: "added SVG property",
  17685. references: [
  17686. "https://www.w3.org/TR/SVG/painting.html#FillProperty"
  17687. ],
  17688. syntax: "<paint>"
  17689. },
  17690. "fill-opacity": {
  17691. comment: "added SVG property",
  17692. references: [
  17693. "https://www.w3.org/TR/SVG/painting.html#FillProperty"
  17694. ],
  17695. syntax: "<number-zero-one>"
  17696. },
  17697. "fill-rule": {
  17698. comment: "added SVG property",
  17699. references: [
  17700. "https://www.w3.org/TR/SVG/painting.html#FillProperty"
  17701. ],
  17702. syntax: "nonzero | evenodd"
  17703. },
  17704. filter: {
  17705. comment: "extend with IE legacy syntaxes",
  17706. syntax: "none | <filter-function-list> | <-ms-filter-function-list>"
  17707. },
  17708. "glyph-orientation-horizontal": {
  17709. comment: "added SVG property",
  17710. references: [
  17711. "https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"
  17712. ],
  17713. syntax: "<angle>"
  17714. },
  17715. "glyph-orientation-vertical": {
  17716. comment: "added SVG property",
  17717. references: [
  17718. "https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"
  17719. ],
  17720. syntax: "<angle>"
  17721. },
  17722. kerning: {
  17723. comment: "added SVG property",
  17724. references: [
  17725. "https://www.w3.org/TR/SVG/text.html#KerningProperty"
  17726. ],
  17727. syntax: "auto | <svg-length>"
  17728. },
  17729. "letter-spacing": {
  17730. comment: "fix syntax <length> -> <length-percentage>",
  17731. references: [
  17732. "https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"
  17733. ],
  17734. syntax: "normal | <length-percentage>"
  17735. },
  17736. marker: {
  17737. comment: "added SVG property",
  17738. references: [
  17739. "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
  17740. ],
  17741. syntax: "none | <url>"
  17742. },
  17743. "marker-end": {
  17744. comment: "added SVG property",
  17745. references: [
  17746. "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
  17747. ],
  17748. syntax: "none | <url>"
  17749. },
  17750. "marker-mid": {
  17751. comment: "added SVG property",
  17752. references: [
  17753. "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
  17754. ],
  17755. syntax: "none | <url>"
  17756. },
  17757. "marker-start": {
  17758. comment: "added SVG property",
  17759. references: [
  17760. "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
  17761. ],
  17762. syntax: "none | <url>"
  17763. },
  17764. "max-width": {
  17765. comment: "fix auto -> none (https://github.com/mdn/data/pull/431); extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/max-width",
  17766. syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
  17767. },
  17768. "max-height": {
  17769. comment: "fix auto -> none (https://github.com/mdn/data/pull/431)",
  17770. syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)"
  17771. },
  17772. "min-width": {
  17773. comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
  17774. syntax: "auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
  17775. },
  17776. overflow: {
  17777. comment: "extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
  17778. syntax: "[ visible | hidden | clip | scroll | auto ]{1,2} | <-non-standard-overflow>"
  17779. },
  17780. pause: {
  17781. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17782. syntax: "<'pause-before'> <'pause-after'>?"
  17783. },
  17784. "pause-after": {
  17785. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17786. syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
  17787. },
  17788. "pause-before": {
  17789. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17790. syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
  17791. },
  17792. rest: {
  17793. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17794. syntax: "<'rest-before'> <'rest-after'>?"
  17795. },
  17796. "rest-after": {
  17797. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17798. syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
  17799. },
  17800. "rest-before": {
  17801. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17802. syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
  17803. },
  17804. "shape-rendering": {
  17805. comment: "added SVG property",
  17806. references: [
  17807. "https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"
  17808. ],
  17809. syntax: "auto | optimizeSpeed | crispEdges | geometricPrecision"
  17810. },
  17811. src: {
  17812. comment: "added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",
  17813. syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"
  17814. },
  17815. speak: {
  17816. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17817. syntax: "auto | none | normal"
  17818. },
  17819. "speak-as": {
  17820. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17821. syntax: "normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"
  17822. },
  17823. stroke: {
  17824. comment: "added SVG property",
  17825. references: [
  17826. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17827. ],
  17828. syntax: "<paint>"
  17829. },
  17830. "stroke-dasharray": {
  17831. comment: "added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",
  17832. references: [
  17833. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17834. ],
  17835. syntax: "none | [ <svg-length>+ ]#"
  17836. },
  17837. "stroke-dashoffset": {
  17838. comment: "added SVG property",
  17839. references: [
  17840. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17841. ],
  17842. syntax: "<svg-length>"
  17843. },
  17844. "stroke-linecap": {
  17845. comment: "added SVG property",
  17846. references: [
  17847. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17848. ],
  17849. syntax: "butt | round | square"
  17850. },
  17851. "stroke-linejoin": {
  17852. comment: "added SVG property",
  17853. references: [
  17854. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17855. ],
  17856. syntax: "miter | round | bevel"
  17857. },
  17858. "stroke-miterlimit": {
  17859. comment: "added SVG property (<miterlimit> = <number-one-or-greater>) ",
  17860. references: [
  17861. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17862. ],
  17863. syntax: "<number-one-or-greater>"
  17864. },
  17865. "stroke-opacity": {
  17866. comment: "added SVG property",
  17867. references: [
  17868. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17869. ],
  17870. syntax: "<number-zero-one>"
  17871. },
  17872. "stroke-width": {
  17873. comment: "added SVG property",
  17874. references: [
  17875. "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
  17876. ],
  17877. syntax: "<svg-length>"
  17878. },
  17879. "text-anchor": {
  17880. comment: "added SVG property",
  17881. references: [
  17882. "https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"
  17883. ],
  17884. syntax: "start | middle | end"
  17885. },
  17886. "unicode-bidi": {
  17887. comment: "added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",
  17888. syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext | -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate"
  17889. },
  17890. "unicode-range": {
  17891. comment: "added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",
  17892. syntax: "<urange>#"
  17893. },
  17894. "voice-balance": {
  17895. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17896. syntax: "<number> | left | center | right | leftwards | rightwards"
  17897. },
  17898. "voice-duration": {
  17899. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17900. syntax: "auto | <time>"
  17901. },
  17902. "voice-family": {
  17903. comment: "<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",
  17904. syntax: "[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"
  17905. },
  17906. "voice-pitch": {
  17907. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17908. syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
  17909. },
  17910. "voice-range": {
  17911. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17912. syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
  17913. },
  17914. "voice-rate": {
  17915. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17916. syntax: "[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"
  17917. },
  17918. "voice-stress": {
  17919. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17920. syntax: "normal | strong | moderate | none | reduced"
  17921. },
  17922. "voice-volume": {
  17923. comment: "https://www.w3.org/TR/css3-speech/#property-index",
  17924. syntax: "silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"
  17925. },
  17926. "writing-mode": {
  17927. comment: "extend with SVG keywords",
  17928. syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr | <svg-writing-mode>"
  17929. }
  17930. };
  17931. var syntaxes$2 = {
  17932. "-legacy-gradient": {
  17933. comment: "added collection of legacy gradient syntaxes",
  17934. syntax: "<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"
  17935. },
  17936. "-legacy-linear-gradient": {
  17937. comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
  17938. syntax: "-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"
  17939. },
  17940. "-legacy-repeating-linear-gradient": {
  17941. comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
  17942. syntax: "-moz-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-repeating-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-repeating-linear-gradient( <-legacy-linear-gradient-arguments> )"
  17943. },
  17944. "-legacy-linear-gradient-arguments": {
  17945. comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
  17946. syntax: "[ <angle> | <side-or-corner> ]? , <color-stop-list>"
  17947. },
  17948. "-legacy-radial-gradient": {
  17949. comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
  17950. syntax: "-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"
  17951. },
  17952. "-legacy-repeating-radial-gradient": {
  17953. comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
  17954. syntax: "-moz-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-repeating-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-repeating-radial-gradient( <-legacy-radial-gradient-arguments> )"
  17955. },
  17956. "-legacy-radial-gradient-arguments": {
  17957. comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
  17958. syntax: "[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"
  17959. },
  17960. "-legacy-radial-gradient-size": {
  17961. comment: "before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",
  17962. syntax: "closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"
  17963. },
  17964. "-legacy-radial-gradient-shape": {
  17965. comment: "define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",
  17966. syntax: "circle | ellipse"
  17967. },
  17968. "-non-standard-font": {
  17969. comment: "non standard fonts",
  17970. references: [
  17971. "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
  17972. ],
  17973. syntax: "-apple-system-body | -apple-system-headline | -apple-system-subheadline | -apple-system-caption1 | -apple-system-caption2 | -apple-system-footnote | -apple-system-short-body | -apple-system-short-headline | -apple-system-short-subheadline | -apple-system-short-caption1 | -apple-system-short-footnote | -apple-system-tall-body"
  17974. },
  17975. "-non-standard-color": {
  17976. comment: "non standard colors",
  17977. references: [
  17978. "http://cssdot.ru/%D0%A1%D0%BF%D1%80%D0%B0%D0%B2%D0%BE%D1%87%D0%BD%D0%B8%D0%BA_CSS/color-i305.html",
  17979. "https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"
  17980. ],
  17981. syntax: "-moz-ButtonDefault | -moz-ButtonHoverFace | -moz-ButtonHoverText | -moz-CellHighlight | -moz-CellHighlightText | -moz-Combobox | -moz-ComboboxText | -moz-Dialog | -moz-DialogText | -moz-dragtargetzone | -moz-EvenTreeRow | -moz-Field | -moz-FieldText | -moz-html-CellHighlight | -moz-html-CellHighlightText | -moz-mac-accentdarkestshadow | -moz-mac-accentdarkshadow | -moz-mac-accentface | -moz-mac-accentlightesthighlight | -moz-mac-accentlightshadow | -moz-mac-accentregularhighlight | -moz-mac-accentregularshadow | -moz-mac-chrome-active | -moz-mac-chrome-inactive | -moz-mac-focusring | -moz-mac-menuselect | -moz-mac-menushadow | -moz-mac-menutextselect | -moz-MenuHover | -moz-MenuHoverText | -moz-MenuBarText | -moz-MenuBarHoverText | -moz-nativehyperlinktext | -moz-OddTreeRow | -moz-win-communicationstext | -moz-win-mediatext | -moz-activehyperlinktext | -moz-default-background-color | -moz-default-color | -moz-hyperlinktext | -moz-visitedhyperlinktext | -webkit-activelink | -webkit-focus-ring-color | -webkit-link | -webkit-text"
  17982. },
  17983. "-non-standard-image-rendering": {
  17984. comment: "non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",
  17985. syntax: "optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"
  17986. },
  17987. "-non-standard-overflow": {
  17988. comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
  17989. syntax: "-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"
  17990. },
  17991. "-non-standard-width": {
  17992. comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
  17993. syntax: "fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"
  17994. },
  17995. "-webkit-gradient()": {
  17996. comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/ - TODO: simplify when after match algorithm improvement ( [, point, radius | , point] -> [, radius]? , point )",
  17997. syntax: "-webkit-gradient( <-webkit-gradient-type>, <-webkit-gradient-point> [, <-webkit-gradient-point> | , <-webkit-gradient-radius>, <-webkit-gradient-point> ] [, <-webkit-gradient-radius>]? [, <-webkit-gradient-color-stop>]* )"
  17998. },
  17999. "-webkit-gradient-color-stop": {
  18000. comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
  18001. syntax: "from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"
  18002. },
  18003. "-webkit-gradient-point": {
  18004. comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
  18005. syntax: "[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"
  18006. },
  18007. "-webkit-gradient-radius": {
  18008. comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
  18009. syntax: "<length> | <percentage>"
  18010. },
  18011. "-webkit-gradient-type": {
  18012. comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
  18013. syntax: "linear | radial"
  18014. },
  18015. "-webkit-mask-box-repeat": {
  18016. comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
  18017. syntax: "repeat | stretch | round"
  18018. },
  18019. "-webkit-mask-clip-style": {
  18020. comment: "missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working",
  18021. syntax: "border | border-box | padding | padding-box | content | content-box | text"
  18022. },
  18023. "-ms-filter-function-list": {
  18024. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
  18025. syntax: "<-ms-filter-function>+"
  18026. },
  18027. "-ms-filter-function": {
  18028. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
  18029. syntax: "<-ms-filter-function-progid> | <-ms-filter-function-legacy>"
  18030. },
  18031. "-ms-filter-function-progid": {
  18032. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
  18033. syntax: "'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"
  18034. },
  18035. "-ms-filter-function-legacy": {
  18036. comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
  18037. syntax: "<ident-token> | <function-token> <any-value>? )"
  18038. },
  18039. "-ms-filter": {
  18040. syntax: "<string>"
  18041. },
  18042. age: {
  18043. comment: "https://www.w3.org/TR/css3-speech/#voice-family",
  18044. syntax: "child | young | old"
  18045. },
  18046. "attr-name": {
  18047. syntax: "<wq-name>"
  18048. },
  18049. "attr-fallback": {
  18050. syntax: "<any-value>"
  18051. },
  18052. "border-radius": {
  18053. comment: "missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius",
  18054. syntax: "<length-percentage>{1,2}"
  18055. },
  18056. bottom: {
  18057. comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
  18058. syntax: "<length> | auto"
  18059. },
  18060. "content-list": {
  18061. comment: "missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)",
  18062. syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <'list-style-type'>? ) ]+"
  18063. },
  18064. "element()": {
  18065. comment: "https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",
  18066. syntax: "element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"
  18067. },
  18068. "generic-voice": {
  18069. comment: "https://www.w3.org/TR/css3-speech/#voice-family",
  18070. syntax: "[ <age>? <gender> <integer>? ]"
  18071. },
  18072. gender: {
  18073. comment: "https://www.w3.org/TR/css3-speech/#voice-family",
  18074. syntax: "male | female | neutral"
  18075. },
  18076. "generic-family": {
  18077. comment: "added -apple-system",
  18078. references: [
  18079. "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
  18080. ],
  18081. syntax: "serif | sans-serif | cursive | fantasy | monospace | -apple-system"
  18082. },
  18083. gradient: {
  18084. comment: "added legacy syntaxes support",
  18085. syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()> | <-legacy-gradient>"
  18086. },
  18087. left: {
  18088. comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
  18089. syntax: "<length> | auto"
  18090. },
  18091. "mask-image": {
  18092. comment: "missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image",
  18093. syntax: "<mask-reference>#"
  18094. },
  18095. "name-repeat": {
  18096. comment: "missed, and looks like obsolete, keep it as is since other property syntaxes should be changed too; https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-name-repeat",
  18097. syntax: "repeat( [ <positive-integer> | auto-fill ], <line-names>+)"
  18098. },
  18099. "named-color": {
  18100. comment: "added non standard color names",
  18101. syntax: "transparent | aliceblue | antiquewhite | aqua | aquamarine | azure | beige | bisque | black | blanchedalmond | blue | blueviolet | brown | burlywood | cadetblue | chartreuse | chocolate | coral | cornflowerblue | cornsilk | crimson | cyan | darkblue | darkcyan | darkgoldenrod | darkgray | darkgreen | darkgrey | darkkhaki | darkmagenta | darkolivegreen | darkorange | darkorchid | darkred | darksalmon | darkseagreen | darkslateblue | darkslategray | darkslategrey | darkturquoise | darkviolet | deeppink | deepskyblue | dimgray | dimgrey | dodgerblue | firebrick | floralwhite | forestgreen | fuchsia | gainsboro | ghostwhite | gold | goldenrod | gray | green | greenyellow | grey | honeydew | hotpink | indianred | indigo | ivory | khaki | lavender | lavenderblush | lawngreen | lemonchiffon | lightblue | lightcoral | lightcyan | lightgoldenrodyellow | lightgray | lightgreen | lightgrey | lightpink | lightsalmon | lightseagreen | lightskyblue | lightslategray | lightslategrey | lightsteelblue | lightyellow | lime | limegreen | linen | magenta | maroon | mediumaquamarine | mediumblue | mediumorchid | mediumpurple | mediumseagreen | mediumslateblue | mediumspringgreen | mediumturquoise | mediumvioletred | midnightblue | mintcream | mistyrose | moccasin | navajowhite | navy | oldlace | olive | olivedrab | orange | orangered | orchid | palegoldenrod | palegreen | paleturquoise | palevioletred | papayawhip | peachpuff | peru | pink | plum | powderblue | purple | rebeccapurple | red | rosybrown | royalblue | saddlebrown | salmon | sandybrown | seagreen | seashell | sienna | silver | skyblue | slateblue | slategray | slategrey | snow | springgreen | steelblue | tan | teal | thistle | tomato | turquoise | violet | wheat | white | whitesmoke | yellow | yellowgreen | <-non-standard-color>"
  18102. },
  18103. paint: {
  18104. comment: "used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",
  18105. syntax: "none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"
  18106. },
  18107. ratio: {
  18108. comment: "missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio",
  18109. syntax: "<integer> / <integer>"
  18110. },
  18111. right: {
  18112. comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
  18113. syntax: "<length> | auto"
  18114. },
  18115. shape: {
  18116. comment: "missed spaces in function body and add backwards compatible syntax",
  18117. syntax: "rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"
  18118. },
  18119. "svg-length": {
  18120. comment: "All coordinates and lengths in SVG can be specified with or without a unit identifier",
  18121. references: [
  18122. "https://www.w3.org/TR/SVG11/coords.html#Units"
  18123. ],
  18124. syntax: "<percentage> | <length> | <number>"
  18125. },
  18126. "svg-writing-mode": {
  18127. comment: "SVG specific keywords (deprecated for CSS)",
  18128. references: [
  18129. "https://developer.mozilla.org/en/docs/Web/CSS/writing-mode",
  18130. "https://www.w3.org/TR/SVG/text.html#WritingModeProperty"
  18131. ],
  18132. syntax: "lr-tb | rl-tb | tb-rl | lr | rl | tb"
  18133. },
  18134. top: {
  18135. comment: "missed; not sure we should add it, but no others except `shape` is using it so it's ok for now; https://drafts.fxtf.org/css-masking-1/#funcdef-clip-rect",
  18136. syntax: "<length> | auto"
  18137. },
  18138. "track-group": {
  18139. comment: "used by old grid-columns and grid-rows syntax v0",
  18140. syntax: "'(' [ <string>* <track-minmax> <string>* ]+ ')' [ '[' <positive-integer> ']' ]? | <track-minmax>"
  18141. },
  18142. "track-list-v0": {
  18143. comment: "used by old grid-columns and grid-rows syntax v0",
  18144. syntax: "[ <string>* <track-group> <string>* ]+ | none"
  18145. },
  18146. "track-minmax": {
  18147. comment: "used by old grid-columns and grid-rows syntax v0",
  18148. syntax: "minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"
  18149. },
  18150. x: {
  18151. comment: "missed; not sure we should add it, but no others except `cursor` is using it so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
  18152. syntax: "<number>"
  18153. },
  18154. y: {
  18155. comment: "missed; not sure we should add it, but no others except `cursor` is using so it's ok for now; https://drafts.csswg.org/css-ui-3/#cursor",
  18156. syntax: "<number>"
  18157. },
  18158. declaration: {
  18159. comment: "missed, restored by https://drafts.csswg.org/css-syntax",
  18160. syntax: "<ident-token> : <declaration-value>? [ '!' important ]?"
  18161. },
  18162. "declaration-list": {
  18163. comment: "missed, restored by https://drafts.csswg.org/css-syntax",
  18164. syntax: "[ <declaration>? ';' ]* <declaration>?"
  18165. },
  18166. url: {
  18167. comment: "https://drafts.csswg.org/css-values-4/#urls",
  18168. syntax: "url( <string> <url-modifier>* ) | <url-token>"
  18169. },
  18170. "url-modifier": {
  18171. comment: "https://drafts.csswg.org/css-values-4/#typedef-url-modifier",
  18172. syntax: "<ident> | <function-token> <any-value> )"
  18173. },
  18174. "number-zero-one": {
  18175. syntax: "<number [0,1]>"
  18176. },
  18177. "number-one-or-greater": {
  18178. syntax: "<number [1,∞]>"
  18179. },
  18180. "positive-integer": {
  18181. syntax: "<integer [0,∞]>"
  18182. },
  18183. "-non-standard-display": {
  18184. syntax: "-ms-inline-flexbox | -ms-grid | -ms-inline-grid | -webkit-flex | -webkit-inline-flex | -webkit-box | -webkit-inline-box | -moz-inline-stack | -moz-box | -moz-inline-box"
  18185. }
  18186. };
  18187. var patch = {
  18188. properties: properties$3,
  18189. syntaxes: syntaxes$2
  18190. };
  18191. var patch$1 = /*#__PURE__*/Object.freeze({
  18192. __proto__: null,
  18193. properties: properties$3,
  18194. syntaxes: syntaxes$2,
  18195. 'default': patch
  18196. });
  18197. var mdnAtrules = getCjsExportFromNamespace(atRules$1);
  18198. var mdnProperties = getCjsExportFromNamespace(properties$2);
  18199. var mdnSyntaxes = getCjsExportFromNamespace(syntaxes$1);
  18200. var patch$2 = getCjsExportFromNamespace(patch$1);
  18201. function preprocessAtrules(dict) {
  18202. var result = Object.create(null);
  18203. for (var atruleName in dict) {
  18204. var atrule = dict[atruleName];
  18205. var descriptors = null;
  18206. if (atrule.descriptors) {
  18207. descriptors = Object.create(null);
  18208. for (var descriptor in atrule.descriptors) {
  18209. descriptors[descriptor] = atrule.descriptors[descriptor].syntax;
  18210. }
  18211. }
  18212. result[atruleName.substr(1)] = {
  18213. prelude: atrule.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim() || null,
  18214. descriptors
  18215. };
  18216. }
  18217. return result;
  18218. }
  18219. function buildDictionary(dict, patchDict) {
  18220. var result = {};
  18221. // copy all syntaxes for an original dict
  18222. for (var key in dict) {
  18223. result[key] = dict[key].syntax;
  18224. }
  18225. // apply a patch
  18226. for (var key in patchDict) {
  18227. if (key in dict) {
  18228. if (patchDict[key].syntax) {
  18229. result[key] = patchDict[key].syntax;
  18230. } else {
  18231. delete result[key];
  18232. }
  18233. } else {
  18234. if (patchDict[key].syntax) {
  18235. result[key] = patchDict[key].syntax;
  18236. }
  18237. }
  18238. }
  18239. return result;
  18240. }
  18241. var data = {
  18242. types: buildDictionary(mdnSyntaxes, patch$2.syntaxes),
  18243. atrules: preprocessAtrules(mdnAtrules),
  18244. properties: buildDictionary(mdnProperties, patch$2.properties)
  18245. };
  18246. var cmpChar$3 = tokenizer.cmpChar;
  18247. var isDigit$4 = tokenizer.isDigit;
  18248. var TYPE$9 = tokenizer.TYPE;
  18249. var WHITESPACE$4 = TYPE$9.WhiteSpace;
  18250. var COMMENT$4 = TYPE$9.Comment;
  18251. var IDENT$3 = TYPE$9.Ident;
  18252. var NUMBER$3 = TYPE$9.Number;
  18253. var DIMENSION$2 = TYPE$9.Dimension;
  18254. var PLUSSIGN$3 = 0x002B; // U+002B PLUS SIGN (+)
  18255. var HYPHENMINUS$3 = 0x002D; // U+002D HYPHEN-MINUS (-)
  18256. var N$4 = 0x006E; // U+006E LATIN SMALL LETTER N (n)
  18257. var DISALLOW_SIGN$1 = true;
  18258. var ALLOW_SIGN$1 = false;
  18259. function checkInteger$1(offset, disallowSign) {
  18260. var pos = this.scanner.tokenStart + offset;
  18261. var code = this.scanner.source.charCodeAt(pos);
  18262. if (code === PLUSSIGN$3 || code === HYPHENMINUS$3) {
  18263. if (disallowSign) {
  18264. this.error('Number sign is not allowed');
  18265. }
  18266. pos++;
  18267. }
  18268. for (; pos < this.scanner.tokenEnd; pos++) {
  18269. if (!isDigit$4(this.scanner.source.charCodeAt(pos))) {
  18270. this.error('Integer is expected', pos);
  18271. }
  18272. }
  18273. }
  18274. function checkTokenIsInteger(disallowSign) {
  18275. return checkInteger$1.call(this, 0, disallowSign);
  18276. }
  18277. function expectCharCode(offset, code) {
  18278. if (!cmpChar$3(this.scanner.source, this.scanner.tokenStart + offset, code)) {
  18279. var msg = '';
  18280. switch (code) {
  18281. case N$4:
  18282. msg = 'N is expected';
  18283. break;
  18284. case HYPHENMINUS$3:
  18285. msg = 'HyphenMinus is expected';
  18286. break;
  18287. }
  18288. this.error(msg, this.scanner.tokenStart + offset);
  18289. }
  18290. }
  18291. // ... <signed-integer>
  18292. // ... ['+' | '-'] <signless-integer>
  18293. function consumeB$1() {
  18294. var offset = 0;
  18295. var sign = 0;
  18296. var type = this.scanner.tokenType;
  18297. while (type === WHITESPACE$4 || type === COMMENT$4) {
  18298. type = this.scanner.lookupType(++offset);
  18299. }
  18300. if (type !== NUMBER$3) {
  18301. if (this.scanner.isDelim(PLUSSIGN$3, offset) ||
  18302. this.scanner.isDelim(HYPHENMINUS$3, offset)) {
  18303. sign = this.scanner.isDelim(PLUSSIGN$3, offset) ? PLUSSIGN$3 : HYPHENMINUS$3;
  18304. do {
  18305. type = this.scanner.lookupType(++offset);
  18306. } while (type === WHITESPACE$4 || type === COMMENT$4);
  18307. if (type !== NUMBER$3) {
  18308. this.scanner.skip(offset);
  18309. checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
  18310. }
  18311. } else {
  18312. return null;
  18313. }
  18314. }
  18315. if (offset > 0) {
  18316. this.scanner.skip(offset);
  18317. }
  18318. if (sign === 0) {
  18319. type = this.scanner.source.charCodeAt(this.scanner.tokenStart);
  18320. if (type !== PLUSSIGN$3 && type !== HYPHENMINUS$3) {
  18321. this.error('Number sign is expected');
  18322. }
  18323. }
  18324. checkTokenIsInteger.call(this, sign !== 0);
  18325. return sign === HYPHENMINUS$3 ? '-' + this.consume(NUMBER$3) : this.consume(NUMBER$3);
  18326. }
  18327. // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb
  18328. var AnPlusB = {
  18329. name: 'AnPlusB',
  18330. structure: {
  18331. a: [String, null],
  18332. b: [String, null]
  18333. },
  18334. parse: function() {
  18335. /* eslint-disable brace-style*/
  18336. var start = this.scanner.tokenStart;
  18337. var a = null;
  18338. var b = null;
  18339. // <integer>
  18340. if (this.scanner.tokenType === NUMBER$3) {
  18341. checkTokenIsInteger.call(this, ALLOW_SIGN$1);
  18342. b = this.consume(NUMBER$3);
  18343. }
  18344. // -n
  18345. // -n <signed-integer>
  18346. // -n ['+' | '-'] <signless-integer>
  18347. // -n- <signless-integer>
  18348. // <dashndashdigit-ident>
  18349. else if (this.scanner.tokenType === IDENT$3 && cmpChar$3(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS$3)) {
  18350. a = '-1';
  18351. expectCharCode.call(this, 1, N$4);
  18352. switch (this.scanner.getTokenLength()) {
  18353. // -n
  18354. // -n <signed-integer>
  18355. // -n ['+' | '-'] <signless-integer>
  18356. case 2:
  18357. this.scanner.next();
  18358. b = consumeB$1.call(this);
  18359. break;
  18360. // -n- <signless-integer>
  18361. case 3:
  18362. expectCharCode.call(this, 2, HYPHENMINUS$3);
  18363. this.scanner.next();
  18364. this.scanner.skipSC();
  18365. checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
  18366. b = '-' + this.consume(NUMBER$3);
  18367. break;
  18368. // <dashndashdigit-ident>
  18369. default:
  18370. expectCharCode.call(this, 2, HYPHENMINUS$3);
  18371. checkInteger$1.call(this, 3, DISALLOW_SIGN$1);
  18372. this.scanner.next();
  18373. b = this.scanner.substrToCursor(start + 2);
  18374. }
  18375. }
  18376. // '+'? n
  18377. // '+'? n <signed-integer>
  18378. // '+'? n ['+' | '-'] <signless-integer>
  18379. // '+'? n- <signless-integer>
  18380. // '+'? <ndashdigit-ident>
  18381. else if (this.scanner.tokenType === IDENT$3 || (this.scanner.isDelim(PLUSSIGN$3) && this.scanner.lookupType(1) === IDENT$3)) {
  18382. var sign = 0;
  18383. a = '1';
  18384. // just ignore a plus
  18385. if (this.scanner.isDelim(PLUSSIGN$3)) {
  18386. sign = 1;
  18387. this.scanner.next();
  18388. }
  18389. expectCharCode.call(this, 0, N$4);
  18390. switch (this.scanner.getTokenLength()) {
  18391. // '+'? n
  18392. // '+'? n <signed-integer>
  18393. // '+'? n ['+' | '-'] <signless-integer>
  18394. case 1:
  18395. this.scanner.next();
  18396. b = consumeB$1.call(this);
  18397. break;
  18398. // '+'? n- <signless-integer>
  18399. case 2:
  18400. expectCharCode.call(this, 1, HYPHENMINUS$3);
  18401. this.scanner.next();
  18402. this.scanner.skipSC();
  18403. checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
  18404. b = '-' + this.consume(NUMBER$3);
  18405. break;
  18406. // '+'? <ndashdigit-ident>
  18407. default:
  18408. expectCharCode.call(this, 1, HYPHENMINUS$3);
  18409. checkInteger$1.call(this, 2, DISALLOW_SIGN$1);
  18410. this.scanner.next();
  18411. b = this.scanner.substrToCursor(start + sign + 1);
  18412. }
  18413. }
  18414. // <ndashdigit-dimension>
  18415. // <ndash-dimension> <signless-integer>
  18416. // <n-dimension>
  18417. // <n-dimension> <signed-integer>
  18418. // <n-dimension> ['+' | '-'] <signless-integer>
  18419. else if (this.scanner.tokenType === DIMENSION$2) {
  18420. var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
  18421. var sign = code === PLUSSIGN$3 || code === HYPHENMINUS$3;
  18422. for (var i = this.scanner.tokenStart + sign; i < this.scanner.tokenEnd; i++) {
  18423. if (!isDigit$4(this.scanner.source.charCodeAt(i))) {
  18424. break;
  18425. }
  18426. }
  18427. if (i === this.scanner.tokenStart + sign) {
  18428. this.error('Integer is expected', this.scanner.tokenStart + sign);
  18429. }
  18430. expectCharCode.call(this, i - this.scanner.tokenStart, N$4);
  18431. a = this.scanner.source.substring(start, i);
  18432. // <n-dimension>
  18433. // <n-dimension> <signed-integer>
  18434. // <n-dimension> ['+' | '-'] <signless-integer>
  18435. if (i + 1 === this.scanner.tokenEnd) {
  18436. this.scanner.next();
  18437. b = consumeB$1.call(this);
  18438. } else {
  18439. expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS$3);
  18440. // <ndash-dimension> <signless-integer>
  18441. if (i + 2 === this.scanner.tokenEnd) {
  18442. this.scanner.next();
  18443. this.scanner.skipSC();
  18444. checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
  18445. b = '-' + this.consume(NUMBER$3);
  18446. }
  18447. // <ndashdigit-dimension>
  18448. else {
  18449. checkInteger$1.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN$1);
  18450. this.scanner.next();
  18451. b = this.scanner.substrToCursor(i + 1);
  18452. }
  18453. }
  18454. } else {
  18455. this.error();
  18456. }
  18457. if (a !== null && a.charCodeAt(0) === PLUSSIGN$3) {
  18458. a = a.substr(1);
  18459. }
  18460. if (b !== null && b.charCodeAt(0) === PLUSSIGN$3) {
  18461. b = b.substr(1);
  18462. }
  18463. return {
  18464. type: 'AnPlusB',
  18465. loc: this.getLocation(start, this.scanner.tokenStart),
  18466. a: a,
  18467. b: b
  18468. };
  18469. },
  18470. generate: function(node) {
  18471. var a = node.a !== null && node.a !== undefined;
  18472. var b = node.b !== null && node.b !== undefined;
  18473. if (a) {
  18474. this.chunk(
  18475. node.a === '+1' ? '+n' : // eslint-disable-line operator-linebreak, indent
  18476. node.a === '1' ? 'n' : // eslint-disable-line operator-linebreak, indent
  18477. node.a === '-1' ? '-n' : // eslint-disable-line operator-linebreak, indent
  18478. node.a + 'n' // eslint-disable-line operator-linebreak, indent
  18479. );
  18480. if (b) {
  18481. b = String(node.b);
  18482. if (b.charAt(0) === '-' || b.charAt(0) === '+') {
  18483. this.chunk(b.charAt(0));
  18484. this.chunk(b.substr(1));
  18485. } else {
  18486. this.chunk('+');
  18487. this.chunk(b);
  18488. }
  18489. }
  18490. } else {
  18491. this.chunk(String(node.b));
  18492. }
  18493. }
  18494. };
  18495. var TYPE$a = tokenizer.TYPE;
  18496. var WhiteSpace = TYPE$a.WhiteSpace;
  18497. var Semicolon = TYPE$a.Semicolon;
  18498. var LeftCurlyBracket = TYPE$a.LeftCurlyBracket;
  18499. var Delim = TYPE$a.Delim;
  18500. var EXCLAMATIONMARK$1 = 0x0021; // U+0021 EXCLAMATION MARK (!)
  18501. function getOffsetExcludeWS() {
  18502. if (this.scanner.tokenIndex > 0) {
  18503. if (this.scanner.lookupType(-1) === WhiteSpace) {
  18504. return this.scanner.tokenIndex > 1
  18505. ? this.scanner.getTokenStart(this.scanner.tokenIndex - 1)
  18506. : this.scanner.firstCharOffset;
  18507. }
  18508. }
  18509. return this.scanner.tokenStart;
  18510. }
  18511. // 0, 0, false
  18512. function balanceEnd() {
  18513. return 0;
  18514. }
  18515. // LEFTCURLYBRACKET, 0, false
  18516. function leftCurlyBracket(tokenType) {
  18517. return tokenType === LeftCurlyBracket ? 1 : 0;
  18518. }
  18519. // LEFTCURLYBRACKET, SEMICOLON, false
  18520. function leftCurlyBracketOrSemicolon(tokenType) {
  18521. return tokenType === LeftCurlyBracket || tokenType === Semicolon ? 1 : 0;
  18522. }
  18523. // EXCLAMATIONMARK, SEMICOLON, false
  18524. function exclamationMarkOrSemicolon(tokenType, source, offset) {
  18525. if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK$1) {
  18526. return 1;
  18527. }
  18528. return tokenType === Semicolon ? 1 : 0;
  18529. }
  18530. // 0, SEMICOLON, true
  18531. function semicolonIncluded(tokenType) {
  18532. return tokenType === Semicolon ? 2 : 0;
  18533. }
  18534. var Raw = {
  18535. name: 'Raw',
  18536. structure: {
  18537. value: String
  18538. },
  18539. parse: function(startToken, mode, excludeWhiteSpace) {
  18540. var startOffset = this.scanner.getTokenStart(startToken);
  18541. var endOffset;
  18542. this.scanner.skip(
  18543. this.scanner.getRawLength(startToken, mode || balanceEnd)
  18544. );
  18545. if (excludeWhiteSpace && this.scanner.tokenStart > startOffset) {
  18546. endOffset = getOffsetExcludeWS.call(this);
  18547. } else {
  18548. endOffset = this.scanner.tokenStart;
  18549. }
  18550. return {
  18551. type: 'Raw',
  18552. loc: this.getLocation(startOffset, endOffset),
  18553. value: this.scanner.source.substring(startOffset, endOffset)
  18554. };
  18555. },
  18556. generate: function(node) {
  18557. this.chunk(node.value);
  18558. },
  18559. mode: {
  18560. default: balanceEnd,
  18561. leftCurlyBracket: leftCurlyBracket,
  18562. leftCurlyBracketOrSemicolon: leftCurlyBracketOrSemicolon,
  18563. exclamationMarkOrSemicolon: exclamationMarkOrSemicolon,
  18564. semicolonIncluded: semicolonIncluded
  18565. }
  18566. };
  18567. var TYPE$b = tokenizer.TYPE;
  18568. var rawMode = Raw.mode;
  18569. var ATKEYWORD = TYPE$b.AtKeyword;
  18570. var SEMICOLON = TYPE$b.Semicolon;
  18571. var LEFTCURLYBRACKET$1 = TYPE$b.LeftCurlyBracket;
  18572. var RIGHTCURLYBRACKET$1 = TYPE$b.RightCurlyBracket;
  18573. function consumeRaw(startToken) {
  18574. return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true);
  18575. }
  18576. function isDeclarationBlockAtrule() {
  18577. for (var offset = 1, type; type = this.scanner.lookupType(offset); offset++) {
  18578. if (type === RIGHTCURLYBRACKET$1) {
  18579. return true;
  18580. }
  18581. if (type === LEFTCURLYBRACKET$1 ||
  18582. type === ATKEYWORD) {
  18583. return false;
  18584. }
  18585. }
  18586. return false;
  18587. }
  18588. var Atrule = {
  18589. name: 'Atrule',
  18590. structure: {
  18591. name: String,
  18592. prelude: ['AtrulePrelude', 'Raw', null],
  18593. block: ['Block', null]
  18594. },
  18595. parse: function() {
  18596. var start = this.scanner.tokenStart;
  18597. var name;
  18598. var nameLowerCase;
  18599. var prelude = null;
  18600. var block = null;
  18601. this.eat(ATKEYWORD);
  18602. name = this.scanner.substrToCursor(start + 1);
  18603. nameLowerCase = name.toLowerCase();
  18604. this.scanner.skipSC();
  18605. // parse prelude
  18606. if (this.scanner.eof === false &&
  18607. this.scanner.tokenType !== LEFTCURLYBRACKET$1 &&
  18608. this.scanner.tokenType !== SEMICOLON) {
  18609. if (this.parseAtrulePrelude) {
  18610. prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw);
  18611. // turn empty AtrulePrelude into null
  18612. if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) {
  18613. prelude = null;
  18614. }
  18615. } else {
  18616. prelude = consumeRaw.call(this, this.scanner.tokenIndex);
  18617. }
  18618. this.scanner.skipSC();
  18619. }
  18620. switch (this.scanner.tokenType) {
  18621. case SEMICOLON:
  18622. this.scanner.next();
  18623. break;
  18624. case LEFTCURLYBRACKET$1:
  18625. if (this.atrule.hasOwnProperty(nameLowerCase) &&
  18626. typeof this.atrule[nameLowerCase].block === 'function') {
  18627. block = this.atrule[nameLowerCase].block.call(this);
  18628. } else {
  18629. // TODO: should consume block content as Raw?
  18630. block = this.Block(isDeclarationBlockAtrule.call(this));
  18631. }
  18632. break;
  18633. }
  18634. return {
  18635. type: 'Atrule',
  18636. loc: this.getLocation(start, this.scanner.tokenStart),
  18637. name: name,
  18638. prelude: prelude,
  18639. block: block
  18640. };
  18641. },
  18642. generate: function(node) {
  18643. this.chunk('@');
  18644. this.chunk(node.name);
  18645. if (node.prelude !== null) {
  18646. this.chunk(' ');
  18647. this.node(node.prelude);
  18648. }
  18649. if (node.block) {
  18650. this.node(node.block);
  18651. } else {
  18652. this.chunk(';');
  18653. }
  18654. },
  18655. walkContext: 'atrule'
  18656. };
  18657. var TYPE$c = tokenizer.TYPE;
  18658. var SEMICOLON$1 = TYPE$c.Semicolon;
  18659. var LEFTCURLYBRACKET$2 = TYPE$c.LeftCurlyBracket;
  18660. var AtrulePrelude = {
  18661. name: 'AtrulePrelude',
  18662. structure: {
  18663. children: [[]]
  18664. },
  18665. parse: function(name) {
  18666. var children = null;
  18667. if (name !== null) {
  18668. name = name.toLowerCase();
  18669. }
  18670. this.scanner.skipSC();
  18671. if (this.atrule.hasOwnProperty(name) &&
  18672. typeof this.atrule[name].prelude === 'function') {
  18673. // custom consumer
  18674. children = this.atrule[name].prelude.call(this);
  18675. } else {
  18676. // default consumer
  18677. children = this.readSequence(this.scope.AtrulePrelude);
  18678. }
  18679. this.scanner.skipSC();
  18680. if (this.scanner.eof !== true &&
  18681. this.scanner.tokenType !== LEFTCURLYBRACKET$2 &&
  18682. this.scanner.tokenType !== SEMICOLON$1) {
  18683. this.error('Semicolon or block is expected');
  18684. }
  18685. if (children === null) {
  18686. children = this.createList();
  18687. }
  18688. return {
  18689. type: 'AtrulePrelude',
  18690. loc: this.getLocationFromList(children),
  18691. children: children
  18692. };
  18693. },
  18694. generate: function(node) {
  18695. this.children(node);
  18696. },
  18697. walkContext: 'atrulePrelude'
  18698. };
  18699. var TYPE$d = tokenizer.TYPE;
  18700. var IDENT$4 = TYPE$d.Ident;
  18701. var STRING = TYPE$d.String;
  18702. var COLON = TYPE$d.Colon;
  18703. var LEFTSQUAREBRACKET$1 = TYPE$d.LeftSquareBracket;
  18704. var RIGHTSQUAREBRACKET$1 = TYPE$d.RightSquareBracket;
  18705. var DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($)
  18706. var ASTERISK$1 = 0x002A; // U+002A ASTERISK (*)
  18707. var EQUALSSIGN = 0x003D; // U+003D EQUALS SIGN (=)
  18708. var CIRCUMFLEXACCENT = 0x005E; // U+005E (^)
  18709. var VERTICALLINE$1 = 0x007C; // U+007C VERTICAL LINE (|)
  18710. var TILDE = 0x007E; // U+007E TILDE (~)
  18711. function getAttributeName() {
  18712. if (this.scanner.eof) {
  18713. this.error('Unexpected end of input');
  18714. }
  18715. var start = this.scanner.tokenStart;
  18716. var expectIdent = false;
  18717. var checkColon = true;
  18718. if (this.scanner.isDelim(ASTERISK$1)) {
  18719. expectIdent = true;
  18720. checkColon = false;
  18721. this.scanner.next();
  18722. } else if (!this.scanner.isDelim(VERTICALLINE$1)) {
  18723. this.eat(IDENT$4);
  18724. }
  18725. if (this.scanner.isDelim(VERTICALLINE$1)) {
  18726. if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 1) !== EQUALSSIGN) {
  18727. this.scanner.next();
  18728. this.eat(IDENT$4);
  18729. } else if (expectIdent) {
  18730. this.error('Identifier is expected', this.scanner.tokenEnd);
  18731. }
  18732. } else if (expectIdent) {
  18733. this.error('Vertical line is expected');
  18734. }
  18735. if (checkColon && this.scanner.tokenType === COLON) {
  18736. this.scanner.next();
  18737. this.eat(IDENT$4);
  18738. }
  18739. return {
  18740. type: 'Identifier',
  18741. loc: this.getLocation(start, this.scanner.tokenStart),
  18742. name: this.scanner.substrToCursor(start)
  18743. };
  18744. }
  18745. function getOperator() {
  18746. var start = this.scanner.tokenStart;
  18747. var code = this.scanner.source.charCodeAt(start);
  18748. if (code !== EQUALSSIGN && // =
  18749. code !== TILDE && // ~=
  18750. code !== CIRCUMFLEXACCENT && // ^=
  18751. code !== DOLLARSIGN && // $=
  18752. code !== ASTERISK$1 && // *=
  18753. code !== VERTICALLINE$1 // |=
  18754. ) {
  18755. this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected');
  18756. }
  18757. this.scanner.next();
  18758. if (code !== EQUALSSIGN) {
  18759. if (!this.scanner.isDelim(EQUALSSIGN)) {
  18760. this.error('Equal sign is expected');
  18761. }
  18762. this.scanner.next();
  18763. }
  18764. return this.scanner.substrToCursor(start);
  18765. }
  18766. // '[' <wq-name> ']'
  18767. // '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'
  18768. var AttributeSelector = {
  18769. name: 'AttributeSelector',
  18770. structure: {
  18771. name: 'Identifier',
  18772. matcher: [String, null],
  18773. value: ['String', 'Identifier', null],
  18774. flags: [String, null]
  18775. },
  18776. parse: function() {
  18777. var start = this.scanner.tokenStart;
  18778. var name;
  18779. var matcher = null;
  18780. var value = null;
  18781. var flags = null;
  18782. this.eat(LEFTSQUAREBRACKET$1);
  18783. this.scanner.skipSC();
  18784. name = getAttributeName.call(this);
  18785. this.scanner.skipSC();
  18786. if (this.scanner.tokenType !== RIGHTSQUAREBRACKET$1) {
  18787. // avoid case `[name i]`
  18788. if (this.scanner.tokenType !== IDENT$4) {
  18789. matcher = getOperator.call(this);
  18790. this.scanner.skipSC();
  18791. value = this.scanner.tokenType === STRING
  18792. ? this.String()
  18793. : this.Identifier();
  18794. this.scanner.skipSC();
  18795. }
  18796. // attribute flags
  18797. if (this.scanner.tokenType === IDENT$4) {
  18798. flags = this.scanner.getTokenValue();
  18799. this.scanner.next();
  18800. this.scanner.skipSC();
  18801. }
  18802. }
  18803. this.eat(RIGHTSQUAREBRACKET$1);
  18804. return {
  18805. type: 'AttributeSelector',
  18806. loc: this.getLocation(start, this.scanner.tokenStart),
  18807. name: name,
  18808. matcher: matcher,
  18809. value: value,
  18810. flags: flags
  18811. };
  18812. },
  18813. generate: function(node) {
  18814. var flagsPrefix = ' ';
  18815. this.chunk('[');
  18816. this.node(node.name);
  18817. if (node.matcher !== null) {
  18818. this.chunk(node.matcher);
  18819. if (node.value !== null) {
  18820. this.node(node.value);
  18821. // space between string and flags is not required
  18822. if (node.value.type === 'String') {
  18823. flagsPrefix = '';
  18824. }
  18825. }
  18826. }
  18827. if (node.flags !== null) {
  18828. this.chunk(flagsPrefix);
  18829. this.chunk(node.flags);
  18830. }
  18831. this.chunk(']');
  18832. }
  18833. };
  18834. var TYPE$e = tokenizer.TYPE;
  18835. var rawMode$1 = Raw.mode;
  18836. var WHITESPACE$5 = TYPE$e.WhiteSpace;
  18837. var COMMENT$5 = TYPE$e.Comment;
  18838. var SEMICOLON$2 = TYPE$e.Semicolon;
  18839. var ATKEYWORD$1 = TYPE$e.AtKeyword;
  18840. var LEFTCURLYBRACKET$3 = TYPE$e.LeftCurlyBracket;
  18841. var RIGHTCURLYBRACKET$2 = TYPE$e.RightCurlyBracket;
  18842. function consumeRaw$1(startToken) {
  18843. return this.Raw(startToken, null, true);
  18844. }
  18845. function consumeRule() {
  18846. return this.parseWithFallback(this.Rule, consumeRaw$1);
  18847. }
  18848. function consumeRawDeclaration(startToken) {
  18849. return this.Raw(startToken, rawMode$1.semicolonIncluded, true);
  18850. }
  18851. function consumeDeclaration() {
  18852. if (this.scanner.tokenType === SEMICOLON$2) {
  18853. return consumeRawDeclaration.call(this, this.scanner.tokenIndex);
  18854. }
  18855. var node = this.parseWithFallback(this.Declaration, consumeRawDeclaration);
  18856. if (this.scanner.tokenType === SEMICOLON$2) {
  18857. this.scanner.next();
  18858. }
  18859. return node;
  18860. }
  18861. var Block = {
  18862. name: 'Block',
  18863. structure: {
  18864. children: [[
  18865. 'Atrule',
  18866. 'Rule',
  18867. 'Declaration'
  18868. ]]
  18869. },
  18870. parse: function(isDeclaration) {
  18871. var consumer = isDeclaration ? consumeDeclaration : consumeRule;
  18872. var start = this.scanner.tokenStart;
  18873. var children = this.createList();
  18874. this.eat(LEFTCURLYBRACKET$3);
  18875. scan:
  18876. while (!this.scanner.eof) {
  18877. switch (this.scanner.tokenType) {
  18878. case RIGHTCURLYBRACKET$2:
  18879. break scan;
  18880. case WHITESPACE$5:
  18881. case COMMENT$5:
  18882. this.scanner.next();
  18883. break;
  18884. case ATKEYWORD$1:
  18885. children.push(this.parseWithFallback(this.Atrule, consumeRaw$1));
  18886. break;
  18887. default:
  18888. children.push(consumer.call(this));
  18889. }
  18890. }
  18891. if (!this.scanner.eof) {
  18892. this.eat(RIGHTCURLYBRACKET$2);
  18893. }
  18894. return {
  18895. type: 'Block',
  18896. loc: this.getLocation(start, this.scanner.tokenStart),
  18897. children: children
  18898. };
  18899. },
  18900. generate: function(node) {
  18901. this.chunk('{');
  18902. this.children(node, function(prev) {
  18903. if (prev.type === 'Declaration') {
  18904. this.chunk(';');
  18905. }
  18906. });
  18907. this.chunk('}');
  18908. },
  18909. walkContext: 'block'
  18910. };
  18911. var TYPE$f = tokenizer.TYPE;
  18912. var LEFTSQUAREBRACKET$2 = TYPE$f.LeftSquareBracket;
  18913. var RIGHTSQUAREBRACKET$2 = TYPE$f.RightSquareBracket;
  18914. var Brackets = {
  18915. name: 'Brackets',
  18916. structure: {
  18917. children: [[]]
  18918. },
  18919. parse: function(readSequence, recognizer) {
  18920. var start = this.scanner.tokenStart;
  18921. var children = null;
  18922. this.eat(LEFTSQUAREBRACKET$2);
  18923. children = readSequence.call(this, recognizer);
  18924. if (!this.scanner.eof) {
  18925. this.eat(RIGHTSQUAREBRACKET$2);
  18926. }
  18927. return {
  18928. type: 'Brackets',
  18929. loc: this.getLocation(start, this.scanner.tokenStart),
  18930. children: children
  18931. };
  18932. },
  18933. generate: function(node) {
  18934. this.chunk('[');
  18935. this.children(node);
  18936. this.chunk(']');
  18937. }
  18938. };
  18939. var CDC = tokenizer.TYPE.CDC;
  18940. var CDC_1 = {
  18941. name: 'CDC',
  18942. structure: [],
  18943. parse: function() {
  18944. var start = this.scanner.tokenStart;
  18945. this.eat(CDC); // -->
  18946. return {
  18947. type: 'CDC',
  18948. loc: this.getLocation(start, this.scanner.tokenStart)
  18949. };
  18950. },
  18951. generate: function() {
  18952. this.chunk('-->');
  18953. }
  18954. };
  18955. var CDO = tokenizer.TYPE.CDO;
  18956. var CDO_1 = {
  18957. name: 'CDO',
  18958. structure: [],
  18959. parse: function() {
  18960. var start = this.scanner.tokenStart;
  18961. this.eat(CDO); // <!--
  18962. return {
  18963. type: 'CDO',
  18964. loc: this.getLocation(start, this.scanner.tokenStart)
  18965. };
  18966. },
  18967. generate: function() {
  18968. this.chunk('<!--');
  18969. }
  18970. };
  18971. var TYPE$g = tokenizer.TYPE;
  18972. var IDENT$5 = TYPE$g.Ident;
  18973. var FULLSTOP = 0x002E; // U+002E FULL STOP (.)
  18974. // '.' ident
  18975. var ClassSelector = {
  18976. name: 'ClassSelector',
  18977. structure: {
  18978. name: String
  18979. },
  18980. parse: function() {
  18981. if (!this.scanner.isDelim(FULLSTOP)) {
  18982. this.error('Full stop is expected');
  18983. }
  18984. this.scanner.next();
  18985. return {
  18986. type: 'ClassSelector',
  18987. loc: this.getLocation(this.scanner.tokenStart - 1, this.scanner.tokenEnd),
  18988. name: this.consume(IDENT$5)
  18989. };
  18990. },
  18991. generate: function(node) {
  18992. this.chunk('.');
  18993. this.chunk(node.name);
  18994. }
  18995. };
  18996. var TYPE$h = tokenizer.TYPE;
  18997. var IDENT$6 = TYPE$h.Ident;
  18998. var PLUSSIGN$4 = 0x002B; // U+002B PLUS SIGN (+)
  18999. var SOLIDUS = 0x002F; // U+002F SOLIDUS (/)
  19000. var GREATERTHANSIGN$1 = 0x003E; // U+003E GREATER-THAN SIGN (>)
  19001. var TILDE$1 = 0x007E; // U+007E TILDE (~)
  19002. // + | > | ~ | /deep/
  19003. var Combinator = {
  19004. name: 'Combinator',
  19005. structure: {
  19006. name: String
  19007. },
  19008. parse: function() {
  19009. var start = this.scanner.tokenStart;
  19010. var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
  19011. switch (code) {
  19012. case GREATERTHANSIGN$1:
  19013. case PLUSSIGN$4:
  19014. case TILDE$1:
  19015. this.scanner.next();
  19016. break;
  19017. case SOLIDUS:
  19018. this.scanner.next();
  19019. if (this.scanner.tokenType !== IDENT$6 || this.scanner.lookupValue(0, 'deep') === false) {
  19020. this.error('Identifier `deep` is expected');
  19021. }
  19022. this.scanner.next();
  19023. if (!this.scanner.isDelim(SOLIDUS)) {
  19024. this.error('Solidus is expected');
  19025. }
  19026. this.scanner.next();
  19027. break;
  19028. default:
  19029. this.error('Combinator is expected');
  19030. }
  19031. return {
  19032. type: 'Combinator',
  19033. loc: this.getLocation(start, this.scanner.tokenStart),
  19034. name: this.scanner.substrToCursor(start)
  19035. };
  19036. },
  19037. generate: function(node) {
  19038. this.chunk(node.name);
  19039. }
  19040. };
  19041. var TYPE$i = tokenizer.TYPE;
  19042. var COMMENT$6 = TYPE$i.Comment;
  19043. var ASTERISK$2 = 0x002A; // U+002A ASTERISK (*)
  19044. var SOLIDUS$1 = 0x002F; // U+002F SOLIDUS (/)
  19045. // '/*' .* '*/'
  19046. var Comment = {
  19047. name: 'Comment',
  19048. structure: {
  19049. value: String
  19050. },
  19051. parse: function() {
  19052. var start = this.scanner.tokenStart;
  19053. var end = this.scanner.tokenEnd;
  19054. this.eat(COMMENT$6);
  19055. if ((end - start + 2) >= 2 &&
  19056. this.scanner.source.charCodeAt(end - 2) === ASTERISK$2 &&
  19057. this.scanner.source.charCodeAt(end - 1) === SOLIDUS$1) {
  19058. end -= 2;
  19059. }
  19060. return {
  19061. type: 'Comment',
  19062. loc: this.getLocation(start, this.scanner.tokenStart),
  19063. value: this.scanner.source.substring(start + 2, end)
  19064. };
  19065. },
  19066. generate: function(node) {
  19067. this.chunk('/*');
  19068. this.chunk(node.value);
  19069. this.chunk('*/');
  19070. }
  19071. };
  19072. var isCustomProperty$1 = names.isCustomProperty;
  19073. var TYPE$j = tokenizer.TYPE;
  19074. var rawMode$2 = Raw.mode;
  19075. var IDENT$7 = TYPE$j.Ident;
  19076. var HASH$1 = TYPE$j.Hash;
  19077. var COLON$1 = TYPE$j.Colon;
  19078. var SEMICOLON$3 = TYPE$j.Semicolon;
  19079. var DELIM$2 = TYPE$j.Delim;
  19080. var EXCLAMATIONMARK$2 = 0x0021; // U+0021 EXCLAMATION MARK (!)
  19081. var NUMBERSIGN$2 = 0x0023; // U+0023 NUMBER SIGN (#)
  19082. var DOLLARSIGN$1 = 0x0024; // U+0024 DOLLAR SIGN ($)
  19083. var AMPERSAND$1 = 0x0026; // U+0026 ANPERSAND (&)
  19084. var ASTERISK$3 = 0x002A; // U+002A ASTERISK (*)
  19085. var PLUSSIGN$5 = 0x002B; // U+002B PLUS SIGN (+)
  19086. var SOLIDUS$2 = 0x002F; // U+002F SOLIDUS (/)
  19087. function consumeValueRaw(startToken) {
  19088. return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, true);
  19089. }
  19090. function consumeCustomPropertyRaw(startToken) {
  19091. return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, false);
  19092. }
  19093. function consumeValue() {
  19094. var startValueToken = this.scanner.tokenIndex;
  19095. var value = this.Value();
  19096. if (value.type !== 'Raw' &&
  19097. this.scanner.eof === false &&
  19098. this.scanner.tokenType !== SEMICOLON$3 &&
  19099. this.scanner.isDelim(EXCLAMATIONMARK$2) === false &&
  19100. this.scanner.isBalanceEdge(startValueToken) === false) {
  19101. this.error();
  19102. }
  19103. return value;
  19104. }
  19105. var Declaration = {
  19106. name: 'Declaration',
  19107. structure: {
  19108. important: [Boolean, String],
  19109. property: String,
  19110. value: ['Value', 'Raw']
  19111. },
  19112. parse: function() {
  19113. var start = this.scanner.tokenStart;
  19114. var startToken = this.scanner.tokenIndex;
  19115. var property = readProperty$1.call(this);
  19116. var customProperty = isCustomProperty$1(property);
  19117. var parseValue = customProperty ? this.parseCustomProperty : this.parseValue;
  19118. var consumeRaw = customProperty ? consumeCustomPropertyRaw : consumeValueRaw;
  19119. var important = false;
  19120. var value;
  19121. this.scanner.skipSC();
  19122. this.eat(COLON$1);
  19123. if (!customProperty) {
  19124. this.scanner.skipSC();
  19125. }
  19126. if (parseValue) {
  19127. value = this.parseWithFallback(consumeValue, consumeRaw);
  19128. } else {
  19129. value = consumeRaw.call(this, this.scanner.tokenIndex);
  19130. }
  19131. if (this.scanner.isDelim(EXCLAMATIONMARK$2)) {
  19132. important = getImportant.call(this);
  19133. this.scanner.skipSC();
  19134. }
  19135. // Do not include semicolon to range per spec
  19136. // https://drafts.csswg.org/css-syntax/#declaration-diagram
  19137. if (this.scanner.eof === false &&
  19138. this.scanner.tokenType !== SEMICOLON$3 &&
  19139. this.scanner.isBalanceEdge(startToken) === false) {
  19140. this.error();
  19141. }
  19142. return {
  19143. type: 'Declaration',
  19144. loc: this.getLocation(start, this.scanner.tokenStart),
  19145. important: important,
  19146. property: property,
  19147. value: value
  19148. };
  19149. },
  19150. generate: function(node) {
  19151. this.chunk(node.property);
  19152. this.chunk(':');
  19153. this.node(node.value);
  19154. if (node.important) {
  19155. this.chunk(node.important === true ? '!important' : '!' + node.important);
  19156. }
  19157. },
  19158. walkContext: 'declaration'
  19159. };
  19160. function readProperty$1() {
  19161. var start = this.scanner.tokenStart;
  19162. // hacks
  19163. if (this.scanner.tokenType === DELIM$2) {
  19164. switch (this.scanner.source.charCodeAt(this.scanner.tokenStart)) {
  19165. case ASTERISK$3:
  19166. case DOLLARSIGN$1:
  19167. case PLUSSIGN$5:
  19168. case NUMBERSIGN$2:
  19169. case AMPERSAND$1:
  19170. this.scanner.next();
  19171. break;
  19172. // TODO: not sure we should support this hack
  19173. case SOLIDUS$2:
  19174. this.scanner.next();
  19175. if (this.scanner.isDelim(SOLIDUS$2)) {
  19176. this.scanner.next();
  19177. }
  19178. break;
  19179. }
  19180. }
  19181. if (this.scanner.tokenType === HASH$1) {
  19182. this.eat(HASH$1);
  19183. } else {
  19184. this.eat(IDENT$7);
  19185. }
  19186. return this.scanner.substrToCursor(start);
  19187. }
  19188. // ! ws* important
  19189. function getImportant() {
  19190. this.eat(DELIM$2);
  19191. this.scanner.skipSC();
  19192. var important = this.consume(IDENT$7);
  19193. // store original value in case it differ from `important`
  19194. // for better original source restoring and hacks like `!ie` support
  19195. return important === 'important' ? true : important;
  19196. }
  19197. var TYPE$k = tokenizer.TYPE;
  19198. var rawMode$3 = Raw.mode;
  19199. var WHITESPACE$6 = TYPE$k.WhiteSpace;
  19200. var COMMENT$7 = TYPE$k.Comment;
  19201. var SEMICOLON$4 = TYPE$k.Semicolon;
  19202. function consumeRaw$2(startToken) {
  19203. return this.Raw(startToken, rawMode$3.semicolonIncluded, true);
  19204. }
  19205. var DeclarationList = {
  19206. name: 'DeclarationList',
  19207. structure: {
  19208. children: [[
  19209. 'Declaration'
  19210. ]]
  19211. },
  19212. parse: function() {
  19213. var children = this.createList();
  19214. while (!this.scanner.eof) {
  19215. switch (this.scanner.tokenType) {
  19216. case WHITESPACE$6:
  19217. case COMMENT$7:
  19218. case SEMICOLON$4:
  19219. this.scanner.next();
  19220. break;
  19221. default:
  19222. children.push(this.parseWithFallback(this.Declaration, consumeRaw$2));
  19223. }
  19224. }
  19225. return {
  19226. type: 'DeclarationList',
  19227. loc: this.getLocationFromList(children),
  19228. children: children
  19229. };
  19230. },
  19231. generate: function(node) {
  19232. this.children(node, function(prev) {
  19233. if (prev.type === 'Declaration') {
  19234. this.chunk(';');
  19235. }
  19236. });
  19237. }
  19238. };
  19239. var consumeNumber$3 = utils.consumeNumber;
  19240. var TYPE$l = tokenizer.TYPE;
  19241. var DIMENSION$3 = TYPE$l.Dimension;
  19242. var Dimension = {
  19243. name: 'Dimension',
  19244. structure: {
  19245. value: String,
  19246. unit: String
  19247. },
  19248. parse: function() {
  19249. var start = this.scanner.tokenStart;
  19250. var numberEnd = consumeNumber$3(this.scanner.source, start);
  19251. this.eat(DIMENSION$3);
  19252. return {
  19253. type: 'Dimension',
  19254. loc: this.getLocation(start, this.scanner.tokenStart),
  19255. value: this.scanner.source.substring(start, numberEnd),
  19256. unit: this.scanner.source.substring(numberEnd, this.scanner.tokenStart)
  19257. };
  19258. },
  19259. generate: function(node) {
  19260. this.chunk(node.value);
  19261. this.chunk(node.unit);
  19262. }
  19263. };
  19264. var TYPE$m = tokenizer.TYPE;
  19265. var RIGHTPARENTHESIS$2 = TYPE$m.RightParenthesis;
  19266. // <function-token> <sequence> )
  19267. var _Function = {
  19268. name: 'Function',
  19269. structure: {
  19270. name: String,
  19271. children: [[]]
  19272. },
  19273. parse: function(readSequence, recognizer) {
  19274. var start = this.scanner.tokenStart;
  19275. var name = this.consumeFunctionName();
  19276. var nameLowerCase = name.toLowerCase();
  19277. var children;
  19278. children = recognizer.hasOwnProperty(nameLowerCase)
  19279. ? recognizer[nameLowerCase].call(this, recognizer)
  19280. : readSequence.call(this, recognizer);
  19281. if (!this.scanner.eof) {
  19282. this.eat(RIGHTPARENTHESIS$2);
  19283. }
  19284. return {
  19285. type: 'Function',
  19286. loc: this.getLocation(start, this.scanner.tokenStart),
  19287. name: name,
  19288. children: children
  19289. };
  19290. },
  19291. generate: function(node) {
  19292. this.chunk(node.name);
  19293. this.chunk('(');
  19294. this.children(node);
  19295. this.chunk(')');
  19296. },
  19297. walkContext: 'function'
  19298. };
  19299. var TYPE$n = tokenizer.TYPE;
  19300. var HASH$2 = TYPE$n.Hash;
  19301. // '#' ident
  19302. var Hash = {
  19303. name: 'Hash',
  19304. structure: {
  19305. value: String
  19306. },
  19307. parse: function() {
  19308. var start = this.scanner.tokenStart;
  19309. this.eat(HASH$2);
  19310. return {
  19311. type: 'Hash',
  19312. loc: this.getLocation(start, this.scanner.tokenStart),
  19313. value: this.scanner.substrToCursor(start + 1)
  19314. };
  19315. },
  19316. generate: function(node) {
  19317. this.chunk('#');
  19318. this.chunk(node.value);
  19319. }
  19320. };
  19321. var TYPE$o = tokenizer.TYPE;
  19322. var IDENT$8 = TYPE$o.Ident;
  19323. var Identifier = {
  19324. name: 'Identifier',
  19325. structure: {
  19326. name: String
  19327. },
  19328. parse: function() {
  19329. return {
  19330. type: 'Identifier',
  19331. loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  19332. name: this.consume(IDENT$8)
  19333. };
  19334. },
  19335. generate: function(node) {
  19336. this.chunk(node.name);
  19337. }
  19338. };
  19339. var TYPE$p = tokenizer.TYPE;
  19340. var HASH$3 = TYPE$p.Hash;
  19341. // <hash-token>
  19342. var IdSelector = {
  19343. name: 'IdSelector',
  19344. structure: {
  19345. name: String
  19346. },
  19347. parse: function() {
  19348. var start = this.scanner.tokenStart;
  19349. // TODO: check value is an ident
  19350. this.eat(HASH$3);
  19351. return {
  19352. type: 'IdSelector',
  19353. loc: this.getLocation(start, this.scanner.tokenStart),
  19354. name: this.scanner.substrToCursor(start + 1)
  19355. };
  19356. },
  19357. generate: function(node) {
  19358. this.chunk('#');
  19359. this.chunk(node.name);
  19360. }
  19361. };
  19362. var TYPE$q = tokenizer.TYPE;
  19363. var IDENT$9 = TYPE$q.Ident;
  19364. var NUMBER$4 = TYPE$q.Number;
  19365. var DIMENSION$4 = TYPE$q.Dimension;
  19366. var LEFTPARENTHESIS$2 = TYPE$q.LeftParenthesis;
  19367. var RIGHTPARENTHESIS$3 = TYPE$q.RightParenthesis;
  19368. var COLON$2 = TYPE$q.Colon;
  19369. var DELIM$3 = TYPE$q.Delim;
  19370. var MediaFeature = {
  19371. name: 'MediaFeature',
  19372. structure: {
  19373. name: String,
  19374. value: ['Identifier', 'Number', 'Dimension', 'Ratio', null]
  19375. },
  19376. parse: function() {
  19377. var start = this.scanner.tokenStart;
  19378. var name;
  19379. var value = null;
  19380. this.eat(LEFTPARENTHESIS$2);
  19381. this.scanner.skipSC();
  19382. name = this.consume(IDENT$9);
  19383. this.scanner.skipSC();
  19384. if (this.scanner.tokenType !== RIGHTPARENTHESIS$3) {
  19385. this.eat(COLON$2);
  19386. this.scanner.skipSC();
  19387. switch (this.scanner.tokenType) {
  19388. case NUMBER$4:
  19389. if (this.lookupNonWSType(1) === DELIM$3) {
  19390. value = this.Ratio();
  19391. } else {
  19392. value = this.Number();
  19393. }
  19394. break;
  19395. case DIMENSION$4:
  19396. value = this.Dimension();
  19397. break;
  19398. case IDENT$9:
  19399. value = this.Identifier();
  19400. break;
  19401. default:
  19402. this.error('Number, dimension, ratio or identifier is expected');
  19403. }
  19404. this.scanner.skipSC();
  19405. }
  19406. this.eat(RIGHTPARENTHESIS$3);
  19407. return {
  19408. type: 'MediaFeature',
  19409. loc: this.getLocation(start, this.scanner.tokenStart),
  19410. name: name,
  19411. value: value
  19412. };
  19413. },
  19414. generate: function(node) {
  19415. this.chunk('(');
  19416. this.chunk(node.name);
  19417. if (node.value !== null) {
  19418. this.chunk(':');
  19419. this.node(node.value);
  19420. }
  19421. this.chunk(')');
  19422. }
  19423. };
  19424. var TYPE$r = tokenizer.TYPE;
  19425. var WHITESPACE$7 = TYPE$r.WhiteSpace;
  19426. var COMMENT$8 = TYPE$r.Comment;
  19427. var IDENT$a = TYPE$r.Ident;
  19428. var LEFTPARENTHESIS$3 = TYPE$r.LeftParenthesis;
  19429. var MediaQuery = {
  19430. name: 'MediaQuery',
  19431. structure: {
  19432. children: [[
  19433. 'Identifier',
  19434. 'MediaFeature',
  19435. 'WhiteSpace'
  19436. ]]
  19437. },
  19438. parse: function() {
  19439. this.scanner.skipSC();
  19440. var children = this.createList();
  19441. var child = null;
  19442. var space = null;
  19443. scan:
  19444. while (!this.scanner.eof) {
  19445. switch (this.scanner.tokenType) {
  19446. case COMMENT$8:
  19447. this.scanner.next();
  19448. continue;
  19449. case WHITESPACE$7:
  19450. space = this.WhiteSpace();
  19451. continue;
  19452. case IDENT$a:
  19453. child = this.Identifier();
  19454. break;
  19455. case LEFTPARENTHESIS$3:
  19456. child = this.MediaFeature();
  19457. break;
  19458. default:
  19459. break scan;
  19460. }
  19461. if (space !== null) {
  19462. children.push(space);
  19463. space = null;
  19464. }
  19465. children.push(child);
  19466. }
  19467. if (child === null) {
  19468. this.error('Identifier or parenthesis is expected');
  19469. }
  19470. return {
  19471. type: 'MediaQuery',
  19472. loc: this.getLocationFromList(children),
  19473. children: children
  19474. };
  19475. },
  19476. generate: function(node) {
  19477. this.children(node);
  19478. }
  19479. };
  19480. var COMMA$1 = tokenizer.TYPE.Comma;
  19481. var MediaQueryList = {
  19482. name: 'MediaQueryList',
  19483. structure: {
  19484. children: [[
  19485. 'MediaQuery'
  19486. ]]
  19487. },
  19488. parse: function(relative) {
  19489. var children = this.createList();
  19490. this.scanner.skipSC();
  19491. while (!this.scanner.eof) {
  19492. children.push(this.MediaQuery(relative));
  19493. if (this.scanner.tokenType !== COMMA$1) {
  19494. break;
  19495. }
  19496. this.scanner.next();
  19497. }
  19498. return {
  19499. type: 'MediaQueryList',
  19500. loc: this.getLocationFromList(children),
  19501. children: children
  19502. };
  19503. },
  19504. generate: function(node) {
  19505. this.children(node, function() {
  19506. this.chunk(',');
  19507. });
  19508. }
  19509. };
  19510. var Nth = {
  19511. name: 'Nth',
  19512. structure: {
  19513. nth: ['AnPlusB', 'Identifier'],
  19514. selector: ['SelectorList', null]
  19515. },
  19516. parse: function(allowOfClause) {
  19517. this.scanner.skipSC();
  19518. var start = this.scanner.tokenStart;
  19519. var end = start;
  19520. var selector = null;
  19521. var query;
  19522. if (this.scanner.lookupValue(0, 'odd') || this.scanner.lookupValue(0, 'even')) {
  19523. query = this.Identifier();
  19524. } else {
  19525. query = this.AnPlusB();
  19526. }
  19527. this.scanner.skipSC();
  19528. if (allowOfClause && this.scanner.lookupValue(0, 'of')) {
  19529. this.scanner.next();
  19530. selector = this.SelectorList();
  19531. if (this.needPositions) {
  19532. end = this.getLastListNode(selector.children).loc.end.offset;
  19533. }
  19534. } else {
  19535. if (this.needPositions) {
  19536. end = query.loc.end.offset;
  19537. }
  19538. }
  19539. return {
  19540. type: 'Nth',
  19541. loc: this.getLocation(start, end),
  19542. nth: query,
  19543. selector: selector
  19544. };
  19545. },
  19546. generate: function(node) {
  19547. this.node(node.nth);
  19548. if (node.selector !== null) {
  19549. this.chunk(' of ');
  19550. this.node(node.selector);
  19551. }
  19552. }
  19553. };
  19554. var NUMBER$5 = tokenizer.TYPE.Number;
  19555. var _Number = {
  19556. name: 'Number',
  19557. structure: {
  19558. value: String
  19559. },
  19560. parse: function() {
  19561. return {
  19562. type: 'Number',
  19563. loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  19564. value: this.consume(NUMBER$5)
  19565. };
  19566. },
  19567. generate: function(node) {
  19568. this.chunk(node.value);
  19569. }
  19570. };
  19571. // '/' | '*' | ',' | ':' | '+' | '-'
  19572. var Operator = {
  19573. name: 'Operator',
  19574. structure: {
  19575. value: String
  19576. },
  19577. parse: function() {
  19578. var start = this.scanner.tokenStart;
  19579. this.scanner.next();
  19580. return {
  19581. type: 'Operator',
  19582. loc: this.getLocation(start, this.scanner.tokenStart),
  19583. value: this.scanner.substrToCursor(start)
  19584. };
  19585. },
  19586. generate: function(node) {
  19587. this.chunk(node.value);
  19588. }
  19589. };
  19590. var TYPE$s = tokenizer.TYPE;
  19591. var LEFTPARENTHESIS$4 = TYPE$s.LeftParenthesis;
  19592. var RIGHTPARENTHESIS$4 = TYPE$s.RightParenthesis;
  19593. var Parentheses = {
  19594. name: 'Parentheses',
  19595. structure: {
  19596. children: [[]]
  19597. },
  19598. parse: function(readSequence, recognizer) {
  19599. var start = this.scanner.tokenStart;
  19600. var children = null;
  19601. this.eat(LEFTPARENTHESIS$4);
  19602. children = readSequence.call(this, recognizer);
  19603. if (!this.scanner.eof) {
  19604. this.eat(RIGHTPARENTHESIS$4);
  19605. }
  19606. return {
  19607. type: 'Parentheses',
  19608. loc: this.getLocation(start, this.scanner.tokenStart),
  19609. children: children
  19610. };
  19611. },
  19612. generate: function(node) {
  19613. this.chunk('(');
  19614. this.children(node);
  19615. this.chunk(')');
  19616. }
  19617. };
  19618. var consumeNumber$4 = utils.consumeNumber;
  19619. var TYPE$t = tokenizer.TYPE;
  19620. var PERCENTAGE$1 = TYPE$t.Percentage;
  19621. var Percentage = {
  19622. name: 'Percentage',
  19623. structure: {
  19624. value: String
  19625. },
  19626. parse: function() {
  19627. var start = this.scanner.tokenStart;
  19628. var numberEnd = consumeNumber$4(this.scanner.source, start);
  19629. this.eat(PERCENTAGE$1);
  19630. return {
  19631. type: 'Percentage',
  19632. loc: this.getLocation(start, this.scanner.tokenStart),
  19633. value: this.scanner.source.substring(start, numberEnd)
  19634. };
  19635. },
  19636. generate: function(node) {
  19637. this.chunk(node.value);
  19638. this.chunk('%');
  19639. }
  19640. };
  19641. var TYPE$u = tokenizer.TYPE;
  19642. var IDENT$b = TYPE$u.Ident;
  19643. var FUNCTION$1 = TYPE$u.Function;
  19644. var COLON$3 = TYPE$u.Colon;
  19645. var RIGHTPARENTHESIS$5 = TYPE$u.RightParenthesis;
  19646. // : [ <ident> | <function-token> <any-value>? ) ]
  19647. var PseudoClassSelector = {
  19648. name: 'PseudoClassSelector',
  19649. structure: {
  19650. name: String,
  19651. children: [['Raw'], null]
  19652. },
  19653. parse: function() {
  19654. var start = this.scanner.tokenStart;
  19655. var children = null;
  19656. var name;
  19657. var nameLowerCase;
  19658. this.eat(COLON$3);
  19659. if (this.scanner.tokenType === FUNCTION$1) {
  19660. name = this.consumeFunctionName();
  19661. nameLowerCase = name.toLowerCase();
  19662. if (this.pseudo.hasOwnProperty(nameLowerCase)) {
  19663. this.scanner.skipSC();
  19664. children = this.pseudo[nameLowerCase].call(this);
  19665. this.scanner.skipSC();
  19666. } else {
  19667. children = this.createList();
  19668. children.push(
  19669. this.Raw(this.scanner.tokenIndex, null, false)
  19670. );
  19671. }
  19672. this.eat(RIGHTPARENTHESIS$5);
  19673. } else {
  19674. name = this.consume(IDENT$b);
  19675. }
  19676. return {
  19677. type: 'PseudoClassSelector',
  19678. loc: this.getLocation(start, this.scanner.tokenStart),
  19679. name: name,
  19680. children: children
  19681. };
  19682. },
  19683. generate: function(node) {
  19684. this.chunk(':');
  19685. this.chunk(node.name);
  19686. if (node.children !== null) {
  19687. this.chunk('(');
  19688. this.children(node);
  19689. this.chunk(')');
  19690. }
  19691. },
  19692. walkContext: 'function'
  19693. };
  19694. var TYPE$v = tokenizer.TYPE;
  19695. var IDENT$c = TYPE$v.Ident;
  19696. var FUNCTION$2 = TYPE$v.Function;
  19697. var COLON$4 = TYPE$v.Colon;
  19698. var RIGHTPARENTHESIS$6 = TYPE$v.RightParenthesis;
  19699. // :: [ <ident> | <function-token> <any-value>? ) ]
  19700. var PseudoElementSelector = {
  19701. name: 'PseudoElementSelector',
  19702. structure: {
  19703. name: String,
  19704. children: [['Raw'], null]
  19705. },
  19706. parse: function() {
  19707. var start = this.scanner.tokenStart;
  19708. var children = null;
  19709. var name;
  19710. var nameLowerCase;
  19711. this.eat(COLON$4);
  19712. this.eat(COLON$4);
  19713. if (this.scanner.tokenType === FUNCTION$2) {
  19714. name = this.consumeFunctionName();
  19715. nameLowerCase = name.toLowerCase();
  19716. if (this.pseudo.hasOwnProperty(nameLowerCase)) {
  19717. this.scanner.skipSC();
  19718. children = this.pseudo[nameLowerCase].call(this);
  19719. this.scanner.skipSC();
  19720. } else {
  19721. children = this.createList();
  19722. children.push(
  19723. this.Raw(this.scanner.tokenIndex, null, false)
  19724. );
  19725. }
  19726. this.eat(RIGHTPARENTHESIS$6);
  19727. } else {
  19728. name = this.consume(IDENT$c);
  19729. }
  19730. return {
  19731. type: 'PseudoElementSelector',
  19732. loc: this.getLocation(start, this.scanner.tokenStart),
  19733. name: name,
  19734. children: children
  19735. };
  19736. },
  19737. generate: function(node) {
  19738. this.chunk('::');
  19739. this.chunk(node.name);
  19740. if (node.children !== null) {
  19741. this.chunk('(');
  19742. this.children(node);
  19743. this.chunk(')');
  19744. }
  19745. },
  19746. walkContext: 'function'
  19747. };
  19748. var isDigit$5 = tokenizer.isDigit;
  19749. var TYPE$w = tokenizer.TYPE;
  19750. var NUMBER$6 = TYPE$w.Number;
  19751. var DELIM$4 = TYPE$w.Delim;
  19752. var SOLIDUS$3 = 0x002F; // U+002F SOLIDUS (/)
  19753. var FULLSTOP$1 = 0x002E; // U+002E FULL STOP (.)
  19754. // Terms of <ratio> should be a positive numbers (not zero or negative)
  19755. // (see https://drafts.csswg.org/mediaqueries-3/#values)
  19756. // However, -o-min-device-pixel-ratio takes fractional values as a ratio's term
  19757. // and this is using by various sites. Therefore we relax checking on parse
  19758. // to test a term is unsigned number without an exponent part.
  19759. // Additional checking may be applied on lexer validation.
  19760. function consumeNumber$5() {
  19761. this.scanner.skipWS();
  19762. var value = this.consume(NUMBER$6);
  19763. for (var i = 0; i < value.length; i++) {
  19764. var code = value.charCodeAt(i);
  19765. if (!isDigit$5(code) && code !== FULLSTOP$1) {
  19766. this.error('Unsigned number is expected', this.scanner.tokenStart - value.length + i);
  19767. }
  19768. }
  19769. if (Number(value) === 0) {
  19770. this.error('Zero number is not allowed', this.scanner.tokenStart - value.length);
  19771. }
  19772. return value;
  19773. }
  19774. // <positive-integer> S* '/' S* <positive-integer>
  19775. var Ratio = {
  19776. name: 'Ratio',
  19777. structure: {
  19778. left: String,
  19779. right: String
  19780. },
  19781. parse: function() {
  19782. var start = this.scanner.tokenStart;
  19783. var left = consumeNumber$5.call(this);
  19784. var right;
  19785. this.scanner.skipWS();
  19786. if (!this.scanner.isDelim(SOLIDUS$3)) {
  19787. this.error('Solidus is expected');
  19788. }
  19789. this.eat(DELIM$4);
  19790. right = consumeNumber$5.call(this);
  19791. return {
  19792. type: 'Ratio',
  19793. loc: this.getLocation(start, this.scanner.tokenStart),
  19794. left: left,
  19795. right: right
  19796. };
  19797. },
  19798. generate: function(node) {
  19799. this.chunk(node.left);
  19800. this.chunk('/');
  19801. this.chunk(node.right);
  19802. }
  19803. };
  19804. var TYPE$x = tokenizer.TYPE;
  19805. var rawMode$4 = Raw.mode;
  19806. var LEFTCURLYBRACKET$4 = TYPE$x.LeftCurlyBracket;
  19807. function consumeRaw$3(startToken) {
  19808. return this.Raw(startToken, rawMode$4.leftCurlyBracket, true);
  19809. }
  19810. function consumePrelude() {
  19811. var prelude = this.SelectorList();
  19812. if (prelude.type !== 'Raw' &&
  19813. this.scanner.eof === false &&
  19814. this.scanner.tokenType !== LEFTCURLYBRACKET$4) {
  19815. this.error();
  19816. }
  19817. return prelude;
  19818. }
  19819. var Rule = {
  19820. name: 'Rule',
  19821. structure: {
  19822. prelude: ['SelectorList', 'Raw'],
  19823. block: ['Block']
  19824. },
  19825. parse: function() {
  19826. var startToken = this.scanner.tokenIndex;
  19827. var startOffset = this.scanner.tokenStart;
  19828. var prelude;
  19829. var block;
  19830. if (this.parseRulePrelude) {
  19831. prelude = this.parseWithFallback(consumePrelude, consumeRaw$3);
  19832. } else {
  19833. prelude = consumeRaw$3.call(this, startToken);
  19834. }
  19835. block = this.Block(true);
  19836. return {
  19837. type: 'Rule',
  19838. loc: this.getLocation(startOffset, this.scanner.tokenStart),
  19839. prelude: prelude,
  19840. block: block
  19841. };
  19842. },
  19843. generate: function(node) {
  19844. this.node(node.prelude);
  19845. this.node(node.block);
  19846. },
  19847. walkContext: 'rule'
  19848. };
  19849. var Selector = {
  19850. name: 'Selector',
  19851. structure: {
  19852. children: [[
  19853. 'TypeSelector',
  19854. 'IdSelector',
  19855. 'ClassSelector',
  19856. 'AttributeSelector',
  19857. 'PseudoClassSelector',
  19858. 'PseudoElementSelector',
  19859. 'Combinator',
  19860. 'WhiteSpace'
  19861. ]]
  19862. },
  19863. parse: function() {
  19864. var children = this.readSequence(this.scope.Selector);
  19865. // nothing were consumed
  19866. if (this.getFirstListNode(children) === null) {
  19867. this.error('Selector is expected');
  19868. }
  19869. return {
  19870. type: 'Selector',
  19871. loc: this.getLocationFromList(children),
  19872. children: children
  19873. };
  19874. },
  19875. generate: function(node) {
  19876. this.children(node);
  19877. }
  19878. };
  19879. var TYPE$y = tokenizer.TYPE;
  19880. var COMMA$2 = TYPE$y.Comma;
  19881. var SelectorList = {
  19882. name: 'SelectorList',
  19883. structure: {
  19884. children: [[
  19885. 'Selector',
  19886. 'Raw'
  19887. ]]
  19888. },
  19889. parse: function() {
  19890. var children = this.createList();
  19891. while (!this.scanner.eof) {
  19892. children.push(this.Selector());
  19893. if (this.scanner.tokenType === COMMA$2) {
  19894. this.scanner.next();
  19895. continue;
  19896. }
  19897. break;
  19898. }
  19899. return {
  19900. type: 'SelectorList',
  19901. loc: this.getLocationFromList(children),
  19902. children: children
  19903. };
  19904. },
  19905. generate: function(node) {
  19906. this.children(node, function() {
  19907. this.chunk(',');
  19908. });
  19909. },
  19910. walkContext: 'selector'
  19911. };
  19912. var STRING$1 = tokenizer.TYPE.String;
  19913. var _String = {
  19914. name: 'String',
  19915. structure: {
  19916. value: String
  19917. },
  19918. parse: function() {
  19919. return {
  19920. type: 'String',
  19921. loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  19922. value: this.consume(STRING$1)
  19923. };
  19924. },
  19925. generate: function(node) {
  19926. this.chunk(node.value);
  19927. }
  19928. };
  19929. var TYPE$z = tokenizer.TYPE;
  19930. var WHITESPACE$8 = TYPE$z.WhiteSpace;
  19931. var COMMENT$9 = TYPE$z.Comment;
  19932. var ATKEYWORD$2 = TYPE$z.AtKeyword;
  19933. var CDO$1 = TYPE$z.CDO;
  19934. var CDC$1 = TYPE$z.CDC;
  19935. var EXCLAMATIONMARK$3 = 0x0021; // U+0021 EXCLAMATION MARK (!)
  19936. function consumeRaw$4(startToken) {
  19937. return this.Raw(startToken, null, false);
  19938. }
  19939. var StyleSheet = {
  19940. name: 'StyleSheet',
  19941. structure: {
  19942. children: [[
  19943. 'Comment',
  19944. 'CDO',
  19945. 'CDC',
  19946. 'Atrule',
  19947. 'Rule',
  19948. 'Raw'
  19949. ]]
  19950. },
  19951. parse: function() {
  19952. var start = this.scanner.tokenStart;
  19953. var children = this.createList();
  19954. var child;
  19955. while (!this.scanner.eof) {
  19956. switch (this.scanner.tokenType) {
  19957. case WHITESPACE$8:
  19958. this.scanner.next();
  19959. continue;
  19960. case COMMENT$9:
  19961. // ignore comments except exclamation comments (i.e. /*! .. */) on top level
  19962. if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 2) !== EXCLAMATIONMARK$3) {
  19963. this.scanner.next();
  19964. continue;
  19965. }
  19966. child = this.Comment();
  19967. break;
  19968. case CDO$1: // <!--
  19969. child = this.CDO();
  19970. break;
  19971. case CDC$1: // -->
  19972. child = this.CDC();
  19973. break;
  19974. // CSS Syntax Module Level 3
  19975. // §2.2 Error handling
  19976. // At the "top level" of a stylesheet, an <at-keyword-token> starts an at-rule.
  19977. case ATKEYWORD$2:
  19978. child = this.parseWithFallback(this.Atrule, consumeRaw$4);
  19979. break;
  19980. // Anything else starts a qualified rule ...
  19981. default:
  19982. child = this.parseWithFallback(this.Rule, consumeRaw$4);
  19983. }
  19984. children.push(child);
  19985. }
  19986. return {
  19987. type: 'StyleSheet',
  19988. loc: this.getLocation(start, this.scanner.tokenStart),
  19989. children: children
  19990. };
  19991. },
  19992. generate: function(node) {
  19993. this.children(node);
  19994. },
  19995. walkContext: 'stylesheet'
  19996. };
  19997. var TYPE$A = tokenizer.TYPE;
  19998. var IDENT$d = TYPE$A.Ident;
  19999. var ASTERISK$4 = 0x002A; // U+002A ASTERISK (*)
  20000. var VERTICALLINE$2 = 0x007C; // U+007C VERTICAL LINE (|)
  20001. function eatIdentifierOrAsterisk() {
  20002. if (this.scanner.tokenType !== IDENT$d &&
  20003. this.scanner.isDelim(ASTERISK$4) === false) {
  20004. this.error('Identifier or asterisk is expected');
  20005. }
  20006. this.scanner.next();
  20007. }
  20008. // ident
  20009. // ident|ident
  20010. // ident|*
  20011. // *
  20012. // *|ident
  20013. // *|*
  20014. // |ident
  20015. // |*
  20016. var TypeSelector = {
  20017. name: 'TypeSelector',
  20018. structure: {
  20019. name: String
  20020. },
  20021. parse: function() {
  20022. var start = this.scanner.tokenStart;
  20023. if (this.scanner.isDelim(VERTICALLINE$2)) {
  20024. this.scanner.next();
  20025. eatIdentifierOrAsterisk.call(this);
  20026. } else {
  20027. eatIdentifierOrAsterisk.call(this);
  20028. if (this.scanner.isDelim(VERTICALLINE$2)) {
  20029. this.scanner.next();
  20030. eatIdentifierOrAsterisk.call(this);
  20031. }
  20032. }
  20033. return {
  20034. type: 'TypeSelector',
  20035. loc: this.getLocation(start, this.scanner.tokenStart),
  20036. name: this.scanner.substrToCursor(start)
  20037. };
  20038. },
  20039. generate: function(node) {
  20040. this.chunk(node.name);
  20041. }
  20042. };
  20043. var isHexDigit$4 = tokenizer.isHexDigit;
  20044. var cmpChar$4 = tokenizer.cmpChar;
  20045. var TYPE$B = tokenizer.TYPE;
  20046. var NAME$3 = tokenizer.NAME;
  20047. var IDENT$e = TYPE$B.Ident;
  20048. var NUMBER$7 = TYPE$B.Number;
  20049. var DIMENSION$5 = TYPE$B.Dimension;
  20050. var PLUSSIGN$6 = 0x002B; // U+002B PLUS SIGN (+)
  20051. var HYPHENMINUS$4 = 0x002D; // U+002D HYPHEN-MINUS (-)
  20052. var QUESTIONMARK$2 = 0x003F; // U+003F QUESTION MARK (?)
  20053. var U$1 = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
  20054. function eatHexSequence(offset, allowDash) {
  20055. for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) {
  20056. var code = this.scanner.source.charCodeAt(pos);
  20057. if (code === HYPHENMINUS$4 && allowDash && len !== 0) {
  20058. if (eatHexSequence.call(this, offset + len + 1, false) === 0) {
  20059. this.error();
  20060. }
  20061. return -1;
  20062. }
  20063. if (!isHexDigit$4(code)) {
  20064. this.error(
  20065. allowDash && len !== 0
  20066. ? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected'
  20067. : (len < 6 ? 'Hex digit is expected' : 'Unexpected input'),
  20068. pos
  20069. );
  20070. }
  20071. if (++len > 6) {
  20072. this.error('Too many hex digits', pos);
  20073. } }
  20074. this.scanner.next();
  20075. return len;
  20076. }
  20077. function eatQuestionMarkSequence(max) {
  20078. var count = 0;
  20079. while (this.scanner.isDelim(QUESTIONMARK$2)) {
  20080. if (++count > max) {
  20081. this.error('Too many question marks');
  20082. }
  20083. this.scanner.next();
  20084. }
  20085. }
  20086. function startsWith$1(code) {
  20087. if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) {
  20088. this.error(NAME$3[code] + ' is expected');
  20089. }
  20090. }
  20091. // https://drafts.csswg.org/css-syntax/#urange
  20092. // Informally, the <urange> production has three forms:
  20093. // U+0001
  20094. // Defines a range consisting of a single code point, in this case the code point "1".
  20095. // U+0001-00ff
  20096. // Defines a range of codepoints between the first and the second value, in this case
  20097. // the range between "1" and "ff" (255 in decimal) inclusive.
  20098. // U+00??
  20099. // Defines a range of codepoints where the "?" characters range over all hex digits,
  20100. // in this case defining the same as the value U+0000-00ff.
  20101. // In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat "?" as a hexadecimal digit).
  20102. //
  20103. // <urange> =
  20104. // u '+' <ident-token> '?'* |
  20105. // u <dimension-token> '?'* |
  20106. // u <number-token> '?'* |
  20107. // u <number-token> <dimension-token> |
  20108. // u <number-token> <number-token> |
  20109. // u '+' '?'+
  20110. function scanUnicodeRange() {
  20111. var hexLength = 0;
  20112. // u '+' <ident-token> '?'*
  20113. // u '+' '?'+
  20114. if (this.scanner.isDelim(PLUSSIGN$6)) {
  20115. this.scanner.next();
  20116. if (this.scanner.tokenType === IDENT$e) {
  20117. hexLength = eatHexSequence.call(this, 0, true);
  20118. if (hexLength > 0) {
  20119. eatQuestionMarkSequence.call(this, 6 - hexLength);
  20120. }
  20121. return;
  20122. }
  20123. if (this.scanner.isDelim(QUESTIONMARK$2)) {
  20124. this.scanner.next();
  20125. eatQuestionMarkSequence.call(this, 5);
  20126. return;
  20127. }
  20128. this.error('Hex digit or question mark is expected');
  20129. return;
  20130. }
  20131. // u <number-token> '?'*
  20132. // u <number-token> <dimension-token>
  20133. // u <number-token> <number-token>
  20134. if (this.scanner.tokenType === NUMBER$7) {
  20135. startsWith$1.call(this, PLUSSIGN$6);
  20136. hexLength = eatHexSequence.call(this, 1, true);
  20137. if (this.scanner.isDelim(QUESTIONMARK$2)) {
  20138. eatQuestionMarkSequence.call(this, 6 - hexLength);
  20139. return;
  20140. }
  20141. if (this.scanner.tokenType === DIMENSION$5 ||
  20142. this.scanner.tokenType === NUMBER$7) {
  20143. startsWith$1.call(this, HYPHENMINUS$4);
  20144. eatHexSequence.call(this, 1, false);
  20145. return;
  20146. }
  20147. return;
  20148. }
  20149. // u <dimension-token> '?'*
  20150. if (this.scanner.tokenType === DIMENSION$5) {
  20151. startsWith$1.call(this, PLUSSIGN$6);
  20152. hexLength = eatHexSequence.call(this, 1, true);
  20153. if (hexLength > 0) {
  20154. eatQuestionMarkSequence.call(this, 6 - hexLength);
  20155. }
  20156. return;
  20157. }
  20158. this.error();
  20159. }
  20160. var UnicodeRange = {
  20161. name: 'UnicodeRange',
  20162. structure: {
  20163. value: String
  20164. },
  20165. parse: function() {
  20166. var start = this.scanner.tokenStart;
  20167. // U or u
  20168. if (!cmpChar$4(this.scanner.source, start, U$1)) {
  20169. this.error('U is expected');
  20170. }
  20171. if (!cmpChar$4(this.scanner.source, start + 1, PLUSSIGN$6)) {
  20172. this.error('Plus sign is expected');
  20173. }
  20174. this.scanner.next();
  20175. scanUnicodeRange.call(this);
  20176. return {
  20177. type: 'UnicodeRange',
  20178. loc: this.getLocation(start, this.scanner.tokenStart),
  20179. value: this.scanner.substrToCursor(start)
  20180. };
  20181. },
  20182. generate: function(node) {
  20183. this.chunk(node.value);
  20184. }
  20185. };
  20186. var isWhiteSpace$2 = tokenizer.isWhiteSpace;
  20187. var cmpStr$5 = tokenizer.cmpStr;
  20188. var TYPE$C = tokenizer.TYPE;
  20189. var FUNCTION$3 = TYPE$C.Function;
  20190. var URL$1 = TYPE$C.Url;
  20191. var RIGHTPARENTHESIS$7 = TYPE$C.RightParenthesis;
  20192. // <url-token> | <function-token> <string> )
  20193. var Url = {
  20194. name: 'Url',
  20195. structure: {
  20196. value: ['String', 'Raw']
  20197. },
  20198. parse: function() {
  20199. var start = this.scanner.tokenStart;
  20200. var value;
  20201. switch (this.scanner.tokenType) {
  20202. case URL$1:
  20203. var rawStart = start + 4;
  20204. var rawEnd = this.scanner.tokenEnd - 1;
  20205. while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawStart))) {
  20206. rawStart++;
  20207. }
  20208. while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawEnd - 1))) {
  20209. rawEnd--;
  20210. }
  20211. value = {
  20212. type: 'Raw',
  20213. loc: this.getLocation(rawStart, rawEnd),
  20214. value: this.scanner.source.substring(rawStart, rawEnd)
  20215. };
  20216. this.eat(URL$1);
  20217. break;
  20218. case FUNCTION$3:
  20219. if (!cmpStr$5(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) {
  20220. this.error('Function name must be `url`');
  20221. }
  20222. this.eat(FUNCTION$3);
  20223. this.scanner.skipSC();
  20224. value = this.String();
  20225. this.scanner.skipSC();
  20226. this.eat(RIGHTPARENTHESIS$7);
  20227. break;
  20228. default:
  20229. this.error('Url or Function is expected');
  20230. }
  20231. return {
  20232. type: 'Url',
  20233. loc: this.getLocation(start, this.scanner.tokenStart),
  20234. value: value
  20235. };
  20236. },
  20237. generate: function(node) {
  20238. this.chunk('url');
  20239. this.chunk('(');
  20240. this.node(node.value);
  20241. this.chunk(')');
  20242. }
  20243. };
  20244. var Value = {
  20245. name: 'Value',
  20246. structure: {
  20247. children: [[]]
  20248. },
  20249. parse: function() {
  20250. var start = this.scanner.tokenStart;
  20251. var children = this.readSequence(this.scope.Value);
  20252. return {
  20253. type: 'Value',
  20254. loc: this.getLocation(start, this.scanner.tokenStart),
  20255. children: children
  20256. };
  20257. },
  20258. generate: function(node) {
  20259. this.children(node);
  20260. }
  20261. };
  20262. var WHITESPACE$9 = tokenizer.TYPE.WhiteSpace;
  20263. var SPACE$2 = Object.freeze({
  20264. type: 'WhiteSpace',
  20265. loc: null,
  20266. value: ' '
  20267. });
  20268. var WhiteSpace$1 = {
  20269. name: 'WhiteSpace',
  20270. structure: {
  20271. value: String
  20272. },
  20273. parse: function() {
  20274. this.eat(WHITESPACE$9);
  20275. return SPACE$2;
  20276. // return {
  20277. // type: 'WhiteSpace',
  20278. // loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
  20279. // value: this.consume(WHITESPACE)
  20280. // };
  20281. },
  20282. generate: function(node) {
  20283. this.chunk(node.value);
  20284. }
  20285. };
  20286. var node = {
  20287. AnPlusB: AnPlusB,
  20288. Atrule: Atrule,
  20289. AtrulePrelude: AtrulePrelude,
  20290. AttributeSelector: AttributeSelector,
  20291. Block: Block,
  20292. Brackets: Brackets,
  20293. CDC: CDC_1,
  20294. CDO: CDO_1,
  20295. ClassSelector: ClassSelector,
  20296. Combinator: Combinator,
  20297. Comment: Comment,
  20298. Declaration: Declaration,
  20299. DeclarationList: DeclarationList,
  20300. Dimension: Dimension,
  20301. Function: _Function,
  20302. Hash: Hash,
  20303. Identifier: Identifier,
  20304. IdSelector: IdSelector,
  20305. MediaFeature: MediaFeature,
  20306. MediaQuery: MediaQuery,
  20307. MediaQueryList: MediaQueryList,
  20308. Nth: Nth,
  20309. Number: _Number,
  20310. Operator: Operator,
  20311. Parentheses: Parentheses,
  20312. Percentage: Percentage,
  20313. PseudoClassSelector: PseudoClassSelector,
  20314. PseudoElementSelector: PseudoElementSelector,
  20315. Ratio: Ratio,
  20316. Raw: Raw,
  20317. Rule: Rule,
  20318. Selector: Selector,
  20319. SelectorList: SelectorList,
  20320. String: _String,
  20321. StyleSheet: StyleSheet,
  20322. TypeSelector: TypeSelector,
  20323. UnicodeRange: UnicodeRange,
  20324. Url: Url,
  20325. Value: Value,
  20326. WhiteSpace: WhiteSpace$1
  20327. };
  20328. var lexer = {
  20329. generic: true,
  20330. types: data.types,
  20331. atrules: data.atrules,
  20332. properties: data.properties,
  20333. node: node
  20334. };
  20335. var cmpChar$5 = tokenizer.cmpChar;
  20336. var cmpStr$6 = tokenizer.cmpStr;
  20337. var TYPE$D = tokenizer.TYPE;
  20338. var IDENT$f = TYPE$D.Ident;
  20339. var STRING$2 = TYPE$D.String;
  20340. var NUMBER$8 = TYPE$D.Number;
  20341. var FUNCTION$4 = TYPE$D.Function;
  20342. var URL$2 = TYPE$D.Url;
  20343. var HASH$4 = TYPE$D.Hash;
  20344. var DIMENSION$6 = TYPE$D.Dimension;
  20345. var PERCENTAGE$2 = TYPE$D.Percentage;
  20346. var LEFTPARENTHESIS$5 = TYPE$D.LeftParenthesis;
  20347. var LEFTSQUAREBRACKET$3 = TYPE$D.LeftSquareBracket;
  20348. var COMMA$3 = TYPE$D.Comma;
  20349. var DELIM$5 = TYPE$D.Delim;
  20350. var NUMBERSIGN$3 = 0x0023; // U+0023 NUMBER SIGN (#)
  20351. var ASTERISK$5 = 0x002A; // U+002A ASTERISK (*)
  20352. var PLUSSIGN$7 = 0x002B; // U+002B PLUS SIGN (+)
  20353. var HYPHENMINUS$5 = 0x002D; // U+002D HYPHEN-MINUS (-)
  20354. var SOLIDUS$4 = 0x002F; // U+002F SOLIDUS (/)
  20355. var U$2 = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
  20356. var _default = function defaultRecognizer(context) {
  20357. switch (this.scanner.tokenType) {
  20358. case HASH$4:
  20359. return this.Hash();
  20360. case COMMA$3:
  20361. context.space = null;
  20362. context.ignoreWSAfter = true;
  20363. return this.Operator();
  20364. case LEFTPARENTHESIS$5:
  20365. return this.Parentheses(this.readSequence, context.recognizer);
  20366. case LEFTSQUAREBRACKET$3:
  20367. return this.Brackets(this.readSequence, context.recognizer);
  20368. case STRING$2:
  20369. return this.String();
  20370. case DIMENSION$6:
  20371. return this.Dimension();
  20372. case PERCENTAGE$2:
  20373. return this.Percentage();
  20374. case NUMBER$8:
  20375. return this.Number();
  20376. case FUNCTION$4:
  20377. return cmpStr$6(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')
  20378. ? this.Url()
  20379. : this.Function(this.readSequence, context.recognizer);
  20380. case URL$2:
  20381. return this.Url();
  20382. case IDENT$f:
  20383. // check for unicode range, it should start with u+ or U+
  20384. if (cmpChar$5(this.scanner.source, this.scanner.tokenStart, U$2) &&
  20385. cmpChar$5(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN$7)) {
  20386. return this.UnicodeRange();
  20387. } else {
  20388. return this.Identifier();
  20389. }
  20390. case DELIM$5:
  20391. var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
  20392. if (code === SOLIDUS$4 ||
  20393. code === ASTERISK$5 ||
  20394. code === PLUSSIGN$7 ||
  20395. code === HYPHENMINUS$5) {
  20396. return this.Operator(); // TODO: replace with Delim
  20397. }
  20398. // TODO: produce a node with Delim node type
  20399. if (code === NUMBERSIGN$3) {
  20400. this.error('Hex or identifier is expected', this.scanner.tokenStart + 1);
  20401. }
  20402. break;
  20403. }
  20404. };
  20405. var atrulePrelude = {
  20406. getNode: _default
  20407. };
  20408. var TYPE$E = tokenizer.TYPE;
  20409. var DELIM$6 = TYPE$E.Delim;
  20410. var IDENT$g = TYPE$E.Ident;
  20411. var DIMENSION$7 = TYPE$E.Dimension;
  20412. var PERCENTAGE$3 = TYPE$E.Percentage;
  20413. var NUMBER$9 = TYPE$E.Number;
  20414. var HASH$5 = TYPE$E.Hash;
  20415. var COLON$5 = TYPE$E.Colon;
  20416. var LEFTSQUAREBRACKET$4 = TYPE$E.LeftSquareBracket;
  20417. var NUMBERSIGN$4 = 0x0023; // U+0023 NUMBER SIGN (#)
  20418. var ASTERISK$6 = 0x002A; // U+002A ASTERISK (*)
  20419. var PLUSSIGN$8 = 0x002B; // U+002B PLUS SIGN (+)
  20420. var SOLIDUS$5 = 0x002F; // U+002F SOLIDUS (/)
  20421. var FULLSTOP$2 = 0x002E; // U+002E FULL STOP (.)
  20422. var GREATERTHANSIGN$2 = 0x003E; // U+003E GREATER-THAN SIGN (>)
  20423. var VERTICALLINE$3 = 0x007C; // U+007C VERTICAL LINE (|)
  20424. var TILDE$2 = 0x007E; // U+007E TILDE (~)
  20425. function getNode(context) {
  20426. switch (this.scanner.tokenType) {
  20427. case LEFTSQUAREBRACKET$4:
  20428. return this.AttributeSelector();
  20429. case HASH$5:
  20430. return this.IdSelector();
  20431. case COLON$5:
  20432. if (this.scanner.lookupType(1) === COLON$5) {
  20433. return this.PseudoElementSelector();
  20434. } else {
  20435. return this.PseudoClassSelector();
  20436. }
  20437. case IDENT$g:
  20438. return this.TypeSelector();
  20439. case NUMBER$9:
  20440. case PERCENTAGE$3:
  20441. return this.Percentage();
  20442. case DIMENSION$7:
  20443. // throws when .123ident
  20444. if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP$2) {
  20445. this.error('Identifier is expected', this.scanner.tokenStart + 1);
  20446. }
  20447. break;
  20448. case DELIM$6:
  20449. var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
  20450. switch (code) {
  20451. case PLUSSIGN$8:
  20452. case GREATERTHANSIGN$2:
  20453. case TILDE$2:
  20454. context.space = null;
  20455. context.ignoreWSAfter = true;
  20456. return this.Combinator();
  20457. case SOLIDUS$5: // /deep/
  20458. return this.Combinator();
  20459. case FULLSTOP$2:
  20460. return this.ClassSelector();
  20461. case ASTERISK$6:
  20462. case VERTICALLINE$3:
  20463. return this.TypeSelector();
  20464. case NUMBERSIGN$4:
  20465. return this.IdSelector();
  20466. }
  20467. break;
  20468. }
  20469. }
  20470. var selector = {
  20471. getNode: getNode
  20472. };
  20473. // legacy IE function
  20474. // expression( <any-value> )
  20475. var expression = function() {
  20476. return this.createSingleNodeList(
  20477. this.Raw(this.scanner.tokenIndex, null, false)
  20478. );
  20479. };
  20480. var TYPE$F = tokenizer.TYPE;
  20481. var rawMode$5 = Raw.mode;
  20482. var COMMA$4 = TYPE$F.Comma;
  20483. // var( <ident> , <value>? )
  20484. var _var = function() {
  20485. var children = this.createList();
  20486. this.scanner.skipSC();
  20487. // NOTE: Don't check more than a first argument is an ident, rest checks are for lexer
  20488. children.push(this.Identifier());
  20489. this.scanner.skipSC();
  20490. if (this.scanner.tokenType === COMMA$4) {
  20491. children.push(this.Operator());
  20492. children.push(this.parseCustomProperty
  20493. ? this.Value(null)
  20494. : this.Raw(this.scanner.tokenIndex, rawMode$5.exclamationMarkOrSemicolon, false)
  20495. );
  20496. }
  20497. return children;
  20498. };
  20499. var value = {
  20500. getNode: _default,
  20501. 'expression': expression,
  20502. 'var': _var
  20503. };
  20504. var scope = {
  20505. AtrulePrelude: atrulePrelude,
  20506. Selector: selector,
  20507. Value: value
  20508. };
  20509. var fontFace = {
  20510. parse: {
  20511. prelude: null,
  20512. block: function() {
  20513. return this.Block(true);
  20514. }
  20515. }
  20516. };
  20517. var TYPE$G = tokenizer.TYPE;
  20518. var STRING$3 = TYPE$G.String;
  20519. var IDENT$h = TYPE$G.Ident;
  20520. var URL$3 = TYPE$G.Url;
  20521. var FUNCTION$5 = TYPE$G.Function;
  20522. var LEFTPARENTHESIS$6 = TYPE$G.LeftParenthesis;
  20523. var _import = {
  20524. parse: {
  20525. prelude: function() {
  20526. var children = this.createList();
  20527. this.scanner.skipSC();
  20528. switch (this.scanner.tokenType) {
  20529. case STRING$3:
  20530. children.push(this.String());
  20531. break;
  20532. case URL$3:
  20533. case FUNCTION$5:
  20534. children.push(this.Url());
  20535. break;
  20536. default:
  20537. this.error('String or url() is expected');
  20538. }
  20539. if (this.lookupNonWSType(0) === IDENT$h ||
  20540. this.lookupNonWSType(0) === LEFTPARENTHESIS$6) {
  20541. children.push(this.WhiteSpace());
  20542. children.push(this.MediaQueryList());
  20543. }
  20544. return children;
  20545. },
  20546. block: null
  20547. }
  20548. };
  20549. var media = {
  20550. parse: {
  20551. prelude: function() {
  20552. return this.createSingleNodeList(
  20553. this.MediaQueryList()
  20554. );
  20555. },
  20556. block: function() {
  20557. return this.Block(false);
  20558. }
  20559. }
  20560. };
  20561. var page = {
  20562. parse: {
  20563. prelude: function() {
  20564. return this.createSingleNodeList(
  20565. this.SelectorList()
  20566. );
  20567. },
  20568. block: function() {
  20569. return this.Block(true);
  20570. }
  20571. }
  20572. };
  20573. var TYPE$H = tokenizer.TYPE;
  20574. var WHITESPACE$a = TYPE$H.WhiteSpace;
  20575. var COMMENT$a = TYPE$H.Comment;
  20576. var IDENT$i = TYPE$H.Ident;
  20577. var FUNCTION$6 = TYPE$H.Function;
  20578. var COLON$6 = TYPE$H.Colon;
  20579. var LEFTPARENTHESIS$7 = TYPE$H.LeftParenthesis;
  20580. function consumeRaw$5() {
  20581. return this.createSingleNodeList(
  20582. this.Raw(this.scanner.tokenIndex, null, false)
  20583. );
  20584. }
  20585. function parentheses() {
  20586. this.scanner.skipSC();
  20587. if (this.scanner.tokenType === IDENT$i &&
  20588. this.lookupNonWSType(1) === COLON$6) {
  20589. return this.createSingleNodeList(
  20590. this.Declaration()
  20591. );
  20592. }
  20593. return readSequence.call(this);
  20594. }
  20595. function readSequence() {
  20596. var children = this.createList();
  20597. var space = null;
  20598. var child;
  20599. this.scanner.skipSC();
  20600. scan:
  20601. while (!this.scanner.eof) {
  20602. switch (this.scanner.tokenType) {
  20603. case WHITESPACE$a:
  20604. space = this.WhiteSpace();
  20605. continue;
  20606. case COMMENT$a:
  20607. this.scanner.next();
  20608. continue;
  20609. case FUNCTION$6:
  20610. child = this.Function(consumeRaw$5, this.scope.AtrulePrelude);
  20611. break;
  20612. case IDENT$i:
  20613. child = this.Identifier();
  20614. break;
  20615. case LEFTPARENTHESIS$7:
  20616. child = this.Parentheses(parentheses, this.scope.AtrulePrelude);
  20617. break;
  20618. default:
  20619. break scan;
  20620. }
  20621. if (space !== null) {
  20622. children.push(space);
  20623. space = null;
  20624. }
  20625. children.push(child);
  20626. }
  20627. return children;
  20628. }
  20629. var supports = {
  20630. parse: {
  20631. prelude: function() {
  20632. var children = readSequence.call(this);
  20633. if (this.getFirstListNode(children) === null) {
  20634. this.error('Condition is expected');
  20635. }
  20636. return children;
  20637. },
  20638. block: function() {
  20639. return this.Block(false);
  20640. }
  20641. }
  20642. };
  20643. var atrule = {
  20644. 'font-face': fontFace,
  20645. 'import': _import,
  20646. 'media': media,
  20647. 'page': page,
  20648. 'supports': supports
  20649. };
  20650. var dir = {
  20651. parse: function() {
  20652. return this.createSingleNodeList(
  20653. this.Identifier()
  20654. );
  20655. }
  20656. };
  20657. var has$1 = {
  20658. parse: function() {
  20659. return this.createSingleNodeList(
  20660. this.SelectorList()
  20661. );
  20662. }
  20663. };
  20664. var lang = {
  20665. parse: function() {
  20666. return this.createSingleNodeList(
  20667. this.Identifier()
  20668. );
  20669. }
  20670. };
  20671. var selectorList = {
  20672. parse: function selectorList() {
  20673. return this.createSingleNodeList(
  20674. this.SelectorList()
  20675. );
  20676. }
  20677. };
  20678. var matches = selectorList;
  20679. var not = selectorList;
  20680. var ALLOW_OF_CLAUSE = true;
  20681. var nthWithOfClause = {
  20682. parse: function nthWithOfClause() {
  20683. return this.createSingleNodeList(
  20684. this.Nth(ALLOW_OF_CLAUSE)
  20685. );
  20686. }
  20687. };
  20688. var nthChild = nthWithOfClause;
  20689. var nthLastChild = nthWithOfClause;
  20690. var DISALLOW_OF_CLAUSE = false;
  20691. var nth$1 = {
  20692. parse: function nth() {
  20693. return this.createSingleNodeList(
  20694. this.Nth(DISALLOW_OF_CLAUSE)
  20695. );
  20696. }
  20697. };
  20698. var nthLastOfType = nth$1;
  20699. var nthOfType = nth$1;
  20700. var slotted = {
  20701. parse: function compoundSelector() {
  20702. return this.createSingleNodeList(
  20703. this.Selector()
  20704. );
  20705. }
  20706. };
  20707. var pseudo = {
  20708. 'dir': dir,
  20709. 'has': has$1,
  20710. 'lang': lang,
  20711. 'matches': matches,
  20712. 'not': not,
  20713. 'nth-child': nthChild,
  20714. 'nth-last-child': nthLastChild,
  20715. 'nth-last-of-type': nthLastOfType,
  20716. 'nth-of-type': nthOfType,
  20717. 'slotted': slotted
  20718. };
  20719. var parser = {
  20720. parseContext: {
  20721. default: 'StyleSheet',
  20722. stylesheet: 'StyleSheet',
  20723. atrule: 'Atrule',
  20724. atrulePrelude: function(options) {
  20725. return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
  20726. },
  20727. mediaQueryList: 'MediaQueryList',
  20728. mediaQuery: 'MediaQuery',
  20729. rule: 'Rule',
  20730. selectorList: 'SelectorList',
  20731. selector: 'Selector',
  20732. block: function() {
  20733. return this.Block(true);
  20734. },
  20735. declarationList: 'DeclarationList',
  20736. declaration: 'Declaration',
  20737. value: 'Value'
  20738. },
  20739. scope: scope,
  20740. atrule: atrule,
  20741. pseudo: pseudo,
  20742. node: node
  20743. };
  20744. var walker = {
  20745. node: node
  20746. };
  20747. var _from = "css-tree@^1.0.0";
  20748. var _id = "css-tree@1.0.0";
  20749. var _inBundle = false;
  20750. var _integrity = "sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw==";
  20751. var _location = "/css-tree";
  20752. var _phantomChildren = {
  20753. };
  20754. var _requested = {
  20755. type: "range",
  20756. registry: true,
  20757. raw: "css-tree@^1.0.0",
  20758. name: "css-tree",
  20759. escapedName: "css-tree",
  20760. rawSpec: "^1.0.0",
  20761. saveSpec: null,
  20762. fetchSpec: "^1.0.0"
  20763. };
  20764. var _requiredBy = [
  20765. "/"
  20766. ];
  20767. var _resolved = "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0.tgz";
  20768. var _shasum = "21993fa270d742642a90409a2c0cb3ac0298adf6";
  20769. var _spec = "css-tree@^1.0.0";
  20770. var _where = "/Users/rdvornov/git/csso";
  20771. var author = {
  20772. name: "Roman Dvornov",
  20773. email: "rdvornov@gmail.com",
  20774. url: "https://github.com/lahmatiy"
  20775. };
  20776. var bugs = {
  20777. url: "https://github.com/csstree/csstree/issues"
  20778. };
  20779. var bundleDependencies = false;
  20780. var dependencies = {
  20781. "mdn-data": "2.0.12",
  20782. "source-map": "^0.6.1"
  20783. };
  20784. var deprecated = false;
  20785. var description = "A tool set for CSS: fast detailed parser (CSS → AST), walker (AST traversal), generator (AST → CSS) and lexer (validation and matching) based on specs and browser implementations";
  20786. var devDependencies = {
  20787. "@rollup/plugin-commonjs": "^11.0.2",
  20788. "@rollup/plugin-json": "^4.0.2",
  20789. "@rollup/plugin-node-resolve": "^7.1.1",
  20790. coveralls: "^3.0.9",
  20791. eslint: "^6.8.0",
  20792. "json-to-ast": "^2.1.0",
  20793. mocha: "^5.2.0",
  20794. nyc: "^14.1.1",
  20795. rollup: "^1.32.1",
  20796. "rollup-plugin-terser": "^5.3.0"
  20797. };
  20798. var engines = {
  20799. node: ">=8.0.0"
  20800. };
  20801. var files = [
  20802. "data",
  20803. "dist",
  20804. "lib"
  20805. ];
  20806. var homepage = "https://github.com/csstree/csstree#readme";
  20807. var jsdelivr = "dist/csstree.min.js";
  20808. var keywords$1 = [
  20809. "css",
  20810. "ast",
  20811. "tokenizer",
  20812. "parser",
  20813. "walker",
  20814. "lexer",
  20815. "generator",
  20816. "utils",
  20817. "syntax",
  20818. "validation"
  20819. ];
  20820. var license = "MIT";
  20821. var main = "lib/index.js";
  20822. var name = "css-tree";
  20823. var repository = {
  20824. type: "git",
  20825. url: "git+https://github.com/csstree/csstree.git"
  20826. };
  20827. var scripts = {
  20828. build: "rollup --config",
  20829. coverage: "nyc npm test",
  20830. coveralls: "nyc report --reporter=text-lcov | coveralls",
  20831. hydrogen: "node --trace-hydrogen --trace-phase=Z --trace-deopt --code-comments --hydrogen-track-positions --redirect-code-traces --redirect-code-traces-to=code.asm --trace_hydrogen_file=code.cfg --print-opt-code bin/parse --stat -o /dev/null",
  20832. lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
  20833. "lint-and-test": "npm run lint && npm test",
  20834. prepublishOnly: "npm run build",
  20835. "review:syntax-patch": "node scripts/review-syntax-patch",
  20836. test: "mocha --reporter progress",
  20837. travis: "nyc npm run lint-and-test && npm run coveralls",
  20838. "update:docs": "node scripts/update-docs"
  20839. };
  20840. var unpkg = "dist/csstree.min.js";
  20841. var version = "1.0.0";
  20842. var _package = {
  20843. _from: _from,
  20844. _id: _id,
  20845. _inBundle: _inBundle,
  20846. _integrity: _integrity,
  20847. _location: _location,
  20848. _phantomChildren: _phantomChildren,
  20849. _requested: _requested,
  20850. _requiredBy: _requiredBy,
  20851. _resolved: _resolved,
  20852. _shasum: _shasum,
  20853. _spec: _spec,
  20854. _where: _where,
  20855. author: author,
  20856. bugs: bugs,
  20857. bundleDependencies: bundleDependencies,
  20858. dependencies: dependencies,
  20859. deprecated: deprecated,
  20860. description: description,
  20861. devDependencies: devDependencies,
  20862. engines: engines,
  20863. files: files,
  20864. homepage: homepage,
  20865. jsdelivr: jsdelivr,
  20866. keywords: keywords$1,
  20867. license: license,
  20868. main: main,
  20869. name: name,
  20870. repository: repository,
  20871. scripts: scripts,
  20872. unpkg: unpkg,
  20873. version: version
  20874. };
  20875. var _package$1 = /*#__PURE__*/Object.freeze({
  20876. __proto__: null,
  20877. _from: _from,
  20878. _id: _id,
  20879. _inBundle: _inBundle,
  20880. _integrity: _integrity,
  20881. _location: _location,
  20882. _phantomChildren: _phantomChildren,
  20883. _requested: _requested,
  20884. _requiredBy: _requiredBy,
  20885. _resolved: _resolved,
  20886. _shasum: _shasum,
  20887. _spec: _spec,
  20888. _where: _where,
  20889. author: author,
  20890. bugs: bugs,
  20891. bundleDependencies: bundleDependencies,
  20892. dependencies: dependencies,
  20893. deprecated: deprecated,
  20894. description: description,
  20895. devDependencies: devDependencies,
  20896. engines: engines,
  20897. files: files,
  20898. homepage: homepage,
  20899. jsdelivr: jsdelivr,
  20900. keywords: keywords$1,
  20901. license: license,
  20902. main: main,
  20903. name: name,
  20904. repository: repository,
  20905. scripts: scripts,
  20906. unpkg: unpkg,
  20907. version: version,
  20908. 'default': _package
  20909. });
  20910. var require$$4 = getCjsExportFromNamespace(_package$1);
  20911. function merge() {
  20912. var dest = {};
  20913. for (var i = 0; i < arguments.length; i++) {
  20914. var src = arguments[i];
  20915. for (var key in src) {
  20916. dest[key] = src[key];
  20917. }
  20918. }
  20919. return dest;
  20920. }
  20921. var syntax = create$4.create(
  20922. merge(
  20923. lexer,
  20924. parser,
  20925. walker
  20926. )
  20927. );
  20928. var version$1 = require$$4.version;
  20929. syntax.version = version$1;
  20930. var lib = syntax;
  20931. var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
  20932. function buildMap(list, caseInsensitive) {
  20933. var map = Object.create(null);
  20934. if (!Array.isArray(list)) {
  20935. return null;
  20936. }
  20937. for (var i = 0; i < list.length; i++) {
  20938. var name = list[i];
  20939. if (caseInsensitive) {
  20940. name = name.toLowerCase();
  20941. }
  20942. map[name] = true;
  20943. }
  20944. return map;
  20945. }
  20946. function buildList(data) {
  20947. if (!data) {
  20948. return null;
  20949. }
  20950. var tags = buildMap(data.tags, true);
  20951. var ids = buildMap(data.ids);
  20952. var classes = buildMap(data.classes);
  20953. if (tags === null &&
  20954. ids === null &&
  20955. classes === null) {
  20956. return null;
  20957. }
  20958. return {
  20959. tags: tags,
  20960. ids: ids,
  20961. classes: classes
  20962. };
  20963. }
  20964. function buildIndex(data) {
  20965. var scopes = false;
  20966. if (data.scopes && Array.isArray(data.scopes)) {
  20967. scopes = Object.create(null);
  20968. for (var i = 0; i < data.scopes.length; i++) {
  20969. var list = data.scopes[i];
  20970. if (!list || !Array.isArray(list)) {
  20971. throw new Error('Wrong usage format');
  20972. }
  20973. for (var j = 0; j < list.length; j++) {
  20974. var name = list[j];
  20975. if (hasOwnProperty$6.call(scopes, name)) {
  20976. throw new Error('Class can\'t be used for several scopes: ' + name);
  20977. }
  20978. scopes[name] = i + 1;
  20979. }
  20980. }
  20981. }
  20982. return {
  20983. whitelist: buildList(data),
  20984. blacklist: buildList(data.blacklist),
  20985. scopes: scopes
  20986. };
  20987. }
  20988. var usage = {
  20989. buildIndex: buildIndex
  20990. };
  20991. var utils$1 = {
  20992. hasNoChildren: function(node) {
  20993. return !node || !node.children || node.children.isEmpty();
  20994. },
  20995. isNodeChildrenList: function(node, list) {
  20996. return node !== null && node.children === list;
  20997. }
  20998. };
  20999. var resolveKeyword = lib.keyword;
  21000. var { hasNoChildren } = utils$1;
  21001. var Atrule$1 = function cleanAtrule(node, item, list) {
  21002. if (node.block) {
  21003. // otherwise removed at-rule don't prevent @import for removal
  21004. if (this.stylesheet !== null) {
  21005. this.stylesheet.firstAtrulesAllowed = false;
  21006. }
  21007. if (hasNoChildren(node.block)) {
  21008. list.remove(item);
  21009. return;
  21010. }
  21011. }
  21012. switch (node.name) {
  21013. case 'charset':
  21014. if (hasNoChildren(node.prelude)) {
  21015. list.remove(item);
  21016. return;
  21017. }
  21018. // if there is any rule before @charset -> remove it
  21019. if (item.prev) {
  21020. list.remove(item);
  21021. return;
  21022. }
  21023. break;
  21024. case 'import':
  21025. if (this.stylesheet === null || !this.stylesheet.firstAtrulesAllowed) {
  21026. list.remove(item);
  21027. return;
  21028. }
  21029. // if there are some rules that not an @import or @charset before @import
  21030. // remove it
  21031. list.prevUntil(item.prev, function(rule) {
  21032. if (rule.type === 'Atrule') {
  21033. if (rule.name === 'import' || rule.name === 'charset') {
  21034. return;
  21035. }
  21036. }
  21037. this.root.firstAtrulesAllowed = false;
  21038. list.remove(item);
  21039. return true;
  21040. }, this);
  21041. break;
  21042. default:
  21043. var name = resolveKeyword(node.name).basename;
  21044. if (name === 'keyframes' ||
  21045. name === 'media' ||
  21046. name === 'supports') {
  21047. // drop at-rule with no prelude
  21048. if (hasNoChildren(node.prelude) || hasNoChildren(node.block)) {
  21049. list.remove(item);
  21050. }
  21051. }
  21052. }
  21053. };
  21054. var Comment$1 = function cleanComment(data, item, list) {
  21055. list.remove(item);
  21056. };
  21057. var Declaration$1 = function cleanDeclartion(node, item, list) {
  21058. if (node.value.children && node.value.children.isEmpty()) {
  21059. list.remove(item);
  21060. }
  21061. };
  21062. var { isNodeChildrenList } = utils$1;
  21063. var Raw$1 = function cleanRaw(node, item, list) {
  21064. // raw in stylesheet or block children
  21065. if (isNodeChildrenList(this.stylesheet, list) ||
  21066. isNodeChildrenList(this.block, list)) {
  21067. list.remove(item);
  21068. }
  21069. };
  21070. var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
  21071. var walk$1 = lib.walk;
  21072. var { hasNoChildren: hasNoChildren$1 } = utils$1;
  21073. function cleanUnused(selectorList, usageData) {
  21074. selectorList.children.each(function(selector, item, list) {
  21075. var shouldRemove = false;
  21076. walk$1(selector, function(node) {
  21077. // ignore nodes in nested selectors
  21078. if (this.selector === null || this.selector === selectorList) {
  21079. switch (node.type) {
  21080. case 'SelectorList':
  21081. // TODO: remove toLowerCase when pseudo selectors will be normalized
  21082. // ignore selectors inside :not()
  21083. if (this.function === null || this.function.name.toLowerCase() !== 'not') {
  21084. if (cleanUnused(node, usageData)) {
  21085. shouldRemove = true;
  21086. }
  21087. }
  21088. break;
  21089. case 'ClassSelector':
  21090. if (usageData.whitelist !== null &&
  21091. usageData.whitelist.classes !== null &&
  21092. !hasOwnProperty$7.call(usageData.whitelist.classes, node.name)) {
  21093. shouldRemove = true;
  21094. }
  21095. if (usageData.blacklist !== null &&
  21096. usageData.blacklist.classes !== null &&
  21097. hasOwnProperty$7.call(usageData.blacklist.classes, node.name)) {
  21098. shouldRemove = true;
  21099. }
  21100. break;
  21101. case 'IdSelector':
  21102. if (usageData.whitelist !== null &&
  21103. usageData.whitelist.ids !== null &&
  21104. !hasOwnProperty$7.call(usageData.whitelist.ids, node.name)) {
  21105. shouldRemove = true;
  21106. }
  21107. if (usageData.blacklist !== null &&
  21108. usageData.blacklist.ids !== null &&
  21109. hasOwnProperty$7.call(usageData.blacklist.ids, node.name)) {
  21110. shouldRemove = true;
  21111. }
  21112. break;
  21113. case 'TypeSelector':
  21114. // TODO: remove toLowerCase when type selectors will be normalized
  21115. // ignore universal selectors
  21116. if (node.name.charAt(node.name.length - 1) !== '*') {
  21117. if (usageData.whitelist !== null &&
  21118. usageData.whitelist.tags !== null &&
  21119. !hasOwnProperty$7.call(usageData.whitelist.tags, node.name.toLowerCase())) {
  21120. shouldRemove = true;
  21121. }
  21122. if (usageData.blacklist !== null &&
  21123. usageData.blacklist.tags !== null &&
  21124. hasOwnProperty$7.call(usageData.blacklist.tags, node.name.toLowerCase())) {
  21125. shouldRemove = true;
  21126. }
  21127. }
  21128. break;
  21129. }
  21130. }
  21131. });
  21132. if (shouldRemove) {
  21133. list.remove(item);
  21134. }
  21135. });
  21136. return selectorList.children.isEmpty();
  21137. }
  21138. var Rule$1 = function cleanRule(node, item, list, options) {
  21139. if (hasNoChildren$1(node.prelude) || hasNoChildren$1(node.block)) {
  21140. list.remove(item);
  21141. return;
  21142. }
  21143. var usageData = options.usage;
  21144. if (usageData && (usageData.whitelist !== null || usageData.blacklist !== null)) {
  21145. cleanUnused(node.prelude, usageData);
  21146. if (hasNoChildren$1(node.prelude)) {
  21147. list.remove(item);
  21148. return;
  21149. }
  21150. }
  21151. };
  21152. // remove useless universal selector
  21153. var TypeSelector$1 = function cleanTypeSelector(node, item, list) {
  21154. var name = item.data.name;
  21155. // check it's a non-namespaced universal selector
  21156. if (name !== '*') {
  21157. return;
  21158. }
  21159. // remove when universal selector before other selectors
  21160. var nextType = item.next && item.next.data.type;
  21161. if (nextType === 'IdSelector' ||
  21162. nextType === 'ClassSelector' ||
  21163. nextType === 'AttributeSelector' ||
  21164. nextType === 'PseudoClassSelector' ||
  21165. nextType === 'PseudoElementSelector') {
  21166. list.remove(item);
  21167. }
  21168. };
  21169. var { isNodeChildrenList: isNodeChildrenList$1 } = utils$1;
  21170. function isSafeOperator(node) {
  21171. return node.type === 'Operator' && node.value !== '+' && node.value !== '-';
  21172. }
  21173. var WhiteSpace$2 = function cleanWhitespace(node, item, list) {
  21174. // remove when first or last item in sequence
  21175. if (item.next === null || item.prev === null) {
  21176. list.remove(item);
  21177. return;
  21178. }
  21179. // white space in stylesheet or block children
  21180. if (isNodeChildrenList$1(this.stylesheet, list) ||
  21181. isNodeChildrenList$1(this.block, list)) {
  21182. list.remove(item);
  21183. return;
  21184. }
  21185. if (item.next.data.type === 'WhiteSpace') {
  21186. list.remove(item);
  21187. return;
  21188. }
  21189. if (isSafeOperator(item.prev.data) || isSafeOperator(item.next.data)) {
  21190. list.remove(item);
  21191. return;
  21192. }
  21193. };
  21194. var walk$2 = lib.walk;
  21195. var handlers = {
  21196. Atrule: Atrule$1,
  21197. Comment: Comment$1,
  21198. Declaration: Declaration$1,
  21199. Raw: Raw$1,
  21200. Rule: Rule$1,
  21201. TypeSelector: TypeSelector$1,
  21202. WhiteSpace: WhiteSpace$2
  21203. };
  21204. var clean = function(ast, options) {
  21205. walk$2(ast, {
  21206. leave: function(node, item, list) {
  21207. if (handlers.hasOwnProperty(node.type)) {
  21208. handlers[node.type].call(this, node, item, list, options);
  21209. }
  21210. }
  21211. });
  21212. };
  21213. var keyframes = function(node) {
  21214. node.block.children.each(function(rule) {
  21215. rule.prelude.children.each(function(simpleselector) {
  21216. simpleselector.children.each(function(data, item) {
  21217. if (data.type === 'Percentage' && data.value === '100') {
  21218. item.data = {
  21219. type: 'TypeSelector',
  21220. loc: data.loc,
  21221. name: 'to'
  21222. };
  21223. } else if (data.type === 'TypeSelector' && data.name === 'from') {
  21224. item.data = {
  21225. type: 'Percentage',
  21226. loc: data.loc,
  21227. value: '0'
  21228. };
  21229. }
  21230. });
  21231. });
  21232. });
  21233. };
  21234. var resolveKeyword$1 = lib.keyword;
  21235. var Atrule$2 = function(node) {
  21236. // compress @keyframe selectors
  21237. if (resolveKeyword$1(node.name).basename === 'keyframes') {
  21238. keyframes(node);
  21239. }
  21240. };
  21241. // Can unquote attribute detection
  21242. // Adopted implementation of Mathias Bynens
  21243. // https://github.com/mathiasbynens/mothereff.in/blob/master/unquoted-attributes/eff.js
  21244. var escapesRx = /\\([0-9A-Fa-f]{1,6})(\r\n|[ \t\n\f\r])?|\\./g;
  21245. var blockUnquoteRx = /^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;
  21246. function canUnquote(value) {
  21247. if (value === '' || value === '-') {
  21248. return;
  21249. }
  21250. // Escapes are valid, so replace them with a valid non-empty string
  21251. value = value.replace(escapesRx, 'a');
  21252. return !blockUnquoteRx.test(value);
  21253. }
  21254. var AttributeSelector$1 = function(node) {
  21255. var attrValue = node.value;
  21256. if (!attrValue || attrValue.type !== 'String') {
  21257. return;
  21258. }
  21259. var unquotedValue = attrValue.value.replace(/^(.)(.*)\1$/, '$2');
  21260. if (canUnquote(unquotedValue)) {
  21261. node.value = {
  21262. type: 'Identifier',
  21263. loc: attrValue.loc,
  21264. name: unquotedValue
  21265. };
  21266. }
  21267. };
  21268. var font$1 = function compressFont(node) {
  21269. var list = node.children;
  21270. list.eachRight(function(node, item) {
  21271. if (node.type === 'Identifier') {
  21272. if (node.name === 'bold') {
  21273. item.data = {
  21274. type: 'Number',
  21275. loc: node.loc,
  21276. value: '700'
  21277. };
  21278. } else if (node.name === 'normal') {
  21279. var prev = item.prev;
  21280. if (prev && prev.data.type === 'Operator' && prev.data.value === '/') {
  21281. this.remove(prev);
  21282. }
  21283. this.remove(item);
  21284. } else if (node.name === 'medium') {
  21285. var next = item.next;
  21286. if (!next || next.data.type !== 'Operator') {
  21287. this.remove(item);
  21288. }
  21289. }
  21290. }
  21291. });
  21292. // remove redundant spaces
  21293. list.each(function(node, item) {
  21294. if (node.type === 'WhiteSpace') {
  21295. if (!item.prev || !item.next || item.next.data.type === 'WhiteSpace') {
  21296. this.remove(item);
  21297. }
  21298. }
  21299. });
  21300. if (list.isEmpty()) {
  21301. list.insert(list.createItem({
  21302. type: 'Identifier',
  21303. name: 'normal'
  21304. }));
  21305. }
  21306. };
  21307. var fontWeight = function compressFontWeight(node) {
  21308. var value = node.children.head.data;
  21309. if (value.type === 'Identifier') {
  21310. switch (value.name) {
  21311. case 'normal':
  21312. node.children.head.data = {
  21313. type: 'Number',
  21314. loc: value.loc,
  21315. value: '400'
  21316. };
  21317. break;
  21318. case 'bold':
  21319. node.children.head.data = {
  21320. type: 'Number',
  21321. loc: value.loc,
  21322. value: '700'
  21323. };
  21324. break;
  21325. }
  21326. }
  21327. };
  21328. var List$1 = lib.List;
  21329. var background$1 = function compressBackground(node) {
  21330. function lastType() {
  21331. if (buffer.length) {
  21332. return buffer[buffer.length - 1].type;
  21333. }
  21334. }
  21335. function flush() {
  21336. if (lastType() === 'WhiteSpace') {
  21337. buffer.pop();
  21338. }
  21339. if (!buffer.length) {
  21340. buffer.unshift(
  21341. {
  21342. type: 'Number',
  21343. loc: null,
  21344. value: '0'
  21345. },
  21346. {
  21347. type: 'WhiteSpace',
  21348. value: ' '
  21349. },
  21350. {
  21351. type: 'Number',
  21352. loc: null,
  21353. value: '0'
  21354. }
  21355. );
  21356. }
  21357. newValue.push.apply(newValue, buffer);
  21358. buffer = [];
  21359. }
  21360. var newValue = [];
  21361. var buffer = [];
  21362. node.children.each(function(node) {
  21363. if (node.type === 'Operator' && node.value === ',') {
  21364. flush();
  21365. newValue.push(node);
  21366. return;
  21367. }
  21368. // remove defaults
  21369. if (node.type === 'Identifier') {
  21370. if (node.name === 'transparent' ||
  21371. node.name === 'none' ||
  21372. node.name === 'repeat' ||
  21373. node.name === 'scroll') {
  21374. return;
  21375. }
  21376. }
  21377. // don't add redundant spaces
  21378. if (node.type === 'WhiteSpace' && (!buffer.length || lastType() === 'WhiteSpace')) {
  21379. return;
  21380. }
  21381. buffer.push(node);
  21382. });
  21383. flush();
  21384. node.children = new List$1().fromArray(newValue);
  21385. };
  21386. function removeItemAndRedundantWhiteSpace(list, item) {
  21387. var prev = item.prev;
  21388. var next = item.next;
  21389. if (next !== null) {
  21390. if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) {
  21391. list.remove(next);
  21392. }
  21393. } else if (prev !== null && prev.data.type === 'WhiteSpace') {
  21394. list.remove(prev);
  21395. }
  21396. list.remove(item);
  21397. }
  21398. var border$1 = function compressBorder(node) {
  21399. node.children.each(function(node, item, list) {
  21400. if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') {
  21401. if (list.head === list.tail) {
  21402. // replace `none` for zero when `none` is a single term
  21403. item.data = {
  21404. type: 'Number',
  21405. loc: node.loc,
  21406. value: '0'
  21407. };
  21408. } else {
  21409. removeItemAndRedundantWhiteSpace(list, item);
  21410. }
  21411. }
  21412. });
  21413. };
  21414. var resolveName = lib.property;
  21415. var handlers$1 = {
  21416. 'font': font$1,
  21417. 'font-weight': fontWeight,
  21418. 'background': background$1,
  21419. 'border': border$1,
  21420. 'outline': border$1
  21421. };
  21422. var Value$1 = function compressValue(node) {
  21423. if (!this.declaration) {
  21424. return;
  21425. }
  21426. var property = resolveName(this.declaration.property);
  21427. if (handlers$1.hasOwnProperty(property.basename)) {
  21428. handlers$1[property.basename](node);
  21429. }
  21430. };
  21431. var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
  21432. var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
  21433. var unsafeToRemovePlusSignAfter = {
  21434. Dimension: true,
  21435. Hash: true,
  21436. Identifier: true,
  21437. Number: true,
  21438. Raw: true,
  21439. UnicodeRange: true
  21440. };
  21441. function packNumber(value, item) {
  21442. // omit plus sign only if no prev or prev is safe type
  21443. var regexp = item && item.prev !== null && unsafeToRemovePlusSignAfter.hasOwnProperty(item.prev.data.type)
  21444. ? KEEP_PLUSSIGN
  21445. : OMIT_PLUSSIGN;
  21446. // 100 -> '100'
  21447. // 00100 -> '100'
  21448. // +100 -> '100' (only when safe, e.g. omitting plus sign for 1px+1px leads to single dimension instead of two)
  21449. // -100 -> '-100'
  21450. // 0.123 -> '.123'
  21451. // 0.12300 -> '.123'
  21452. // 0.0 -> ''
  21453. // 0 -> ''
  21454. // -0 -> '-'
  21455. value = String(value).replace(regexp, '$1$2$3');
  21456. if (value === '' || value === '-') {
  21457. value = '0';
  21458. }
  21459. return value;
  21460. }
  21461. var _Number$1 = function(node, item) {
  21462. node.value = packNumber(node.value, item);
  21463. };
  21464. var pack = packNumber;
  21465. _Number$1.pack = pack;
  21466. var packNumber$1 = _Number$1.pack;
  21467. var LENGTH_UNIT = {
  21468. // absolute length units
  21469. 'px': true,
  21470. 'mm': true,
  21471. 'cm': true,
  21472. 'in': true,
  21473. 'pt': true,
  21474. 'pc': true,
  21475. // relative length units
  21476. 'em': true,
  21477. 'ex': true,
  21478. 'ch': true,
  21479. 'rem': true,
  21480. // viewport-percentage lengths
  21481. 'vh': true,
  21482. 'vw': true,
  21483. 'vmin': true,
  21484. 'vmax': true,
  21485. 'vm': true
  21486. };
  21487. var Dimension$1 = function compressDimension(node, item) {
  21488. var value = packNumber$1(node.value, item);
  21489. node.value = value;
  21490. if (value === '0' && this.declaration !== null && this.atrulePrelude === null) {
  21491. var unit = node.unit.toLowerCase();
  21492. // only length values can be compressed
  21493. if (!LENGTH_UNIT.hasOwnProperty(unit)) {
  21494. return;
  21495. }
  21496. // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11
  21497. // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11
  21498. if (this.declaration.property === '-ms-flex' ||
  21499. this.declaration.property === 'flex') {
  21500. return;
  21501. }
  21502. // issue #222: don't remove units inside calc
  21503. if (this.function && this.function.name === 'calc') {
  21504. return;
  21505. }
  21506. item.data = {
  21507. type: 'Number',
  21508. loc: node.loc,
  21509. value: value
  21510. };
  21511. }
  21512. };
  21513. var lexer$1 = lib.lexer;
  21514. var packNumber$2 = _Number$1.pack;
  21515. var blacklist = new Set([
  21516. // see https://github.com/jakubpawlowicz/clean-css/issues/957
  21517. 'width',
  21518. 'min-width',
  21519. 'max-width',
  21520. 'height',
  21521. 'min-height',
  21522. 'max-height',
  21523. // issue #410: Don’t remove units in flex-basis value for (-ms-)flex shorthand
  21524. // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11
  21525. // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11
  21526. 'flex',
  21527. '-ms-flex'
  21528. ]);
  21529. var Percentage$1 = function compressPercentage(node, item) {
  21530. node.value = packNumber$2(node.value, item);
  21531. if (node.value === '0' && this.declaration && !blacklist.has(this.declaration.property)) {
  21532. // try to convert a number
  21533. item.data = {
  21534. type: 'Number',
  21535. loc: node.loc,
  21536. value: node.value
  21537. };
  21538. // that's ok only when new value matches on length
  21539. if (!lexer$1.matchDeclaration(this.declaration).isType(item.data, 'length')) {
  21540. // otherwise rollback changes
  21541. item.data = node;
  21542. }
  21543. }
  21544. };
  21545. var _String$1 = function(node) {
  21546. var value = node.value;
  21547. // remove escaped newlines, i.e.
  21548. // .a { content: "foo\
  21549. // bar"}
  21550. // ->
  21551. // .a { content: "foobar" }
  21552. value = value.replace(/\\(\r\n|\r|\n|\f)/g, '');
  21553. node.value = value;
  21554. };
  21555. var UNICODE = '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?';
  21556. var ESCAPE = '(' + UNICODE + '|\\\\[^\\n\\r\\f0-9a-fA-F])';
  21557. var NONPRINTABLE = '\u0000\u0008\u000b\u000e-\u001f\u007f';
  21558. var SAFE_URL = new RegExp('^(' + ESCAPE + '|[^\"\'\\(\\)\\\\\\s' + NONPRINTABLE + '])*$', 'i');
  21559. var Url$1 = function(node) {
  21560. var value = node.value;
  21561. if (value.type !== 'String') {
  21562. return;
  21563. }
  21564. var quote = value.value[0];
  21565. var url = value.value.substr(1, value.value.length - 2);
  21566. // convert `\\` to `/`
  21567. url = url.replace(/\\\\/g, '/');
  21568. // remove quotes when safe
  21569. // https://www.w3.org/TR/css-syntax-3/#url-unquoted-diagram
  21570. if (SAFE_URL.test(url)) {
  21571. node.value = {
  21572. type: 'Raw',
  21573. loc: node.value.loc,
  21574. value: url
  21575. };
  21576. } else {
  21577. // use double quotes if string has no double quotes
  21578. // otherwise use original quotes
  21579. // TODO: make better quote type selection
  21580. node.value.value = url.indexOf('"') === -1 ? '"' + url + '"' : quote + url + quote;
  21581. }
  21582. };
  21583. var lexer$2 = lib.lexer;
  21584. var packNumber$3 = _Number$1.pack;
  21585. // http://www.w3.org/TR/css3-color/#svg-color
  21586. var NAME_TO_HEX = {
  21587. 'aliceblue': 'f0f8ff',
  21588. 'antiquewhite': 'faebd7',
  21589. 'aqua': '0ff',
  21590. 'aquamarine': '7fffd4',
  21591. 'azure': 'f0ffff',
  21592. 'beige': 'f5f5dc',
  21593. 'bisque': 'ffe4c4',
  21594. 'black': '000',
  21595. 'blanchedalmond': 'ffebcd',
  21596. 'blue': '00f',
  21597. 'blueviolet': '8a2be2',
  21598. 'brown': 'a52a2a',
  21599. 'burlywood': 'deb887',
  21600. 'cadetblue': '5f9ea0',
  21601. 'chartreuse': '7fff00',
  21602. 'chocolate': 'd2691e',
  21603. 'coral': 'ff7f50',
  21604. 'cornflowerblue': '6495ed',
  21605. 'cornsilk': 'fff8dc',
  21606. 'crimson': 'dc143c',
  21607. 'cyan': '0ff',
  21608. 'darkblue': '00008b',
  21609. 'darkcyan': '008b8b',
  21610. 'darkgoldenrod': 'b8860b',
  21611. 'darkgray': 'a9a9a9',
  21612. 'darkgrey': 'a9a9a9',
  21613. 'darkgreen': '006400',
  21614. 'darkkhaki': 'bdb76b',
  21615. 'darkmagenta': '8b008b',
  21616. 'darkolivegreen': '556b2f',
  21617. 'darkorange': 'ff8c00',
  21618. 'darkorchid': '9932cc',
  21619. 'darkred': '8b0000',
  21620. 'darksalmon': 'e9967a',
  21621. 'darkseagreen': '8fbc8f',
  21622. 'darkslateblue': '483d8b',
  21623. 'darkslategray': '2f4f4f',
  21624. 'darkslategrey': '2f4f4f',
  21625. 'darkturquoise': '00ced1',
  21626. 'darkviolet': '9400d3',
  21627. 'deeppink': 'ff1493',
  21628. 'deepskyblue': '00bfff',
  21629. 'dimgray': '696969',
  21630. 'dimgrey': '696969',
  21631. 'dodgerblue': '1e90ff',
  21632. 'firebrick': 'b22222',
  21633. 'floralwhite': 'fffaf0',
  21634. 'forestgreen': '228b22',
  21635. 'fuchsia': 'f0f',
  21636. 'gainsboro': 'dcdcdc',
  21637. 'ghostwhite': 'f8f8ff',
  21638. 'gold': 'ffd700',
  21639. 'goldenrod': 'daa520',
  21640. 'gray': '808080',
  21641. 'grey': '808080',
  21642. 'green': '008000',
  21643. 'greenyellow': 'adff2f',
  21644. 'honeydew': 'f0fff0',
  21645. 'hotpink': 'ff69b4',
  21646. 'indianred': 'cd5c5c',
  21647. 'indigo': '4b0082',
  21648. 'ivory': 'fffff0',
  21649. 'khaki': 'f0e68c',
  21650. 'lavender': 'e6e6fa',
  21651. 'lavenderblush': 'fff0f5',
  21652. 'lawngreen': '7cfc00',
  21653. 'lemonchiffon': 'fffacd',
  21654. 'lightblue': 'add8e6',
  21655. 'lightcoral': 'f08080',
  21656. 'lightcyan': 'e0ffff',
  21657. 'lightgoldenrodyellow': 'fafad2',
  21658. 'lightgray': 'd3d3d3',
  21659. 'lightgrey': 'd3d3d3',
  21660. 'lightgreen': '90ee90',
  21661. 'lightpink': 'ffb6c1',
  21662. 'lightsalmon': 'ffa07a',
  21663. 'lightseagreen': '20b2aa',
  21664. 'lightskyblue': '87cefa',
  21665. 'lightslategray': '789',
  21666. 'lightslategrey': '789',
  21667. 'lightsteelblue': 'b0c4de',
  21668. 'lightyellow': 'ffffe0',
  21669. 'lime': '0f0',
  21670. 'limegreen': '32cd32',
  21671. 'linen': 'faf0e6',
  21672. 'magenta': 'f0f',
  21673. 'maroon': '800000',
  21674. 'mediumaquamarine': '66cdaa',
  21675. 'mediumblue': '0000cd',
  21676. 'mediumorchid': 'ba55d3',
  21677. 'mediumpurple': '9370db',
  21678. 'mediumseagreen': '3cb371',
  21679. 'mediumslateblue': '7b68ee',
  21680. 'mediumspringgreen': '00fa9a',
  21681. 'mediumturquoise': '48d1cc',
  21682. 'mediumvioletred': 'c71585',
  21683. 'midnightblue': '191970',
  21684. 'mintcream': 'f5fffa',
  21685. 'mistyrose': 'ffe4e1',
  21686. 'moccasin': 'ffe4b5',
  21687. 'navajowhite': 'ffdead',
  21688. 'navy': '000080',
  21689. 'oldlace': 'fdf5e6',
  21690. 'olive': '808000',
  21691. 'olivedrab': '6b8e23',
  21692. 'orange': 'ffa500',
  21693. 'orangered': 'ff4500',
  21694. 'orchid': 'da70d6',
  21695. 'palegoldenrod': 'eee8aa',
  21696. 'palegreen': '98fb98',
  21697. 'paleturquoise': 'afeeee',
  21698. 'palevioletred': 'db7093',
  21699. 'papayawhip': 'ffefd5',
  21700. 'peachpuff': 'ffdab9',
  21701. 'peru': 'cd853f',
  21702. 'pink': 'ffc0cb',
  21703. 'plum': 'dda0dd',
  21704. 'powderblue': 'b0e0e6',
  21705. 'purple': '800080',
  21706. 'rebeccapurple': '639',
  21707. 'red': 'f00',
  21708. 'rosybrown': 'bc8f8f',
  21709. 'royalblue': '4169e1',
  21710. 'saddlebrown': '8b4513',
  21711. 'salmon': 'fa8072',
  21712. 'sandybrown': 'f4a460',
  21713. 'seagreen': '2e8b57',
  21714. 'seashell': 'fff5ee',
  21715. 'sienna': 'a0522d',
  21716. 'silver': 'c0c0c0',
  21717. 'skyblue': '87ceeb',
  21718. 'slateblue': '6a5acd',
  21719. 'slategray': '708090',
  21720. 'slategrey': '708090',
  21721. 'snow': 'fffafa',
  21722. 'springgreen': '00ff7f',
  21723. 'steelblue': '4682b4',
  21724. 'tan': 'd2b48c',
  21725. 'teal': '008080',
  21726. 'thistle': 'd8bfd8',
  21727. 'tomato': 'ff6347',
  21728. 'turquoise': '40e0d0',
  21729. 'violet': 'ee82ee',
  21730. 'wheat': 'f5deb3',
  21731. 'white': 'fff',
  21732. 'whitesmoke': 'f5f5f5',
  21733. 'yellow': 'ff0',
  21734. 'yellowgreen': '9acd32'
  21735. };
  21736. var HEX_TO_NAME = {
  21737. '800000': 'maroon',
  21738. '800080': 'purple',
  21739. '808000': 'olive',
  21740. '808080': 'gray',
  21741. '00ffff': 'cyan',
  21742. 'f0ffff': 'azure',
  21743. 'f5f5dc': 'beige',
  21744. 'ffe4c4': 'bisque',
  21745. '000000': 'black',
  21746. '0000ff': 'blue',
  21747. 'a52a2a': 'brown',
  21748. 'ff7f50': 'coral',
  21749. 'ffd700': 'gold',
  21750. '008000': 'green',
  21751. '4b0082': 'indigo',
  21752. 'fffff0': 'ivory',
  21753. 'f0e68c': 'khaki',
  21754. '00ff00': 'lime',
  21755. 'faf0e6': 'linen',
  21756. '000080': 'navy',
  21757. 'ffa500': 'orange',
  21758. 'da70d6': 'orchid',
  21759. 'cd853f': 'peru',
  21760. 'ffc0cb': 'pink',
  21761. 'dda0dd': 'plum',
  21762. 'f00': 'red',
  21763. 'ff0000': 'red',
  21764. 'fa8072': 'salmon',
  21765. 'a0522d': 'sienna',
  21766. 'c0c0c0': 'silver',
  21767. 'fffafa': 'snow',
  21768. 'd2b48c': 'tan',
  21769. '008080': 'teal',
  21770. 'ff6347': 'tomato',
  21771. 'ee82ee': 'violet',
  21772. 'f5deb3': 'wheat',
  21773. 'ffffff': 'white',
  21774. 'ffff00': 'yellow'
  21775. };
  21776. function hueToRgb(p, q, t) {
  21777. if (t < 0) {
  21778. t += 1;
  21779. }
  21780. if (t > 1) {
  21781. t -= 1;
  21782. }
  21783. if (t < 1 / 6) {
  21784. return p + (q - p) * 6 * t;
  21785. }
  21786. if (t < 1 / 2) {
  21787. return q;
  21788. }
  21789. if (t < 2 / 3) {
  21790. return p + (q - p) * (2 / 3 - t) * 6;
  21791. }
  21792. return p;
  21793. }
  21794. function hslToRgb(h, s, l, a) {
  21795. var r;
  21796. var g;
  21797. var b;
  21798. if (s === 0) {
  21799. r = g = b = l; // achromatic
  21800. } else {
  21801. var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  21802. var p = 2 * l - q;
  21803. r = hueToRgb(p, q, h + 1 / 3);
  21804. g = hueToRgb(p, q, h);
  21805. b = hueToRgb(p, q, h - 1 / 3);
  21806. }
  21807. return [
  21808. Math.round(r * 255),
  21809. Math.round(g * 255),
  21810. Math.round(b * 255),
  21811. a
  21812. ];
  21813. }
  21814. function toHex(value) {
  21815. value = value.toString(16);
  21816. return value.length === 1 ? '0' + value : value;
  21817. }
  21818. function parseFunctionArgs(functionArgs, count, rgb) {
  21819. var cursor = functionArgs.head;
  21820. var args = [];
  21821. var wasValue = false;
  21822. while (cursor !== null) {
  21823. var node = cursor.data;
  21824. var type = node.type;
  21825. switch (type) {
  21826. case 'Number':
  21827. case 'Percentage':
  21828. if (wasValue) {
  21829. return;
  21830. }
  21831. wasValue = true;
  21832. args.push({
  21833. type: type,
  21834. value: Number(node.value)
  21835. });
  21836. break;
  21837. case 'Operator':
  21838. if (node.value === ',') {
  21839. if (!wasValue) {
  21840. return;
  21841. }
  21842. wasValue = false;
  21843. } else if (wasValue || node.value !== '+') {
  21844. return;
  21845. }
  21846. break;
  21847. default:
  21848. // something we couldn't understand
  21849. return;
  21850. }
  21851. cursor = cursor.next;
  21852. }
  21853. if (args.length !== count) {
  21854. // invalid arguments count
  21855. // TODO: remove those tokens
  21856. return;
  21857. }
  21858. if (args.length === 4) {
  21859. if (args[3].type !== 'Number') {
  21860. // 4th argument should be a number
  21861. // TODO: remove those tokens
  21862. return;
  21863. }
  21864. args[3].type = 'Alpha';
  21865. }
  21866. if (rgb) {
  21867. if (args[0].type !== args[1].type || args[0].type !== args[2].type) {
  21868. // invalid color, numbers and percentage shouldn't be mixed
  21869. // TODO: remove those tokens
  21870. return;
  21871. }
  21872. } else {
  21873. if (args[0].type !== 'Number' ||
  21874. args[1].type !== 'Percentage' ||
  21875. args[2].type !== 'Percentage') {
  21876. // invalid color, for hsl values should be: number, percentage, percentage
  21877. // TODO: remove those tokens
  21878. return;
  21879. }
  21880. args[0].type = 'Angle';
  21881. }
  21882. return args.map(function(arg) {
  21883. var value = Math.max(0, arg.value);
  21884. switch (arg.type) {
  21885. case 'Number':
  21886. // fit value to [0..255] range
  21887. value = Math.min(value, 255);
  21888. break;
  21889. case 'Percentage':
  21890. // convert 0..100% to value in [0..255] range
  21891. value = Math.min(value, 100) / 100;
  21892. if (!rgb) {
  21893. return value;
  21894. }
  21895. value = 255 * value;
  21896. break;
  21897. case 'Angle':
  21898. // fit value to (-360..360) range
  21899. return (((value % 360) + 360) % 360) / 360;
  21900. case 'Alpha':
  21901. // fit value to [0..1] range
  21902. return Math.min(value, 1);
  21903. }
  21904. return Math.round(value);
  21905. });
  21906. }
  21907. function compressFunction(node, item, list) {
  21908. var functionName = node.name;
  21909. var args;
  21910. if (functionName === 'rgba' || functionName === 'hsla') {
  21911. args = parseFunctionArgs(node.children, 4, functionName === 'rgba');
  21912. if (!args) {
  21913. // something went wrong
  21914. return;
  21915. }
  21916. if (functionName === 'hsla') {
  21917. args = hslToRgb.apply(null, args);
  21918. node.name = 'rgba';
  21919. }
  21920. if (args[3] === 0) {
  21921. // try to replace `rgba(x, x, x, 0)` to `transparent`
  21922. // always replace `rgba(0, 0, 0, 0)` to `transparent`
  21923. // otherwise avoid replacement in gradients since it may break color transition
  21924. // http://stackoverflow.com/questions/11829410/css3-gradient-rendering-issues-from-transparent-to-white
  21925. var scopeFunctionName = this.function && this.function.name;
  21926. if ((args[0] === 0 && args[1] === 0 && args[2] === 0) ||
  21927. !/^(?:to|from|color-stop)$|gradient$/i.test(scopeFunctionName)) {
  21928. item.data = {
  21929. type: 'Identifier',
  21930. loc: node.loc,
  21931. name: 'transparent'
  21932. };
  21933. return;
  21934. }
  21935. }
  21936. if (args[3] !== 1) {
  21937. // replace argument values for normalized/interpolated
  21938. node.children.each(function(node, item, list) {
  21939. if (node.type === 'Operator') {
  21940. if (node.value !== ',') {
  21941. list.remove(item);
  21942. }
  21943. return;
  21944. }
  21945. item.data = {
  21946. type: 'Number',
  21947. loc: node.loc,
  21948. value: packNumber$3(args.shift(), null)
  21949. };
  21950. });
  21951. return;
  21952. }
  21953. // otherwise convert to rgb, i.e. rgba(255, 0, 0, 1) -> rgb(255, 0, 0)
  21954. functionName = 'rgb';
  21955. }
  21956. if (functionName === 'hsl') {
  21957. args = args || parseFunctionArgs(node.children, 3, false);
  21958. if (!args) {
  21959. // something went wrong
  21960. return;
  21961. }
  21962. // convert to rgb
  21963. args = hslToRgb.apply(null, args);
  21964. functionName = 'rgb';
  21965. }
  21966. if (functionName === 'rgb') {
  21967. args = args || parseFunctionArgs(node.children, 3, true);
  21968. if (!args) {
  21969. // something went wrong
  21970. return;
  21971. }
  21972. // check if color is not at the end and not followed by space
  21973. var next = item.next;
  21974. if (next && next.data.type !== 'WhiteSpace') {
  21975. list.insert(list.createItem({
  21976. type: 'WhiteSpace',
  21977. value: ' '
  21978. }), next);
  21979. }
  21980. item.data = {
  21981. type: 'Hash',
  21982. loc: node.loc,
  21983. value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
  21984. };
  21985. compressHex(item.data, item);
  21986. }
  21987. }
  21988. function compressIdent(node, item) {
  21989. if (this.declaration === null) {
  21990. return;
  21991. }
  21992. var color = node.name.toLowerCase();
  21993. if (NAME_TO_HEX.hasOwnProperty(color) &&
  21994. lexer$2.matchDeclaration(this.declaration).isType(node, 'color')) {
  21995. var hex = NAME_TO_HEX[color];
  21996. if (hex.length + 1 <= color.length) {
  21997. // replace for shorter hex value
  21998. item.data = {
  21999. type: 'Hash',
  22000. loc: node.loc,
  22001. value: hex
  22002. };
  22003. } else {
  22004. // special case for consistent colors
  22005. if (color === 'grey') {
  22006. color = 'gray';
  22007. }
  22008. // just replace value for lower cased name
  22009. node.name = color;
  22010. }
  22011. }
  22012. }
  22013. function compressHex(node, item) {
  22014. var color = node.value.toLowerCase();
  22015. // #112233 -> #123
  22016. if (color.length === 6 &&
  22017. color[0] === color[1] &&
  22018. color[2] === color[3] &&
  22019. color[4] === color[5]) {
  22020. color = color[0] + color[2] + color[4];
  22021. }
  22022. if (HEX_TO_NAME[color]) {
  22023. item.data = {
  22024. type: 'Identifier',
  22025. loc: node.loc,
  22026. name: HEX_TO_NAME[color]
  22027. };
  22028. } else {
  22029. node.value = color;
  22030. }
  22031. }
  22032. var color$2 = {
  22033. compressFunction: compressFunction,
  22034. compressIdent: compressIdent,
  22035. compressHex: compressHex
  22036. };
  22037. var walk$3 = lib.walk;
  22038. var handlers$2 = {
  22039. Atrule: Atrule$2,
  22040. AttributeSelector: AttributeSelector$1,
  22041. Value: Value$1,
  22042. Dimension: Dimension$1,
  22043. Percentage: Percentage$1,
  22044. Number: _Number$1,
  22045. String: _String$1,
  22046. Url: Url$1,
  22047. Hash: color$2.compressHex,
  22048. Identifier: color$2.compressIdent,
  22049. Function: color$2.compressFunction
  22050. };
  22051. var replace = function(ast) {
  22052. walk$3(ast, {
  22053. leave: function(node, item, list) {
  22054. if (handlers$2.hasOwnProperty(node.type)) {
  22055. handlers$2[node.type].call(this, node, item, list);
  22056. }
  22057. }
  22058. });
  22059. };
  22060. var generate$1 = lib.generate;
  22061. function Index() {
  22062. this.seed = 0;
  22063. this.map = Object.create(null);
  22064. }
  22065. Index.prototype.resolve = function(str) {
  22066. var index = this.map[str];
  22067. if (!index) {
  22068. index = ++this.seed;
  22069. this.map[str] = index;
  22070. }
  22071. return index;
  22072. };
  22073. var createDeclarationIndexer = function createDeclarationIndexer() {
  22074. var ids = new Index();
  22075. return function markDeclaration(node) {
  22076. var id = generate$1(node);
  22077. node.id = ids.resolve(id);
  22078. node.length = id.length;
  22079. node.fingerprint = null;
  22080. return node;
  22081. };
  22082. };
  22083. var specificity = function specificity(simpleSelector) {
  22084. var A = 0;
  22085. var B = 0;
  22086. var C = 0;
  22087. simpleSelector.children.each(function walk(node) {
  22088. switch (node.type) {
  22089. case 'SelectorList':
  22090. case 'Selector':
  22091. node.children.each(walk);
  22092. break;
  22093. case 'IdSelector':
  22094. A++;
  22095. break;
  22096. case 'ClassSelector':
  22097. case 'AttributeSelector':
  22098. B++;
  22099. break;
  22100. case 'PseudoClassSelector':
  22101. switch (node.name.toLowerCase()) {
  22102. case 'not':
  22103. node.children.each(walk);
  22104. break;
  22105. case 'before':
  22106. case 'after':
  22107. case 'first-line':
  22108. case 'first-letter':
  22109. C++;
  22110. break;
  22111. // TODO: support for :nth-*(.. of <SelectorList>), :matches(), :has()
  22112. default:
  22113. B++;
  22114. }
  22115. break;
  22116. case 'PseudoElementSelector':
  22117. C++;
  22118. break;
  22119. case 'TypeSelector':
  22120. // ignore universal selector
  22121. if (node.name.charAt(node.name.length - 1) !== '*') {
  22122. C++;
  22123. }
  22124. break;
  22125. }
  22126. });
  22127. return [A, B, C];
  22128. };
  22129. var generate$2 = lib.generate;
  22130. var nonFreezePseudoElements = {
  22131. 'first-letter': true,
  22132. 'first-line': true,
  22133. 'after': true,
  22134. 'before': true
  22135. };
  22136. var nonFreezePseudoClasses = {
  22137. 'link': true,
  22138. 'visited': true,
  22139. 'hover': true,
  22140. 'active': true,
  22141. 'first-letter': true,
  22142. 'first-line': true,
  22143. 'after': true,
  22144. 'before': true
  22145. };
  22146. var processSelector = function freeze(node, usageData) {
  22147. var pseudos = Object.create(null);
  22148. var hasPseudo = false;
  22149. node.prelude.children.each(function(simpleSelector) {
  22150. var tagName = '*';
  22151. var scope = 0;
  22152. simpleSelector.children.each(function(node) {
  22153. switch (node.type) {
  22154. case 'ClassSelector':
  22155. if (usageData && usageData.scopes) {
  22156. var classScope = usageData.scopes[node.name] || 0;
  22157. if (scope !== 0 && classScope !== scope) {
  22158. throw new Error('Selector can\'t has classes from different scopes: ' + generate$2(simpleSelector));
  22159. }
  22160. scope = classScope;
  22161. }
  22162. break;
  22163. case 'PseudoClassSelector':
  22164. var name = node.name.toLowerCase();
  22165. if (!nonFreezePseudoClasses.hasOwnProperty(name)) {
  22166. pseudos[':' + name] = true;
  22167. hasPseudo = true;
  22168. }
  22169. break;
  22170. case 'PseudoElementSelector':
  22171. var name = node.name.toLowerCase();
  22172. if (!nonFreezePseudoElements.hasOwnProperty(name)) {
  22173. pseudos['::' + name] = true;
  22174. hasPseudo = true;
  22175. }
  22176. break;
  22177. case 'TypeSelector':
  22178. tagName = node.name.toLowerCase();
  22179. break;
  22180. case 'AttributeSelector':
  22181. if (node.flags) {
  22182. pseudos['[' + node.flags.toLowerCase() + ']'] = true;
  22183. hasPseudo = true;
  22184. }
  22185. break;
  22186. case 'WhiteSpace':
  22187. case 'Combinator':
  22188. tagName = '*';
  22189. break;
  22190. }
  22191. });
  22192. simpleSelector.compareMarker = specificity(simpleSelector).toString();
  22193. simpleSelector.id = null; // pre-init property to avoid multiple hidden class
  22194. simpleSelector.id = generate$2(simpleSelector);
  22195. if (scope) {
  22196. simpleSelector.compareMarker += ':' + scope;
  22197. }
  22198. if (tagName !== '*') {
  22199. simpleSelector.compareMarker += ',' + tagName;
  22200. }
  22201. });
  22202. // add property to all rule nodes to avoid multiple hidden class
  22203. node.pseudoSignature = hasPseudo && Object.keys(pseudos).sort().join(',');
  22204. };
  22205. var resolveKeyword$2 = lib.keyword;
  22206. var walk$4 = lib.walk;
  22207. var generate$3 = lib.generate;
  22208. var prepare = function prepare(ast, options) {
  22209. var markDeclaration = createDeclarationIndexer();
  22210. walk$4(ast, {
  22211. visit: 'Rule',
  22212. enter: function processRule(node) {
  22213. node.block.children.each(markDeclaration);
  22214. processSelector(node, options.usage);
  22215. }
  22216. });
  22217. walk$4(ast, {
  22218. visit: 'Atrule',
  22219. enter: function(node) {
  22220. if (node.prelude) {
  22221. node.prelude.id = null; // pre-init property to avoid multiple hidden class for generate
  22222. node.prelude.id = generate$3(node.prelude);
  22223. }
  22224. // compare keyframe selectors by its values
  22225. // NOTE: still no clarification about problems with keyframes selector grouping (issue #197)
  22226. if (resolveKeyword$2(node.name).basename === 'keyframes') {
  22227. node.block.avoidRulesMerge = true; /* probably we don't need to prevent those merges for @keyframes
  22228. TODO: need to be checked */
  22229. node.block.children.each(function(rule) {
  22230. rule.prelude.children.each(function(simpleselector) {
  22231. simpleselector.compareMarker = simpleselector.id;
  22232. });
  22233. });
  22234. }
  22235. }
  22236. });
  22237. return {
  22238. declaration: markDeclaration
  22239. };
  22240. };
  22241. var List$2 = lib.List;
  22242. var resolveKeyword$3 = lib.keyword;
  22243. var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
  22244. var walk$5 = lib.walk;
  22245. function addRuleToMap(map, item, list, single) {
  22246. var node = item.data;
  22247. var name = resolveKeyword$3(node.name).basename;
  22248. var id = node.name.toLowerCase() + '/' + (node.prelude ? node.prelude.id : null);
  22249. if (!hasOwnProperty$8.call(map, name)) {
  22250. map[name] = Object.create(null);
  22251. }
  22252. if (single) {
  22253. delete map[name][id];
  22254. }
  22255. if (!hasOwnProperty$8.call(map[name], id)) {
  22256. map[name][id] = new List$2();
  22257. }
  22258. map[name][id].append(list.remove(item));
  22259. }
  22260. function relocateAtrules(ast, options) {
  22261. var collected = Object.create(null);
  22262. var topInjectPoint = null;
  22263. ast.children.each(function(node, item, list) {
  22264. if (node.type === 'Atrule') {
  22265. var name = resolveKeyword$3(node.name).basename;
  22266. switch (name) {
  22267. case 'keyframes':
  22268. addRuleToMap(collected, item, list, true);
  22269. return;
  22270. case 'media':
  22271. if (options.forceMediaMerge) {
  22272. addRuleToMap(collected, item, list, false);
  22273. return;
  22274. }
  22275. break;
  22276. }
  22277. if (topInjectPoint === null &&
  22278. name !== 'charset' &&
  22279. name !== 'import') {
  22280. topInjectPoint = item;
  22281. }
  22282. } else {
  22283. if (topInjectPoint === null) {
  22284. topInjectPoint = item;
  22285. }
  22286. }
  22287. });
  22288. for (var atrule in collected) {
  22289. for (var id in collected[atrule]) {
  22290. ast.children.insertList(
  22291. collected[atrule][id],
  22292. atrule === 'media' ? null : topInjectPoint
  22293. );
  22294. }
  22295. }
  22296. }
  22297. function isMediaRule(node) {
  22298. return node.type === 'Atrule' && node.name === 'media';
  22299. }
  22300. function processAtrule(node, item, list) {
  22301. if (!isMediaRule(node)) {
  22302. return;
  22303. }
  22304. var prev = item.prev && item.prev.data;
  22305. if (!prev || !isMediaRule(prev)) {
  22306. return;
  22307. }
  22308. // merge @media with same query
  22309. if (node.prelude &&
  22310. prev.prelude &&
  22311. node.prelude.id === prev.prelude.id) {
  22312. prev.block.children.appendList(node.block.children);
  22313. list.remove(item);
  22314. // TODO: use it when we can refer to several points in source
  22315. // prev.loc = {
  22316. // primary: prev.loc,
  22317. // merged: node.loc
  22318. // };
  22319. }
  22320. }
  22321. var _1MergeAtrule = function rejoinAtrule(ast, options) {
  22322. relocateAtrules(ast, options);
  22323. walk$5(ast, {
  22324. visit: 'Atrule',
  22325. reverse: true,
  22326. enter: processAtrule
  22327. });
  22328. };
  22329. var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
  22330. function isEqualSelectors(a, b) {
  22331. var cursor1 = a.head;
  22332. var cursor2 = b.head;
  22333. while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
  22334. cursor1 = cursor1.next;
  22335. cursor2 = cursor2.next;
  22336. }
  22337. return cursor1 === null && cursor2 === null;
  22338. }
  22339. function isEqualDeclarations(a, b) {
  22340. var cursor1 = a.head;
  22341. var cursor2 = b.head;
  22342. while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
  22343. cursor1 = cursor1.next;
  22344. cursor2 = cursor2.next;
  22345. }
  22346. return cursor1 === null && cursor2 === null;
  22347. }
  22348. function compareDeclarations(declarations1, declarations2) {
  22349. var result = {
  22350. eq: [],
  22351. ne1: [],
  22352. ne2: [],
  22353. ne2overrided: []
  22354. };
  22355. var fingerprints = Object.create(null);
  22356. var declarations2hash = Object.create(null);
  22357. for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
  22358. declarations2hash[cursor.data.id] = true;
  22359. }
  22360. for (var cursor = declarations1.head; cursor; cursor = cursor.next) {
  22361. var data = cursor.data;
  22362. if (data.fingerprint) {
  22363. fingerprints[data.fingerprint] = data.important;
  22364. }
  22365. if (declarations2hash[data.id]) {
  22366. declarations2hash[data.id] = false;
  22367. result.eq.push(data);
  22368. } else {
  22369. result.ne1.push(data);
  22370. }
  22371. }
  22372. for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
  22373. var data = cursor.data;
  22374. if (declarations2hash[data.id]) {
  22375. // when declarations1 has an overriding declaration, this is not a difference
  22376. // unless no !important is used on prev and !important is used on the following
  22377. if (!hasOwnProperty$9.call(fingerprints, data.fingerprint) ||
  22378. (!fingerprints[data.fingerprint] && data.important)) {
  22379. result.ne2.push(data);
  22380. }
  22381. result.ne2overrided.push(data);
  22382. }
  22383. }
  22384. return result;
  22385. }
  22386. function addSelectors(dest, source) {
  22387. source.each(function(sourceData) {
  22388. var newStr = sourceData.id;
  22389. var cursor = dest.head;
  22390. while (cursor) {
  22391. var nextStr = cursor.data.id;
  22392. if (nextStr === newStr) {
  22393. return;
  22394. }
  22395. if (nextStr > newStr) {
  22396. break;
  22397. }
  22398. cursor = cursor.next;
  22399. }
  22400. dest.insert(dest.createItem(sourceData), cursor);
  22401. });
  22402. return dest;
  22403. }
  22404. // check if simpleselectors has no equal specificity and element selector
  22405. function hasSimilarSelectors(selectors1, selectors2) {
  22406. var cursor1 = selectors1.head;
  22407. while (cursor1 !== null) {
  22408. var cursor2 = selectors2.head;
  22409. while (cursor2 !== null) {
  22410. if (cursor1.data.compareMarker === cursor2.data.compareMarker) {
  22411. return true;
  22412. }
  22413. cursor2 = cursor2.next;
  22414. }
  22415. cursor1 = cursor1.next;
  22416. }
  22417. return false;
  22418. }
  22419. // test node can't to be skipped
  22420. function unsafeToSkipNode(node) {
  22421. switch (node.type) {
  22422. case 'Rule':
  22423. // unsafe skip ruleset with selector similarities
  22424. return hasSimilarSelectors(node.prelude.children, this);
  22425. case 'Atrule':
  22426. // can skip at-rules with blocks
  22427. if (node.block) {
  22428. // unsafe skip at-rule if block contains something unsafe to skip
  22429. return node.block.children.some(unsafeToSkipNode, this);
  22430. }
  22431. break;
  22432. case 'Declaration':
  22433. return false;
  22434. }
  22435. // unsafe by default
  22436. return true;
  22437. }
  22438. var utils$2 = {
  22439. isEqualSelectors: isEqualSelectors,
  22440. isEqualDeclarations: isEqualDeclarations,
  22441. compareDeclarations: compareDeclarations,
  22442. addSelectors: addSelectors,
  22443. hasSimilarSelectors: hasSimilarSelectors,
  22444. unsafeToSkipNode: unsafeToSkipNode
  22445. };
  22446. var walk$6 = lib.walk;
  22447. function processRule(node, item, list) {
  22448. var selectors = node.prelude.children;
  22449. var declarations = node.block.children;
  22450. list.prevUntil(item.prev, function(prev) {
  22451. // skip non-ruleset node if safe
  22452. if (prev.type !== 'Rule') {
  22453. return utils$2.unsafeToSkipNode.call(selectors, prev);
  22454. }
  22455. var prevSelectors = prev.prelude.children;
  22456. var prevDeclarations = prev.block.children;
  22457. // try to join rulesets with equal pseudo signature
  22458. if (node.pseudoSignature === prev.pseudoSignature) {
  22459. // try to join by selectors
  22460. if (utils$2.isEqualSelectors(prevSelectors, selectors)) {
  22461. prevDeclarations.appendList(declarations);
  22462. list.remove(item);
  22463. return true;
  22464. }
  22465. // try to join by declarations
  22466. if (utils$2.isEqualDeclarations(declarations, prevDeclarations)) {
  22467. utils$2.addSelectors(prevSelectors, selectors);
  22468. list.remove(item);
  22469. return true;
  22470. }
  22471. }
  22472. // go to prev ruleset if has no selector similarities
  22473. return utils$2.hasSimilarSelectors(selectors, prevSelectors);
  22474. });
  22475. }
  22476. // NOTE: direction should be left to right, since rulesets merge to left
  22477. // ruleset. When direction right to left unmerged rulesets may prevent lookup
  22478. // TODO: remove initial merge
  22479. var _2InitialMergeRuleset = function initialMergeRule(ast) {
  22480. walk$6(ast, {
  22481. visit: 'Rule',
  22482. enter: processRule
  22483. });
  22484. };
  22485. var List$3 = lib.List;
  22486. var walk$7 = lib.walk;
  22487. function processRule$1(node, item, list) {
  22488. var selectors = node.prelude.children;
  22489. // generate new rule sets:
  22490. // .a, .b { color: red; }
  22491. // ->
  22492. // .a { color: red; }
  22493. // .b { color: red; }
  22494. // while there are more than 1 simple selector split for rulesets
  22495. while (selectors.head !== selectors.tail) {
  22496. var newSelectors = new List$3();
  22497. newSelectors.insert(selectors.remove(selectors.head));
  22498. list.insert(list.createItem({
  22499. type: 'Rule',
  22500. loc: node.loc,
  22501. prelude: {
  22502. type: 'SelectorList',
  22503. loc: node.prelude.loc,
  22504. children: newSelectors
  22505. },
  22506. block: {
  22507. type: 'Block',
  22508. loc: node.block.loc,
  22509. children: node.block.children.copy()
  22510. },
  22511. pseudoSignature: node.pseudoSignature
  22512. }), item);
  22513. }
  22514. }
  22515. var _3DisjoinRuleset = function disjoinRule(ast) {
  22516. walk$7(ast, {
  22517. visit: 'Rule',
  22518. reverse: true,
  22519. enter: processRule$1
  22520. });
  22521. };
  22522. var List$4 = lib.List;
  22523. var generate$4 = lib.generate;
  22524. var walk$8 = lib.walk;
  22525. var REPLACE = 1;
  22526. var REMOVE = 2;
  22527. var TOP = 0;
  22528. var RIGHT = 1;
  22529. var BOTTOM = 2;
  22530. var LEFT = 3;
  22531. var SIDES = ['top', 'right', 'bottom', 'left'];
  22532. var SIDE = {
  22533. 'margin-top': 'top',
  22534. 'margin-right': 'right',
  22535. 'margin-bottom': 'bottom',
  22536. 'margin-left': 'left',
  22537. 'padding-top': 'top',
  22538. 'padding-right': 'right',
  22539. 'padding-bottom': 'bottom',
  22540. 'padding-left': 'left',
  22541. 'border-top-color': 'top',
  22542. 'border-right-color': 'right',
  22543. 'border-bottom-color': 'bottom',
  22544. 'border-left-color': 'left',
  22545. 'border-top-width': 'top',
  22546. 'border-right-width': 'right',
  22547. 'border-bottom-width': 'bottom',
  22548. 'border-left-width': 'left',
  22549. 'border-top-style': 'top',
  22550. 'border-right-style': 'right',
  22551. 'border-bottom-style': 'bottom',
  22552. 'border-left-style': 'left'
  22553. };
  22554. var MAIN_PROPERTY = {
  22555. 'margin': 'margin',
  22556. 'margin-top': 'margin',
  22557. 'margin-right': 'margin',
  22558. 'margin-bottom': 'margin',
  22559. 'margin-left': 'margin',
  22560. 'padding': 'padding',
  22561. 'padding-top': 'padding',
  22562. 'padding-right': 'padding',
  22563. 'padding-bottom': 'padding',
  22564. 'padding-left': 'padding',
  22565. 'border-color': 'border-color',
  22566. 'border-top-color': 'border-color',
  22567. 'border-right-color': 'border-color',
  22568. 'border-bottom-color': 'border-color',
  22569. 'border-left-color': 'border-color',
  22570. 'border-width': 'border-width',
  22571. 'border-top-width': 'border-width',
  22572. 'border-right-width': 'border-width',
  22573. 'border-bottom-width': 'border-width',
  22574. 'border-left-width': 'border-width',
  22575. 'border-style': 'border-style',
  22576. 'border-top-style': 'border-style',
  22577. 'border-right-style': 'border-style',
  22578. 'border-bottom-style': 'border-style',
  22579. 'border-left-style': 'border-style'
  22580. };
  22581. function TRBL(name) {
  22582. this.name = name;
  22583. this.loc = null;
  22584. this.iehack = undefined;
  22585. this.sides = {
  22586. 'top': null,
  22587. 'right': null,
  22588. 'bottom': null,
  22589. 'left': null
  22590. };
  22591. }
  22592. TRBL.prototype.getValueSequence = function(declaration, count) {
  22593. var values = [];
  22594. var iehack = '';
  22595. var hasBadValues = declaration.value.children.some(function(child) {
  22596. var special = false;
  22597. switch (child.type) {
  22598. case 'Identifier':
  22599. switch (child.name) {
  22600. case '\\0':
  22601. case '\\9':
  22602. iehack = child.name;
  22603. return;
  22604. case 'inherit':
  22605. case 'initial':
  22606. case 'unset':
  22607. case 'revert':
  22608. special = child.name;
  22609. break;
  22610. }
  22611. break;
  22612. case 'Dimension':
  22613. switch (child.unit) {
  22614. // is not supported until IE11
  22615. case 'rem':
  22616. // v* units is too buggy across browsers and better
  22617. // don't merge values with those units
  22618. case 'vw':
  22619. case 'vh':
  22620. case 'vmin':
  22621. case 'vmax':
  22622. case 'vm': // IE9 supporting "vm" instead of "vmin".
  22623. special = child.unit;
  22624. break;
  22625. }
  22626. break;
  22627. case 'Hash': // color
  22628. case 'Number':
  22629. case 'Percentage':
  22630. break;
  22631. case 'Function':
  22632. if (child.name === 'var') {
  22633. return true;
  22634. }
  22635. special = child.name;
  22636. break;
  22637. case 'WhiteSpace':
  22638. return false; // ignore space
  22639. default:
  22640. return true; // bad value
  22641. }
  22642. values.push({
  22643. node: child,
  22644. special: special,
  22645. important: declaration.important
  22646. });
  22647. });
  22648. if (hasBadValues || values.length > count) {
  22649. return false;
  22650. }
  22651. if (typeof this.iehack === 'string' && this.iehack !== iehack) {
  22652. return false;
  22653. }
  22654. this.iehack = iehack; // move outside
  22655. return values;
  22656. };
  22657. TRBL.prototype.canOverride = function(side, value) {
  22658. var currentValue = this.sides[side];
  22659. return !currentValue || (value.important && !currentValue.important);
  22660. };
  22661. TRBL.prototype.add = function(name, declaration) {
  22662. function attemptToAdd() {
  22663. var sides = this.sides;
  22664. var side = SIDE[name];
  22665. if (side) {
  22666. if (side in sides === false) {
  22667. return false;
  22668. }
  22669. var values = this.getValueSequence(declaration, 1);
  22670. if (!values || !values.length) {
  22671. return false;
  22672. }
  22673. // can mix only if specials are equal
  22674. for (var key in sides) {
  22675. if (sides[key] !== null && sides[key].special !== values[0].special) {
  22676. return false;
  22677. }
  22678. }
  22679. if (!this.canOverride(side, values[0])) {
  22680. return true;
  22681. }
  22682. sides[side] = values[0];
  22683. return true;
  22684. } else if (name === this.name) {
  22685. var values = this.getValueSequence(declaration, 4);
  22686. if (!values || !values.length) {
  22687. return false;
  22688. }
  22689. switch (values.length) {
  22690. case 1:
  22691. values[RIGHT] = values[TOP];
  22692. values[BOTTOM] = values[TOP];
  22693. values[LEFT] = values[TOP];
  22694. break;
  22695. case 2:
  22696. values[BOTTOM] = values[TOP];
  22697. values[LEFT] = values[RIGHT];
  22698. break;
  22699. case 3:
  22700. values[LEFT] = values[RIGHT];
  22701. break;
  22702. }
  22703. // can mix only if specials are equal
  22704. for (var i = 0; i < 4; i++) {
  22705. for (var key in sides) {
  22706. if (sides[key] !== null && sides[key].special !== values[i].special) {
  22707. return false;
  22708. }
  22709. }
  22710. }
  22711. for (var i = 0; i < 4; i++) {
  22712. if (this.canOverride(SIDES[i], values[i])) {
  22713. sides[SIDES[i]] = values[i];
  22714. }
  22715. }
  22716. return true;
  22717. }
  22718. }
  22719. if (!attemptToAdd.call(this)) {
  22720. return false;
  22721. }
  22722. // TODO: use it when we can refer to several points in source
  22723. // if (this.loc) {
  22724. // this.loc = {
  22725. // primary: this.loc,
  22726. // merged: declaration.loc
  22727. // };
  22728. // } else {
  22729. // this.loc = declaration.loc;
  22730. // }
  22731. if (!this.loc) {
  22732. this.loc = declaration.loc;
  22733. }
  22734. return true;
  22735. };
  22736. TRBL.prototype.isOkToMinimize = function() {
  22737. var top = this.sides.top;
  22738. var right = this.sides.right;
  22739. var bottom = this.sides.bottom;
  22740. var left = this.sides.left;
  22741. if (top && right && bottom && left) {
  22742. var important =
  22743. top.important +
  22744. right.important +
  22745. bottom.important +
  22746. left.important;
  22747. return important === 0 || important === 4;
  22748. }
  22749. return false;
  22750. };
  22751. TRBL.prototype.getValue = function() {
  22752. var result = new List$4();
  22753. var sides = this.sides;
  22754. var values = [
  22755. sides.top,
  22756. sides.right,
  22757. sides.bottom,
  22758. sides.left
  22759. ];
  22760. var stringValues = [
  22761. generate$4(sides.top.node),
  22762. generate$4(sides.right.node),
  22763. generate$4(sides.bottom.node),
  22764. generate$4(sides.left.node)
  22765. ];
  22766. if (stringValues[LEFT] === stringValues[RIGHT]) {
  22767. values.pop();
  22768. if (stringValues[BOTTOM] === stringValues[TOP]) {
  22769. values.pop();
  22770. if (stringValues[RIGHT] === stringValues[TOP]) {
  22771. values.pop();
  22772. }
  22773. }
  22774. }
  22775. for (var i = 0; i < values.length; i++) {
  22776. if (i) {
  22777. result.appendData({ type: 'WhiteSpace', value: ' ' });
  22778. }
  22779. result.appendData(values[i].node);
  22780. }
  22781. if (this.iehack) {
  22782. result.appendData({ type: 'WhiteSpace', value: ' ' });
  22783. result.appendData({
  22784. type: 'Identifier',
  22785. loc: null,
  22786. name: this.iehack
  22787. });
  22788. }
  22789. return {
  22790. type: 'Value',
  22791. loc: null,
  22792. children: result
  22793. };
  22794. };
  22795. TRBL.prototype.getDeclaration = function() {
  22796. return {
  22797. type: 'Declaration',
  22798. loc: this.loc,
  22799. important: this.sides.top.important,
  22800. property: this.name,
  22801. value: this.getValue()
  22802. };
  22803. };
  22804. function processRule$2(rule, shorts, shortDeclarations, lastShortSelector) {
  22805. var declarations = rule.block.children;
  22806. var selector = rule.prelude.children.first().id;
  22807. rule.block.children.eachRight(function(declaration, item) {
  22808. var property = declaration.property;
  22809. if (!MAIN_PROPERTY.hasOwnProperty(property)) {
  22810. return;
  22811. }
  22812. var key = MAIN_PROPERTY[property];
  22813. var shorthand;
  22814. var operation;
  22815. if (!lastShortSelector || selector === lastShortSelector) {
  22816. if (key in shorts) {
  22817. operation = REMOVE;
  22818. shorthand = shorts[key];
  22819. }
  22820. }
  22821. if (!shorthand || !shorthand.add(property, declaration)) {
  22822. operation = REPLACE;
  22823. shorthand = new TRBL(key);
  22824. // if can't parse value ignore it and break shorthand children
  22825. if (!shorthand.add(property, declaration)) {
  22826. lastShortSelector = null;
  22827. return;
  22828. }
  22829. }
  22830. shorts[key] = shorthand;
  22831. shortDeclarations.push({
  22832. operation: operation,
  22833. block: declarations,
  22834. item: item,
  22835. shorthand: shorthand
  22836. });
  22837. lastShortSelector = selector;
  22838. });
  22839. return lastShortSelector;
  22840. }
  22841. function processShorthands(shortDeclarations, markDeclaration) {
  22842. shortDeclarations.forEach(function(item) {
  22843. var shorthand = item.shorthand;
  22844. if (!shorthand.isOkToMinimize()) {
  22845. return;
  22846. }
  22847. if (item.operation === REPLACE) {
  22848. item.item.data = markDeclaration(shorthand.getDeclaration());
  22849. } else {
  22850. item.block.remove(item.item);
  22851. }
  22852. });
  22853. }
  22854. var _4RestructShorthand = function restructBlock(ast, indexer) {
  22855. var stylesheetMap = {};
  22856. var shortDeclarations = [];
  22857. walk$8(ast, {
  22858. visit: 'Rule',
  22859. reverse: true,
  22860. enter: function(node) {
  22861. var stylesheet = this.block || this.stylesheet;
  22862. var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
  22863. var ruleMap;
  22864. var shorts;
  22865. if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
  22866. ruleMap = {
  22867. lastShortSelector: null
  22868. };
  22869. stylesheetMap[stylesheet.id] = ruleMap;
  22870. } else {
  22871. ruleMap = stylesheetMap[stylesheet.id];
  22872. }
  22873. if (ruleMap.hasOwnProperty(ruleId)) {
  22874. shorts = ruleMap[ruleId];
  22875. } else {
  22876. shorts = {};
  22877. ruleMap[ruleId] = shorts;
  22878. }
  22879. ruleMap.lastShortSelector = processRule$2.call(this, node, shorts, shortDeclarations, ruleMap.lastShortSelector);
  22880. }
  22881. });
  22882. processShorthands(shortDeclarations, indexer.declaration);
  22883. };
  22884. var resolveProperty = lib.property;
  22885. var resolveKeyword$4 = lib.keyword;
  22886. var walk$9 = lib.walk;
  22887. var generate$5 = lib.generate;
  22888. var fingerprintId = 1;
  22889. var dontRestructure = {
  22890. 'src': 1 // https://github.com/afelix/csso/issues/50
  22891. };
  22892. var DONT_MIX_VALUE = {
  22893. // https://developer.mozilla.org/en-US/docs/Web/CSS/display#Browser_compatibility
  22894. 'display': /table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,
  22895. // https://developer.mozilla.org/en/docs/Web/CSS/text-align
  22896. 'text-align': /^(start|end|match-parent|justify-all)$/i
  22897. };
  22898. var SAFE_VALUES = {
  22899. cursor: [
  22900. 'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
  22901. 'n-resize', 'e-resize', 's-resize', 'w-resize',
  22902. 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
  22903. 'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
  22904. 'col-resize', 'row-resize'
  22905. ],
  22906. overflow: [
  22907. 'hidden', 'visible', 'scroll', 'auto'
  22908. ],
  22909. position: [
  22910. 'static', 'relative', 'absolute', 'fixed'
  22911. ]
  22912. };
  22913. var NEEDLESS_TABLE = {
  22914. 'border-width': ['border'],
  22915. 'border-style': ['border'],
  22916. 'border-color': ['border'],
  22917. 'border-top': ['border'],
  22918. 'border-right': ['border'],
  22919. 'border-bottom': ['border'],
  22920. 'border-left': ['border'],
  22921. 'border-top-width': ['border-top', 'border-width', 'border'],
  22922. 'border-right-width': ['border-right', 'border-width', 'border'],
  22923. 'border-bottom-width': ['border-bottom', 'border-width', 'border'],
  22924. 'border-left-width': ['border-left', 'border-width', 'border'],
  22925. 'border-top-style': ['border-top', 'border-style', 'border'],
  22926. 'border-right-style': ['border-right', 'border-style', 'border'],
  22927. 'border-bottom-style': ['border-bottom', 'border-style', 'border'],
  22928. 'border-left-style': ['border-left', 'border-style', 'border'],
  22929. 'border-top-color': ['border-top', 'border-color', 'border'],
  22930. 'border-right-color': ['border-right', 'border-color', 'border'],
  22931. 'border-bottom-color': ['border-bottom', 'border-color', 'border'],
  22932. 'border-left-color': ['border-left', 'border-color', 'border'],
  22933. 'margin-top': ['margin'],
  22934. 'margin-right': ['margin'],
  22935. 'margin-bottom': ['margin'],
  22936. 'margin-left': ['margin'],
  22937. 'padding-top': ['padding'],
  22938. 'padding-right': ['padding'],
  22939. 'padding-bottom': ['padding'],
  22940. 'padding-left': ['padding'],
  22941. 'font-style': ['font'],
  22942. 'font-variant': ['font'],
  22943. 'font-weight': ['font'],
  22944. 'font-size': ['font'],
  22945. 'font-family': ['font'],
  22946. 'list-style-type': ['list-style'],
  22947. 'list-style-position': ['list-style'],
  22948. 'list-style-image': ['list-style']
  22949. };
  22950. function getPropertyFingerprint(propertyName, declaration, fingerprints) {
  22951. var realName = resolveProperty(propertyName).basename;
  22952. if (realName === 'background') {
  22953. return propertyName + ':' + generate$5(declaration.value);
  22954. }
  22955. var declarationId = declaration.id;
  22956. var fingerprint = fingerprints[declarationId];
  22957. if (!fingerprint) {
  22958. switch (declaration.value.type) {
  22959. case 'Value':
  22960. var vendorId = '';
  22961. var iehack = '';
  22962. var special = {};
  22963. var raw = false;
  22964. declaration.value.children.each(function walk(node) {
  22965. switch (node.type) {
  22966. case 'Value':
  22967. case 'Brackets':
  22968. case 'Parentheses':
  22969. node.children.each(walk);
  22970. break;
  22971. case 'Raw':
  22972. raw = true;
  22973. break;
  22974. case 'Identifier':
  22975. var name = node.name;
  22976. if (!vendorId) {
  22977. vendorId = resolveKeyword$4(name).vendor;
  22978. }
  22979. if (/\\[09]/.test(name)) {
  22980. iehack = RegExp.lastMatch;
  22981. }
  22982. if (SAFE_VALUES.hasOwnProperty(realName)) {
  22983. if (SAFE_VALUES[realName].indexOf(name) === -1) {
  22984. special[name] = true;
  22985. }
  22986. } else if (DONT_MIX_VALUE.hasOwnProperty(realName)) {
  22987. if (DONT_MIX_VALUE[realName].test(name)) {
  22988. special[name] = true;
  22989. }
  22990. }
  22991. break;
  22992. case 'Function':
  22993. var name = node.name;
  22994. if (!vendorId) {
  22995. vendorId = resolveKeyword$4(name).vendor;
  22996. }
  22997. if (name === 'rect') {
  22998. // there are 2 forms of rect:
  22999. // rect(<top>, <right>, <bottom>, <left>) - standart
  23000. // rect(<top> <right> <bottom> <left>) – backwards compatible syntax
  23001. // only the same form values can be merged
  23002. var hasComma = node.children.some(function(node) {
  23003. return node.type === 'Operator' && node.value === ',';
  23004. });
  23005. if (!hasComma) {
  23006. name = 'rect-backward';
  23007. }
  23008. }
  23009. special[name + '()'] = true;
  23010. // check nested tokens too
  23011. node.children.each(walk);
  23012. break;
  23013. case 'Dimension':
  23014. var unit = node.unit;
  23015. if (/\\[09]/.test(unit)) {
  23016. iehack = RegExp.lastMatch;
  23017. }
  23018. switch (unit) {
  23019. // is not supported until IE11
  23020. case 'rem':
  23021. // v* units is too buggy across browsers and better
  23022. // don't merge values with those units
  23023. case 'vw':
  23024. case 'vh':
  23025. case 'vmin':
  23026. case 'vmax':
  23027. case 'vm': // IE9 supporting "vm" instead of "vmin".
  23028. special[unit] = true;
  23029. break;
  23030. }
  23031. break;
  23032. }
  23033. });
  23034. fingerprint = raw
  23035. ? '!' + fingerprintId++
  23036. : '!' + Object.keys(special).sort() + '|' + iehack + vendorId;
  23037. break;
  23038. case 'Raw':
  23039. fingerprint = '!' + declaration.value.value;
  23040. break;
  23041. default:
  23042. fingerprint = generate$5(declaration.value);
  23043. }
  23044. fingerprints[declarationId] = fingerprint;
  23045. }
  23046. return propertyName + fingerprint;
  23047. }
  23048. function needless(props, declaration, fingerprints) {
  23049. var property = resolveProperty(declaration.property);
  23050. if (NEEDLESS_TABLE.hasOwnProperty(property.basename)) {
  23051. var table = NEEDLESS_TABLE[property.basename];
  23052. for (var i = 0; i < table.length; i++) {
  23053. var ppre = getPropertyFingerprint(property.prefix + table[i], declaration, fingerprints);
  23054. var prev = props.hasOwnProperty(ppre) ? props[ppre] : null;
  23055. if (prev && (!declaration.important || prev.item.data.important)) {
  23056. return prev;
  23057. }
  23058. }
  23059. }
  23060. }
  23061. function processRule$3(rule, item, list, props, fingerprints) {
  23062. var declarations = rule.block.children;
  23063. declarations.eachRight(function(declaration, declarationItem) {
  23064. var property = declaration.property;
  23065. var fingerprint = getPropertyFingerprint(property, declaration, fingerprints);
  23066. var prev = props[fingerprint];
  23067. if (prev && !dontRestructure.hasOwnProperty(property)) {
  23068. if (declaration.important && !prev.item.data.important) {
  23069. props[fingerprint] = {
  23070. block: declarations,
  23071. item: declarationItem
  23072. };
  23073. prev.block.remove(prev.item);
  23074. // TODO: use it when we can refer to several points in source
  23075. // declaration.loc = {
  23076. // primary: declaration.loc,
  23077. // merged: prev.item.data.loc
  23078. // };
  23079. } else {
  23080. declarations.remove(declarationItem);
  23081. // TODO: use it when we can refer to several points in source
  23082. // prev.item.data.loc = {
  23083. // primary: prev.item.data.loc,
  23084. // merged: declaration.loc
  23085. // };
  23086. }
  23087. } else {
  23088. var prev = needless(props, declaration, fingerprints);
  23089. if (prev) {
  23090. declarations.remove(declarationItem);
  23091. // TODO: use it when we can refer to several points in source
  23092. // prev.item.data.loc = {
  23093. // primary: prev.item.data.loc,
  23094. // merged: declaration.loc
  23095. // };
  23096. } else {
  23097. declaration.fingerprint = fingerprint;
  23098. props[fingerprint] = {
  23099. block: declarations,
  23100. item: declarationItem
  23101. };
  23102. }
  23103. }
  23104. });
  23105. if (declarations.isEmpty()) {
  23106. list.remove(item);
  23107. }
  23108. }
  23109. var _6RestructBlock = function restructBlock(ast) {
  23110. var stylesheetMap = {};
  23111. var fingerprints = Object.create(null);
  23112. walk$9(ast, {
  23113. visit: 'Rule',
  23114. reverse: true,
  23115. enter: function(node, item, list) {
  23116. var stylesheet = this.block || this.stylesheet;
  23117. var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
  23118. var ruleMap;
  23119. var props;
  23120. if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
  23121. ruleMap = {};
  23122. stylesheetMap[stylesheet.id] = ruleMap;
  23123. } else {
  23124. ruleMap = stylesheetMap[stylesheet.id];
  23125. }
  23126. if (ruleMap.hasOwnProperty(ruleId)) {
  23127. props = ruleMap[ruleId];
  23128. } else {
  23129. props = {};
  23130. ruleMap[ruleId] = props;
  23131. }
  23132. processRule$3.call(this, node, item, list, props, fingerprints);
  23133. }
  23134. });
  23135. };
  23136. var walk$a = lib.walk;
  23137. /*
  23138. At this step all rules has single simple selector. We try to join by equal
  23139. declaration blocks to first rule, e.g.
  23140. .a { color: red }
  23141. b { ... }
  23142. .b { color: red }
  23143. ->
  23144. .a, .b { color: red }
  23145. b { ... }
  23146. */
  23147. function processRule$4(node, item, list) {
  23148. var selectors = node.prelude.children;
  23149. var declarations = node.block.children;
  23150. var nodeCompareMarker = selectors.first().compareMarker;
  23151. var skippedCompareMarkers = {};
  23152. list.nextUntil(item.next, function(next, nextItem) {
  23153. // skip non-ruleset node if safe
  23154. if (next.type !== 'Rule') {
  23155. return utils$2.unsafeToSkipNode.call(selectors, next);
  23156. }
  23157. if (node.pseudoSignature !== next.pseudoSignature) {
  23158. return true;
  23159. }
  23160. var nextFirstSelector = next.prelude.children.head;
  23161. var nextDeclarations = next.block.children;
  23162. var nextCompareMarker = nextFirstSelector.data.compareMarker;
  23163. // if next ruleset has same marked as one of skipped then stop joining
  23164. if (nextCompareMarker in skippedCompareMarkers) {
  23165. return true;
  23166. }
  23167. // try to join by selectors
  23168. if (selectors.head === selectors.tail) {
  23169. if (selectors.first().id === nextFirstSelector.data.id) {
  23170. declarations.appendList(nextDeclarations);
  23171. list.remove(nextItem);
  23172. return;
  23173. }
  23174. }
  23175. // try to join by properties
  23176. if (utils$2.isEqualDeclarations(declarations, nextDeclarations)) {
  23177. var nextStr = nextFirstSelector.data.id;
  23178. selectors.some(function(data, item) {
  23179. var curStr = data.id;
  23180. if (nextStr < curStr) {
  23181. selectors.insert(nextFirstSelector, item);
  23182. return true;
  23183. }
  23184. if (!item.next) {
  23185. selectors.insert(nextFirstSelector);
  23186. return true;
  23187. }
  23188. });
  23189. list.remove(nextItem);
  23190. return;
  23191. }
  23192. // go to next ruleset if current one can be skipped (has no equal specificity nor element selector)
  23193. if (nextCompareMarker === nodeCompareMarker) {
  23194. return true;
  23195. }
  23196. skippedCompareMarkers[nextCompareMarker] = true;
  23197. });
  23198. }
  23199. var _7MergeRuleset = function mergeRule(ast) {
  23200. walk$a(ast, {
  23201. visit: 'Rule',
  23202. enter: processRule$4
  23203. });
  23204. };
  23205. var List$5 = lib.List;
  23206. var walk$b = lib.walk;
  23207. function calcSelectorLength(list) {
  23208. var length = 0;
  23209. list.each(function(data) {
  23210. length += data.id.length + 1;
  23211. });
  23212. return length - 1;
  23213. }
  23214. function calcDeclarationsLength(tokens) {
  23215. var length = 0;
  23216. for (var i = 0; i < tokens.length; i++) {
  23217. length += tokens[i].length;
  23218. }
  23219. return (
  23220. length + // declarations
  23221. tokens.length - 1 // delimeters
  23222. );
  23223. }
  23224. function processRule$5(node, item, list) {
  23225. var avoidRulesMerge = this.block !== null ? this.block.avoidRulesMerge : false;
  23226. var selectors = node.prelude.children;
  23227. var block = node.block;
  23228. var disallowDownMarkers = Object.create(null);
  23229. var allowMergeUp = true;
  23230. var allowMergeDown = true;
  23231. list.prevUntil(item.prev, function(prev, prevItem) {
  23232. var prevBlock = prev.block;
  23233. var prevType = prev.type;
  23234. if (prevType !== 'Rule') {
  23235. var unsafe = utils$2.unsafeToSkipNode.call(selectors, prev);
  23236. if (!unsafe && prevType === 'Atrule' && prevBlock) {
  23237. walk$b(prevBlock, {
  23238. visit: 'Rule',
  23239. enter: function(node) {
  23240. node.prelude.children.each(function(data) {
  23241. disallowDownMarkers[data.compareMarker] = true;
  23242. });
  23243. }
  23244. });
  23245. }
  23246. return unsafe;
  23247. }
  23248. var prevSelectors = prev.prelude.children;
  23249. if (node.pseudoSignature !== prev.pseudoSignature) {
  23250. return true;
  23251. }
  23252. allowMergeDown = !prevSelectors.some(function(selector) {
  23253. return selector.compareMarker in disallowDownMarkers;
  23254. });
  23255. // try prev ruleset if simpleselectors has no equal specifity and element selector
  23256. if (!allowMergeDown && !allowMergeUp) {
  23257. return true;
  23258. }
  23259. // try to join by selectors
  23260. if (allowMergeUp && utils$2.isEqualSelectors(prevSelectors, selectors)) {
  23261. prevBlock.children.appendList(block.children);
  23262. list.remove(item);
  23263. return true;
  23264. }
  23265. // try to join by properties
  23266. var diff = utils$2.compareDeclarations(block.children, prevBlock.children);
  23267. // console.log(diff.eq, diff.ne1, diff.ne2);
  23268. if (diff.eq.length) {
  23269. if (!diff.ne1.length && !diff.ne2.length) {
  23270. // equal blocks
  23271. if (allowMergeDown) {
  23272. utils$2.addSelectors(selectors, prevSelectors);
  23273. list.remove(prevItem);
  23274. }
  23275. return true;
  23276. } else if (!avoidRulesMerge) { /* probably we don't need to prevent those merges for @keyframes
  23277. TODO: need to be checked */
  23278. if (diff.ne1.length && !diff.ne2.length) {
  23279. // prevBlock is subset block
  23280. var selectorLength = calcSelectorLength(selectors);
  23281. var blockLength = calcDeclarationsLength(diff.eq); // declarations length
  23282. if (allowMergeUp && selectorLength < blockLength) {
  23283. utils$2.addSelectors(prevSelectors, selectors);
  23284. block.children = new List$5().fromArray(diff.ne1);
  23285. }
  23286. } else if (!diff.ne1.length && diff.ne2.length) {
  23287. // node is subset of prevBlock
  23288. var selectorLength = calcSelectorLength(prevSelectors);
  23289. var blockLength = calcDeclarationsLength(diff.eq); // declarations length
  23290. if (allowMergeDown && selectorLength < blockLength) {
  23291. utils$2.addSelectors(selectors, prevSelectors);
  23292. prevBlock.children = new List$5().fromArray(diff.ne2);
  23293. }
  23294. } else {
  23295. // diff.ne1.length && diff.ne2.length
  23296. // extract equal block
  23297. var newSelector = {
  23298. type: 'SelectorList',
  23299. loc: null,
  23300. children: utils$2.addSelectors(prevSelectors.copy(), selectors)
  23301. };
  23302. var newBlockLength = calcSelectorLength(newSelector.children) + 2; // selectors length + curly braces length
  23303. var blockLength = calcDeclarationsLength(diff.eq); // declarations length
  23304. // create new ruleset if declarations length greater than
  23305. // ruleset description overhead
  23306. if (blockLength >= newBlockLength) {
  23307. var newItem = list.createItem({
  23308. type: 'Rule',
  23309. loc: null,
  23310. prelude: newSelector,
  23311. block: {
  23312. type: 'Block',
  23313. loc: null,
  23314. children: new List$5().fromArray(diff.eq)
  23315. },
  23316. pseudoSignature: node.pseudoSignature
  23317. });
  23318. block.children = new List$5().fromArray(diff.ne1);
  23319. prevBlock.children = new List$5().fromArray(diff.ne2overrided);
  23320. if (allowMergeUp) {
  23321. list.insert(newItem, prevItem);
  23322. } else {
  23323. list.insert(newItem, item);
  23324. }
  23325. return true;
  23326. }
  23327. }
  23328. }
  23329. }
  23330. if (allowMergeUp) {
  23331. // TODO: disallow up merge only if any property interception only (i.e. diff.ne2overrided.length > 0);
  23332. // await property families to find property interception correctly
  23333. allowMergeUp = !prevSelectors.some(function(prevSelector) {
  23334. return selectors.some(function(selector) {
  23335. return selector.compareMarker === prevSelector.compareMarker;
  23336. });
  23337. });
  23338. }
  23339. prevSelectors.each(function(data) {
  23340. disallowDownMarkers[data.compareMarker] = true;
  23341. });
  23342. });
  23343. }
  23344. var _8RestructRuleset = function restructRule(ast) {
  23345. walk$b(ast, {
  23346. visit: 'Rule',
  23347. reverse: true,
  23348. enter: processRule$5
  23349. });
  23350. };
  23351. var restructure = function(ast, options) {
  23352. // prepare ast for restructing
  23353. var indexer = prepare(ast, options);
  23354. options.logger('prepare', ast);
  23355. _1MergeAtrule(ast, options);
  23356. options.logger('mergeAtrule', ast);
  23357. _2InitialMergeRuleset(ast);
  23358. options.logger('initialMergeRuleset', ast);
  23359. _3DisjoinRuleset(ast);
  23360. options.logger('disjoinRuleset', ast);
  23361. _4RestructShorthand(ast, indexer);
  23362. options.logger('restructShorthand', ast);
  23363. _6RestructBlock(ast);
  23364. options.logger('restructBlock', ast);
  23365. _7MergeRuleset(ast);
  23366. options.logger('mergeRuleset', ast);
  23367. _8RestructRuleset(ast);
  23368. options.logger('restructRuleset', ast);
  23369. };
  23370. var List$6 = lib.List;
  23371. var clone$1 = lib.clone;
  23372. var walk$c = lib.walk;
  23373. function readChunk(children, specialComments) {
  23374. var buffer = new List$6();
  23375. var nonSpaceTokenInBuffer = false;
  23376. var protectedComment;
  23377. children.nextUntil(children.head, function(node, item, list) {
  23378. if (node.type === 'Comment') {
  23379. if (!specialComments || node.value.charAt(0) !== '!') {
  23380. list.remove(item);
  23381. return;
  23382. }
  23383. if (nonSpaceTokenInBuffer || protectedComment) {
  23384. return true;
  23385. }
  23386. list.remove(item);
  23387. protectedComment = node;
  23388. return;
  23389. }
  23390. if (node.type !== 'WhiteSpace') {
  23391. nonSpaceTokenInBuffer = true;
  23392. }
  23393. buffer.insert(list.remove(item));
  23394. });
  23395. return {
  23396. comment: protectedComment,
  23397. stylesheet: {
  23398. type: 'StyleSheet',
  23399. loc: null,
  23400. children: buffer
  23401. }
  23402. };
  23403. }
  23404. function compressChunk(ast, firstAtrulesAllowed, num, options) {
  23405. options.logger('Compress block #' + num, null, true);
  23406. var seed = 1;
  23407. if (ast.type === 'StyleSheet') {
  23408. ast.firstAtrulesAllowed = firstAtrulesAllowed;
  23409. ast.id = seed++;
  23410. }
  23411. walk$c(ast, {
  23412. visit: 'Atrule',
  23413. enter: function markScopes(node) {
  23414. if (node.block !== null) {
  23415. node.block.id = seed++;
  23416. }
  23417. }
  23418. });
  23419. options.logger('init', ast);
  23420. // remove redundant
  23421. clean(ast, options);
  23422. options.logger('clean', ast);
  23423. // replace nodes for shortened forms
  23424. replace(ast);
  23425. options.logger('replace', ast);
  23426. // structure optimisations
  23427. if (options.restructuring) {
  23428. restructure(ast, options);
  23429. }
  23430. return ast;
  23431. }
  23432. function getCommentsOption(options) {
  23433. var comments = 'comments' in options ? options.comments : 'exclamation';
  23434. if (typeof comments === 'boolean') {
  23435. comments = comments ? 'exclamation' : false;
  23436. } else if (comments !== 'exclamation' && comments !== 'first-exclamation') {
  23437. comments = false;
  23438. }
  23439. return comments;
  23440. }
  23441. function getRestructureOption(options) {
  23442. if ('restructure' in options) {
  23443. return options.restructure;
  23444. }
  23445. return 'restructuring' in options ? options.restructuring : true;
  23446. }
  23447. function wrapBlock(block) {
  23448. return new List$6().appendData({
  23449. type: 'Rule',
  23450. loc: null,
  23451. prelude: {
  23452. type: 'SelectorList',
  23453. loc: null,
  23454. children: new List$6().appendData({
  23455. type: 'Selector',
  23456. loc: null,
  23457. children: new List$6().appendData({
  23458. type: 'TypeSelector',
  23459. loc: null,
  23460. name: 'x'
  23461. })
  23462. })
  23463. },
  23464. block: block
  23465. });
  23466. }
  23467. var compress = function compress(ast, options) {
  23468. ast = ast || { type: 'StyleSheet', loc: null, children: new List$6() };
  23469. options = options || {};
  23470. var compressOptions = {
  23471. logger: typeof options.logger === 'function' ? options.logger : function() {},
  23472. restructuring: getRestructureOption(options),
  23473. forceMediaMerge: Boolean(options.forceMediaMerge),
  23474. usage: options.usage ? usage.buildIndex(options.usage) : false
  23475. };
  23476. var specialComments = getCommentsOption(options);
  23477. var firstAtrulesAllowed = true;
  23478. var input;
  23479. var output = new List$6();
  23480. var chunk;
  23481. var chunkNum = 1;
  23482. var chunkChildren;
  23483. if (options.clone) {
  23484. ast = clone$1(ast);
  23485. }
  23486. if (ast.type === 'StyleSheet') {
  23487. input = ast.children;
  23488. ast.children = output;
  23489. } else {
  23490. input = wrapBlock(ast);
  23491. }
  23492. do {
  23493. chunk = readChunk(input, Boolean(specialComments));
  23494. compressChunk(chunk.stylesheet, firstAtrulesAllowed, chunkNum++, compressOptions);
  23495. chunkChildren = chunk.stylesheet.children;
  23496. if (chunk.comment) {
  23497. // add \n before comment if there is another content in output
  23498. if (!output.isEmpty()) {
  23499. output.insert(List$6.createItem({
  23500. type: 'Raw',
  23501. value: '\n'
  23502. }));
  23503. }
  23504. output.insert(List$6.createItem(chunk.comment));
  23505. // add \n after comment if chunk is not empty
  23506. if (!chunkChildren.isEmpty()) {
  23507. output.insert(List$6.createItem({
  23508. type: 'Raw',
  23509. value: '\n'
  23510. }));
  23511. }
  23512. }
  23513. if (firstAtrulesAllowed && !chunkChildren.isEmpty()) {
  23514. var lastRule = chunkChildren.last();
  23515. if (lastRule.type !== 'Atrule' ||
  23516. (lastRule.name !== 'import' && lastRule.name !== 'charset')) {
  23517. firstAtrulesAllowed = false;
  23518. }
  23519. }
  23520. if (specialComments !== 'exclamation') {
  23521. specialComments = false;
  23522. }
  23523. output.appendList(chunkChildren);
  23524. } while (!input.isEmpty());
  23525. return {
  23526. ast: ast
  23527. };
  23528. };
  23529. var version$2 = "4.1.0";
  23530. var _package$2 = {
  23531. version: version$2
  23532. };
  23533. var _package$3 = /*#__PURE__*/Object.freeze({
  23534. __proto__: null,
  23535. version: version$2,
  23536. 'default': _package$2
  23537. });
  23538. var require$$0 = getCjsExportFromNamespace(_package$3);
  23539. var parse$1 = lib.parse;
  23540. var generate$6 = lib.generate;
  23541. function debugOutput(name, options, startTime, data) {
  23542. if (options.debug) {
  23543. console.error('## ' + name + ' done in %d ms\n', Date.now() - startTime);
  23544. }
  23545. return data;
  23546. }
  23547. function createDefaultLogger(level) {
  23548. var lastDebug;
  23549. return function logger(title, ast) {
  23550. var line = title;
  23551. if (ast) {
  23552. line = '[' + ((Date.now() - lastDebug) / 1000).toFixed(3) + 's] ' + line;
  23553. }
  23554. if (level > 1 && ast) {
  23555. var css = generate$6(ast);
  23556. // when level 2, limit css to 256 symbols
  23557. if (level === 2 && css.length > 256) {
  23558. css = css.substr(0, 256) + '...';
  23559. }
  23560. line += '\n ' + css + '\n';
  23561. }
  23562. console.error(line);
  23563. lastDebug = Date.now();
  23564. };
  23565. }
  23566. function copy$1(obj) {
  23567. var result = {};
  23568. for (var key in obj) {
  23569. result[key] = obj[key];
  23570. }
  23571. return result;
  23572. }
  23573. function buildCompressOptions(options) {
  23574. options = copy$1(options);
  23575. if (typeof options.logger !== 'function' && options.debug) {
  23576. options.logger = createDefaultLogger(options.debug);
  23577. }
  23578. return options;
  23579. }
  23580. function runHandler(ast, options, handlers) {
  23581. if (!Array.isArray(handlers)) {
  23582. handlers = [handlers];
  23583. }
  23584. handlers.forEach(function(fn) {
  23585. fn(ast, options);
  23586. });
  23587. }
  23588. function minify(context, source, options) {
  23589. options = options || {};
  23590. var filename = options.filename || '<unknown>';
  23591. var result;
  23592. // parse
  23593. var ast = debugOutput('parsing', options, Date.now(),
  23594. parse$1(source, {
  23595. context: context,
  23596. filename: filename,
  23597. positions: Boolean(options.sourceMap)
  23598. })
  23599. );
  23600. // before compress handlers
  23601. if (options.beforeCompress) {
  23602. debugOutput('beforeCompress', options, Date.now(),
  23603. runHandler(ast, options, options.beforeCompress)
  23604. );
  23605. }
  23606. // compress
  23607. var compressResult = debugOutput('compress', options, Date.now(),
  23608. compress(ast, buildCompressOptions(options))
  23609. );
  23610. // after compress handlers
  23611. if (options.afterCompress) {
  23612. debugOutput('afterCompress', options, Date.now(),
  23613. runHandler(compressResult, options, options.afterCompress)
  23614. );
  23615. }
  23616. // generate
  23617. if (options.sourceMap) {
  23618. result = debugOutput('generate(sourceMap: true)', options, Date.now(), (function() {
  23619. var tmp = generate$6(compressResult.ast, { sourceMap: true });
  23620. tmp.map._file = filename; // since other tools can relay on file in source map transform chain
  23621. tmp.map.setSourceContent(filename, source);
  23622. return tmp;
  23623. }()));
  23624. } else {
  23625. result = debugOutput('generate', options, Date.now(), {
  23626. css: generate$6(compressResult.ast),
  23627. map: null
  23628. });
  23629. }
  23630. return result;
  23631. }
  23632. function minifyStylesheet(source, options) {
  23633. return minify('stylesheet', source, options);
  23634. }
  23635. function minifyBlock(source, options) {
  23636. return minify('declarationList', source, options);
  23637. }
  23638. var lib$1 = {
  23639. version: require$$0.version,
  23640. // main methods
  23641. minify: minifyStylesheet,
  23642. minifyBlock: minifyBlock,
  23643. // css syntax parser/walkers/generator/etc
  23644. syntax: Object.assign({
  23645. compress: compress
  23646. }, lib)
  23647. };
  23648. var lib_1 = lib$1.version;
  23649. var lib_2 = lib$1.minify;
  23650. var lib_3 = lib$1.minifyBlock;
  23651. var lib_4 = lib$1.syntax;
  23652. exports.default = lib$1;
  23653. exports.minify = lib_2;
  23654. exports.minifyBlock = lib_3;
  23655. exports.syntax = lib_4;
  23656. exports.version = lib_1;
  23657. Object.defineProperty(exports, '__esModule', { value: true });
  23658. })));