| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162 |
- (function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = global || self, factory(global.csso = {}));
- }(this, (function (exports) { 'use strict';
- //
- // list
- // ┌──────┐
- // ┌──────────────┼─head │
- // │ │ tail─┼──────────────┐
- // │ └──────┘ │
- // ▼ ▼
- // item item item item
- // ┌──────┐ ┌──────┐ ┌──────┐ ┌──────┐
- // null ◀──┼─prev │◀───┼─prev │◀───┼─prev │◀───┼─prev │
- // │ next─┼───▶│ next─┼───▶│ next─┼───▶│ next─┼──▶ null
- // ├──────┤ ├──────┤ ├──────┤ ├──────┤
- // │ data │ │ data │ │ data │ │ data │
- // └──────┘ └──────┘ └──────┘ └──────┘
- //
- function createItem(data) {
- return {
- prev: null,
- next: null,
- data: data
- };
- }
- function allocateCursor(node, prev, next) {
- var cursor;
- if (cursors !== null) {
- cursor = cursors;
- cursors = cursors.cursor;
- cursor.prev = prev;
- cursor.next = next;
- cursor.cursor = node.cursor;
- } else {
- cursor = {
- prev: prev,
- next: next,
- cursor: node.cursor
- };
- }
- node.cursor = cursor;
- return cursor;
- }
- function releaseCursor(node) {
- var cursor = node.cursor;
- node.cursor = cursor.cursor;
- cursor.prev = null;
- cursor.next = null;
- cursor.cursor = cursors;
- cursors = cursor;
- }
- var cursors = null;
- var List = function() {
- this.cursor = null;
- this.head = null;
- this.tail = null;
- };
- List.createItem = createItem;
- List.prototype.createItem = createItem;
- List.prototype.updateCursors = function(prevOld, prevNew, nextOld, nextNew) {
- var cursor = this.cursor;
- while (cursor !== null) {
- if (cursor.prev === prevOld) {
- cursor.prev = prevNew;
- }
- if (cursor.next === nextOld) {
- cursor.next = nextNew;
- }
- cursor = cursor.cursor;
- }
- };
- List.prototype.getSize = function() {
- var size = 0;
- var cursor = this.head;
- while (cursor) {
- size++;
- cursor = cursor.next;
- }
- return size;
- };
- List.prototype.fromArray = function(array) {
- var cursor = null;
- this.head = null;
- for (var i = 0; i < array.length; i++) {
- var item = createItem(array[i]);
- if (cursor !== null) {
- cursor.next = item;
- } else {
- this.head = item;
- }
- item.prev = cursor;
- cursor = item;
- }
- this.tail = cursor;
- return this;
- };
- List.prototype.toArray = function() {
- var cursor = this.head;
- var result = [];
- while (cursor) {
- result.push(cursor.data);
- cursor = cursor.next;
- }
- return result;
- };
- List.prototype.toJSON = List.prototype.toArray;
- List.prototype.isEmpty = function() {
- return this.head === null;
- };
- List.prototype.first = function() {
- return this.head && this.head.data;
- };
- List.prototype.last = function() {
- return this.tail && this.tail.data;
- };
- List.prototype.each = function(fn, context) {
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, null, this.head);
- while (cursor.next !== null) {
- item = cursor.next;
- cursor.next = item.next;
- fn.call(context, item.data, item, this);
- }
- // pop cursor
- releaseCursor(this);
- };
- List.prototype.forEach = List.prototype.each;
- List.prototype.eachRight = function(fn, context) {
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, this.tail, null);
- while (cursor.prev !== null) {
- item = cursor.prev;
- cursor.prev = item.prev;
- fn.call(context, item.data, item, this);
- }
- // pop cursor
- releaseCursor(this);
- };
- List.prototype.forEachRight = List.prototype.eachRight;
- List.prototype.reduce = function(fn, initialValue, context) {
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, null, this.head);
- var acc = initialValue;
- while (cursor.next !== null) {
- item = cursor.next;
- cursor.next = item.next;
- acc = fn.call(context, acc, item.data, item, this);
- }
- // pop cursor
- releaseCursor(this);
- return acc;
- };
- List.prototype.reduceRight = function(fn, initialValue, context) {
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, this.tail, null);
- var acc = initialValue;
- while (cursor.prev !== null) {
- item = cursor.prev;
- cursor.prev = item.prev;
- acc = fn.call(context, acc, item.data, item, this);
- }
- // pop cursor
- releaseCursor(this);
- return acc;
- };
- List.prototype.nextUntil = function(start, fn, context) {
- if (start === null) {
- return;
- }
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, null, start);
- while (cursor.next !== null) {
- item = cursor.next;
- cursor.next = item.next;
- if (fn.call(context, item.data, item, this)) {
- break;
- }
- }
- // pop cursor
- releaseCursor(this);
- };
- List.prototype.prevUntil = function(start, fn, context) {
- if (start === null) {
- return;
- }
- var item;
- if (context === undefined) {
- context = this;
- }
- // push cursor
- var cursor = allocateCursor(this, start, null);
- while (cursor.prev !== null) {
- item = cursor.prev;
- cursor.prev = item.prev;
- if (fn.call(context, item.data, item, this)) {
- break;
- }
- }
- // pop cursor
- releaseCursor(this);
- };
- List.prototype.some = function(fn, context) {
- var cursor = this.head;
- if (context === undefined) {
- context = this;
- }
- while (cursor !== null) {
- if (fn.call(context, cursor.data, cursor, this)) {
- return true;
- }
- cursor = cursor.next;
- }
- return false;
- };
- List.prototype.map = function(fn, context) {
- var result = new List();
- var cursor = this.head;
- if (context === undefined) {
- context = this;
- }
- while (cursor !== null) {
- result.appendData(fn.call(context, cursor.data, cursor, this));
- cursor = cursor.next;
- }
- return result;
- };
- List.prototype.filter = function(fn, context) {
- var result = new List();
- var cursor = this.head;
- if (context === undefined) {
- context = this;
- }
- while (cursor !== null) {
- if (fn.call(context, cursor.data, cursor, this)) {
- result.appendData(cursor.data);
- }
- cursor = cursor.next;
- }
- return result;
- };
- List.prototype.clear = function() {
- this.head = null;
- this.tail = null;
- };
- List.prototype.copy = function() {
- var result = new List();
- var cursor = this.head;
- while (cursor !== null) {
- result.insert(createItem(cursor.data));
- cursor = cursor.next;
- }
- return result;
- };
- List.prototype.prepend = function(item) {
- // head
- // ^
- // item
- this.updateCursors(null, item, this.head, item);
- // insert to the beginning of the list
- if (this.head !== null) {
- // new item <- first item
- this.head.prev = item;
- // new item -> first item
- item.next = this.head;
- } else {
- // if list has no head, then it also has no tail
- // in this case tail points to the new item
- this.tail = item;
- }
- // head always points to new item
- this.head = item;
- return this;
- };
- List.prototype.prependData = function(data) {
- return this.prepend(createItem(data));
- };
- List.prototype.append = function(item) {
- return this.insert(item);
- };
- List.prototype.appendData = function(data) {
- return this.insert(createItem(data));
- };
- List.prototype.insert = function(item, before) {
- if (before !== undefined && before !== null) {
- // prev before
- // ^
- // item
- this.updateCursors(before.prev, item, before, item);
- if (before.prev === null) {
- // insert to the beginning of list
- if (this.head !== before) {
- throw new Error('before doesn\'t belong to list');
- }
- // since head points to before therefore list doesn't empty
- // no need to check tail
- this.head = item;
- before.prev = item;
- item.next = before;
- this.updateCursors(null, item);
- } else {
- // insert between two items
- before.prev.next = item;
- item.prev = before.prev;
- before.prev = item;
- item.next = before;
- }
- } else {
- // tail
- // ^
- // item
- this.updateCursors(this.tail, item, null, item);
- // insert to the ending of the list
- if (this.tail !== null) {
- // last item -> new item
- this.tail.next = item;
- // last item <- new item
- item.prev = this.tail;
- } else {
- // if list has no tail, then it also has no head
- // in this case head points to new item
- this.head = item;
- }
- // tail always points to new item
- this.tail = item;
- }
- return this;
- };
- List.prototype.insertData = function(data, before) {
- return this.insert(createItem(data), before);
- };
- List.prototype.remove = function(item) {
- // item
- // ^
- // prev next
- this.updateCursors(item, item.prev, item, item.next);
- if (item.prev !== null) {
- item.prev.next = item.next;
- } else {
- if (this.head !== item) {
- throw new Error('item doesn\'t belong to list');
- }
- this.head = item.next;
- }
- if (item.next !== null) {
- item.next.prev = item.prev;
- } else {
- if (this.tail !== item) {
- throw new Error('item doesn\'t belong to list');
- }
- this.tail = item.prev;
- }
- item.prev = null;
- item.next = null;
- return item;
- };
- List.prototype.push = function(data) {
- this.insert(createItem(data));
- };
- List.prototype.pop = function() {
- if (this.tail !== null) {
- return this.remove(this.tail);
- }
- };
- List.prototype.unshift = function(data) {
- this.prepend(createItem(data));
- };
- List.prototype.shift = function() {
- if (this.head !== null) {
- return this.remove(this.head);
- }
- };
- List.prototype.prependList = function(list) {
- return this.insertList(list, this.head);
- };
- List.prototype.appendList = function(list) {
- return this.insertList(list);
- };
- List.prototype.insertList = function(list, before) {
- // ignore empty lists
- if (list.head === null) {
- return this;
- }
- if (before !== undefined && before !== null) {
- this.updateCursors(before.prev, list.tail, before, list.head);
- // insert in the middle of dist list
- if (before.prev !== null) {
- // before.prev <-> list.head
- before.prev.next = list.head;
- list.head.prev = before.prev;
- } else {
- this.head = list.head;
- }
- before.prev = list.tail;
- list.tail.next = before;
- } else {
- this.updateCursors(this.tail, list.tail, null, list.head);
- // insert to end of the list
- if (this.tail !== null) {
- // if destination list has a tail, then it also has a head,
- // but head doesn't change
- // dest tail -> source head
- this.tail.next = list.head;
- // dest tail <- source head
- list.head.prev = this.tail;
- } else {
- // if list has no a tail, then it also has no a head
- // in this case points head to new item
- this.head = list.head;
- }
- // tail always start point to new item
- this.tail = list.tail;
- }
- list.head = null;
- list.tail = null;
- return this;
- };
- List.prototype.replace = function(oldItem, newItemOrList) {
- if ('head' in newItemOrList) {
- this.insertList(newItemOrList, oldItem);
- } else {
- this.insert(newItemOrList, oldItem);
- }
- this.remove(oldItem);
- };
- var List_1 = List;
- var createCustomError = function createCustomError(name, message) {
- // use Object.create(), because some VMs prevent setting line/column otherwise
- // (iOS Safari 10 even throws an exception)
- var error = Object.create(SyntaxError.prototype);
- var errorStack = new Error();
- error.name = name;
- error.message = message;
- Object.defineProperty(error, 'stack', {
- get: function() {
- return (errorStack.stack || '').replace(/^(.+\n){1,3}/, name + ': ' + message + '\n');
- }
- });
- return error;
- };
- var MAX_LINE_LENGTH = 100;
- var OFFSET_CORRECTION = 60;
- var TAB_REPLACEMENT = ' ';
- function sourceFragment(error, extraLines) {
- function processLines(start, end) {
- return lines.slice(start, end).map(function(line, idx) {
- var num = String(start + idx + 1);
- while (num.length < maxNumLength) {
- num = ' ' + num;
- }
- return num + ' |' + line;
- }).join('\n');
- }
- var lines = error.source.split(/\r\n?|\n|\f/);
- var line = error.line;
- var column = error.column;
- var startLine = Math.max(1, line - extraLines) - 1;
- var endLine = Math.min(line + extraLines, lines.length + 1);
- var maxNumLength = Math.max(4, String(endLine).length) + 1;
- var cutLeft = 0;
- // column correction according to replaced tab before column
- column += (TAB_REPLACEMENT.length - 1) * (lines[line - 1].substr(0, column - 1).match(/\t/g) || []).length;
- if (column > MAX_LINE_LENGTH) {
- cutLeft = column - OFFSET_CORRECTION + 3;
- column = OFFSET_CORRECTION - 2;
- }
- for (var i = startLine; i <= endLine; i++) {
- if (i >= 0 && i < lines.length) {
- lines[i] = lines[i].replace(/\t/g, TAB_REPLACEMENT);
- lines[i] =
- (cutLeft > 0 && lines[i].length > cutLeft ? '\u2026' : '') +
- lines[i].substr(cutLeft, MAX_LINE_LENGTH - 2) +
- (lines[i].length > cutLeft + MAX_LINE_LENGTH - 1 ? '\u2026' : '');
- }
- }
- return [
- processLines(startLine, line),
- new Array(column + maxNumLength + 2).join('-') + '^',
- processLines(line, endLine)
- ].filter(Boolean).join('\n');
- }
- var SyntaxError$1 = function(message, source, offset, line, column) {
- var error = createCustomError('SyntaxError', message);
- error.source = source;
- error.offset = offset;
- error.line = line;
- error.column = column;
- error.sourceFragment = function(extraLines) {
- return sourceFragment(error, isNaN(extraLines) ? 0 : extraLines);
- };
- Object.defineProperty(error, 'formattedMessage', {
- get: function() {
- return (
- 'Parse error: ' + error.message + '\n' +
- sourceFragment(error, 2)
- );
- }
- });
- // for backward capability
- error.parseError = {
- offset: offset,
- line: line,
- column: column
- };
- return error;
- };
- var _SyntaxError = SyntaxError$1;
- // CSS Syntax Module Level 3
- // https://www.w3.org/TR/css-syntax-3/
- var TYPE = {
- EOF: 0, // <EOF-token>
- Ident: 1, // <ident-token>
- Function: 2, // <function-token>
- AtKeyword: 3, // <at-keyword-token>
- Hash: 4, // <hash-token>
- String: 5, // <string-token>
- BadString: 6, // <bad-string-token>
- Url: 7, // <url-token>
- BadUrl: 8, // <bad-url-token>
- Delim: 9, // <delim-token>
- Number: 10, // <number-token>
- Percentage: 11, // <percentage-token>
- Dimension: 12, // <dimension-token>
- WhiteSpace: 13, // <whitespace-token>
- CDO: 14, // <CDO-token>
- CDC: 15, // <CDC-token>
- Colon: 16, // <colon-token> :
- Semicolon: 17, // <semicolon-token> ;
- Comma: 18, // <comma-token> ,
- LeftSquareBracket: 19, // <[-token>
- RightSquareBracket: 20, // <]-token>
- LeftParenthesis: 21, // <(-token>
- RightParenthesis: 22, // <)-token>
- LeftCurlyBracket: 23, // <{-token>
- RightCurlyBracket: 24, // <}-token>
- Comment: 25
- };
- var NAME = Object.keys(TYPE).reduce(function(result, key) {
- result[TYPE[key]] = key;
- return result;
- }, {});
- var _const = {
- TYPE: TYPE,
- NAME: NAME
- };
- var EOF = 0;
- // https://drafts.csswg.org/css-syntax-3/
- // § 4.2. Definitions
- // digit
- // A code point between U+0030 DIGIT ZERO (0) and U+0039 DIGIT NINE (9).
- function isDigit(code) {
- return code >= 0x0030 && code <= 0x0039;
- }
- // hex digit
- // A digit, or a code point between U+0041 LATIN CAPITAL LETTER A (A) and U+0046 LATIN CAPITAL LETTER F (F),
- // or a code point between U+0061 LATIN SMALL LETTER A (a) and U+0066 LATIN SMALL LETTER F (f).
- function isHexDigit(code) {
- return (
- isDigit(code) || // 0 .. 9
- (code >= 0x0041 && code <= 0x0046) || // A .. F
- (code >= 0x0061 && code <= 0x0066) // a .. f
- );
- }
- // uppercase letter
- // A code point between U+0041 LATIN CAPITAL LETTER A (A) and U+005A LATIN CAPITAL LETTER Z (Z).
- function isUppercaseLetter(code) {
- return code >= 0x0041 && code <= 0x005A;
- }
- // lowercase letter
- // A code point between U+0061 LATIN SMALL LETTER A (a) and U+007A LATIN SMALL LETTER Z (z).
- function isLowercaseLetter(code) {
- return code >= 0x0061 && code <= 0x007A;
- }
- // letter
- // An uppercase letter or a lowercase letter.
- function isLetter(code) {
- return isUppercaseLetter(code) || isLowercaseLetter(code);
- }
- // non-ASCII code point
- // A code point with a value equal to or greater than U+0080 <control>.
- function isNonAscii(code) {
- return code >= 0x0080;
- }
- // name-start code point
- // A letter, a non-ASCII code point, or U+005F LOW LINE (_).
- function isNameStart(code) {
- return isLetter(code) || isNonAscii(code) || code === 0x005F;
- }
- // name code point
- // A name-start code point, a digit, or U+002D HYPHEN-MINUS (-).
- function isName(code) {
- return isNameStart(code) || isDigit(code) || code === 0x002D;
- }
- // non-printable code point
- // A code point between U+0000 NULL and U+0008 BACKSPACE, or U+000B LINE TABULATION,
- // or a code point between U+000E SHIFT OUT and U+001F INFORMATION SEPARATOR ONE, or U+007F DELETE.
- function isNonPrintable(code) {
- return (
- (code >= 0x0000 && code <= 0x0008) ||
- (code === 0x000B) ||
- (code >= 0x000E && code <= 0x001F) ||
- (code === 0x007F)
- );
- }
- // newline
- // U+000A LINE FEED. Note that U+000D CARRIAGE RETURN and U+000C FORM FEED are not included in this definition,
- // as they are converted to U+000A LINE FEED during preprocessing.
- // TODO: we doesn't do a preprocessing, so check a code point for U+000D CARRIAGE RETURN and U+000C FORM FEED
- function isNewline(code) {
- return code === 0x000A || code === 0x000D || code === 0x000C;
- }
- // whitespace
- // A newline, U+0009 CHARACTER TABULATION, or U+0020 SPACE.
- function isWhiteSpace(code) {
- return isNewline(code) || code === 0x0020 || code === 0x0009;
- }
- // § 4.3.8. Check if two code points are a valid escape
- function isValidEscape(first, second) {
- // If the first code point is not U+005C REVERSE SOLIDUS (\), return false.
- if (first !== 0x005C) {
- return false;
- }
- // Otherwise, if the second code point is a newline or EOF, return false.
- if (isNewline(second) || second === EOF) {
- return false;
- }
- // Otherwise, return true.
- return true;
- }
- // § 4.3.9. Check if three code points would start an identifier
- function isIdentifierStart(first, second, third) {
- // Look at the first code point:
- // U+002D HYPHEN-MINUS
- if (first === 0x002D) {
- // If the second code point is a name-start code point or a U+002D HYPHEN-MINUS,
- // or the second and third code points are a valid escape, return true. Otherwise, return false.
- return (
- isNameStart(second) ||
- second === 0x002D ||
- isValidEscape(second, third)
- );
- }
- // name-start code point
- if (isNameStart(first)) {
- // Return true.
- return true;
- }
- // U+005C REVERSE SOLIDUS (\)
- if (first === 0x005C) {
- // If the first and second code points are a valid escape, return true. Otherwise, return false.
- return isValidEscape(first, second);
- }
- // anything else
- // Return false.
- return false;
- }
- // § 4.3.10. Check if three code points would start a number
- function isNumberStart(first, second, third) {
- // Look at the first code point:
- // U+002B PLUS SIGN (+)
- // U+002D HYPHEN-MINUS (-)
- if (first === 0x002B || first === 0x002D) {
- // If the second code point is a digit, return true.
- if (isDigit(second)) {
- return 2;
- }
- // Otherwise, if the second code point is a U+002E FULL STOP (.)
- // and the third code point is a digit, return true.
- // Otherwise, return false.
- return second === 0x002E && isDigit(third) ? 3 : 0;
- }
- // U+002E FULL STOP (.)
- if (first === 0x002E) {
- // If the second code point is a digit, return true. Otherwise, return false.
- return isDigit(second) ? 2 : 0;
- }
- // digit
- if (isDigit(first)) {
- // Return true.
- return 1;
- }
- // anything else
- // Return false.
- return 0;
- }
- //
- // Misc
- //
- // detect BOM (https://en.wikipedia.org/wiki/Byte_order_mark)
- function isBOM(code) {
- // UTF-16BE
- if (code === 0xFEFF) {
- return 1;
- }
- // UTF-16LE
- if (code === 0xFFFE) {
- return 1;
- }
- return 0;
- }
- // Fast code category
- //
- // https://drafts.csswg.org/css-syntax/#tokenizer-definitions
- // > non-ASCII code point
- // > A code point with a value equal to or greater than U+0080 <control>
- // > name-start code point
- // > A letter, a non-ASCII code point, or U+005F LOW LINE (_).
- // > name code point
- // > A name-start code point, a digit, or U+002D HYPHEN-MINUS (-)
- // That means only ASCII code points has a special meaning and we define a maps for 0..127 codes only
- var CATEGORY = new Array(0x80);
- charCodeCategory.Eof = 0x80;
- charCodeCategory.WhiteSpace = 0x82;
- charCodeCategory.Digit = 0x83;
- charCodeCategory.NameStart = 0x84;
- charCodeCategory.NonPrintable = 0x85;
- for (var i = 0; i < CATEGORY.length; i++) {
- switch (true) {
- case isWhiteSpace(i):
- CATEGORY[i] = charCodeCategory.WhiteSpace;
- break;
- case isDigit(i):
- CATEGORY[i] = charCodeCategory.Digit;
- break;
- case isNameStart(i):
- CATEGORY[i] = charCodeCategory.NameStart;
- break;
- case isNonPrintable(i):
- CATEGORY[i] = charCodeCategory.NonPrintable;
- break;
- default:
- CATEGORY[i] = i || charCodeCategory.Eof;
- }
- }
- function charCodeCategory(code) {
- return code < 0x80 ? CATEGORY[code] : charCodeCategory.NameStart;
- }
- var charCodeDefinitions = {
- isDigit: isDigit,
- isHexDigit: isHexDigit,
- isUppercaseLetter: isUppercaseLetter,
- isLowercaseLetter: isLowercaseLetter,
- isLetter: isLetter,
- isNonAscii: isNonAscii,
- isNameStart: isNameStart,
- isName: isName,
- isNonPrintable: isNonPrintable,
- isNewline: isNewline,
- isWhiteSpace: isWhiteSpace,
- isValidEscape: isValidEscape,
- isIdentifierStart: isIdentifierStart,
- isNumberStart: isNumberStart,
- isBOM: isBOM,
- charCodeCategory: charCodeCategory
- };
- var isDigit$1 = charCodeDefinitions.isDigit;
- var isHexDigit$1 = charCodeDefinitions.isHexDigit;
- var isUppercaseLetter$1 = charCodeDefinitions.isUppercaseLetter;
- var isName$1 = charCodeDefinitions.isName;
- var isWhiteSpace$1 = charCodeDefinitions.isWhiteSpace;
- var isValidEscape$1 = charCodeDefinitions.isValidEscape;
- function getCharCode(source, offset) {
- return offset < source.length ? source.charCodeAt(offset) : 0;
- }
- function getNewlineLength(source, offset, code) {
- if (code === 13 /* \r */ && getCharCode(source, offset + 1) === 10 /* \n */) {
- return 2;
- }
- return 1;
- }
- function cmpChar(testStr, offset, referenceCode) {
- var code = testStr.charCodeAt(offset);
- // code.toLowerCase() for A..Z
- if (isUppercaseLetter$1(code)) {
- code = code | 32;
- }
- return code === referenceCode;
- }
- function cmpStr(testStr, start, end, referenceStr) {
- if (end - start !== referenceStr.length) {
- return false;
- }
- if (start < 0 || end > testStr.length) {
- return false;
- }
- for (var i = start; i < end; i++) {
- var testCode = testStr.charCodeAt(i);
- var referenceCode = referenceStr.charCodeAt(i - start);
- // testCode.toLowerCase() for A..Z
- if (isUppercaseLetter$1(testCode)) {
- testCode = testCode | 32;
- }
- if (testCode !== referenceCode) {
- return false;
- }
- }
- return true;
- }
- function findWhiteSpaceStart(source, offset) {
- for (; offset >= 0; offset--) {
- if (!isWhiteSpace$1(source.charCodeAt(offset))) {
- break;
- }
- }
- return offset + 1;
- }
- function findWhiteSpaceEnd(source, offset) {
- for (; offset < source.length; offset++) {
- if (!isWhiteSpace$1(source.charCodeAt(offset))) {
- break;
- }
- }
- return offset;
- }
- function findDecimalNumberEnd(source, offset) {
- for (; offset < source.length; offset++) {
- if (!isDigit$1(source.charCodeAt(offset))) {
- break;
- }
- }
- return offset;
- }
- // § 4.3.7. Consume an escaped code point
- function consumeEscaped(source, offset) {
- // It assumes that the U+005C REVERSE SOLIDUS (\) has already been consumed and
- // that the next input code point has already been verified to be part of a valid escape.
- offset += 2;
- // hex digit
- if (isHexDigit$1(getCharCode(source, offset - 1))) {
- // Consume as many hex digits as possible, but no more than 5.
- // Note that this means 1-6 hex digits have been consumed in total.
- for (var maxOffset = Math.min(source.length, offset + 5); offset < maxOffset; offset++) {
- if (!isHexDigit$1(getCharCode(source, offset))) {
- break;
- }
- }
- // If the next input code point is whitespace, consume it as well.
- var code = getCharCode(source, offset);
- if (isWhiteSpace$1(code)) {
- offset += getNewlineLength(source, offset, code);
- }
- }
- return offset;
- }
- // §4.3.11. Consume a name
- // Note: This algorithm does not do the verification of the first few code points that are necessary
- // to ensure the returned code points would constitute an <ident-token>. If that is the intended use,
- // ensure that the stream starts with an identifier before calling this algorithm.
- function consumeName(source, offset) {
- // Let result initially be an empty string.
- // Repeatedly consume the next input code point from the stream:
- for (; offset < source.length; offset++) {
- var code = source.charCodeAt(offset);
- // name code point
- if (isName$1(code)) {
- // Append the code point to result.
- continue;
- }
- // the stream starts with a valid escape
- if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
- // Consume an escaped code point. Append the returned code point to result.
- offset = consumeEscaped(source, offset) - 1;
- continue;
- }
- // anything else
- // Reconsume the current input code point. Return result.
- break;
- }
- return offset;
- }
- // §4.3.12. Consume a number
- function consumeNumber(source, offset) {
- var code = source.charCodeAt(offset);
- // 2. If the next input code point is U+002B PLUS SIGN (+) or U+002D HYPHEN-MINUS (-),
- // consume it and append it to repr.
- if (code === 0x002B || code === 0x002D) {
- code = source.charCodeAt(offset += 1);
- }
- // 3. While the next input code point is a digit, consume it and append it to repr.
- if (isDigit$1(code)) {
- offset = findDecimalNumberEnd(source, offset + 1);
- code = source.charCodeAt(offset);
- }
- // 4. If the next 2 input code points are U+002E FULL STOP (.) followed by a digit, then:
- if (code === 0x002E && isDigit$1(source.charCodeAt(offset + 1))) {
- // 4.1 Consume them.
- // 4.2 Append them to repr.
- code = source.charCodeAt(offset += 2);
- // 4.3 Set type to "number".
- // TODO
- // 4.4 While the next input code point is a digit, consume it and append it to repr.
- offset = findDecimalNumberEnd(source, offset);
- }
- // 5. If the next 2 or 3 input code points are U+0045 LATIN CAPITAL LETTER E (E)
- // or U+0065 LATIN SMALL LETTER E (e), ... , followed by a digit, then:
- if (cmpChar(source, offset, 101 /* e */)) {
- var sign = 0;
- code = source.charCodeAt(offset + 1);
- // ... optionally followed by U+002D HYPHEN-MINUS (-) or U+002B PLUS SIGN (+) ...
- if (code === 0x002D || code === 0x002B) {
- sign = 1;
- code = source.charCodeAt(offset + 2);
- }
- // ... followed by a digit
- if (isDigit$1(code)) {
- // 5.1 Consume them.
- // 5.2 Append them to repr.
- // 5.3 Set type to "number".
- // TODO
- // 5.4 While the next input code point is a digit, consume it and append it to repr.
- offset = findDecimalNumberEnd(source, offset + 1 + sign + 1);
- }
- }
- return offset;
- }
- // § 4.3.14. Consume the remnants of a bad url
- // ... its sole use is to consume enough of the input stream to reach a recovery point
- // where normal tokenizing can resume.
- function consumeBadUrlRemnants(source, offset) {
- // Repeatedly consume the next input code point from the stream:
- for (; offset < source.length; offset++) {
- var code = source.charCodeAt(offset);
- // U+0029 RIGHT PARENTHESIS ())
- // EOF
- if (code === 0x0029) {
- // Return.
- offset++;
- break;
- }
- if (isValidEscape$1(code, getCharCode(source, offset + 1))) {
- // Consume an escaped code point.
- // Note: This allows an escaped right parenthesis ("\)") to be encountered
- // without ending the <bad-url-token>. This is otherwise identical to
- // the "anything else" clause.
- offset = consumeEscaped(source, offset);
- }
- }
- return offset;
- }
- var utils = {
- consumeEscaped: consumeEscaped,
- consumeName: consumeName,
- consumeNumber: consumeNumber,
- consumeBadUrlRemnants: consumeBadUrlRemnants,
- cmpChar: cmpChar,
- cmpStr: cmpStr,
- getNewlineLength: getNewlineLength,
- findWhiteSpaceStart: findWhiteSpaceStart,
- findWhiteSpaceEnd: findWhiteSpaceEnd
- };
- var TYPE$1 = _const.TYPE;
- var NAME$1 = _const.NAME;
- var cmpStr$1 = utils.cmpStr;
- var EOF$1 = TYPE$1.EOF;
- var WHITESPACE = TYPE$1.WhiteSpace;
- var COMMENT = TYPE$1.Comment;
- var OFFSET_MASK = 0x00FFFFFF;
- var TYPE_SHIFT = 24;
- var TokenStream = function() {
- this.offsetAndType = null;
- this.balance = null;
- this.reset();
- };
- TokenStream.prototype = {
- reset: function() {
- this.eof = false;
- this.tokenIndex = -1;
- this.tokenType = 0;
- this.tokenStart = this.firstCharOffset;
- this.tokenEnd = this.firstCharOffset;
- },
- lookupType: function(offset) {
- offset += this.tokenIndex;
- if (offset < this.tokenCount) {
- return this.offsetAndType[offset] >> TYPE_SHIFT;
- }
- return EOF$1;
- },
- lookupOffset: function(offset) {
- offset += this.tokenIndex;
- if (offset < this.tokenCount) {
- return this.offsetAndType[offset - 1] & OFFSET_MASK;
- }
- return this.source.length;
- },
- lookupValue: function(offset, referenceStr) {
- offset += this.tokenIndex;
- if (offset < this.tokenCount) {
- return cmpStr$1(
- this.source,
- this.offsetAndType[offset - 1] & OFFSET_MASK,
- this.offsetAndType[offset] & OFFSET_MASK,
- referenceStr
- );
- }
- return false;
- },
- getTokenStart: function(tokenIndex) {
- if (tokenIndex === this.tokenIndex) {
- return this.tokenStart;
- }
- if (tokenIndex > 0) {
- return tokenIndex < this.tokenCount
- ? this.offsetAndType[tokenIndex - 1] & OFFSET_MASK
- : this.offsetAndType[this.tokenCount] & OFFSET_MASK;
- }
- return this.firstCharOffset;
- },
- // TODO: -> skipUntilBalanced
- getRawLength: function(startToken, mode) {
- var cursor = startToken;
- var balanceEnd;
- var offset = this.offsetAndType[Math.max(cursor - 1, 0)] & OFFSET_MASK;
- var type;
- loop:
- for (; cursor < this.tokenCount; cursor++) {
- balanceEnd = this.balance[cursor];
- // stop scanning on balance edge that points to offset before start token
- if (balanceEnd < startToken) {
- break loop;
- }
- type = this.offsetAndType[cursor] >> TYPE_SHIFT;
- // check token is stop type
- switch (mode(type, this.source, offset)) {
- case 1:
- break loop;
- case 2:
- cursor++;
- break loop;
- default:
- offset = this.offsetAndType[cursor] & OFFSET_MASK;
- // fast forward to the end of balanced block
- if (this.balance[balanceEnd] === cursor) {
- cursor = balanceEnd;
- }
- }
- }
- return cursor - this.tokenIndex;
- },
- isBalanceEdge: function(pos) {
- return this.balance[this.tokenIndex] < pos;
- },
- isDelim: function(code, offset) {
- if (offset) {
- return (
- this.lookupType(offset) === TYPE$1.Delim &&
- this.source.charCodeAt(this.lookupOffset(offset)) === code
- );
- }
- return (
- this.tokenType === TYPE$1.Delim &&
- this.source.charCodeAt(this.tokenStart) === code
- );
- },
- getTokenValue: function() {
- return this.source.substring(this.tokenStart, this.tokenEnd);
- },
- getTokenLength: function() {
- return this.tokenEnd - this.tokenStart;
- },
- substrToCursor: function(start) {
- return this.source.substring(start, this.tokenStart);
- },
- skipWS: function() {
- for (var i = this.tokenIndex, skipTokenCount = 0; i < this.tokenCount; i++, skipTokenCount++) {
- if ((this.offsetAndType[i] >> TYPE_SHIFT) !== WHITESPACE) {
- break;
- }
- }
- if (skipTokenCount > 0) {
- this.skip(skipTokenCount);
- }
- },
- skipSC: function() {
- while (this.tokenType === WHITESPACE || this.tokenType === COMMENT) {
- this.next();
- }
- },
- skip: function(tokenCount) {
- var next = this.tokenIndex + tokenCount;
- if (next < this.tokenCount) {
- this.tokenIndex = next;
- this.tokenStart = this.offsetAndType[next - 1] & OFFSET_MASK;
- next = this.offsetAndType[next];
- this.tokenType = next >> TYPE_SHIFT;
- this.tokenEnd = next & OFFSET_MASK;
- } else {
- this.tokenIndex = this.tokenCount;
- this.next();
- }
- },
- next: function() {
- var next = this.tokenIndex + 1;
- if (next < this.tokenCount) {
- this.tokenIndex = next;
- this.tokenStart = this.tokenEnd;
- next = this.offsetAndType[next];
- this.tokenType = next >> TYPE_SHIFT;
- this.tokenEnd = next & OFFSET_MASK;
- } else {
- this.tokenIndex = this.tokenCount;
- this.eof = true;
- this.tokenType = EOF$1;
- this.tokenStart = this.tokenEnd = this.source.length;
- }
- },
- forEachToken(fn) {
- for (var i = 0, offset = this.firstCharOffset; i < this.tokenCount; i++) {
- var start = offset;
- var item = this.offsetAndType[i];
- var end = item & OFFSET_MASK;
- var type = item >> TYPE_SHIFT;
- offset = end;
- fn(type, start, end, i);
- }
- },
- dump() {
- var tokens = new Array(this.tokenCount);
- this.forEachToken((type, start, end, index) => {
- tokens[index] = {
- idx: index,
- type: NAME$1[type],
- chunk: this.source.substring(start, end),
- balance: this.balance[index]
- };
- });
- return tokens;
- }
- };
- var TokenStream_1 = TokenStream;
- function noop(value) {
- return value;
- }
- function generateMultiplier(multiplier) {
- if (multiplier.min === 0 && multiplier.max === 0) {
- return '*';
- }
- if (multiplier.min === 0 && multiplier.max === 1) {
- return '?';
- }
- if (multiplier.min === 1 && multiplier.max === 0) {
- return multiplier.comma ? '#' : '+';
- }
- if (multiplier.min === 1 && multiplier.max === 1) {
- return '';
- }
- return (
- (multiplier.comma ? '#' : '') +
- (multiplier.min === multiplier.max
- ? '{' + multiplier.min + '}'
- : '{' + multiplier.min + ',' + (multiplier.max !== 0 ? multiplier.max : '') + '}'
- )
- );
- }
- function generateTypeOpts(node) {
- switch (node.type) {
- case 'Range':
- return (
- ' [' +
- (node.min === null ? '-∞' : node.min) +
- ',' +
- (node.max === null ? '∞' : node.max) +
- ']'
- );
- default:
- throw new Error('Unknown node type `' + node.type + '`');
- }
- }
- function generateSequence(node, decorate, forceBraces, compact) {
- var combinator = node.combinator === ' ' || compact ? node.combinator : ' ' + node.combinator + ' ';
- var result = node.terms.map(function(term) {
- return generate(term, decorate, forceBraces, compact);
- }).join(combinator);
- if (node.explicit || forceBraces) {
- result = (compact || result[0] === ',' ? '[' : '[ ') + result + (compact ? ']' : ' ]');
- }
- return result;
- }
- function generate(node, decorate, forceBraces, compact) {
- var result;
- switch (node.type) {
- case 'Group':
- result =
- generateSequence(node, decorate, forceBraces, compact) +
- (node.disallowEmpty ? '!' : '');
- break;
- case 'Multiplier':
- // return since node is a composition
- return (
- generate(node.term, decorate, forceBraces, compact) +
- decorate(generateMultiplier(node), node)
- );
- case 'Type':
- result = '<' + node.name + (node.opts ? decorate(generateTypeOpts(node.opts), node.opts) : '') + '>';
- break;
- case 'Property':
- result = '<\'' + node.name + '\'>';
- break;
- case 'Keyword':
- result = node.name;
- break;
- case 'AtKeyword':
- result = '@' + node.name;
- break;
- case 'Function':
- result = node.name + '(';
- break;
- case 'String':
- case 'Token':
- result = node.value;
- break;
- case 'Comma':
- result = ',';
- break;
- default:
- throw new Error('Unknown node type `' + node.type + '`');
- }
- return decorate(result, node);
- }
- var generate_1 = function(node, options) {
- var decorate = noop;
- var forceBraces = false;
- var compact = false;
- if (typeof options === 'function') {
- decorate = options;
- } else if (options) {
- forceBraces = Boolean(options.forceBraces);
- compact = Boolean(options.compact);
- if (typeof options.decorate === 'function') {
- decorate = options.decorate;
- }
- }
- return generate(node, decorate, forceBraces, compact);
- };
- function fromMatchResult(matchResult) {
- var tokens = matchResult.tokens;
- var longestMatch = matchResult.longestMatch;
- var node = longestMatch < tokens.length ? tokens[longestMatch].node : null;
- var mismatchOffset = -1;
- var entries = 0;
- var css = '';
- for (var i = 0; i < tokens.length; i++) {
- if (i === longestMatch) {
- mismatchOffset = css.length;
- }
- if (node !== null && tokens[i].node === node) {
- if (i <= longestMatch) {
- entries++;
- } else {
- entries = 0;
- }
- }
- css += tokens[i].value;
- }
- return {
- node: node,
- css: css,
- mismatchOffset: mismatchOffset === -1 ? css.length : mismatchOffset,
- last: node === null || entries > 1
- };
- }
- function getLocation(node, point) {
- var loc = node && node.loc && node.loc[point];
- if (loc) {
- return {
- offset: loc.offset,
- line: loc.line,
- column: loc.column
- };
- }
- return null;
- }
- var SyntaxReferenceError = function(type, referenceName) {
- var error = createCustomError(
- 'SyntaxReferenceError',
- type + (referenceName ? ' `' + referenceName + '`' : '')
- );
- error.reference = referenceName;
- return error;
- };
- var MatchError = function(message, syntax, node, matchResult) {
- var error = createCustomError('SyntaxMatchError', message);
- var details = fromMatchResult(matchResult);
- var mismatchOffset = details.mismatchOffset || 0;
- var badNode = details.node || node;
- var end = getLocation(badNode, 'end');
- var start = details.last ? end : getLocation(badNode, 'start');
- var css = details.css;
- error.rawMessage = message;
- error.syntax = syntax ? generate_1(syntax) : '<generic>';
- error.css = css;
- error.mismatchOffset = mismatchOffset;
- error.loc = {
- source: (badNode && badNode.loc && badNode.loc.source) || '<unknown>',
- start: start,
- end: end
- };
- error.line = start ? start.line : undefined;
- error.column = start ? start.column : undefined;
- error.offset = start ? start.offset : undefined;
- error.message = message + '\n' +
- ' syntax: ' + error.syntax + '\n' +
- ' value: ' + (error.css || '<empty string>') + '\n' +
- ' --------' + new Array(error.mismatchOffset + 1).join('-') + '^';
- return error;
- };
- var error = {
- SyntaxReferenceError: SyntaxReferenceError,
- MatchError: MatchError
- };
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var keywords = Object.create(null);
- var properties = Object.create(null);
- var HYPHENMINUS = 45; // '-'.charCodeAt()
- function isCustomProperty(str, offset) {
- offset = offset || 0;
- return str.length - offset >= 2 &&
- str.charCodeAt(offset) === HYPHENMINUS &&
- str.charCodeAt(offset + 1) === HYPHENMINUS;
- }
- function getVendorPrefix(str, offset) {
- offset = offset || 0;
- // verdor prefix should be at least 3 chars length
- if (str.length - offset >= 3) {
- // vendor prefix starts with hyper minus following non-hyper minus
- if (str.charCodeAt(offset) === HYPHENMINUS &&
- str.charCodeAt(offset + 1) !== HYPHENMINUS) {
- // vendor prefix should contain a hyper minus at the ending
- var secondDashIndex = str.indexOf('-', offset + 2);
- if (secondDashIndex !== -1) {
- return str.substring(offset, secondDashIndex + 1);
- }
- }
- }
- return '';
- }
- function getKeywordDescriptor(keyword) {
- if (hasOwnProperty.call(keywords, keyword)) {
- return keywords[keyword];
- }
- var name = keyword.toLowerCase();
- if (hasOwnProperty.call(keywords, name)) {
- return keywords[keyword] = keywords[name];
- }
- var custom = isCustomProperty(name, 0);
- var vendor = !custom ? getVendorPrefix(name, 0) : '';
- return keywords[keyword] = Object.freeze({
- basename: name.substr(vendor.length),
- name: name,
- vendor: vendor,
- prefix: vendor,
- custom: custom
- });
- }
- function getPropertyDescriptor(property) {
- if (hasOwnProperty.call(properties, property)) {
- return properties[property];
- }
- var name = property;
- var hack = property[0];
- if (hack === '/') {
- hack = property[1] === '/' ? '//' : '/';
- } else if (hack !== '_' &&
- hack !== '*' &&
- hack !== '$' &&
- hack !== '#' &&
- hack !== '+' &&
- hack !== '&') {
- hack = '';
- }
- var custom = isCustomProperty(name, hack.length);
- // re-use result when possible (the same as for lower case)
- if (!custom) {
- name = name.toLowerCase();
- if (hasOwnProperty.call(properties, name)) {
- return properties[property] = properties[name];
- }
- }
- var vendor = !custom ? getVendorPrefix(name, hack.length) : '';
- var prefix = name.substr(0, hack.length + vendor.length);
- return properties[property] = Object.freeze({
- basename: name.substr(prefix.length),
- name: name.substr(hack.length),
- hack: hack,
- vendor: vendor,
- prefix: prefix,
- custom: custom
- });
- }
- var names = {
- keyword: getKeywordDescriptor,
- property: getPropertyDescriptor,
- isCustomProperty: isCustomProperty,
- vendorPrefix: getVendorPrefix
- };
- var MIN_SIZE = 16 * 1024;
- var SafeUint32Array = typeof Uint32Array !== 'undefined' ? Uint32Array : Array; // fallback on Array when TypedArray is not supported
- var adoptBuffer = function adoptBuffer(buffer, size) {
- if (buffer === null || buffer.length < size) {
- return new SafeUint32Array(Math.max(size + 1024, MIN_SIZE));
- }
- return buffer;
- };
- var TYPE$2 = _const.TYPE;
- var isNewline$1 = charCodeDefinitions.isNewline;
- var isName$2 = charCodeDefinitions.isName;
- var isValidEscape$2 = charCodeDefinitions.isValidEscape;
- var isNumberStart$1 = charCodeDefinitions.isNumberStart;
- var isIdentifierStart$1 = charCodeDefinitions.isIdentifierStart;
- var charCodeCategory$1 = charCodeDefinitions.charCodeCategory;
- var isBOM$1 = charCodeDefinitions.isBOM;
- var cmpStr$2 = utils.cmpStr;
- var getNewlineLength$1 = utils.getNewlineLength;
- var findWhiteSpaceEnd$1 = utils.findWhiteSpaceEnd;
- var consumeEscaped$1 = utils.consumeEscaped;
- var consumeName$1 = utils.consumeName;
- var consumeNumber$1 = utils.consumeNumber;
- var consumeBadUrlRemnants$1 = utils.consumeBadUrlRemnants;
- var OFFSET_MASK$1 = 0x00FFFFFF;
- var TYPE_SHIFT$1 = 24;
- function tokenize(source, stream) {
- function getCharCode(offset) {
- return offset < sourceLength ? source.charCodeAt(offset) : 0;
- }
- // § 4.3.3. Consume a numeric token
- function consumeNumericToken() {
- // Consume a number and let number be the result.
- offset = consumeNumber$1(source, offset);
- // If the next 3 input code points would start an identifier, then:
- if (isIdentifierStart$1(getCharCode(offset), getCharCode(offset + 1), getCharCode(offset + 2))) {
- // Create a <dimension-token> with the same value and type flag as number, and a unit set initially to the empty string.
- // Consume a name. Set the <dimension-token>’s unit to the returned value.
- // Return the <dimension-token>.
- type = TYPE$2.Dimension;
- offset = consumeName$1(source, offset);
- return;
- }
- // Otherwise, if the next input code point is U+0025 PERCENTAGE SIGN (%), consume it.
- if (getCharCode(offset) === 0x0025) {
- // Create a <percentage-token> with the same value as number, and return it.
- type = TYPE$2.Percentage;
- offset++;
- return;
- }
- // Otherwise, create a <number-token> with the same value and type flag as number, and return it.
- type = TYPE$2.Number;
- }
- // § 4.3.4. Consume an ident-like token
- function consumeIdentLikeToken() {
- const nameStartOffset = offset;
- // Consume a name, and let string be the result.
- offset = consumeName$1(source, offset);
- // If string’s value is an ASCII case-insensitive match for "url",
- // and the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.
- if (cmpStr$2(source, nameStartOffset, offset, 'url') && getCharCode(offset) === 0x0028) {
- // While the next two input code points are whitespace, consume the next input code point.
- offset = findWhiteSpaceEnd$1(source, offset + 1);
- // If the next one or two input code points are U+0022 QUOTATION MARK ("), U+0027 APOSTROPHE ('),
- // or whitespace followed by U+0022 QUOTATION MARK (") or U+0027 APOSTROPHE ('),
- // then create a <function-token> with its value set to string and return it.
- if (getCharCode(offset) === 0x0022 ||
- getCharCode(offset) === 0x0027) {
- type = TYPE$2.Function;
- offset = nameStartOffset + 4;
- return;
- }
- // Otherwise, consume a url token, and return it.
- consumeUrlToken();
- return;
- }
- // Otherwise, if the next input code point is U+0028 LEFT PARENTHESIS ((), consume it.
- // Create a <function-token> with its value set to string and return it.
- if (getCharCode(offset) === 0x0028) {
- type = TYPE$2.Function;
- offset++;
- return;
- }
- // Otherwise, create an <ident-token> with its value set to string and return it.
- type = TYPE$2.Ident;
- }
- // § 4.3.5. Consume a string token
- function consumeStringToken(endingCodePoint) {
- // This algorithm may be called with an ending code point, which denotes the code point
- // that ends the string. If an ending code point is not specified,
- // the current input code point is used.
- if (!endingCodePoint) {
- endingCodePoint = getCharCode(offset++);
- }
- // Initially create a <string-token> with its value set to the empty string.
- type = TYPE$2.String;
- // Repeatedly consume the next input code point from the stream:
- for (; offset < source.length; offset++) {
- var code = source.charCodeAt(offset);
- switch (charCodeCategory$1(code)) {
- // ending code point
- case endingCodePoint:
- // Return the <string-token>.
- offset++;
- return;
- // EOF
- case charCodeCategory$1.Eof:
- // This is a parse error. Return the <string-token>.
- return;
- // newline
- case charCodeCategory$1.WhiteSpace:
- if (isNewline$1(code)) {
- // This is a parse error. Reconsume the current input code point,
- // create a <bad-string-token>, and return it.
- offset += getNewlineLength$1(source, offset, code);
- type = TYPE$2.BadString;
- return;
- }
- break;
- // U+005C REVERSE SOLIDUS (\)
- case 0x005C:
- // If the next input code point is EOF, do nothing.
- if (offset === source.length - 1) {
- break;
- }
- var nextCode = getCharCode(offset + 1);
- // Otherwise, if the next input code point is a newline, consume it.
- if (isNewline$1(nextCode)) {
- offset += getNewlineLength$1(source, offset + 1, nextCode);
- } else if (isValidEscape$2(code, nextCode)) {
- // Otherwise, (the stream starts with a valid escape) consume
- // an escaped code point and append the returned code point to
- // the <string-token>’s value.
- offset = consumeEscaped$1(source, offset) - 1;
- }
- break;
- // anything else
- // Append the current input code point to the <string-token>’s value.
- }
- }
- }
- // § 4.3.6. Consume a url token
- // Note: This algorithm assumes that the initial "url(" has already been consumed.
- // This algorithm also assumes that it’s being called to consume an "unquoted" value, like url(foo).
- // A quoted value, like url("foo"), is parsed as a <function-token>. Consume an ident-like token
- // automatically handles this distinction; this algorithm shouldn’t be called directly otherwise.
- function consumeUrlToken() {
- // Initially create a <url-token> with its value set to the empty string.
- type = TYPE$2.Url;
- // Consume as much whitespace as possible.
- offset = findWhiteSpaceEnd$1(source, offset);
- // Repeatedly consume the next input code point from the stream:
- for (; offset < source.length; offset++) {
- var code = source.charCodeAt(offset);
- switch (charCodeCategory$1(code)) {
- // U+0029 RIGHT PARENTHESIS ())
- case 0x0029:
- // Return the <url-token>.
- offset++;
- return;
- // EOF
- case charCodeCategory$1.Eof:
- // This is a parse error. Return the <url-token>.
- return;
- // whitespace
- case charCodeCategory$1.WhiteSpace:
- // Consume as much whitespace as possible.
- offset = findWhiteSpaceEnd$1(source, offset);
- // If the next input code point is U+0029 RIGHT PARENTHESIS ()) or EOF,
- // consume it and return the <url-token>
- // (if EOF was encountered, this is a parse error);
- if (getCharCode(offset) === 0x0029 || offset >= source.length) {
- if (offset < source.length) {
- offset++;
- }
- return;
- }
- // otherwise, consume the remnants of a bad url, create a <bad-url-token>,
- // and return it.
- offset = consumeBadUrlRemnants$1(source, offset);
- type = TYPE$2.BadUrl;
- return;
- // U+0022 QUOTATION MARK (")
- // U+0027 APOSTROPHE (')
- // U+0028 LEFT PARENTHESIS (()
- // non-printable code point
- case 0x0022:
- case 0x0027:
- case 0x0028:
- case charCodeCategory$1.NonPrintable:
- // This is a parse error. Consume the remnants of a bad url,
- // create a <bad-url-token>, and return it.
- offset = consumeBadUrlRemnants$1(source, offset);
- type = TYPE$2.BadUrl;
- return;
- // U+005C REVERSE SOLIDUS (\)
- case 0x005C:
- // If the stream starts with a valid escape, consume an escaped code point and
- // append the returned code point to the <url-token>’s value.
- if (isValidEscape$2(code, getCharCode(offset + 1))) {
- offset = consumeEscaped$1(source, offset) - 1;
- break;
- }
- // Otherwise, this is a parse error. Consume the remnants of a bad url,
- // create a <bad-url-token>, and return it.
- offset = consumeBadUrlRemnants$1(source, offset);
- type = TYPE$2.BadUrl;
- return;
- // anything else
- // Append the current input code point to the <url-token>’s value.
- }
- }
- }
- if (!stream) {
- stream = new TokenStream_1();
- }
- // ensure source is a string
- source = String(source || '');
- var sourceLength = source.length;
- var offsetAndType = adoptBuffer(stream.offsetAndType, sourceLength + 1); // +1 because of eof-token
- var balance = adoptBuffer(stream.balance, sourceLength + 1);
- var tokenCount = 0;
- var start = isBOM$1(getCharCode(0));
- var offset = start;
- var balanceCloseType = 0;
- var balanceStart = 0;
- var balancePrev = 0;
- // https://drafts.csswg.org/css-syntax-3/#consume-token
- // § 4.3.1. Consume a token
- while (offset < sourceLength) {
- var code = source.charCodeAt(offset);
- var type = 0;
- balance[tokenCount] = sourceLength;
- switch (charCodeCategory$1(code)) {
- // whitespace
- case charCodeCategory$1.WhiteSpace:
- // Consume as much whitespace as possible. Return a <whitespace-token>.
- type = TYPE$2.WhiteSpace;
- offset = findWhiteSpaceEnd$1(source, offset + 1);
- break;
- // U+0022 QUOTATION MARK (")
- case 0x0022:
- // Consume a string token and return it.
- consumeStringToken();
- break;
- // U+0023 NUMBER SIGN (#)
- case 0x0023:
- // If the next input code point is a name code point or the next two input code points are a valid escape, then:
- if (isName$2(getCharCode(offset + 1)) || isValidEscape$2(getCharCode(offset + 1), getCharCode(offset + 2))) {
- // Create a <hash-token>.
- type = TYPE$2.Hash;
- // If the next 3 input code points would start an identifier, set the <hash-token>’s type flag to "id".
- // if (isIdentifierStart(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {
- // // TODO: set id flag
- // }
- // Consume a name, and set the <hash-token>’s value to the returned string.
- offset = consumeName$1(source, offset + 1);
- // Return the <hash-token>.
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+0027 APOSTROPHE (')
- case 0x0027:
- // Consume a string token and return it.
- consumeStringToken();
- break;
- // U+0028 LEFT PARENTHESIS (()
- case 0x0028:
- // Return a <(-token>.
- type = TYPE$2.LeftParenthesis;
- offset++;
- break;
- // U+0029 RIGHT PARENTHESIS ())
- case 0x0029:
- // Return a <)-token>.
- type = TYPE$2.RightParenthesis;
- offset++;
- break;
- // U+002B PLUS SIGN (+)
- case 0x002B:
- // If the input stream starts with a number, ...
- if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
- // ... reconsume the current input code point, consume a numeric token, and return it.
- consumeNumericToken();
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+002C COMMA (,)
- case 0x002C:
- // Return a <comma-token>.
- type = TYPE$2.Comma;
- offset++;
- break;
- // U+002D HYPHEN-MINUS (-)
- case 0x002D:
- // If the input stream starts with a number, reconsume the current input code point, consume a numeric token, and return it.
- if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
- consumeNumericToken();
- } else {
- // 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>.
- if (getCharCode(offset + 1) === 0x002D &&
- getCharCode(offset + 2) === 0x003E) {
- type = TYPE$2.CDC;
- offset = offset + 3;
- } else {
- // Otherwise, if the input stream starts with an identifier, ...
- if (isIdentifierStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
- // ... reconsume the current input code point, consume an ident-like token, and return it.
- consumeIdentLikeToken();
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- }
- }
- break;
- // U+002E FULL STOP (.)
- case 0x002E:
- // If the input stream starts with a number, ...
- if (isNumberStart$1(code, getCharCode(offset + 1), getCharCode(offset + 2))) {
- // ... reconsume the current input code point, consume a numeric token, and return it.
- consumeNumericToken();
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+002F SOLIDUS (/)
- case 0x002F:
- // If the next two input code point are U+002F SOLIDUS (/) followed by a U+002A ASTERISK (*),
- if (getCharCode(offset + 1) === 0x002A) {
- // ... consume them and all following code points up to and including the first U+002A ASTERISK (*)
- // followed by a U+002F SOLIDUS (/), or up to an EOF code point.
- type = TYPE$2.Comment;
- offset = source.indexOf('*/', offset + 2) + 2;
- if (offset === 1) {
- offset = source.length;
- }
- } else {
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+003A COLON (:)
- case 0x003A:
- // Return a <colon-token>.
- type = TYPE$2.Colon;
- offset++;
- break;
- // U+003B SEMICOLON (;)
- case 0x003B:
- // Return a <semicolon-token>.
- type = TYPE$2.Semicolon;
- offset++;
- break;
- // U+003C LESS-THAN SIGN (<)
- case 0x003C:
- // If the next 3 input code points are U+0021 EXCLAMATION MARK U+002D HYPHEN-MINUS U+002D HYPHEN-MINUS (!--), ...
- if (getCharCode(offset + 1) === 0x0021 &&
- getCharCode(offset + 2) === 0x002D &&
- getCharCode(offset + 3) === 0x002D) {
- // ... consume them and return a <CDO-token>.
- type = TYPE$2.CDO;
- offset = offset + 4;
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+0040 COMMERCIAL AT (@)
- case 0x0040:
- // If the next 3 input code points would start an identifier, ...
- if (isIdentifierStart$1(getCharCode(offset + 1), getCharCode(offset + 2), getCharCode(offset + 3))) {
- // ... consume a name, create an <at-keyword-token> with its value set to the returned value, and return it.
- type = TYPE$2.AtKeyword;
- offset = consumeName$1(source, offset + 1);
- } else {
- // Otherwise, return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+005B LEFT SQUARE BRACKET ([)
- case 0x005B:
- // Return a <[-token>.
- type = TYPE$2.LeftSquareBracket;
- offset++;
- break;
- // U+005C REVERSE SOLIDUS (\)
- case 0x005C:
- // If the input stream starts with a valid escape, ...
- if (isValidEscape$2(code, getCharCode(offset + 1))) {
- // ... reconsume the current input code point, consume an ident-like token, and return it.
- consumeIdentLikeToken();
- } else {
- // Otherwise, this is a parse error. Return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- break;
- // U+005D RIGHT SQUARE BRACKET (])
- case 0x005D:
- // Return a <]-token>.
- type = TYPE$2.RightSquareBracket;
- offset++;
- break;
- // U+007B LEFT CURLY BRACKET ({)
- case 0x007B:
- // Return a <{-token>.
- type = TYPE$2.LeftCurlyBracket;
- offset++;
- break;
- // U+007D RIGHT CURLY BRACKET (})
- case 0x007D:
- // Return a <}-token>.
- type = TYPE$2.RightCurlyBracket;
- offset++;
- break;
- // digit
- case charCodeCategory$1.Digit:
- // Reconsume the current input code point, consume a numeric token, and return it.
- consumeNumericToken();
- break;
- // name-start code point
- case charCodeCategory$1.NameStart:
- // Reconsume the current input code point, consume an ident-like token, and return it.
- consumeIdentLikeToken();
- break;
- // EOF
- case charCodeCategory$1.Eof:
- // Return an <EOF-token>.
- break;
- // anything else
- default:
- // Return a <delim-token> with its value set to the current input code point.
- type = TYPE$2.Delim;
- offset++;
- }
- switch (type) {
- case balanceCloseType:
- balancePrev = balanceStart & OFFSET_MASK$1;
- balanceStart = balance[balancePrev];
- balanceCloseType = balanceStart >> TYPE_SHIFT$1;
- balance[tokenCount] = balancePrev;
- balance[balancePrev++] = tokenCount;
- for (; balancePrev < tokenCount; balancePrev++) {
- if (balance[balancePrev] === sourceLength) {
- balance[balancePrev] = tokenCount;
- }
- }
- break;
- case TYPE$2.LeftParenthesis:
- case TYPE$2.Function:
- balance[tokenCount] = balanceStart;
- balanceCloseType = TYPE$2.RightParenthesis;
- balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
- break;
- case TYPE$2.LeftSquareBracket:
- balance[tokenCount] = balanceStart;
- balanceCloseType = TYPE$2.RightSquareBracket;
- balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
- break;
- case TYPE$2.LeftCurlyBracket:
- balance[tokenCount] = balanceStart;
- balanceCloseType = TYPE$2.RightCurlyBracket;
- balanceStart = (balanceCloseType << TYPE_SHIFT$1) | tokenCount;
- break;
- }
- offsetAndType[tokenCount++] = (type << TYPE_SHIFT$1) | offset;
- }
- // finalize buffers
- offsetAndType[tokenCount] = (TYPE$2.EOF << TYPE_SHIFT$1) | offset; // <EOF-token>
- balance[tokenCount] = sourceLength;
- balance[sourceLength] = sourceLength; // prevents false positive balance match with any token
- while (balanceStart !== 0) {
- balancePrev = balanceStart & OFFSET_MASK$1;
- balanceStart = balance[balancePrev];
- balance[balancePrev] = sourceLength;
- }
- // update stream
- stream.source = source;
- stream.firstCharOffset = start;
- stream.offsetAndType = offsetAndType;
- stream.tokenCount = tokenCount;
- stream.balance = balance;
- stream.reset();
- stream.next();
- return stream;
- }
- // extend tokenizer with constants
- Object.keys(_const).forEach(function(key) {
- tokenize[key] = _const[key];
- });
- // extend tokenizer with static methods from utils
- Object.keys(charCodeDefinitions).forEach(function(key) {
- tokenize[key] = charCodeDefinitions[key];
- });
- Object.keys(utils).forEach(function(key) {
- tokenize[key] = utils[key];
- });
- var tokenizer = tokenize;
- var isDigit$2 = tokenizer.isDigit;
- var cmpChar$1 = tokenizer.cmpChar;
- var TYPE$3 = tokenizer.TYPE;
- var DELIM = TYPE$3.Delim;
- var WHITESPACE$1 = TYPE$3.WhiteSpace;
- var COMMENT$1 = TYPE$3.Comment;
- var IDENT = TYPE$3.Ident;
- var NUMBER = TYPE$3.Number;
- var DIMENSION = TYPE$3.Dimension;
- var PLUSSIGN = 0x002B; // U+002B PLUS SIGN (+)
- var HYPHENMINUS$1 = 0x002D; // U+002D HYPHEN-MINUS (-)
- var N = 0x006E; // U+006E LATIN SMALL LETTER N (n)
- var DISALLOW_SIGN = true;
- var ALLOW_SIGN = false;
- function isDelim(token, code) {
- return token !== null && token.type === DELIM && token.value.charCodeAt(0) === code;
- }
- function skipSC(token, offset, getNextToken) {
- while (token !== null && (token.type === WHITESPACE$1 || token.type === COMMENT$1)) {
- token = getNextToken(++offset);
- }
- return offset;
- }
- function checkInteger(token, valueOffset, disallowSign, offset) {
- if (!token) {
- return 0;
- }
- var code = token.value.charCodeAt(valueOffset);
- if (code === PLUSSIGN || code === HYPHENMINUS$1) {
- if (disallowSign) {
- // Number sign is not allowed
- return 0;
- }
- valueOffset++;
- }
- for (; valueOffset < token.value.length; valueOffset++) {
- if (!isDigit$2(token.value.charCodeAt(valueOffset))) {
- // Integer is expected
- return 0;
- }
- }
- return offset + 1;
- }
- // ... <signed-integer>
- // ... ['+' | '-'] <signless-integer>
- function consumeB(token, offset_, getNextToken) {
- var sign = false;
- var offset = skipSC(token, offset_, getNextToken);
- token = getNextToken(offset);
- if (token === null) {
- return offset_;
- }
- if (token.type !== NUMBER) {
- if (isDelim(token, PLUSSIGN) || isDelim(token, HYPHENMINUS$1)) {
- sign = true;
- offset = skipSC(getNextToken(++offset), offset, getNextToken);
- token = getNextToken(offset);
- if (token === null && token.type !== NUMBER) {
- return 0;
- }
- } else {
- return offset_;
- }
- }
- if (!sign) {
- var code = token.value.charCodeAt(0);
- if (code !== PLUSSIGN && code !== HYPHENMINUS$1) {
- // Number sign is expected
- return 0;
- }
- }
- return checkInteger(token, sign ? 0 : 1, sign, offset);
- }
- // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb
- var genericAnPlusB = function anPlusB(token, getNextToken) {
- /* eslint-disable brace-style*/
- var offset = 0;
- if (!token) {
- return 0;
- }
- // <integer>
- if (token.type === NUMBER) {
- return checkInteger(token, 0, ALLOW_SIGN, offset); // b
- }
- // -n
- // -n <signed-integer>
- // -n ['+' | '-'] <signless-integer>
- // -n- <signless-integer>
- // <dashndashdigit-ident>
- else if (token.type === IDENT && token.value.charCodeAt(0) === HYPHENMINUS$1) {
- // expect 1st char is N
- if (!cmpChar$1(token.value, 1, N)) {
- return 0;
- }
- switch (token.value.length) {
- // -n
- // -n <signed-integer>
- // -n ['+' | '-'] <signless-integer>
- case 2:
- return consumeB(getNextToken(++offset), offset, getNextToken);
- // -n- <signless-integer>
- case 3:
- if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
- return 0;
- }
- offset = skipSC(getNextToken(++offset), offset, getNextToken);
- token = getNextToken(offset);
- return checkInteger(token, 0, DISALLOW_SIGN, offset);
- // <dashndashdigit-ident>
- default:
- if (token.value.charCodeAt(2) !== HYPHENMINUS$1) {
- return 0;
- }
- return checkInteger(token, 3, DISALLOW_SIGN, offset);
- }
- }
- // '+'? n
- // '+'? n <signed-integer>
- // '+'? n ['+' | '-'] <signless-integer>
- // '+'? n- <signless-integer>
- // '+'? <ndashdigit-ident>
- else if (token.type === IDENT || (isDelim(token, PLUSSIGN) && getNextToken(offset + 1).type === IDENT)) {
- // just ignore a plus
- if (token.type !== IDENT) {
- token = getNextToken(++offset);
- }
- if (token === null || !cmpChar$1(token.value, 0, N)) {
- return 0;
- }
- switch (token.value.length) {
- // '+'? n
- // '+'? n <signed-integer>
- // '+'? n ['+' | '-'] <signless-integer>
- case 1:
- return consumeB(getNextToken(++offset), offset, getNextToken);
- // '+'? n- <signless-integer>
- case 2:
- if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
- return 0;
- }
- offset = skipSC(getNextToken(++offset), offset, getNextToken);
- token = getNextToken(offset);
- return checkInteger(token, 0, DISALLOW_SIGN, offset);
- // '+'? <ndashdigit-ident>
- default:
- if (token.value.charCodeAt(1) !== HYPHENMINUS$1) {
- return 0;
- }
- return checkInteger(token, 2, DISALLOW_SIGN, offset);
- }
- }
- // <ndashdigit-dimension>
- // <ndash-dimension> <signless-integer>
- // <n-dimension>
- // <n-dimension> <signed-integer>
- // <n-dimension> ['+' | '-'] <signless-integer>
- else if (token.type === DIMENSION) {
- var code = token.value.charCodeAt(0);
- var sign = code === PLUSSIGN || code === HYPHENMINUS$1 ? 1 : 0;
- for (var i = sign; i < token.value.length; i++) {
- if (!isDigit$2(token.value.charCodeAt(i))) {
- break;
- }
- }
- if (i === sign) {
- // Integer is expected
- return 0;
- }
- if (!cmpChar$1(token.value, i, N)) {
- return 0;
- }
- // <n-dimension>
- // <n-dimension> <signed-integer>
- // <n-dimension> ['+' | '-'] <signless-integer>
- if (i + 1 === token.value.length) {
- return consumeB(getNextToken(++offset), offset, getNextToken);
- } else {
- if (token.value.charCodeAt(i + 1) !== HYPHENMINUS$1) {
- return 0;
- }
- // <ndash-dimension> <signless-integer>
- if (i + 2 === token.value.length) {
- offset = skipSC(getNextToken(++offset), offset, getNextToken);
- token = getNextToken(offset);
- return checkInteger(token, 0, DISALLOW_SIGN, offset);
- }
- // <ndashdigit-dimension>
- else {
- return checkInteger(token, i + 2, DISALLOW_SIGN, offset);
- }
- }
- }
- return 0;
- };
- var isHexDigit$2 = tokenizer.isHexDigit;
- var cmpChar$2 = tokenizer.cmpChar;
- var TYPE$4 = tokenizer.TYPE;
- var IDENT$1 = TYPE$4.Ident;
- var DELIM$1 = TYPE$4.Delim;
- var NUMBER$1 = TYPE$4.Number;
- var DIMENSION$1 = TYPE$4.Dimension;
- var PLUSSIGN$1 = 0x002B; // U+002B PLUS SIGN (+)
- var HYPHENMINUS$2 = 0x002D; // U+002D HYPHEN-MINUS (-)
- var QUESTIONMARK = 0x003F; // U+003F QUESTION MARK (?)
- var U = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
- function isDelim$1(token, code) {
- return token !== null && token.type === DELIM$1 && token.value.charCodeAt(0) === code;
- }
- function startsWith(token, code) {
- return token.value.charCodeAt(0) === code;
- }
- function hexSequence(token, offset, allowDash) {
- for (var pos = offset, hexlen = 0; pos < token.value.length; pos++) {
- var code = token.value.charCodeAt(pos);
- if (code === HYPHENMINUS$2 && allowDash && hexlen !== 0) {
- if (hexSequence(token, offset + hexlen + 1, false) > 0) {
- return 6; // dissallow following question marks
- }
- return 0; // dash at the ending of a hex sequence is not allowed
- }
- if (!isHexDigit$2(code)) {
- return 0; // not a hex digit
- }
- if (++hexlen > 6) {
- return 0; // too many hex digits
- } }
- return hexlen;
- }
- function withQuestionMarkSequence(consumed, length, getNextToken) {
- if (!consumed) {
- return 0; // nothing consumed
- }
- while (isDelim$1(getNextToken(length), QUESTIONMARK)) {
- if (++consumed > 6) {
- return 0; // too many question marks
- }
- length++;
- }
- return length;
- }
- // https://drafts.csswg.org/css-syntax/#urange
- // Informally, the <urange> production has three forms:
- // U+0001
- // Defines a range consisting of a single code point, in this case the code point "1".
- // U+0001-00ff
- // Defines a range of codepoints between the first and the second value, in this case
- // the range between "1" and "ff" (255 in decimal) inclusive.
- // U+00??
- // Defines a range of codepoints where the "?" characters range over all hex digits,
- // in this case defining the same as the value U+0000-00ff.
- // In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat "?" as a hexadecimal digit).
- //
- // <urange> =
- // u '+' <ident-token> '?'* |
- // u <dimension-token> '?'* |
- // u <number-token> '?'* |
- // u <number-token> <dimension-token> |
- // u <number-token> <number-token> |
- // u '+' '?'+
- var genericUrange = function urange(token, getNextToken) {
- var length = 0;
- // should start with `u` or `U`
- if (token === null || token.type !== IDENT$1 || !cmpChar$2(token.value, 0, U)) {
- return 0;
- }
- token = getNextToken(++length);
- if (token === null) {
- return 0;
- }
- // u '+' <ident-token> '?'*
- // u '+' '?'+
- if (isDelim$1(token, PLUSSIGN$1)) {
- token = getNextToken(++length);
- if (token === null) {
- return 0;
- }
- if (token.type === IDENT$1) {
- // u '+' <ident-token> '?'*
- return withQuestionMarkSequence(hexSequence(token, 0, true), ++length, getNextToken);
- }
- if (isDelim$1(token, QUESTIONMARK)) {
- // u '+' '?'+
- return withQuestionMarkSequence(1, ++length, getNextToken);
- }
- // Hex digit or question mark is expected
- return 0;
- }
- // u <number-token> '?'*
- // u <number-token> <dimension-token>
- // u <number-token> <number-token>
- if (token.type === NUMBER$1) {
- if (!startsWith(token, PLUSSIGN$1)) {
- return 0;
- }
- var consumedHexLength = hexSequence(token, 1, true);
- if (consumedHexLength === 0) {
- return 0;
- }
- token = getNextToken(++length);
- if (token === null) {
- // u <number-token> <eof>
- return length;
- }
- if (token.type === DIMENSION$1 || token.type === NUMBER$1) {
- // u <number-token> <dimension-token>
- // u <number-token> <number-token>
- if (!startsWith(token, HYPHENMINUS$2) || !hexSequence(token, 1, false)) {
- return 0;
- }
- return length + 1;
- }
- // u <number-token> '?'*
- return withQuestionMarkSequence(consumedHexLength, length, getNextToken);
- }
- // u <dimension-token> '?'*
- if (token.type === DIMENSION$1) {
- if (!startsWith(token, PLUSSIGN$1)) {
- return 0;
- }
- return withQuestionMarkSequence(hexSequence(token, 1, true), ++length, getNextToken);
- }
- return 0;
- };
- var isIdentifierStart$2 = tokenizer.isIdentifierStart;
- var isHexDigit$3 = tokenizer.isHexDigit;
- var isDigit$3 = tokenizer.isDigit;
- var cmpStr$3 = tokenizer.cmpStr;
- var consumeNumber$2 = tokenizer.consumeNumber;
- var TYPE$5 = tokenizer.TYPE;
- var cssWideKeywords = ['unset', 'initial', 'inherit'];
- var calcFunctionNames = ['calc(', '-moz-calc(', '-webkit-calc('];
- // https://www.w3.org/TR/css-values-3/#lengths
- var LENGTH = {
- // absolute length units
- 'px': true,
- 'mm': true,
- 'cm': true,
- 'in': true,
- 'pt': true,
- 'pc': true,
- 'q': true,
- // relative length units
- 'em': true,
- 'ex': true,
- 'ch': true,
- 'rem': true,
- // viewport-percentage lengths
- 'vh': true,
- 'vw': true,
- 'vmin': true,
- 'vmax': true,
- 'vm': true
- };
- var ANGLE = {
- 'deg': true,
- 'grad': true,
- 'rad': true,
- 'turn': true
- };
- var TIME = {
- 's': true,
- 'ms': true
- };
- var FREQUENCY = {
- 'hz': true,
- 'khz': true
- };
- // https://www.w3.org/TR/css-values-3/#resolution (https://drafts.csswg.org/css-values/#resolution)
- var RESOLUTION = {
- 'dpi': true,
- 'dpcm': true,
- 'dppx': true,
- 'x': true // https://github.com/w3c/csswg-drafts/issues/461
- };
- // https://drafts.csswg.org/css-grid/#fr-unit
- var FLEX = {
- 'fr': true
- };
- // https://www.w3.org/TR/css3-speech/#mixing-props-voice-volume
- var DECIBEL = {
- 'db': true
- };
- // https://www.w3.org/TR/css3-speech/#voice-props-voice-pitch
- var SEMITONES = {
- 'st': true
- };
- // safe char code getter
- function charCode(str, index) {
- return index < str.length ? str.charCodeAt(index) : 0;
- }
- function eqStr(actual, expected) {
- return cmpStr$3(actual, 0, actual.length, expected);
- }
- function eqStrAny(actual, expected) {
- for (var i = 0; i < expected.length; i++) {
- if (eqStr(actual, expected[i])) {
- return true;
- }
- }
- return false;
- }
- // IE postfix hack, i.e. 123\0 or 123px\9
- function isPostfixIeHack(str, offset) {
- if (offset !== str.length - 2) {
- return false;
- }
- return (
- str.charCodeAt(offset) === 0x005C && // U+005C REVERSE SOLIDUS (\)
- isDigit$3(str.charCodeAt(offset + 1))
- );
- }
- function outOfRange(opts, value, numEnd) {
- if (opts && opts.type === 'Range') {
- var num = Number(
- numEnd !== undefined && numEnd !== value.length
- ? value.substr(0, numEnd)
- : value
- );
- if (isNaN(num)) {
- return true;
- }
- if (opts.min !== null && num < opts.min) {
- return true;
- }
- if (opts.max !== null && num > opts.max) {
- return true;
- }
- }
- return false;
- }
- function consumeFunction(token, getNextToken) {
- var startIdx = token.index;
- var length = 0;
- // balanced token consuming
- do {
- length++;
- if (token.balance <= startIdx) {
- break;
- }
- } while (token = getNextToken(length));
- return length;
- }
- // TODO: implement
- // can be used wherever <length>, <frequency>, <angle>, <time>, <percentage>, <number>, or <integer> values are allowed
- // https://drafts.csswg.org/css-values/#calc-notation
- function calc(next) {
- return function(token, getNextToken, opts) {
- if (token === null) {
- return 0;
- }
- if (token.type === TYPE$5.Function && eqStrAny(token.value, calcFunctionNames)) {
- return consumeFunction(token, getNextToken);
- }
- return next(token, getNextToken, opts);
- };
- }
- function tokenType(expectedTokenType) {
- return function(token) {
- if (token === null || token.type !== expectedTokenType) {
- return 0;
- }
- return 1;
- };
- }
- function func(name) {
- name = name + '(';
- return function(token, getNextToken) {
- if (token !== null && eqStr(token.value, name)) {
- return consumeFunction(token, getNextToken);
- }
- return 0;
- };
- }
- // =========================
- // Complex types
- //
- // https://drafts.csswg.org/css-values-4/#custom-idents
- // 4.2. Author-defined Identifiers: the <custom-ident> type
- // Some properties accept arbitrary author-defined identifiers as a component value.
- // This generic data type is denoted by <custom-ident>, and represents any valid CSS identifier
- // that would not be misinterpreted as a pre-defined keyword in that property’s value definition.
- //
- // See also: https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident
- function customIdent(token) {
- if (token === null || token.type !== TYPE$5.Ident) {
- return 0;
- }
- var name = token.value.toLowerCase();
- // The CSS-wide keywords are not valid <custom-ident>s
- if (eqStrAny(name, cssWideKeywords)) {
- return 0;
- }
- // The default keyword is reserved and is also not a valid <custom-ident>
- if (eqStr(name, 'default')) {
- return 0;
- }
- // TODO: ignore property specific keywords (as described https://developer.mozilla.org/en-US/docs/Web/CSS/custom-ident)
- // Specifications using <custom-ident> must specify clearly what other keywords
- // are excluded from <custom-ident>, if any—for example by saying that any pre-defined keywords
- // in that property’s value definition are excluded. Excluded keywords are excluded
- // in all ASCII case permutations.
- return 1;
- }
- // https://drafts.csswg.org/css-variables/#typedef-custom-property-name
- // A custom property is any property whose name starts with two dashes (U+002D HYPHEN-MINUS), like --foo.
- // The <custom-property-name> production corresponds to this: it’s defined as any valid identifier
- // that starts with two dashes, except -- itself, which is reserved for future use by CSS.
- // NOTE: Current implementation treat `--` as a valid name since most (all?) major browsers treat it as valid.
- function customPropertyName(token) {
- // ... defined as any valid identifier
- if (token === null || token.type !== TYPE$5.Ident) {
- return 0;
- }
- // ... that starts with two dashes (U+002D HYPHEN-MINUS)
- if (charCode(token.value, 0) !== 0x002D || charCode(token.value, 1) !== 0x002D) {
- return 0;
- }
- return 1;
- }
- // https://drafts.csswg.org/css-color-4/#hex-notation
- // The syntax of a <hex-color> is a <hash-token> token whose value consists of 3, 4, 6, or 8 hexadecimal digits.
- // In other words, a hex color is written as a hash character, "#", followed by some number of digits 0-9 or
- // letters a-f (the case of the letters doesn’t matter - #00ff00 is identical to #00FF00).
- function hexColor(token) {
- if (token === null || token.type !== TYPE$5.Hash) {
- return 0;
- }
- var length = token.value.length;
- // valid values (length): #rgb (4), #rgba (5), #rrggbb (7), #rrggbbaa (9)
- if (length !== 4 && length !== 5 && length !== 7 && length !== 9) {
- return 0;
- }
- for (var i = 1; i < length; i++) {
- if (!isHexDigit$3(token.value.charCodeAt(i))) {
- return 0;
- }
- }
- return 1;
- }
- function idSelector(token) {
- if (token === null || token.type !== TYPE$5.Hash) {
- return 0;
- }
- if (!isIdentifierStart$2(charCode(token.value, 1), charCode(token.value, 2), charCode(token.value, 3))) {
- return 0;
- }
- return 1;
- }
- // https://drafts.csswg.org/css-syntax/#any-value
- // It represents the entirety of what a valid declaration can have as its value.
- function declarationValue(token, getNextToken) {
- if (!token) {
- return 0;
- }
- var length = 0;
- var level = 0;
- var startIdx = token.index;
- // The <declaration-value> production matches any sequence of one or more tokens,
- // so long as the sequence ...
- scan:
- do {
- switch (token.type) {
- // ... does not contain <bad-string-token>, <bad-url-token>,
- case TYPE$5.BadString:
- case TYPE$5.BadUrl:
- break scan;
- // ... unmatched <)-token>, <]-token>, or <}-token>,
- case TYPE$5.RightCurlyBracket:
- case TYPE$5.RightParenthesis:
- case TYPE$5.RightSquareBracket:
- if (token.balance > token.index || token.balance < startIdx) {
- break scan;
- }
- level--;
- break;
- // ... or top-level <semicolon-token> tokens
- case TYPE$5.Semicolon:
- if (level === 0) {
- break scan;
- }
- break;
- // ... or <delim-token> tokens with a value of "!"
- case TYPE$5.Delim:
- if (token.value === '!' && level === 0) {
- break scan;
- }
- break;
- case TYPE$5.Function:
- case TYPE$5.LeftParenthesis:
- case TYPE$5.LeftSquareBracket:
- case TYPE$5.LeftCurlyBracket:
- level++;
- break;
- }
- length++;
- // until balance closing
- if (token.balance <= startIdx) {
- break;
- }
- } while (token = getNextToken(length));
- return length;
- }
- // https://drafts.csswg.org/css-syntax/#any-value
- // The <any-value> production is identical to <declaration-value>, but also
- // allows top-level <semicolon-token> tokens and <delim-token> tokens
- // with a value of "!". It represents the entirety of what valid CSS can be in any context.
- function anyValue(token, getNextToken) {
- if (!token) {
- return 0;
- }
- var startIdx = token.index;
- var length = 0;
- // The <any-value> production matches any sequence of one or more tokens,
- // so long as the sequence ...
- scan:
- do {
- switch (token.type) {
- // ... does not contain <bad-string-token>, <bad-url-token>,
- case TYPE$5.BadString:
- case TYPE$5.BadUrl:
- break scan;
- // ... unmatched <)-token>, <]-token>, or <}-token>,
- case TYPE$5.RightCurlyBracket:
- case TYPE$5.RightParenthesis:
- case TYPE$5.RightSquareBracket:
- if (token.balance > token.index || token.balance < startIdx) {
- break scan;
- }
- break;
- }
- length++;
- // until balance closing
- if (token.balance <= startIdx) {
- break;
- }
- } while (token = getNextToken(length));
- return length;
- }
- // =========================
- // Dimensions
- //
- function dimension(type) {
- return function(token, getNextToken, opts) {
- if (token === null || token.type !== TYPE$5.Dimension) {
- return 0;
- }
- var numberEnd = consumeNumber$2(token.value, 0);
- // check unit
- if (type !== null) {
- // check for IE postfix hack, i.e. 123px\0 or 123px\9
- var reverseSolidusOffset = token.value.indexOf('\\', numberEnd);
- var unit = reverseSolidusOffset === -1 || !isPostfixIeHack(token.value, reverseSolidusOffset)
- ? token.value.substr(numberEnd)
- : token.value.substring(numberEnd, reverseSolidusOffset);
- if (type.hasOwnProperty(unit.toLowerCase()) === false) {
- return 0;
- }
- }
- // check range if specified
- if (outOfRange(opts, token.value, numberEnd)) {
- return 0;
- }
- return 1;
- };
- }
- // =========================
- // Percentage
- //
- // §5.5. Percentages: the <percentage> type
- // https://drafts.csswg.org/css-values-4/#percentages
- function percentage(token, getNextToken, opts) {
- // ... corresponds to the <percentage-token> production
- if (token === null || token.type !== TYPE$5.Percentage) {
- return 0;
- }
- // check range if specified
- if (outOfRange(opts, token.value, token.value.length - 1)) {
- return 0;
- }
- return 1;
- }
- // =========================
- // Numeric
- //
- // https://drafts.csswg.org/css-values-4/#numbers
- // The value <zero> represents a literal number with the value 0. Expressions that merely
- // evaluate to a <number> with the value 0 (for example, calc(0)) do not match <zero>;
- // only literal <number-token>s do.
- function zero(next) {
- if (typeof next !== 'function') {
- next = function() {
- return 0;
- };
- }
- return function(token, getNextToken, opts) {
- if (token !== null && token.type === TYPE$5.Number) {
- if (Number(token.value) === 0) {
- return 1;
- }
- }
- return next(token, getNextToken, opts);
- };
- }
- // § 5.3. Real Numbers: the <number> type
- // https://drafts.csswg.org/css-values-4/#numbers
- // Number values are denoted by <number>, and represent real numbers, possibly with a fractional component.
- // ... It corresponds to the <number-token> production
- function number(token, getNextToken, opts) {
- if (token === null) {
- return 0;
- }
- var numberEnd = consumeNumber$2(token.value, 0);
- var isNumber = numberEnd === token.value.length;
- if (!isNumber && !isPostfixIeHack(token.value, numberEnd)) {
- return 0;
- }
- // check range if specified
- if (outOfRange(opts, token.value, numberEnd)) {
- return 0;
- }
- return 1;
- }
- // §5.2. Integers: the <integer> type
- // https://drafts.csswg.org/css-values-4/#integers
- function integer(token, getNextToken, opts) {
- // ... corresponds to a subset of the <number-token> production
- if (token === null || token.type !== TYPE$5.Number) {
- return 0;
- }
- // The first digit of an integer may be immediately preceded by `-` or `+` to indicate the integer’s sign.
- var i = token.value.charCodeAt(0) === 0x002B || // U+002B PLUS SIGN (+)
- token.value.charCodeAt(0) === 0x002D ? 1 : 0; // U+002D HYPHEN-MINUS (-)
- // When written literally, an integer is one or more decimal digits 0 through 9 ...
- for (; i < token.value.length; i++) {
- if (!isDigit$3(token.value.charCodeAt(i))) {
- return 0;
- }
- }
- // check range if specified
- if (outOfRange(opts, token.value, i)) {
- return 0;
- }
- return 1;
- }
- var generic = {
- // token types
- 'ident-token': tokenType(TYPE$5.Ident),
- 'function-token': tokenType(TYPE$5.Function),
- 'at-keyword-token': tokenType(TYPE$5.AtKeyword),
- 'hash-token': tokenType(TYPE$5.Hash),
- 'string-token': tokenType(TYPE$5.String),
- 'bad-string-token': tokenType(TYPE$5.BadString),
- 'url-token': tokenType(TYPE$5.Url),
- 'bad-url-token': tokenType(TYPE$5.BadUrl),
- 'delim-token': tokenType(TYPE$5.Delim),
- 'number-token': tokenType(TYPE$5.Number),
- 'percentage-token': tokenType(TYPE$5.Percentage),
- 'dimension-token': tokenType(TYPE$5.Dimension),
- 'whitespace-token': tokenType(TYPE$5.WhiteSpace),
- 'CDO-token': tokenType(TYPE$5.CDO),
- 'CDC-token': tokenType(TYPE$5.CDC),
- 'colon-token': tokenType(TYPE$5.Colon),
- 'semicolon-token': tokenType(TYPE$5.Semicolon),
- 'comma-token': tokenType(TYPE$5.Comma),
- '[-token': tokenType(TYPE$5.LeftSquareBracket),
- ']-token': tokenType(TYPE$5.RightSquareBracket),
- '(-token': tokenType(TYPE$5.LeftParenthesis),
- ')-token': tokenType(TYPE$5.RightParenthesis),
- '{-token': tokenType(TYPE$5.LeftCurlyBracket),
- '}-token': tokenType(TYPE$5.RightCurlyBracket),
- // token type aliases
- 'string': tokenType(TYPE$5.String),
- 'ident': tokenType(TYPE$5.Ident),
- // complex types
- 'custom-ident': customIdent,
- 'custom-property-name': customPropertyName,
- 'hex-color': hexColor,
- 'id-selector': idSelector, // element( <id-selector> )
- 'an-plus-b': genericAnPlusB,
- 'urange': genericUrange,
- 'declaration-value': declarationValue,
- 'any-value': anyValue,
- // dimensions
- 'dimension': calc(dimension(null)),
- 'angle': calc(dimension(ANGLE)),
- 'decibel': calc(dimension(DECIBEL)),
- 'frequency': calc(dimension(FREQUENCY)),
- 'flex': calc(dimension(FLEX)),
- 'length': calc(zero(dimension(LENGTH))),
- 'resolution': calc(dimension(RESOLUTION)),
- 'semitones': calc(dimension(SEMITONES)),
- 'time': calc(dimension(TIME)),
- // percentage
- 'percentage': calc(percentage),
- // numeric
- 'zero': zero(),
- 'number': calc(number),
- 'integer': calc(integer),
- // old IE stuff
- '-ms-legacy-expression': func('expression')
- };
- var _SyntaxError$1 = function SyntaxError(message, input, offset) {
- var error = createCustomError('SyntaxError', message);
- error.input = input;
- error.offset = offset;
- error.rawMessage = message;
- error.message = error.rawMessage + '\n' +
- ' ' + error.input + '\n' +
- '--' + new Array((error.offset || error.input.length) + 1).join('-') + '^';
- return error;
- };
- var TAB = 9;
- var N$1 = 10;
- var F = 12;
- var R = 13;
- var SPACE = 32;
- var Tokenizer = function(str) {
- this.str = str;
- this.pos = 0;
- };
- Tokenizer.prototype = {
- charCodeAt: function(pos) {
- return pos < this.str.length ? this.str.charCodeAt(pos) : 0;
- },
- charCode: function() {
- return this.charCodeAt(this.pos);
- },
- nextCharCode: function() {
- return this.charCodeAt(this.pos + 1);
- },
- nextNonWsCode: function(pos) {
- return this.charCodeAt(this.findWsEnd(pos));
- },
- findWsEnd: function(pos) {
- for (; pos < this.str.length; pos++) {
- var code = this.str.charCodeAt(pos);
- if (code !== R && code !== N$1 && code !== F && code !== SPACE && code !== TAB) {
- break;
- }
- }
- return pos;
- },
- substringToPos: function(end) {
- return this.str.substring(this.pos, this.pos = end);
- },
- eat: function(code) {
- if (this.charCode() !== code) {
- this.error('Expect `' + String.fromCharCode(code) + '`');
- }
- this.pos++;
- },
- peek: function() {
- return this.pos < this.str.length ? this.str.charAt(this.pos++) : '';
- },
- error: function(message) {
- throw new _SyntaxError$1(message, this.str, this.pos);
- }
- };
- var tokenizer$1 = Tokenizer;
- var TAB$1 = 9;
- var N$2 = 10;
- var F$1 = 12;
- var R$1 = 13;
- var SPACE$1 = 32;
- var EXCLAMATIONMARK = 33; // !
- var NUMBERSIGN = 35; // #
- var AMPERSAND = 38; // &
- var APOSTROPHE = 39; // '
- var LEFTPARENTHESIS = 40; // (
- var RIGHTPARENTHESIS = 41; // )
- var ASTERISK = 42; // *
- var PLUSSIGN$2 = 43; // +
- var COMMA = 44; // ,
- var HYPERMINUS = 45; // -
- var LESSTHANSIGN = 60; // <
- var GREATERTHANSIGN = 62; // >
- var QUESTIONMARK$1 = 63; // ?
- var COMMERCIALAT = 64; // @
- var LEFTSQUAREBRACKET = 91; // [
- var RIGHTSQUAREBRACKET = 93; // ]
- var LEFTCURLYBRACKET = 123; // {
- var VERTICALLINE = 124; // |
- var RIGHTCURLYBRACKET = 125; // }
- var INFINITY = 8734; // ∞
- var NAME_CHAR = createCharMap(function(ch) {
- return /[a-zA-Z0-9\-]/.test(ch);
- });
- var COMBINATOR_PRECEDENCE = {
- ' ': 1,
- '&&': 2,
- '||': 3,
- '|': 4
- };
- function createCharMap(fn) {
- var array = typeof Uint32Array === 'function' ? new Uint32Array(128) : new Array(128);
- for (var i = 0; i < 128; i++) {
- array[i] = fn(String.fromCharCode(i)) ? 1 : 0;
- }
- return array;
- }
- function scanSpaces(tokenizer) {
- return tokenizer.substringToPos(
- tokenizer.findWsEnd(tokenizer.pos)
- );
- }
- function scanWord(tokenizer) {
- var end = tokenizer.pos;
- for (; end < tokenizer.str.length; end++) {
- var code = tokenizer.str.charCodeAt(end);
- if (code >= 128 || NAME_CHAR[code] === 0) {
- break;
- }
- }
- if (tokenizer.pos === end) {
- tokenizer.error('Expect a keyword');
- }
- return tokenizer.substringToPos(end);
- }
- function scanNumber(tokenizer) {
- var end = tokenizer.pos;
- for (; end < tokenizer.str.length; end++) {
- var code = tokenizer.str.charCodeAt(end);
- if (code < 48 || code > 57) {
- break;
- }
- }
- if (tokenizer.pos === end) {
- tokenizer.error('Expect a number');
- }
- return tokenizer.substringToPos(end);
- }
- function scanString(tokenizer) {
- var end = tokenizer.str.indexOf('\'', tokenizer.pos + 1);
- if (end === -1) {
- tokenizer.pos = tokenizer.str.length;
- tokenizer.error('Expect an apostrophe');
- }
- return tokenizer.substringToPos(end + 1);
- }
- function readMultiplierRange(tokenizer) {
- var min = null;
- var max = null;
- tokenizer.eat(LEFTCURLYBRACKET);
- min = scanNumber(tokenizer);
- if (tokenizer.charCode() === COMMA) {
- tokenizer.pos++;
- if (tokenizer.charCode() !== RIGHTCURLYBRACKET) {
- max = scanNumber(tokenizer);
- }
- } else {
- max = min;
- }
- tokenizer.eat(RIGHTCURLYBRACKET);
- return {
- min: Number(min),
- max: max ? Number(max) : 0
- };
- }
- function readMultiplier(tokenizer) {
- var range = null;
- var comma = false;
- switch (tokenizer.charCode()) {
- case ASTERISK:
- tokenizer.pos++;
- range = {
- min: 0,
- max: 0
- };
- break;
- case PLUSSIGN$2:
- tokenizer.pos++;
- range = {
- min: 1,
- max: 0
- };
- break;
- case QUESTIONMARK$1:
- tokenizer.pos++;
- range = {
- min: 0,
- max: 1
- };
- break;
- case NUMBERSIGN:
- tokenizer.pos++;
- comma = true;
- if (tokenizer.charCode() === LEFTCURLYBRACKET) {
- range = readMultiplierRange(tokenizer);
- } else {
- range = {
- min: 1,
- max: 0
- };
- }
- break;
- case LEFTCURLYBRACKET:
- range = readMultiplierRange(tokenizer);
- break;
- default:
- return null;
- }
- return {
- type: 'Multiplier',
- comma: comma,
- min: range.min,
- max: range.max,
- term: null
- };
- }
- function maybeMultiplied(tokenizer, node) {
- var multiplier = readMultiplier(tokenizer);
- if (multiplier !== null) {
- multiplier.term = node;
- return multiplier;
- }
- return node;
- }
- function maybeToken(tokenizer) {
- var ch = tokenizer.peek();
- if (ch === '') {
- return null;
- }
- return {
- type: 'Token',
- value: ch
- };
- }
- function readProperty(tokenizer) {
- var name;
- tokenizer.eat(LESSTHANSIGN);
- tokenizer.eat(APOSTROPHE);
- name = scanWord(tokenizer);
- tokenizer.eat(APOSTROPHE);
- tokenizer.eat(GREATERTHANSIGN);
- return maybeMultiplied(tokenizer, {
- type: 'Property',
- name: name
- });
- }
- // https://drafts.csswg.org/css-values-3/#numeric-ranges
- // 4.1. Range Restrictions and Range Definition Notation
- //
- // Range restrictions can be annotated in the numeric type notation using CSS bracketed
- // range notation—[min,max]—within the angle brackets, after the identifying keyword,
- // indicating a closed range between (and including) min and max.
- // For example, <integer [0, 10]> indicates an integer between 0 and 10, inclusive.
- function readTypeRange(tokenizer) {
- // use null for Infinity to make AST format JSON serializable/deserializable
- var min = null; // -Infinity
- var max = null; // Infinity
- var sign = 1;
- tokenizer.eat(LEFTSQUAREBRACKET);
- if (tokenizer.charCode() === HYPERMINUS) {
- tokenizer.peek();
- sign = -1;
- }
- if (sign == -1 && tokenizer.charCode() === INFINITY) {
- tokenizer.peek();
- } else {
- min = sign * Number(scanNumber(tokenizer));
- }
- scanSpaces(tokenizer);
- tokenizer.eat(COMMA);
- scanSpaces(tokenizer);
- if (tokenizer.charCode() === INFINITY) {
- tokenizer.peek();
- } else {
- sign = 1;
- if (tokenizer.charCode() === HYPERMINUS) {
- tokenizer.peek();
- sign = -1;
- }
- max = sign * Number(scanNumber(tokenizer));
- }
- tokenizer.eat(RIGHTSQUAREBRACKET);
- // If no range is indicated, either by using the bracketed range notation
- // or in the property description, then [−∞,∞] is assumed.
- if (min === null && max === null) {
- return null;
- }
- return {
- type: 'Range',
- min: min,
- max: max
- };
- }
- function readType(tokenizer) {
- var name;
- var opts = null;
- tokenizer.eat(LESSTHANSIGN);
- name = scanWord(tokenizer);
- if (tokenizer.charCode() === LEFTPARENTHESIS &&
- tokenizer.nextCharCode() === RIGHTPARENTHESIS) {
- tokenizer.pos += 2;
- name += '()';
- }
- if (tokenizer.charCodeAt(tokenizer.findWsEnd(tokenizer.pos)) === LEFTSQUAREBRACKET) {
- scanSpaces(tokenizer);
- opts = readTypeRange(tokenizer);
- }
- tokenizer.eat(GREATERTHANSIGN);
- return maybeMultiplied(tokenizer, {
- type: 'Type',
- name: name,
- opts: opts
- });
- }
- function readKeywordOrFunction(tokenizer) {
- var name;
- name = scanWord(tokenizer);
- if (tokenizer.charCode() === LEFTPARENTHESIS) {
- tokenizer.pos++;
- return {
- type: 'Function',
- name: name
- };
- }
- return maybeMultiplied(tokenizer, {
- type: 'Keyword',
- name: name
- });
- }
- function regroupTerms(terms, combinators) {
- function createGroup(terms, combinator) {
- return {
- type: 'Group',
- terms: terms,
- combinator: combinator,
- disallowEmpty: false,
- explicit: false
- };
- }
- combinators = Object.keys(combinators).sort(function(a, b) {
- return COMBINATOR_PRECEDENCE[a] - COMBINATOR_PRECEDENCE[b];
- });
- while (combinators.length > 0) {
- var combinator = combinators.shift();
- for (var i = 0, subgroupStart = 0; i < terms.length; i++) {
- var term = terms[i];
- if (term.type === 'Combinator') {
- if (term.value === combinator) {
- if (subgroupStart === -1) {
- subgroupStart = i - 1;
- }
- terms.splice(i, 1);
- i--;
- } else {
- if (subgroupStart !== -1 && i - subgroupStart > 1) {
- terms.splice(
- subgroupStart,
- i - subgroupStart,
- createGroup(terms.slice(subgroupStart, i), combinator)
- );
- i = subgroupStart + 1;
- }
- subgroupStart = -1;
- }
- }
- }
- if (subgroupStart !== -1 && combinators.length) {
- terms.splice(
- subgroupStart,
- i - subgroupStart,
- createGroup(terms.slice(subgroupStart, i), combinator)
- );
- }
- }
- return combinator;
- }
- function readImplicitGroup(tokenizer) {
- var terms = [];
- var combinators = {};
- var token;
- var prevToken = null;
- var prevTokenPos = tokenizer.pos;
- while (token = peek(tokenizer)) {
- if (token.type !== 'Spaces') {
- if (token.type === 'Combinator') {
- // check for combinator in group beginning and double combinator sequence
- if (prevToken === null || prevToken.type === 'Combinator') {
- tokenizer.pos = prevTokenPos;
- tokenizer.error('Unexpected combinator');
- }
- combinators[token.value] = true;
- } else if (prevToken !== null && prevToken.type !== 'Combinator') {
- combinators[' '] = true; // a b
- terms.push({
- type: 'Combinator',
- value: ' '
- });
- }
- terms.push(token);
- prevToken = token;
- prevTokenPos = tokenizer.pos;
- }
- }
- // check for combinator in group ending
- if (prevToken !== null && prevToken.type === 'Combinator') {
- tokenizer.pos -= prevTokenPos;
- tokenizer.error('Unexpected combinator');
- }
- return {
- type: 'Group',
- terms: terms,
- combinator: regroupTerms(terms, combinators) || ' ',
- disallowEmpty: false,
- explicit: false
- };
- }
- function readGroup(tokenizer) {
- var result;
- tokenizer.eat(LEFTSQUAREBRACKET);
- result = readImplicitGroup(tokenizer);
- tokenizer.eat(RIGHTSQUAREBRACKET);
- result.explicit = true;
- if (tokenizer.charCode() === EXCLAMATIONMARK) {
- tokenizer.pos++;
- result.disallowEmpty = true;
- }
- return result;
- }
- function peek(tokenizer) {
- var code = tokenizer.charCode();
- if (code < 128 && NAME_CHAR[code] === 1) {
- return readKeywordOrFunction(tokenizer);
- }
- switch (code) {
- case RIGHTSQUAREBRACKET:
- // don't eat, stop scan a group
- break;
- case LEFTSQUAREBRACKET:
- return maybeMultiplied(tokenizer, readGroup(tokenizer));
- case LESSTHANSIGN:
- return tokenizer.nextCharCode() === APOSTROPHE
- ? readProperty(tokenizer)
- : readType(tokenizer);
- case VERTICALLINE:
- return {
- type: 'Combinator',
- value: tokenizer.substringToPos(
- tokenizer.nextCharCode() === VERTICALLINE
- ? tokenizer.pos + 2
- : tokenizer.pos + 1
- )
- };
- case AMPERSAND:
- tokenizer.pos++;
- tokenizer.eat(AMPERSAND);
- return {
- type: 'Combinator',
- value: '&&'
- };
- case COMMA:
- tokenizer.pos++;
- return {
- type: 'Comma'
- };
- case APOSTROPHE:
- return maybeMultiplied(tokenizer, {
- type: 'String',
- value: scanString(tokenizer)
- });
- case SPACE$1:
- case TAB$1:
- case N$2:
- case R$1:
- case F$1:
- return {
- type: 'Spaces',
- value: scanSpaces(tokenizer)
- };
- case COMMERCIALAT:
- code = tokenizer.nextCharCode();
- if (code < 128 && NAME_CHAR[code] === 1) {
- tokenizer.pos++;
- return {
- type: 'AtKeyword',
- name: scanWord(tokenizer)
- };
- }
- return maybeToken(tokenizer);
- case ASTERISK:
- case PLUSSIGN$2:
- case QUESTIONMARK$1:
- case NUMBERSIGN:
- case EXCLAMATIONMARK:
- // prohibited tokens (used as a multiplier start)
- break;
- case LEFTCURLYBRACKET:
- // LEFTCURLYBRACKET is allowed since mdn/data uses it w/o quoting
- // check next char isn't a number, because it's likely a disjoined multiplier
- code = tokenizer.nextCharCode();
- if (code < 48 || code > 57) {
- return maybeToken(tokenizer);
- }
- break;
- default:
- return maybeToken(tokenizer);
- }
- }
- function parse(source) {
- var tokenizer = new tokenizer$1(source);
- var result = readImplicitGroup(tokenizer);
- if (tokenizer.pos !== source.length) {
- tokenizer.error('Unexpected input');
- }
- // reduce redundant groups with single group term
- if (result.terms.length === 1 && result.terms[0].type === 'Group') {
- result = result.terms[0];
- }
- return result;
- }
- // warm up parse to elimitate code branches that never execute
- // fix soft deoptimizations (insufficient type feedback)
- parse('[a&&<b>#|<\'c\'>*||e() f{2} /,(% g#{1,2} h{2,})]!');
- var parse_1 = parse;
- var noop$1 = function() {};
- function ensureFunction(value) {
- return typeof value === 'function' ? value : noop$1;
- }
- var walk = function(node, options, context) {
- function walk(node) {
- enter.call(context, node);
- switch (node.type) {
- case 'Group':
- node.terms.forEach(walk);
- break;
- case 'Multiplier':
- walk(node.term);
- break;
- case 'Type':
- case 'Property':
- case 'Keyword':
- case 'AtKeyword':
- case 'Function':
- case 'String':
- case 'Token':
- case 'Comma':
- break;
- default:
- throw new Error('Unknown type: ' + node.type);
- }
- leave.call(context, node);
- }
- var enter = noop$1;
- var leave = noop$1;
- if (typeof options === 'function') {
- enter = options;
- } else if (options) {
- enter = ensureFunction(options.enter);
- leave = ensureFunction(options.leave);
- }
- if (enter === noop$1 && leave === noop$1) {
- throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
- }
- walk(node);
- };
- var tokenStream = new TokenStream_1();
- var astToTokens = {
- decorator: function(handlers) {
- var curNode = null;
- var prev = { len: 0, node: null };
- var nodes = [prev];
- var buffer = '';
- return {
- children: handlers.children,
- node: function(node) {
- var tmp = curNode;
- curNode = node;
- handlers.node.call(this, node);
- curNode = tmp;
- },
- chunk: function(chunk) {
- buffer += chunk;
- if (prev.node !== curNode) {
- nodes.push({
- len: chunk.length,
- node: curNode
- });
- } else {
- prev.len += chunk.length;
- }
- },
- result: function() {
- return prepareTokens(buffer, nodes);
- }
- };
- }
- };
- function prepareTokens(str, nodes) {
- var tokens = [];
- var nodesOffset = 0;
- var nodesIndex = 0;
- var currentNode = nodes ? nodes[nodesIndex].node : null;
- tokenizer(str, tokenStream);
- while (!tokenStream.eof) {
- if (nodes) {
- while (nodesIndex < nodes.length && nodesOffset + nodes[nodesIndex].len <= tokenStream.tokenStart) {
- nodesOffset += nodes[nodesIndex++].len;
- currentNode = nodes[nodesIndex].node;
- }
- }
- tokens.push({
- type: tokenStream.tokenType,
- value: tokenStream.getTokenValue(),
- index: tokenStream.tokenIndex, // TODO: remove it, temporary solution
- balance: tokenStream.balance[tokenStream.tokenIndex], // TODO: remove it, temporary solution
- node: currentNode
- });
- tokenStream.next();
- // console.log({ ...tokens[tokens.length - 1], node: undefined });
- }
- return tokens;
- }
- var prepareTokens_1 = function(value, syntax) {
- if (typeof value === 'string') {
- return prepareTokens(value, null);
- }
- return syntax.generate(value, astToTokens);
- };
- var MATCH = { type: 'Match' };
- var MISMATCH = { type: 'Mismatch' };
- var DISALLOW_EMPTY = { type: 'DisallowEmpty' };
- var LEFTPARENTHESIS$1 = 40; // (
- var RIGHTPARENTHESIS$1 = 41; // )
- function createCondition(match, thenBranch, elseBranch) {
- // reduce node count
- if (thenBranch === MATCH && elseBranch === MISMATCH) {
- return match;
- }
- if (match === MATCH && thenBranch === MATCH && elseBranch === MATCH) {
- return match;
- }
- if (match.type === 'If' && match.else === MISMATCH && thenBranch === MATCH) {
- thenBranch = match.then;
- match = match.match;
- }
- return {
- type: 'If',
- match: match,
- then: thenBranch,
- else: elseBranch
- };
- }
- function isFunctionType(name) {
- return (
- name.length > 2 &&
- name.charCodeAt(name.length - 2) === LEFTPARENTHESIS$1 &&
- name.charCodeAt(name.length - 1) === RIGHTPARENTHESIS$1
- );
- }
- function isEnumCapatible(term) {
- return (
- term.type === 'Keyword' ||
- term.type === 'AtKeyword' ||
- term.type === 'Function' ||
- term.type === 'Type' && isFunctionType(term.name)
- );
- }
- function buildGroupMatchGraph(combinator, terms, atLeastOneTermMatched) {
- switch (combinator) {
- case ' ':
- // Juxtaposing components means that all of them must occur, in the given order.
- //
- // a b c
- // =
- // match a
- // then match b
- // then match c
- // then MATCH
- // else MISMATCH
- // else MISMATCH
- // else MISMATCH
- var result = MATCH;
- for (var i = terms.length - 1; i >= 0; i--) {
- var term = terms[i];
- result = createCondition(
- term,
- result,
- MISMATCH
- );
- }
- return result;
- case '|':
- // A bar (|) separates two or more alternatives: exactly one of them must occur.
- //
- // a | b | c
- // =
- // match a
- // then MATCH
- // else match b
- // then MATCH
- // else match c
- // then MATCH
- // else MISMATCH
- var result = MISMATCH;
- var map = null;
- for (var i = terms.length - 1; i >= 0; i--) {
- var term = terms[i];
- // reduce sequence of keywords into a Enum
- if (isEnumCapatible(term)) {
- if (map === null && i > 0 && isEnumCapatible(terms[i - 1])) {
- map = Object.create(null);
- result = createCondition(
- {
- type: 'Enum',
- map: map
- },
- MATCH,
- result
- );
- }
- if (map !== null) {
- var key = (isFunctionType(term.name) ? term.name.slice(0, -1) : term.name).toLowerCase();
- if (key in map === false) {
- map[key] = term;
- continue;
- }
- }
- }
- map = null;
- // create a new conditonal node
- result = createCondition(
- term,
- MATCH,
- result
- );
- }
- return result;
- case '&&':
- // A double ampersand (&&) separates two or more components,
- // all of which must occur, in any order.
- // Use MatchOnce for groups with a large number of terms,
- // since &&-groups produces at least N!-node trees
- if (terms.length > 5) {
- return {
- type: 'MatchOnce',
- terms: terms,
- all: true
- };
- }
- // Use a combination tree for groups with small number of terms
- //
- // a && b && c
- // =
- // match a
- // then [b && c]
- // else match b
- // then [a && c]
- // else match c
- // then [a && b]
- // else MISMATCH
- //
- // a && b
- // =
- // match a
- // then match b
- // then MATCH
- // else MISMATCH
- // else match b
- // then match a
- // then MATCH
- // else MISMATCH
- // else MISMATCH
- var result = MISMATCH;
- for (var i = terms.length - 1; i >= 0; i--) {
- var term = terms[i];
- var thenClause;
- if (terms.length > 1) {
- thenClause = buildGroupMatchGraph(
- combinator,
- terms.filter(function(newGroupTerm) {
- return newGroupTerm !== term;
- }),
- false
- );
- } else {
- thenClause = MATCH;
- }
- result = createCondition(
- term,
- thenClause,
- result
- );
- }
- return result;
- case '||':
- // A double bar (||) separates two or more options:
- // one or more of them must occur, in any order.
- // Use MatchOnce for groups with a large number of terms,
- // since ||-groups produces at least N!-node trees
- if (terms.length > 5) {
- return {
- type: 'MatchOnce',
- terms: terms,
- all: false
- };
- }
- // Use a combination tree for groups with small number of terms
- //
- // a || b || c
- // =
- // match a
- // then [b || c]
- // else match b
- // then [a || c]
- // else match c
- // then [a || b]
- // else MISMATCH
- //
- // a || b
- // =
- // match a
- // then match b
- // then MATCH
- // else MATCH
- // else match b
- // then match a
- // then MATCH
- // else MATCH
- // else MISMATCH
- var result = atLeastOneTermMatched ? MATCH : MISMATCH;
- for (var i = terms.length - 1; i >= 0; i--) {
- var term = terms[i];
- var thenClause;
- if (terms.length > 1) {
- thenClause = buildGroupMatchGraph(
- combinator,
- terms.filter(function(newGroupTerm) {
- return newGroupTerm !== term;
- }),
- true
- );
- } else {
- thenClause = MATCH;
- }
- result = createCondition(
- term,
- thenClause,
- result
- );
- }
- return result;
- }
- }
- function buildMultiplierMatchGraph(node) {
- var result = MATCH;
- var matchTerm = buildMatchGraph(node.term);
- if (node.max === 0) {
- // disable repeating of empty match to prevent infinite loop
- matchTerm = createCondition(
- matchTerm,
- DISALLOW_EMPTY,
- MISMATCH
- );
- // an occurrence count is not limited, make a cycle;
- // to collect more terms on each following matching mismatch
- result = createCondition(
- matchTerm,
- null, // will be a loop
- MISMATCH
- );
- result.then = createCondition(
- MATCH,
- MATCH,
- result // make a loop
- );
- if (node.comma) {
- result.then.else = createCondition(
- { type: 'Comma', syntax: node },
- result,
- MISMATCH
- );
- }
- } else {
- // create a match node chain for [min .. max] interval with optional matches
- for (var i = node.min || 1; i <= node.max; i++) {
- if (node.comma && result !== MATCH) {
- result = createCondition(
- { type: 'Comma', syntax: node },
- result,
- MISMATCH
- );
- }
- result = createCondition(
- matchTerm,
- createCondition(
- MATCH,
- MATCH,
- result
- ),
- MISMATCH
- );
- }
- }
- if (node.min === 0) {
- // allow zero match
- result = createCondition(
- MATCH,
- MATCH,
- result
- );
- } else {
- // create a match node chain to collect [0 ... min - 1] required matches
- for (var i = 0; i < node.min - 1; i++) {
- if (node.comma && result !== MATCH) {
- result = createCondition(
- { type: 'Comma', syntax: node },
- result,
- MISMATCH
- );
- }
- result = createCondition(
- matchTerm,
- result,
- MISMATCH
- );
- }
- }
- return result;
- }
- function buildMatchGraph(node) {
- if (typeof node === 'function') {
- return {
- type: 'Generic',
- fn: node
- };
- }
- switch (node.type) {
- case 'Group':
- var result = buildGroupMatchGraph(
- node.combinator,
- node.terms.map(buildMatchGraph),
- false
- );
- if (node.disallowEmpty) {
- result = createCondition(
- result,
- DISALLOW_EMPTY,
- MISMATCH
- );
- }
- return result;
- case 'Multiplier':
- return buildMultiplierMatchGraph(node);
- case 'Type':
- case 'Property':
- return {
- type: node.type,
- name: node.name,
- syntax: node
- };
- case 'Keyword':
- return {
- type: node.type,
- name: node.name.toLowerCase(),
- syntax: node
- };
- case 'AtKeyword':
- return {
- type: node.type,
- name: '@' + node.name.toLowerCase(),
- syntax: node
- };
- case 'Function':
- return {
- type: node.type,
- name: node.name.toLowerCase() + '(',
- syntax: node
- };
- case 'String':
- // convert a one char length String to a Token
- if (node.value.length === 3) {
- return {
- type: 'Token',
- value: node.value.charAt(1),
- syntax: node
- };
- }
- // otherwise use it as is
- return {
- type: node.type,
- value: node.value.substr(1, node.value.length - 2).replace(/\\'/g, '\''),
- syntax: node
- };
- case 'Token':
- return {
- type: node.type,
- value: node.value,
- syntax: node
- };
- case 'Comma':
- return {
- type: node.type,
- syntax: node
- };
- default:
- throw new Error('Unknown node type:', node.type);
- }
- }
- var matchGraph = {
- MATCH: MATCH,
- MISMATCH: MISMATCH,
- DISALLOW_EMPTY: DISALLOW_EMPTY,
- buildMatchGraph: function(syntaxTree, ref) {
- if (typeof syntaxTree === 'string') {
- syntaxTree = parse_1(syntaxTree);
- }
- return {
- type: 'MatchGraph',
- match: buildMatchGraph(syntaxTree),
- syntax: ref || null,
- source: syntaxTree
- };
- }
- };
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
- var MATCH$1 = matchGraph.MATCH;
- var MISMATCH$1 = matchGraph.MISMATCH;
- var DISALLOW_EMPTY$1 = matchGraph.DISALLOW_EMPTY;
- var TYPE$6 = _const.TYPE;
- var STUB = 0;
- var TOKEN = 1;
- var OPEN_SYNTAX = 2;
- var CLOSE_SYNTAX = 3;
- var EXIT_REASON_MATCH = 'Match';
- var EXIT_REASON_MISMATCH = 'Mismatch';
- var EXIT_REASON_ITERATION_LIMIT = 'Maximum iteration number exceeded (please fill an issue on https://github.com/csstree/csstree/issues)';
- var ITERATION_LIMIT = 15000;
- var totalIterationCount = 0;
- function reverseList(list) {
- var prev = null;
- var next = null;
- var item = list;
- while (item !== null) {
- next = item.prev;
- item.prev = prev;
- prev = item;
- item = next;
- }
- return prev;
- }
- function areStringsEqualCaseInsensitive(testStr, referenceStr) {
- if (testStr.length !== referenceStr.length) {
- return false;
- }
- for (var i = 0; i < testStr.length; i++) {
- var testCode = testStr.charCodeAt(i);
- var referenceCode = referenceStr.charCodeAt(i);
- // testCode.toLowerCase() for U+0041 LATIN CAPITAL LETTER A (A) .. U+005A LATIN CAPITAL LETTER Z (Z).
- if (testCode >= 0x0041 && testCode <= 0x005A) {
- testCode = testCode | 32;
- }
- if (testCode !== referenceCode) {
- return false;
- }
- }
- return true;
- }
- function isContextEdgeDelim(token) {
- if (token.type !== TYPE$6.Delim) {
- return false;
- }
- // Fix matching for unicode-range: U+30??, U+FF00-FF9F
- // Probably we need to check out previous match instead
- return token.value !== '?';
- }
- function isCommaContextStart(token) {
- if (token === null) {
- return true;
- }
- return (
- token.type === TYPE$6.Comma ||
- token.type === TYPE$6.Function ||
- token.type === TYPE$6.LeftParenthesis ||
- token.type === TYPE$6.LeftSquareBracket ||
- token.type === TYPE$6.LeftCurlyBracket ||
- isContextEdgeDelim(token)
- );
- }
- function isCommaContextEnd(token) {
- if (token === null) {
- return true;
- }
- return (
- token.type === TYPE$6.RightParenthesis ||
- token.type === TYPE$6.RightSquareBracket ||
- token.type === TYPE$6.RightCurlyBracket ||
- token.type === TYPE$6.Delim
- );
- }
- function internalMatch(tokens, state, syntaxes) {
- function moveToNextToken() {
- do {
- tokenIndex++;
- token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
- } while (token !== null && (token.type === TYPE$6.WhiteSpace || token.type === TYPE$6.Comment));
- }
- function getNextToken(offset) {
- var nextIndex = tokenIndex + offset;
- return nextIndex < tokens.length ? tokens[nextIndex] : null;
- }
- function stateSnapshotFromSyntax(nextState, prev) {
- return {
- nextState: nextState,
- matchStack: matchStack,
- syntaxStack: syntaxStack,
- thenStack: thenStack,
- tokenIndex: tokenIndex,
- prev: prev
- };
- }
- function pushThenStack(nextState) {
- thenStack = {
- nextState: nextState,
- matchStack: matchStack,
- syntaxStack: syntaxStack,
- prev: thenStack
- };
- }
- function pushElseStack(nextState) {
- elseStack = stateSnapshotFromSyntax(nextState, elseStack);
- }
- function addTokenToMatch() {
- matchStack = {
- type: TOKEN,
- syntax: state.syntax,
- token: token,
- prev: matchStack
- };
- moveToNextToken();
- syntaxStash = null;
- if (tokenIndex > longestMatch) {
- longestMatch = tokenIndex;
- }
- }
- function openSyntax() {
- syntaxStack = {
- syntax: state.syntax,
- opts: state.syntax.opts || (syntaxStack !== null && syntaxStack.opts) || null,
- prev: syntaxStack
- };
- matchStack = {
- type: OPEN_SYNTAX,
- syntax: state.syntax,
- token: matchStack.token,
- prev: matchStack
- };
- }
- function closeSyntax() {
- if (matchStack.type === OPEN_SYNTAX) {
- matchStack = matchStack.prev;
- } else {
- matchStack = {
- type: CLOSE_SYNTAX,
- syntax: syntaxStack.syntax,
- token: matchStack.token,
- prev: matchStack
- };
- }
- syntaxStack = syntaxStack.prev;
- }
- var syntaxStack = null;
- var thenStack = null;
- var elseStack = null;
- // null – stashing allowed, nothing stashed
- // false – stashing disabled, nothing stashed
- // anithing else – fail stashable syntaxes, some syntax stashed
- var syntaxStash = null;
- var iterationCount = 0; // count iterations and prevent infinite loop
- var exitReason = null;
- var token = null;
- var tokenIndex = -1;
- var longestMatch = 0;
- var matchStack = {
- type: STUB,
- syntax: null,
- token: null,
- prev: null
- };
- moveToNextToken();
- while (exitReason === null && ++iterationCount < ITERATION_LIMIT) {
- // function mapList(list, fn) {
- // var result = [];
- // while (list) {
- // result.unshift(fn(list));
- // list = list.prev;
- // }
- // return result;
- // }
- // console.log('--\n',
- // '#' + iterationCount,
- // require('util').inspect({
- // 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),
- // token: token && token.value,
- // tokenIndex,
- // syntax: syntax.type + (syntax.id ? ' #' + syntax.id : '')
- // }, { depth: null })
- // );
- switch (state.type) {
- case 'Match':
- if (thenStack === null) {
- // turn to MISMATCH when some tokens left unmatched
- if (token !== null) {
- // doesn't mismatch if just one token left and it's an IE hack
- if (tokenIndex !== tokens.length - 1 || (token.value !== '\\0' && token.value !== '\\9')) {
- state = MISMATCH$1;
- break;
- }
- }
- // break the main loop, return a result - MATCH
- exitReason = EXIT_REASON_MATCH;
- break;
- }
- // go to next syntax (`then` branch)
- state = thenStack.nextState;
- // check match is not empty
- if (state === DISALLOW_EMPTY$1) {
- if (thenStack.matchStack === matchStack) {
- state = MISMATCH$1;
- break;
- } else {
- state = MATCH$1;
- }
- }
- // close syntax if needed
- while (thenStack.syntaxStack !== syntaxStack) {
- closeSyntax();
- }
- // pop stack
- thenStack = thenStack.prev;
- break;
- case 'Mismatch':
- // when some syntax is stashed
- if (syntaxStash !== null && syntaxStash !== false) {
- // there is no else branches or a branch reduce match stack
- if (elseStack === null || tokenIndex > elseStack.tokenIndex) {
- // restore state from the stash
- elseStack = syntaxStash;
- syntaxStash = false; // disable stashing
- }
- } else if (elseStack === null) {
- // no else branches -> break the main loop
- // return a result - MISMATCH
- exitReason = EXIT_REASON_MISMATCH;
- break;
- }
- // go to next syntax (`else` branch)
- state = elseStack.nextState;
- // restore all the rest stack states
- thenStack = elseStack.thenStack;
- syntaxStack = elseStack.syntaxStack;
- matchStack = elseStack.matchStack;
- tokenIndex = elseStack.tokenIndex;
- token = tokenIndex < tokens.length ? tokens[tokenIndex] : null;
- // pop stack
- elseStack = elseStack.prev;
- break;
- case 'MatchGraph':
- state = state.match;
- break;
- case 'If':
- // IMPORTANT: else stack push must go first,
- // since it stores the state of thenStack before changes
- if (state.else !== MISMATCH$1) {
- pushElseStack(state.else);
- }
- if (state.then !== MATCH$1) {
- pushThenStack(state.then);
- }
- state = state.match;
- break;
- case 'MatchOnce':
- state = {
- type: 'MatchOnceBuffer',
- syntax: state,
- index: 0,
- mask: 0
- };
- break;
- case 'MatchOnceBuffer':
- var terms = state.syntax.terms;
- if (state.index === terms.length) {
- // no matches at all or it's required all terms to be matched
- if (state.mask === 0 || state.syntax.all) {
- state = MISMATCH$1;
- break;
- }
- // a partial match is ok
- state = MATCH$1;
- break;
- }
- // all terms are matched
- if (state.mask === (1 << terms.length) - 1) {
- state = MATCH$1;
- break;
- }
- for (; state.index < terms.length; state.index++) {
- var matchFlag = 1 << state.index;
- if ((state.mask & matchFlag) === 0) {
- // IMPORTANT: else stack push must go first,
- // since it stores the state of thenStack before changes
- pushElseStack(state);
- pushThenStack({
- type: 'AddMatchOnce',
- syntax: state.syntax,
- mask: state.mask | matchFlag
- });
- // match
- state = terms[state.index++];
- break;
- }
- }
- break;
- case 'AddMatchOnce':
- state = {
- type: 'MatchOnceBuffer',
- syntax: state.syntax,
- index: 0,
- mask: state.mask
- };
- break;
- case 'Enum':
- if (token !== null) {
- var name = token.value.toLowerCase();
- // drop \0 and \9 hack from keyword name
- if (name.indexOf('\\') !== -1) {
- name = name.replace(/\\[09].*$/, '');
- }
- if (hasOwnProperty$1.call(state.map, name)) {
- state = state.map[name];
- break;
- }
- }
- state = MISMATCH$1;
- break;
- case 'Generic':
- var opts = syntaxStack !== null ? syntaxStack.opts : null;
- var lastTokenIndex = tokenIndex + Math.floor(state.fn(token, getNextToken, opts));
- if (!isNaN(lastTokenIndex) && lastTokenIndex > tokenIndex) {
- while (tokenIndex < lastTokenIndex) {
- addTokenToMatch();
- }
- state = MATCH$1;
- } else {
- state = MISMATCH$1;
- }
- break;
- case 'Type':
- case 'Property':
- var syntaxDict = state.type === 'Type' ? 'types' : 'properties';
- var dictSyntax = hasOwnProperty$1.call(syntaxes, syntaxDict) ? syntaxes[syntaxDict][state.name] : null;
- if (!dictSyntax || !dictSyntax.match) {
- throw new Error(
- 'Bad syntax reference: ' +
- (state.type === 'Type'
- ? '<' + state.name + '>'
- : '<\'' + state.name + '\'>')
- );
- }
- // stash a syntax for types with low priority
- if (syntaxStash !== false && token !== null && state.type === 'Type') {
- var lowPriorityMatching =
- // https://drafts.csswg.org/css-values-4/#custom-idents
- // When parsing positionally-ambiguous keywords in a property value, a <custom-ident> production
- // can only claim the keyword if no other unfulfilled production can claim it.
- (state.name === 'custom-ident' && token.type === TYPE$6.Ident) ||
- // https://drafts.csswg.org/css-values-4/#lengths
- // ... if a `0` could be parsed as either a <number> or a <length> in a property (such as line-height),
- // it must parse as a <number>
- (state.name === 'length' && token.value === '0');
- if (lowPriorityMatching) {
- if (syntaxStash === null) {
- syntaxStash = stateSnapshotFromSyntax(state, elseStack);
- }
- state = MISMATCH$1;
- break;
- }
- }
- openSyntax();
- state = dictSyntax.match;
- break;
- case 'Keyword':
- var name = state.name;
- if (token !== null) {
- var keywordName = token.value;
- // drop \0 and \9 hack from keyword name
- if (keywordName.indexOf('\\') !== -1) {
- keywordName = keywordName.replace(/\\[09].*$/, '');
- }
- if (areStringsEqualCaseInsensitive(keywordName, name)) {
- addTokenToMatch();
- state = MATCH$1;
- break;
- }
- }
- state = MISMATCH$1;
- break;
- case 'AtKeyword':
- case 'Function':
- if (token !== null && areStringsEqualCaseInsensitive(token.value, state.name)) {
- addTokenToMatch();
- state = MATCH$1;
- break;
- }
- state = MISMATCH$1;
- break;
- case 'Token':
- if (token !== null && token.value === state.value) {
- addTokenToMatch();
- state = MATCH$1;
- break;
- }
- state = MISMATCH$1;
- break;
- case 'Comma':
- if (token !== null && token.type === TYPE$6.Comma) {
- if (isCommaContextStart(matchStack.token)) {
- state = MISMATCH$1;
- } else {
- addTokenToMatch();
- state = isCommaContextEnd(token) ? MISMATCH$1 : MATCH$1;
- }
- } else {
- state = isCommaContextStart(matchStack.token) || isCommaContextEnd(token) ? MATCH$1 : MISMATCH$1;
- }
- break;
- case 'String':
- var string = '';
- for (var lastTokenIndex = tokenIndex; lastTokenIndex < tokens.length && string.length < state.value.length; lastTokenIndex++) {
- string += tokens[lastTokenIndex].value;
- }
- if (areStringsEqualCaseInsensitive(string, state.value)) {
- while (tokenIndex < lastTokenIndex) {
- addTokenToMatch();
- }
- state = MATCH$1;
- } else {
- state = MISMATCH$1;
- }
- break;
- default:
- throw new Error('Unknown node type: ' + state.type);
- }
- }
- totalIterationCount += iterationCount;
- switch (exitReason) {
- case null:
- console.warn('[csstree-match] BREAK after ' + ITERATION_LIMIT + ' iterations');
- exitReason = EXIT_REASON_ITERATION_LIMIT;
- matchStack = null;
- break;
- case EXIT_REASON_MATCH:
- while (syntaxStack !== null) {
- closeSyntax();
- }
- break;
- default:
- matchStack = null;
- }
- return {
- tokens: tokens,
- reason: exitReason,
- iterations: iterationCount,
- match: matchStack,
- longestMatch: longestMatch
- };
- }
- function matchAsList(tokens, matchGraph, syntaxes) {
- var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
- if (matchResult.match !== null) {
- var item = reverseList(matchResult.match).prev;
- matchResult.match = [];
- while (item !== null) {
- switch (item.type) {
- case STUB:
- break;
- case OPEN_SYNTAX:
- case CLOSE_SYNTAX:
- matchResult.match.push({
- type: item.type,
- syntax: item.syntax
- });
- break;
- default:
- matchResult.match.push({
- token: item.token.value,
- node: item.token.node
- });
- break;
- }
- item = item.prev;
- }
- }
- return matchResult;
- }
- function matchAsTree(tokens, matchGraph, syntaxes) {
- var matchResult = internalMatch(tokens, matchGraph, syntaxes || {});
- if (matchResult.match === null) {
- return matchResult;
- }
- var item = matchResult.match;
- var host = matchResult.match = {
- syntax: matchGraph.syntax || null,
- match: []
- };
- var hostStack = [host];
- // revert a list and start with 2nd item since 1st is a stub item
- item = reverseList(item).prev;
- // build a tree
- while (item !== null) {
- switch (item.type) {
- case OPEN_SYNTAX:
- host.match.push(host = {
- syntax: item.syntax,
- match: []
- });
- hostStack.push(host);
- break;
- case CLOSE_SYNTAX:
- hostStack.pop();
- host = hostStack[hostStack.length - 1];
- break;
- default:
- host.match.push({
- syntax: item.syntax || null,
- token: item.token.value,
- node: item.token.node
- });
- }
- item = item.prev;
- }
- return matchResult;
- }
- var match = {
- matchAsList: matchAsList,
- matchAsTree: matchAsTree,
- getTotalIterationCount: function() {
- return totalIterationCount;
- }
- };
- function getTrace(node) {
- function shouldPutToTrace(syntax) {
- if (syntax === null) {
- return false;
- }
- return (
- syntax.type === 'Type' ||
- syntax.type === 'Property' ||
- syntax.type === 'Keyword'
- );
- }
- function hasMatch(matchNode) {
- if (Array.isArray(matchNode.match)) {
- // use for-loop for better perfomance
- for (var i = 0; i < matchNode.match.length; i++) {
- if (hasMatch(matchNode.match[i])) {
- if (shouldPutToTrace(matchNode.syntax)) {
- result.unshift(matchNode.syntax);
- }
- return true;
- }
- }
- } else if (matchNode.node === node) {
- result = shouldPutToTrace(matchNode.syntax)
- ? [matchNode.syntax]
- : [];
- return true;
- }
- return false;
- }
- var result = null;
- if (this.matched !== null) {
- hasMatch(this.matched);
- }
- return result;
- }
- function testNode(match, node, fn) {
- var trace = getTrace.call(match, node);
- if (trace === null) {
- return false;
- }
- return trace.some(fn);
- }
- function isType(node, type) {
- return testNode(this, node, function(matchNode) {
- return matchNode.type === 'Type' && matchNode.name === type;
- });
- }
- function isProperty(node, property) {
- return testNode(this, node, function(matchNode) {
- return matchNode.type === 'Property' && matchNode.name === property;
- });
- }
- function isKeyword(node) {
- return testNode(this, node, function(matchNode) {
- return matchNode.type === 'Keyword';
- });
- }
- var trace = {
- getTrace: getTrace,
- isType: isType,
- isProperty: isProperty,
- isKeyword: isKeyword
- };
- function getFirstMatchNode(matchNode) {
- if ('node' in matchNode) {
- return matchNode.node;
- }
- return getFirstMatchNode(matchNode.match[0]);
- }
- function getLastMatchNode(matchNode) {
- if ('node' in matchNode) {
- return matchNode.node;
- }
- return getLastMatchNode(matchNode.match[matchNode.match.length - 1]);
- }
- function matchFragments(lexer, ast, match, type, name) {
- function findFragments(matchNode) {
- if (matchNode.syntax !== null &&
- matchNode.syntax.type === type &&
- matchNode.syntax.name === name) {
- var start = getFirstMatchNode(matchNode);
- var end = getLastMatchNode(matchNode);
- lexer.syntax.walk(ast, function(node, item, list) {
- if (node === start) {
- var nodes = new List_1();
- do {
- nodes.appendData(item.data);
- if (item.data === end) {
- break;
- }
- item = item.next;
- } while (item !== null);
- fragments.push({
- parent: list,
- nodes: nodes
- });
- }
- });
- }
- if (Array.isArray(matchNode.match)) {
- matchNode.match.forEach(findFragments);
- }
- }
- var fragments = [];
- if (match.matched !== null) {
- findFragments(match.matched);
- }
- return fragments;
- }
- var search = {
- matchFragments: matchFragments
- };
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- function isValidNumber(value) {
- // Number.isInteger(value) && value >= 0
- return (
- typeof value === 'number' &&
- isFinite(value) &&
- Math.floor(value) === value &&
- value >= 0
- );
- }
- function isValidLocation(loc) {
- return (
- Boolean(loc) &&
- isValidNumber(loc.offset) &&
- isValidNumber(loc.line) &&
- isValidNumber(loc.column)
- );
- }
- function createNodeStructureChecker(type, fields) {
- return function checkNode(node, warn) {
- if (!node || node.constructor !== Object) {
- return warn(node, 'Type of node should be an Object');
- }
- for (var key in node) {
- var valid = true;
- if (hasOwnProperty$2.call(node, key) === false) {
- continue;
- }
- if (key === 'type') {
- if (node.type !== type) {
- warn(node, 'Wrong node type `' + node.type + '`, expected `' + type + '`');
- }
- } else if (key === 'loc') {
- if (node.loc === null) {
- continue;
- } else if (node.loc && node.loc.constructor === Object) {
- if (typeof node.loc.source !== 'string') {
- key += '.source';
- } else if (!isValidLocation(node.loc.start)) {
- key += '.start';
- } else if (!isValidLocation(node.loc.end)) {
- key += '.end';
- } else {
- continue;
- }
- }
- valid = false;
- } else if (fields.hasOwnProperty(key)) {
- for (var i = 0, valid = false; !valid && i < fields[key].length; i++) {
- var fieldType = fields[key][i];
- switch (fieldType) {
- case String:
- valid = typeof node[key] === 'string';
- break;
- case Boolean:
- valid = typeof node[key] === 'boolean';
- break;
- case null:
- valid = node[key] === null;
- break;
- default:
- if (typeof fieldType === 'string') {
- valid = node[key] && node[key].type === fieldType;
- } else if (Array.isArray(fieldType)) {
- valid = node[key] instanceof List_1;
- }
- }
- }
- } else {
- warn(node, 'Unknown field `' + key + '` for ' + type + ' node type');
- }
- if (!valid) {
- warn(node, 'Bad value for `' + type + '.' + key + '`');
- }
- }
- for (var key in fields) {
- if (hasOwnProperty$2.call(fields, key) &&
- hasOwnProperty$2.call(node, key) === false) {
- warn(node, 'Field `' + type + '.' + key + '` is missed');
- }
- }
- };
- }
- function processStructure(name, nodeType) {
- var structure = nodeType.structure;
- var fields = {
- type: String,
- loc: true
- };
- var docs = {
- type: '"' + name + '"'
- };
- for (var key in structure) {
- if (hasOwnProperty$2.call(structure, key) === false) {
- continue;
- }
- var docsTypes = [];
- var fieldTypes = fields[key] = Array.isArray(structure[key])
- ? structure[key].slice()
- : [structure[key]];
- for (var i = 0; i < fieldTypes.length; i++) {
- var fieldType = fieldTypes[i];
- if (fieldType === String || fieldType === Boolean) {
- docsTypes.push(fieldType.name);
- } else if (fieldType === null) {
- docsTypes.push('null');
- } else if (typeof fieldType === 'string') {
- docsTypes.push('<' + fieldType + '>');
- } else if (Array.isArray(fieldType)) {
- docsTypes.push('List'); // TODO: use type enum
- } else {
- throw new Error('Wrong value `' + fieldType + '` in `' + name + '.' + key + '` structure definition');
- }
- }
- docs[key] = docsTypes.join(' | ');
- }
- return {
- docs: docs,
- check: createNodeStructureChecker(name, fields)
- };
- }
- var structure = {
- getStructureFromConfig: function(config) {
- var structure = {};
- if (config.node) {
- for (var name in config.node) {
- if (hasOwnProperty$2.call(config.node, name)) {
- var nodeType = config.node[name];
- if (nodeType.structure) {
- structure[name] = processStructure(name, nodeType);
- } else {
- throw new Error('Missed `structure` field in `' + name + '` node type definition');
- }
- }
- }
- }
- return structure;
- }
- };
- var SyntaxReferenceError$1 = error.SyntaxReferenceError;
- var MatchError$1 = error.MatchError;
- var buildMatchGraph$1 = matchGraph.buildMatchGraph;
- var matchAsTree$1 = match.matchAsTree;
- var getStructureFromConfig = structure.getStructureFromConfig;
- var cssWideKeywords$1 = buildMatchGraph$1('inherit | initial | unset');
- var cssWideKeywordsWithExpression = buildMatchGraph$1('inherit | initial | unset | <-ms-legacy-expression>');
- function dumpMapSyntax(map, compact, syntaxAsAst) {
- var result = {};
- for (var name in map) {
- if (map[name].syntax) {
- result[name] = syntaxAsAst
- ? map[name].syntax
- : generate_1(map[name].syntax, { compact: compact });
- }
- }
- return result;
- }
- function dumpAtruleMapSyntax(map, compact, syntaxAsAst) {
- const result = {};
- for (const [name, atrule] of Object.entries(map)) {
- result[name] = {
- prelude: atrule.prelude && (
- syntaxAsAst
- ? atrule.prelude.syntax
- : generate_1(atrule.prelude.syntax, { compact })
- ),
- descriptors: atrule.descriptors && dumpMapSyntax(atrule.descriptors, compact, syntaxAsAst)
- };
- }
- return result;
- }
- function valueHasVar(tokens) {
- for (var i = 0; i < tokens.length; i++) {
- if (tokens[i].value.toLowerCase() === 'var(') {
- return true;
- }
- }
- return false;
- }
- function buildMatchResult(match, error, iterations) {
- return {
- matched: match,
- iterations: iterations,
- error: error,
- getTrace: trace.getTrace,
- isType: trace.isType,
- isProperty: trace.isProperty,
- isKeyword: trace.isKeyword
- };
- }
- function matchSyntax(lexer, syntax, value, useCommon) {
- var tokens = prepareTokens_1(value, lexer.syntax);
- var result;
- if (valueHasVar(tokens)) {
- return buildMatchResult(null, new Error('Matching for a tree with var() is not supported'));
- }
- if (useCommon) {
- result = matchAsTree$1(tokens, lexer.valueCommonSyntax, lexer);
- }
- if (!useCommon || !result.match) {
- result = matchAsTree$1(tokens, syntax.match, lexer);
- if (!result.match) {
- return buildMatchResult(
- null,
- new MatchError$1(result.reason, syntax.syntax, value, result),
- result.iterations
- );
- }
- }
- return buildMatchResult(result.match, null, result.iterations);
- }
- var Lexer = function(config, syntax, structure) {
- this.valueCommonSyntax = cssWideKeywords$1;
- this.syntax = syntax;
- this.generic = false;
- this.atrules = {};
- this.properties = {};
- this.types = {};
- this.structure = structure || getStructureFromConfig(config);
- if (config) {
- if (config.types) {
- for (var name in config.types) {
- this.addType_(name, config.types[name]);
- }
- }
- if (config.generic) {
- this.generic = true;
- for (var name in generic) {
- this.addType_(name, generic[name]);
- }
- }
- if (config.atrules) {
- for (var name in config.atrules) {
- this.addAtrule_(name, config.atrules[name]);
- }
- }
- if (config.properties) {
- for (var name in config.properties) {
- this.addProperty_(name, config.properties[name]);
- }
- }
- }
- };
- Lexer.prototype = {
- structure: {},
- checkStructure: function(ast) {
- function collectWarning(node, message) {
- warns.push({
- node: node,
- message: message
- });
- }
- var structure = this.structure;
- var warns = [];
- this.syntax.walk(ast, function(node) {
- if (structure.hasOwnProperty(node.type)) {
- structure[node.type].check(node, collectWarning);
- } else {
- collectWarning(node, 'Unknown node type `' + node.type + '`');
- }
- });
- return warns.length ? warns : false;
- },
- createDescriptor: function(syntax, type, name) {
- var ref = {
- type: type,
- name: name
- };
- var descriptor = {
- type: type,
- name: name,
- syntax: null,
- match: null
- };
- if (typeof syntax === 'function') {
- descriptor.match = buildMatchGraph$1(syntax, ref);
- } else {
- if (typeof syntax === 'string') {
- // lazy parsing on first access
- Object.defineProperty(descriptor, 'syntax', {
- get: function() {
- Object.defineProperty(descriptor, 'syntax', {
- value: parse_1(syntax)
- });
- return descriptor.syntax;
- }
- });
- } else {
- descriptor.syntax = syntax;
- }
- // lazy graph build on first access
- Object.defineProperty(descriptor, 'match', {
- get: function() {
- Object.defineProperty(descriptor, 'match', {
- value: buildMatchGraph$1(descriptor.syntax, ref)
- });
- return descriptor.match;
- }
- });
- }
- return descriptor;
- },
- addAtrule_: function(name, syntax) {
- this.atrules[name] = {
- prelude: syntax.prelude ? this.createDescriptor(syntax.prelude, 'AtrulePrelude', name) : null,
- descriptors: syntax.descriptors
- ? Object.keys(syntax.descriptors).reduce((res, name) => {
- res[name] = this.createDescriptor(syntax.descriptors[name], 'AtruleDescriptor', name);
- return res;
- }, {})
- : null
- };
- },
- addProperty_: function(name, syntax) {
- this.properties[name] = this.createDescriptor(syntax, 'Property', name);
- },
- addType_: function(name, syntax) {
- this.types[name] = this.createDescriptor(syntax, 'Type', name);
- if (syntax === generic['-ms-legacy-expression']) {
- this.valueCommonSyntax = cssWideKeywordsWithExpression;
- }
- },
- matchAtrulePrelude: function(atruleName, prelude) {
- var atrule = names.keyword(atruleName);
- var atrulePreludeSyntax = atrule.vendor
- ? this.getAtrulePrelude(atrule.name) || this.getAtrulePrelude(atrule.basename)
- : this.getAtrulePrelude(atrule.name);
- if (!atrulePreludeSyntax) {
- if (atrule.basename in this.atrules) {
- return buildMatchResult(null, new Error('At-rule `' + atruleName + '` should not contain a prelude'));
- }
- return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName));
- }
- return matchSyntax(this, atrulePreludeSyntax, prelude, true);
- },
- matchAtruleDescriptor: function(atruleName, descriptorName, value) {
- var atrule = names.keyword(atruleName);
- var descriptor = names.keyword(descriptorName);
- var atruleEntry = atrule.vendor
- ? this.atrules[atrule.name] || this.atrules[atrule.basename]
- : this.atrules[atrule.name];
- if (!atruleEntry) {
- return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule', atruleName));
- }
- if (!atruleEntry.descriptors) {
- return buildMatchResult(null, new Error('At-rule `' + atruleName + '` has no known descriptors'));
- }
- var atruleDescriptorSyntax = descriptor.vendor
- ? atruleEntry.descriptors[descriptor.name] || atruleEntry.descriptors[descriptor.basename]
- : atruleEntry.descriptors[descriptor.name];
- if (!atruleDescriptorSyntax) {
- return buildMatchResult(null, new SyntaxReferenceError$1('Unknown at-rule descriptor', descriptorName));
- }
- return matchSyntax(this, atruleDescriptorSyntax, value, true);
- },
- matchDeclaration: function(node) {
- if (node.type !== 'Declaration') {
- return buildMatchResult(null, new Error('Not a Declaration node'));
- }
- return this.matchProperty(node.property, node.value);
- },
- matchProperty: function(propertyName, value) {
- var property = names.property(propertyName);
- // don't match syntax for a custom property
- if (property.custom) {
- return buildMatchResult(null, new Error('Lexer matching doesn\'t applicable for custom properties'));
- }
- var propertySyntax = property.vendor
- ? this.getProperty(property.name) || this.getProperty(property.basename)
- : this.getProperty(property.name);
- if (!propertySyntax) {
- return buildMatchResult(null, new SyntaxReferenceError$1('Unknown property', propertyName));
- }
- return matchSyntax(this, propertySyntax, value, true);
- },
- matchType: function(typeName, value) {
- var typeSyntax = this.getType(typeName);
- if (!typeSyntax) {
- return buildMatchResult(null, new SyntaxReferenceError$1('Unknown type', typeName));
- }
- return matchSyntax(this, typeSyntax, value, false);
- },
- match: function(syntax, value) {
- if (typeof syntax !== 'string' && (!syntax || !syntax.type)) {
- return buildMatchResult(null, new SyntaxReferenceError$1('Bad syntax'));
- }
- if (typeof syntax === 'string' || !syntax.match) {
- syntax = this.createDescriptor(syntax, 'Type', 'anonymous');
- }
- return matchSyntax(this, syntax, value, false);
- },
- findValueFragments: function(propertyName, value, type, name) {
- return search.matchFragments(this, value, this.matchProperty(propertyName, value), type, name);
- },
- findDeclarationValueFragments: function(declaration, type, name) {
- return search.matchFragments(this, declaration.value, this.matchDeclaration(declaration), type, name);
- },
- findAllFragments: function(ast, type, name) {
- var result = [];
- this.syntax.walk(ast, {
- visit: 'Declaration',
- enter: function(declaration) {
- result.push.apply(result, this.findDeclarationValueFragments(declaration, type, name));
- }.bind(this)
- });
- return result;
- },
- getAtrulePrelude: function(atruleName) {
- return this.atrules.hasOwnProperty(atruleName) ? this.atrules[atruleName].prelude : null;
- },
- getAtruleDescriptor: function(atruleName, name) {
- return this.atrules.hasOwnProperty(atruleName) && this.atrules.declarators
- ? this.atrules[atruleName].declarators[name] || null
- : null;
- },
- getProperty: function(name) {
- return this.properties.hasOwnProperty(name) ? this.properties[name] : null;
- },
- getType: function(name) {
- return this.types.hasOwnProperty(name) ? this.types[name] : null;
- },
- validate: function() {
- function validate(syntax, name, broken, descriptor) {
- if (broken.hasOwnProperty(name)) {
- return broken[name];
- }
- broken[name] = false;
- if (descriptor.syntax !== null) {
- walk(descriptor.syntax, function(node) {
- if (node.type !== 'Type' && node.type !== 'Property') {
- return;
- }
- var map = node.type === 'Type' ? syntax.types : syntax.properties;
- var brokenMap = node.type === 'Type' ? brokenTypes : brokenProperties;
- if (!map.hasOwnProperty(node.name) || validate(syntax, node.name, brokenMap, map[node.name])) {
- broken[name] = true;
- }
- }, this);
- }
- }
- var brokenTypes = {};
- var brokenProperties = {};
- for (var key in this.types) {
- validate(this, key, brokenTypes, this.types[key]);
- }
- for (var key in this.properties) {
- validate(this, key, brokenProperties, this.properties[key]);
- }
- brokenTypes = Object.keys(brokenTypes).filter(function(name) {
- return brokenTypes[name];
- });
- brokenProperties = Object.keys(brokenProperties).filter(function(name) {
- return brokenProperties[name];
- });
- if (brokenTypes.length || brokenProperties.length) {
- return {
- types: brokenTypes,
- properties: brokenProperties
- };
- }
- return null;
- },
- dump: function(syntaxAsAst, pretty) {
- return {
- generic: this.generic,
- types: dumpMapSyntax(this.types, !pretty, syntaxAsAst),
- properties: dumpMapSyntax(this.properties, !pretty, syntaxAsAst),
- atrules: dumpAtruleMapSyntax(this.atrules, !pretty, syntaxAsAst)
- };
- },
- toString: function() {
- return JSON.stringify(this.dump());
- }
- };
- var Lexer_1 = Lexer;
- var definitionSyntax = {
- SyntaxError: _SyntaxError$1,
- parse: parse_1,
- generate: generate_1,
- walk: walk
- };
- var isBOM$2 = tokenizer.isBOM;
- var N$3 = 10;
- var F$2 = 12;
- var R$2 = 13;
- function computeLinesAndColumns(host, source) {
- var sourceLength = source.length;
- var lines = adoptBuffer(host.lines, sourceLength); // +1
- var line = host.startLine;
- var columns = adoptBuffer(host.columns, sourceLength);
- var column = host.startColumn;
- var startOffset = source.length > 0 ? isBOM$2(source.charCodeAt(0)) : 0;
- for (var i = startOffset; i < sourceLength; i++) { // -1
- var code = source.charCodeAt(i);
- lines[i] = line;
- columns[i] = column++;
- if (code === N$3 || code === R$2 || code === F$2) {
- if (code === R$2 && i + 1 < sourceLength && source.charCodeAt(i + 1) === N$3) {
- i++;
- lines[i] = line;
- columns[i] = column;
- }
- line++;
- column = 1;
- }
- }
- lines[i] = line;
- columns[i] = column;
- host.lines = lines;
- host.columns = columns;
- }
- var OffsetToLocation = function() {
- this.lines = null;
- this.columns = null;
- this.linesAndColumnsComputed = false;
- };
- OffsetToLocation.prototype = {
- setSource: function(source, startOffset, startLine, startColumn) {
- this.source = source;
- this.startOffset = typeof startOffset === 'undefined' ? 0 : startOffset;
- this.startLine = typeof startLine === 'undefined' ? 1 : startLine;
- this.startColumn = typeof startColumn === 'undefined' ? 1 : startColumn;
- this.linesAndColumnsComputed = false;
- },
- ensureLinesAndColumnsComputed: function() {
- if (!this.linesAndColumnsComputed) {
- computeLinesAndColumns(this, this.source);
- this.linesAndColumnsComputed = true;
- }
- },
- getLocation: function(offset, filename) {
- this.ensureLinesAndColumnsComputed();
- return {
- source: filename,
- offset: this.startOffset + offset,
- line: this.lines[offset],
- column: this.columns[offset]
- };
- },
- getLocationRange: function(start, end, filename) {
- this.ensureLinesAndColumnsComputed();
- return {
- source: filename,
- start: {
- offset: this.startOffset + start,
- line: this.lines[start],
- column: this.columns[start]
- },
- end: {
- offset: this.startOffset + end,
- line: this.lines[end],
- column: this.columns[end]
- }
- };
- }
- };
- var OffsetToLocation_1 = OffsetToLocation;
- var TYPE$7 = tokenizer.TYPE;
- var WHITESPACE$2 = TYPE$7.WhiteSpace;
- var COMMENT$2 = TYPE$7.Comment;
- var sequence = function readSequence(recognizer) {
- var children = this.createList();
- var child = null;
- var context = {
- recognizer: recognizer,
- space: null,
- ignoreWS: false,
- ignoreWSAfter: false
- };
- this.scanner.skipSC();
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case COMMENT$2:
- this.scanner.next();
- continue;
- case WHITESPACE$2:
- if (context.ignoreWS) {
- this.scanner.next();
- } else {
- context.space = this.WhiteSpace();
- }
- continue;
- }
- child = recognizer.getNode.call(this, context);
- if (child === undefined) {
- break;
- }
- if (context.space !== null) {
- children.push(context.space);
- context.space = null;
- }
- children.push(child);
- if (context.ignoreWSAfter) {
- context.ignoreWSAfter = false;
- context.ignoreWS = true;
- } else {
- context.ignoreWS = false;
- }
- }
- return children;
- };
- var { findWhiteSpaceStart: findWhiteSpaceStart$1, cmpStr: cmpStr$4 } = utils;
- var noop$2 = function() {};
- var TYPE$8 = _const.TYPE;
- var NAME$2 = _const.NAME;
- var WHITESPACE$3 = TYPE$8.WhiteSpace;
- var COMMENT$3 = TYPE$8.Comment;
- var IDENT$2 = TYPE$8.Ident;
- var FUNCTION = TYPE$8.Function;
- var URL = TYPE$8.Url;
- var HASH = TYPE$8.Hash;
- var PERCENTAGE = TYPE$8.Percentage;
- var NUMBER$2 = TYPE$8.Number;
- var NUMBERSIGN$1 = 0x0023; // U+0023 NUMBER SIGN (#)
- var NULL = 0;
- function createParseContext(name) {
- return function() {
- return this[name]();
- };
- }
- function processConfig(config) {
- var parserConfig = {
- context: {},
- scope: {},
- atrule: {},
- pseudo: {}
- };
- if (config.parseContext) {
- for (var name in config.parseContext) {
- switch (typeof config.parseContext[name]) {
- case 'function':
- parserConfig.context[name] = config.parseContext[name];
- break;
- case 'string':
- parserConfig.context[name] = createParseContext(config.parseContext[name]);
- break;
- }
- }
- }
- if (config.scope) {
- for (var name in config.scope) {
- parserConfig.scope[name] = config.scope[name];
- }
- }
- if (config.atrule) {
- for (var name in config.atrule) {
- var atrule = config.atrule[name];
- if (atrule.parse) {
- parserConfig.atrule[name] = atrule.parse;
- }
- }
- }
- if (config.pseudo) {
- for (var name in config.pseudo) {
- var pseudo = config.pseudo[name];
- if (pseudo.parse) {
- parserConfig.pseudo[name] = pseudo.parse;
- }
- }
- }
- if (config.node) {
- for (var name in config.node) {
- parserConfig[name] = config.node[name].parse;
- }
- }
- return parserConfig;
- }
- var create = function createParser(config) {
- var parser = {
- scanner: new TokenStream_1(),
- locationMap: new OffsetToLocation_1(),
- filename: '<unknown>',
- needPositions: false,
- onParseError: noop$2,
- onParseErrorThrow: false,
- parseAtrulePrelude: true,
- parseRulePrelude: true,
- parseValue: true,
- parseCustomProperty: false,
- readSequence: sequence,
- createList: function() {
- return new List_1();
- },
- createSingleNodeList: function(node) {
- return new List_1().appendData(node);
- },
- getFirstListNode: function(list) {
- return list && list.first();
- },
- getLastListNode: function(list) {
- return list.last();
- },
- parseWithFallback: function(consumer, fallback) {
- var startToken = this.scanner.tokenIndex;
- try {
- return consumer.call(this);
- } catch (e) {
- if (this.onParseErrorThrow) {
- throw e;
- }
- var fallbackNode = fallback.call(this, startToken);
- this.onParseErrorThrow = true;
- this.onParseError(e, fallbackNode);
- this.onParseErrorThrow = false;
- return fallbackNode;
- }
- },
- lookupNonWSType: function(offset) {
- do {
- var type = this.scanner.lookupType(offset++);
- if (type !== WHITESPACE$3) {
- return type;
- }
- } while (type !== NULL);
- return NULL;
- },
- eat: function(tokenType) {
- if (this.scanner.tokenType !== tokenType) {
- var offset = this.scanner.tokenStart;
- var message = NAME$2[tokenType] + ' is expected';
- // tweak message and offset
- switch (tokenType) {
- case IDENT$2:
- // when identifier is expected but there is a function or url
- if (this.scanner.tokenType === FUNCTION || this.scanner.tokenType === URL) {
- offset = this.scanner.tokenEnd - 1;
- message = 'Identifier is expected but function found';
- } else {
- message = 'Identifier is expected';
- }
- break;
- case HASH:
- if (this.scanner.isDelim(NUMBERSIGN$1)) {
- this.scanner.next();
- offset++;
- message = 'Name is expected';
- }
- break;
- case PERCENTAGE:
- if (this.scanner.tokenType === NUMBER$2) {
- offset = this.scanner.tokenEnd;
- message = 'Percent sign is expected';
- }
- break;
- default:
- // when test type is part of another token show error for current position + 1
- // e.g. eat(HYPHENMINUS) will fail on "-foo", but pointing on "-" is odd
- if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === tokenType) {
- offset = offset + 1;
- }
- }
- this.error(message, offset);
- }
- this.scanner.next();
- },
- consume: function(tokenType) {
- var value = this.scanner.getTokenValue();
- this.eat(tokenType);
- return value;
- },
- consumeFunctionName: function() {
- var name = this.scanner.source.substring(this.scanner.tokenStart, this.scanner.tokenEnd - 1);
- this.eat(FUNCTION);
- return name;
- },
- getLocation: function(start, end) {
- if (this.needPositions) {
- return this.locationMap.getLocationRange(
- start,
- end,
- this.filename
- );
- }
- return null;
- },
- getLocationFromList: function(list) {
- if (this.needPositions) {
- var head = this.getFirstListNode(list);
- var tail = this.getLastListNode(list);
- return this.locationMap.getLocationRange(
- head !== null ? head.loc.start.offset - this.locationMap.startOffset : this.scanner.tokenStart,
- tail !== null ? tail.loc.end.offset - this.locationMap.startOffset : this.scanner.tokenStart,
- this.filename
- );
- }
- return null;
- },
- error: function(message, offset) {
- var location = typeof offset !== 'undefined' && offset < this.scanner.source.length
- ? this.locationMap.getLocation(offset)
- : this.scanner.eof
- ? this.locationMap.getLocation(findWhiteSpaceStart$1(this.scanner.source, this.scanner.source.length - 1))
- : this.locationMap.getLocation(this.scanner.tokenStart);
- throw new _SyntaxError(
- message || 'Unexpected input',
- this.scanner.source,
- location.offset,
- location.line,
- location.column
- );
- }
- };
- config = processConfig(config || {});
- for (var key in config) {
- parser[key] = config[key];
- }
- return function(source, options) {
- options = options || {};
- var context = options.context || 'default';
- var onComment = options.onComment;
- var ast;
- tokenizer(source, parser.scanner);
- parser.locationMap.setSource(
- source,
- options.offset,
- options.line,
- options.column
- );
- parser.filename = options.filename || '<unknown>';
- parser.needPositions = Boolean(options.positions);
- parser.onParseError = typeof options.onParseError === 'function' ? options.onParseError : noop$2;
- parser.onParseErrorThrow = false;
- parser.parseAtrulePrelude = 'parseAtrulePrelude' in options ? Boolean(options.parseAtrulePrelude) : true;
- parser.parseRulePrelude = 'parseRulePrelude' in options ? Boolean(options.parseRulePrelude) : true;
- parser.parseValue = 'parseValue' in options ? Boolean(options.parseValue) : true;
- parser.parseCustomProperty = 'parseCustomProperty' in options ? Boolean(options.parseCustomProperty) : false;
- if (!parser.context.hasOwnProperty(context)) {
- throw new Error('Unknown context `' + context + '`');
- }
- if (typeof onComment === 'function') {
- parser.scanner.forEachToken((type, start, end) => {
- if (type === COMMENT$3) {
- const loc = parser.getLocation(start, end);
- const value = cmpStr$4(source, end - 2, end, '*/')
- ? source.slice(start + 2, end - 2)
- : source.slice(start + 2, end);
- onComment(value, loc);
- }
- });
- }
- ast = parser.context[context].call(parser, options);
- if (!parser.scanner.eof) {
- parser.error();
- }
- return ast;
- };
- };
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
- /**
- * Encode an integer in the range of 0 to 63 to a single base 64 digit.
- */
- var encode = function (number) {
- if (0 <= number && number < intToCharMap.length) {
- return intToCharMap[number];
- }
- throw new TypeError("Must be between 0 and 63: " + number);
- };
- /**
- * Decode a single base 64 character code digit to an integer. Returns -1 on
- * failure.
- */
- var decode = function (charCode) {
- var bigA = 65; // 'A'
- var bigZ = 90; // 'Z'
- var littleA = 97; // 'a'
- var littleZ = 122; // 'z'
- var zero = 48; // '0'
- var nine = 57; // '9'
- var plus = 43; // '+'
- var slash = 47; // '/'
- var littleOffset = 26;
- var numberOffset = 52;
- // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ
- if (bigA <= charCode && charCode <= bigZ) {
- return (charCode - bigA);
- }
- // 26 - 51: abcdefghijklmnopqrstuvwxyz
- if (littleA <= charCode && charCode <= littleZ) {
- return (charCode - littleA + littleOffset);
- }
- // 52 - 61: 0123456789
- if (zero <= charCode && charCode <= nine) {
- return (charCode - zero + numberOffset);
- }
- // 62: +
- if (charCode == plus) {
- return 62;
- }
- // 63: /
- if (charCode == slash) {
- return 63;
- }
- // Invalid base64 digit.
- return -1;
- };
- var base64 = {
- encode: encode,
- decode: decode
- };
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- *
- * Based on the Base 64 VLQ implementation in Closure Compiler:
- * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java
- *
- * Copyright 2011 The Closure Compiler Authors. All rights reserved.
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
- // A single base 64 digit can contain 6 bits of data. For the base 64 variable
- // length quantities we use in the source map spec, the first bit is the sign,
- // the next four bits are the actual value, and the 6th bit is the
- // continuation bit. The continuation bit tells us whether there are more
- // digits in this value following this digit.
- //
- // Continuation
- // | Sign
- // | |
- // V V
- // 101011
- var VLQ_BASE_SHIFT = 5;
- // binary: 100000
- var VLQ_BASE = 1 << VLQ_BASE_SHIFT;
- // binary: 011111
- var VLQ_BASE_MASK = VLQ_BASE - 1;
- // binary: 100000
- var VLQ_CONTINUATION_BIT = VLQ_BASE;
- /**
- * Converts from a two-complement value to a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
- * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
- */
- function toVLQSigned(aValue) {
- return aValue < 0
- ? ((-aValue) << 1) + 1
- : (aValue << 1) + 0;
- }
- /**
- * Converts to a two-complement value from a value where the sign bit is
- * placed in the least significant bit. For example, as decimals:
- * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
- * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
- */
- function fromVLQSigned(aValue) {
- var isNegative = (aValue & 1) === 1;
- var shifted = aValue >> 1;
- return isNegative
- ? -shifted
- : shifted;
- }
- /**
- * Returns the base 64 VLQ encoded value.
- */
- var encode$1 = function base64VLQ_encode(aValue) {
- var encoded = "";
- var digit;
- var vlq = toVLQSigned(aValue);
- do {
- digit = vlq & VLQ_BASE_MASK;
- vlq >>>= VLQ_BASE_SHIFT;
- if (vlq > 0) {
- // There are still more digits in this value, so we must make sure the
- // continuation bit is marked.
- digit |= VLQ_CONTINUATION_BIT;
- }
- encoded += base64.encode(digit);
- } while (vlq > 0);
- return encoded;
- };
- /**
- * Decodes the next base 64 VLQ value from the given string and returns the
- * value and the rest of the string via the out parameter.
- */
- var decode$1 = function base64VLQ_decode(aStr, aIndex, aOutParam) {
- var strLen = aStr.length;
- var result = 0;
- var shift = 0;
- var continuation, digit;
- do {
- if (aIndex >= strLen) {
- throw new Error("Expected more digits in base 64 VLQ value.");
- }
- digit = base64.decode(aStr.charCodeAt(aIndex++));
- if (digit === -1) {
- throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1));
- }
- continuation = !!(digit & VLQ_CONTINUATION_BIT);
- digit &= VLQ_BASE_MASK;
- result = result + (digit << shift);
- shift += VLQ_BASE_SHIFT;
- } while (continuation);
- aOutParam.value = fromVLQSigned(result);
- aOutParam.rest = aIndex;
- };
- var base64Vlq = {
- encode: encode$1,
- decode: decode$1
- };
- function createCommonjsModule(fn, module) {
- return module = { exports: {} }, fn(module, module.exports), module.exports;
- }
- function getCjsExportFromNamespace (n) {
- return n && n['default'] || n;
- }
- var util = createCommonjsModule(function (module, exports) {
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- /**
- * This is a helper function for getting values from parameter/options
- * objects.
- *
- * @param args The object we are extracting values from
- * @param name The name of the property we are getting.
- * @param defaultValue An optional value to return if the property is missing
- * from the object. If this is not specified and the property is missing, an
- * error will be thrown.
- */
- function getArg(aArgs, aName, aDefaultValue) {
- if (aName in aArgs) {
- return aArgs[aName];
- } else if (arguments.length === 3) {
- return aDefaultValue;
- } else {
- throw new Error('"' + aName + '" is a required argument.');
- }
- }
- exports.getArg = getArg;
- var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/;
- var dataUrlRegexp = /^data:.+\,.+$/;
- function urlParse(aUrl) {
- var match = aUrl.match(urlRegexp);
- if (!match) {
- return null;
- }
- return {
- scheme: match[1],
- auth: match[2],
- host: match[3],
- port: match[4],
- path: match[5]
- };
- }
- exports.urlParse = urlParse;
- function urlGenerate(aParsedUrl) {
- var url = '';
- if (aParsedUrl.scheme) {
- url += aParsedUrl.scheme + ':';
- }
- url += '//';
- if (aParsedUrl.auth) {
- url += aParsedUrl.auth + '@';
- }
- if (aParsedUrl.host) {
- url += aParsedUrl.host;
- }
- if (aParsedUrl.port) {
- url += ":" + aParsedUrl.port;
- }
- if (aParsedUrl.path) {
- url += aParsedUrl.path;
- }
- return url;
- }
- exports.urlGenerate = urlGenerate;
- /**
- * Normalizes a path, or the path portion of a URL:
- *
- * - Replaces consecutive slashes with one slash.
- * - Removes unnecessary '.' parts.
- * - Removes unnecessary '<dir>/..' parts.
- *
- * Based on code in the Node.js 'path' core module.
- *
- * @param aPath The path or url to normalize.
- */
- function normalize(aPath) {
- var path = aPath;
- var url = urlParse(aPath);
- if (url) {
- if (!url.path) {
- return aPath;
- }
- path = url.path;
- }
- var isAbsolute = exports.isAbsolute(path);
- var parts = path.split(/\/+/);
- for (var part, up = 0, i = parts.length - 1; i >= 0; i--) {
- part = parts[i];
- if (part === '.') {
- parts.splice(i, 1);
- } else if (part === '..') {
- up++;
- } else if (up > 0) {
- if (part === '') {
- // The first part is blank if the path is absolute. Trying to go
- // above the root is a no-op. Therefore we can remove all '..' parts
- // directly after the root.
- parts.splice(i + 1, up);
- up = 0;
- } else {
- parts.splice(i, 2);
- up--;
- }
- }
- }
- path = parts.join('/');
- if (path === '') {
- path = isAbsolute ? '/' : '.';
- }
- if (url) {
- url.path = path;
- return urlGenerate(url);
- }
- return path;
- }
- exports.normalize = normalize;
- /**
- * Joins two paths/URLs.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be joined with the root.
- *
- * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a
- * scheme-relative URL: Then the scheme of aRoot, if any, is prepended
- * first.
- * - Otherwise aPath is a path. If aRoot is a URL, then its path portion
- * is updated with the result and aRoot is returned. Otherwise the result
- * is returned.
- * - If aPath is absolute, the result is aPath.
- * - Otherwise the two paths are joined with a slash.
- * - Joining for example 'http://' and 'www.example.com' is also supported.
- */
- function join(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- if (aPath === "") {
- aPath = ".";
- }
- var aPathUrl = urlParse(aPath);
- var aRootUrl = urlParse(aRoot);
- if (aRootUrl) {
- aRoot = aRootUrl.path || '/';
- }
- // `join(foo, '//www.example.org')`
- if (aPathUrl && !aPathUrl.scheme) {
- if (aRootUrl) {
- aPathUrl.scheme = aRootUrl.scheme;
- }
- return urlGenerate(aPathUrl);
- }
- if (aPathUrl || aPath.match(dataUrlRegexp)) {
- return aPath;
- }
- // `join('http://', 'www.example.com')`
- if (aRootUrl && !aRootUrl.host && !aRootUrl.path) {
- aRootUrl.host = aPath;
- return urlGenerate(aRootUrl);
- }
- var joined = aPath.charAt(0) === '/'
- ? aPath
- : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath);
- if (aRootUrl) {
- aRootUrl.path = joined;
- return urlGenerate(aRootUrl);
- }
- return joined;
- }
- exports.join = join;
- exports.isAbsolute = function (aPath) {
- return aPath.charAt(0) === '/' || urlRegexp.test(aPath);
- };
- /**
- * Make a path relative to a URL or another path.
- *
- * @param aRoot The root path or URL.
- * @param aPath The path or URL to be made relative to aRoot.
- */
- function relative(aRoot, aPath) {
- if (aRoot === "") {
- aRoot = ".";
- }
- aRoot = aRoot.replace(/\/$/, '');
- // It is possible for the path to be above the root. In this case, simply
- // checking whether the root is a prefix of the path won't work. Instead, we
- // need to remove components from the root one by one, until either we find
- // a prefix that fits, or we run out of components to remove.
- var level = 0;
- while (aPath.indexOf(aRoot + '/') !== 0) {
- var index = aRoot.lastIndexOf("/");
- if (index < 0) {
- return aPath;
- }
- // If the only part of the root that is left is the scheme (i.e. http://,
- // file:///, etc.), one or more slashes (/), or simply nothing at all, we
- // have exhausted all components, so the path is not relative to the root.
- aRoot = aRoot.slice(0, index);
- if (aRoot.match(/^([^\/]+:\/)?\/*$/)) {
- return aPath;
- }
- ++level;
- }
- // Make sure we add a "../" for each component we removed from the root.
- return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1);
- }
- exports.relative = relative;
- var supportsNullProto = (function () {
- var obj = Object.create(null);
- return !('__proto__' in obj);
- }());
- function identity (s) {
- return s;
- }
- /**
- * Because behavior goes wacky when you set `__proto__` on objects, we
- * have to prefix all the strings in our set with an arbitrary character.
- *
- * See https://github.com/mozilla/source-map/pull/31 and
- * https://github.com/mozilla/source-map/issues/30
- *
- * @param String aStr
- */
- function toSetString(aStr) {
- if (isProtoString(aStr)) {
- return '$' + aStr;
- }
- return aStr;
- }
- exports.toSetString = supportsNullProto ? identity : toSetString;
- function fromSetString(aStr) {
- if (isProtoString(aStr)) {
- return aStr.slice(1);
- }
- return aStr;
- }
- exports.fromSetString = supportsNullProto ? identity : fromSetString;
- function isProtoString(s) {
- if (!s) {
- return false;
- }
- var length = s.length;
- if (length < 9 /* "__proto__".length */) {
- return false;
- }
- if (s.charCodeAt(length - 1) !== 95 /* '_' */ ||
- s.charCodeAt(length - 2) !== 95 /* '_' */ ||
- s.charCodeAt(length - 3) !== 111 /* 'o' */ ||
- s.charCodeAt(length - 4) !== 116 /* 't' */ ||
- s.charCodeAt(length - 5) !== 111 /* 'o' */ ||
- s.charCodeAt(length - 6) !== 114 /* 'r' */ ||
- s.charCodeAt(length - 7) !== 112 /* 'p' */ ||
- s.charCodeAt(length - 8) !== 95 /* '_' */ ||
- s.charCodeAt(length - 9) !== 95 /* '_' */) {
- return false;
- }
- for (var i = length - 10; i >= 0; i--) {
- if (s.charCodeAt(i) !== 36 /* '$' */) {
- return false;
- }
- }
- return true;
- }
- /**
- * Comparator between two mappings where the original positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same original source/line/column, but different generated
- * line and column the same. Useful when searching for a mapping with a
- * stubbed out mapping.
- */
- function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) {
- var cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0 || onlyCompareOriginal) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByOriginalPositions = compareByOriginalPositions;
- /**
- * Comparator between two mappings with deflated source and name indices where
- * the generated positions are compared.
- *
- * Optionally pass in `true` as `onlyCompareGenerated` to consider two
- * mappings with the same generated line and column, but different
- * source/name/original line and column the same. Useful when searching for a
- * mapping with a stubbed out mapping.
- */
- function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0 || onlyCompareGenerated) {
- return cmp;
- }
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated;
- function strcmp(aStr1, aStr2) {
- if (aStr1 === aStr2) {
- return 0;
- }
- if (aStr1 === null) {
- return 1; // aStr2 !== null
- }
- if (aStr2 === null) {
- return -1; // aStr1 !== null
- }
- if (aStr1 > aStr2) {
- return 1;
- }
- return -1;
- }
- /**
- * Comparator between two mappings with inflated source and name strings where
- * the generated positions are compared.
- */
- function compareByGeneratedPositionsInflated(mappingA, mappingB) {
- var cmp = mappingA.generatedLine - mappingB.generatedLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.generatedColumn - mappingB.generatedColumn;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = strcmp(mappingA.source, mappingB.source);
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalLine - mappingB.originalLine;
- if (cmp !== 0) {
- return cmp;
- }
- cmp = mappingA.originalColumn - mappingB.originalColumn;
- if (cmp !== 0) {
- return cmp;
- }
- return strcmp(mappingA.name, mappingB.name);
- }
- exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated;
- /**
- * Strip any JSON XSSI avoidance prefix from the string (as documented
- * in the source maps specification), and then parse the string as
- * JSON.
- */
- function parseSourceMapInput(str) {
- return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, ''));
- }
- exports.parseSourceMapInput = parseSourceMapInput;
- /**
- * Compute the URL of a source given the the source root, the source's
- * URL, and the source map's URL.
- */
- function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) {
- sourceURL = sourceURL || '';
- if (sourceRoot) {
- // This follows what Chrome does.
- if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') {
- sourceRoot += '/';
- }
- // The spec says:
- // Line 4: An optional source root, useful for relocating source
- // files on a server or removing repeated values in the
- // “sources” entry. This value is prepended to the individual
- // entries in the “source” field.
- sourceURL = sourceRoot + sourceURL;
- }
- // Historically, SourceMapConsumer did not take the sourceMapURL as
- // a parameter. This mode is still somewhat supported, which is why
- // this code block is conditional. However, it's preferable to pass
- // the source map URL to SourceMapConsumer, so that this function
- // can implement the source URL resolution algorithm as outlined in
- // the spec. This block is basically the equivalent of:
- // new URL(sourceURL, sourceMapURL).toString()
- // ... except it avoids using URL, which wasn't available in the
- // older releases of node still supported by this library.
- //
- // The spec says:
- // If the sources are not absolute URLs after prepending of the
- // “sourceRoot”, the sources are resolved relative to the
- // SourceMap (like resolving script src in a html document).
- if (sourceMapURL) {
- var parsed = urlParse(sourceMapURL);
- if (!parsed) {
- throw new Error("sourceMapURL could not be parsed");
- }
- if (parsed.path) {
- // Strip the last path component, but keep the "/".
- var index = parsed.path.lastIndexOf('/');
- if (index >= 0) {
- parsed.path = parsed.path.substring(0, index + 1);
- }
- }
- sourceURL = join(urlGenerate(parsed), sourceURL);
- }
- return normalize(sourceURL);
- }
- exports.computeSourceURL = computeSourceURL;
- });
- var util_1 = util.getArg;
- var util_2 = util.urlParse;
- var util_3 = util.urlGenerate;
- var util_4 = util.normalize;
- var util_5 = util.join;
- var util_6 = util.isAbsolute;
- var util_7 = util.relative;
- var util_8 = util.toSetString;
- var util_9 = util.fromSetString;
- var util_10 = util.compareByOriginalPositions;
- var util_11 = util.compareByGeneratedPositionsDeflated;
- var util_12 = util.compareByGeneratedPositionsInflated;
- var util_13 = util.parseSourceMapInput;
- var util_14 = util.computeSourceURL;
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var has = Object.prototype.hasOwnProperty;
- var hasNativeMap = typeof Map !== "undefined";
- /**
- * A data structure which is a combination of an array and a set. Adding a new
- * member is O(1), testing for membership is O(1), and finding the index of an
- * element is O(1). Removing elements from the set is not supported. Only
- * strings are supported for membership.
- */
- function ArraySet() {
- this._array = [];
- this._set = hasNativeMap ? new Map() : Object.create(null);
- }
- /**
- * Static method for creating ArraySet instances from an existing array.
- */
- ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) {
- var set = new ArraySet();
- for (var i = 0, len = aArray.length; i < len; i++) {
- set.add(aArray[i], aAllowDuplicates);
- }
- return set;
- };
- /**
- * Return how many unique items are in this ArraySet. If duplicates have been
- * added, than those do not count towards the size.
- *
- * @returns Number
- */
- ArraySet.prototype.size = function ArraySet_size() {
- return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length;
- };
- /**
- * Add the given string to this set.
- *
- * @param String aStr
- */
- ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) {
- var sStr = hasNativeMap ? aStr : util.toSetString(aStr);
- var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr);
- var idx = this._array.length;
- if (!isDuplicate || aAllowDuplicates) {
- this._array.push(aStr);
- }
- if (!isDuplicate) {
- if (hasNativeMap) {
- this._set.set(aStr, idx);
- } else {
- this._set[sStr] = idx;
- }
- }
- };
- /**
- * Is the given string a member of this set?
- *
- * @param String aStr
- */
- ArraySet.prototype.has = function ArraySet_has(aStr) {
- if (hasNativeMap) {
- return this._set.has(aStr);
- } else {
- var sStr = util.toSetString(aStr);
- return has.call(this._set, sStr);
- }
- };
- /**
- * What is the index of the given string in the array?
- *
- * @param String aStr
- */
- ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) {
- if (hasNativeMap) {
- var idx = this._set.get(aStr);
- if (idx >= 0) {
- return idx;
- }
- } else {
- var sStr = util.toSetString(aStr);
- if (has.call(this._set, sStr)) {
- return this._set[sStr];
- }
- }
- throw new Error('"' + aStr + '" is not in the set.');
- };
- /**
- * What is the element at the given index?
- *
- * @param Number aIdx
- */
- ArraySet.prototype.at = function ArraySet_at(aIdx) {
- if (aIdx >= 0 && aIdx < this._array.length) {
- return this._array[aIdx];
- }
- throw new Error('No element indexed by ' + aIdx);
- };
- /**
- * Returns the array representation of this set (which has the proper indices
- * indicated by indexOf). Note that this is a copy of the internal array used
- * for storing the members so that no one can mess with internal state.
- */
- ArraySet.prototype.toArray = function ArraySet_toArray() {
- return this._array.slice();
- };
- var ArraySet_1 = ArraySet;
- var arraySet = {
- ArraySet: ArraySet_1
- };
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2014 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- /**
- * Determine whether mappingB is after mappingA with respect to generated
- * position.
- */
- function generatedPositionAfter(mappingA, mappingB) {
- // Optimized for most common case
- var lineA = mappingA.generatedLine;
- var lineB = mappingB.generatedLine;
- var columnA = mappingA.generatedColumn;
- var columnB = mappingB.generatedColumn;
- return lineB > lineA || lineB == lineA && columnB >= columnA ||
- util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0;
- }
- /**
- * A data structure to provide a sorted view of accumulated mappings in a
- * performance conscious manner. It trades a neglibable overhead in general
- * case for a large speedup in case of mappings being added in order.
- */
- function MappingList() {
- this._array = [];
- this._sorted = true;
- // Serves as infimum
- this._last = {generatedLine: -1, generatedColumn: 0};
- }
- /**
- * Iterate through internal items. This method takes the same arguments that
- * `Array.prototype.forEach` takes.
- *
- * NOTE: The order of the mappings is NOT guaranteed.
- */
- MappingList.prototype.unsortedForEach =
- function MappingList_forEach(aCallback, aThisArg) {
- this._array.forEach(aCallback, aThisArg);
- };
- /**
- * Add the given source mapping.
- *
- * @param Object aMapping
- */
- MappingList.prototype.add = function MappingList_add(aMapping) {
- if (generatedPositionAfter(this._last, aMapping)) {
- this._last = aMapping;
- this._array.push(aMapping);
- } else {
- this._sorted = false;
- this._array.push(aMapping);
- }
- };
- /**
- * Returns the flat, sorted array of mappings. The mappings are sorted by
- * generated position.
- *
- * WARNING: This method returns internal data without copying, for
- * performance. The return value must NOT be mutated, and should be treated as
- * an immutable borrow. If you want to take ownership, you must make your own
- * copy.
- */
- MappingList.prototype.toArray = function MappingList_toArray() {
- if (!this._sorted) {
- this._array.sort(util.compareByGeneratedPositionsInflated);
- this._sorted = true;
- }
- return this._array;
- };
- var MappingList_1 = MappingList;
- var mappingList = {
- MappingList: MappingList_1
- };
- /* -*- Mode: js; js-indent-level: 2; -*- */
- /*
- * Copyright 2011 Mozilla Foundation and contributors
- * Licensed under the New BSD license. See LICENSE or:
- * http://opensource.org/licenses/BSD-3-Clause
- */
- var ArraySet$1 = arraySet.ArraySet;
- var MappingList$1 = mappingList.MappingList;
- /**
- * An instance of the SourceMapGenerator represents a source map which is
- * being built incrementally. You may pass an object with the following
- * properties:
- *
- * - file: The filename of the generated source.
- * - sourceRoot: A root for all relative URLs in this source map.
- */
- function SourceMapGenerator(aArgs) {
- if (!aArgs) {
- aArgs = {};
- }
- this._file = util.getArg(aArgs, 'file', null);
- this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null);
- this._skipValidation = util.getArg(aArgs, 'skipValidation', false);
- this._sources = new ArraySet$1();
- this._names = new ArraySet$1();
- this._mappings = new MappingList$1();
- this._sourcesContents = null;
- }
- SourceMapGenerator.prototype._version = 3;
- /**
- * Creates a new SourceMapGenerator based on a SourceMapConsumer
- *
- * @param aSourceMapConsumer The SourceMap.
- */
- SourceMapGenerator.fromSourceMap =
- function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) {
- var sourceRoot = aSourceMapConsumer.sourceRoot;
- var generator = new SourceMapGenerator({
- file: aSourceMapConsumer.file,
- sourceRoot: sourceRoot
- });
- aSourceMapConsumer.eachMapping(function (mapping) {
- var newMapping = {
- generated: {
- line: mapping.generatedLine,
- column: mapping.generatedColumn
- }
- };
- if (mapping.source != null) {
- newMapping.source = mapping.source;
- if (sourceRoot != null) {
- newMapping.source = util.relative(sourceRoot, newMapping.source);
- }
- newMapping.original = {
- line: mapping.originalLine,
- column: mapping.originalColumn
- };
- if (mapping.name != null) {
- newMapping.name = mapping.name;
- }
- }
- generator.addMapping(newMapping);
- });
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var sourceRelative = sourceFile;
- if (sourceRoot !== null) {
- sourceRelative = util.relative(sourceRoot, sourceFile);
- }
- if (!generator._sources.has(sourceRelative)) {
- generator._sources.add(sourceRelative);
- }
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- generator.setSourceContent(sourceFile, content);
- }
- });
- return generator;
- };
- /**
- * Add a single mapping from original source line and column to the generated
- * source's line and column for this source map being created. The mapping
- * object should have the following properties:
- *
- * - generated: An object with the generated line and column positions.
- * - original: An object with the original line and column positions.
- * - source: The original source file (relative to the sourceRoot).
- * - name: An optional original token name for this mapping.
- */
- SourceMapGenerator.prototype.addMapping =
- function SourceMapGenerator_addMapping(aArgs) {
- var generated = util.getArg(aArgs, 'generated');
- var original = util.getArg(aArgs, 'original', null);
- var source = util.getArg(aArgs, 'source', null);
- var name = util.getArg(aArgs, 'name', null);
- if (!this._skipValidation) {
- this._validateMapping(generated, original, source, name);
- }
- if (source != null) {
- source = String(source);
- if (!this._sources.has(source)) {
- this._sources.add(source);
- }
- }
- if (name != null) {
- name = String(name);
- if (!this._names.has(name)) {
- this._names.add(name);
- }
- }
- this._mappings.add({
- generatedLine: generated.line,
- generatedColumn: generated.column,
- originalLine: original != null && original.line,
- originalColumn: original != null && original.column,
- source: source,
- name: name
- });
- };
- /**
- * Set the source content for a source file.
- */
- SourceMapGenerator.prototype.setSourceContent =
- function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) {
- var source = aSourceFile;
- if (this._sourceRoot != null) {
- source = util.relative(this._sourceRoot, source);
- }
- if (aSourceContent != null) {
- // Add the source content to the _sourcesContents map.
- // Create a new _sourcesContents map if the property is null.
- if (!this._sourcesContents) {
- this._sourcesContents = Object.create(null);
- }
- this._sourcesContents[util.toSetString(source)] = aSourceContent;
- } else if (this._sourcesContents) {
- // Remove the source file from the _sourcesContents map.
- // If the _sourcesContents map is empty, set the property to null.
- delete this._sourcesContents[util.toSetString(source)];
- if (Object.keys(this._sourcesContents).length === 0) {
- this._sourcesContents = null;
- }
- }
- };
- /**
- * Applies the mappings of a sub-source-map for a specific source file to the
- * source map being generated. Each mapping to the supplied source file is
- * rewritten using the supplied source map. Note: The resolution for the
- * resulting mappings is the minimium of this map and the supplied map.
- *
- * @param aSourceMapConsumer The source map to be applied.
- * @param aSourceFile Optional. The filename of the source file.
- * If omitted, SourceMapConsumer's file property will be used.
- * @param aSourceMapPath Optional. The dirname of the path to the source map
- * to be applied. If relative, it is relative to the SourceMapConsumer.
- * This parameter is needed when the two source maps aren't in the same
- * directory, and the source map to be applied contains relative source
- * paths. If so, those relative source paths need to be rewritten
- * relative to the SourceMapGenerator.
- */
- SourceMapGenerator.prototype.applySourceMap =
- function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) {
- var sourceFile = aSourceFile;
- // If aSourceFile is omitted, we will use the file property of the SourceMap
- if (aSourceFile == null) {
- if (aSourceMapConsumer.file == null) {
- throw new Error(
- 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' +
- 'or the source map\'s "file" property. Both were omitted.'
- );
- }
- sourceFile = aSourceMapConsumer.file;
- }
- var sourceRoot = this._sourceRoot;
- // Make "sourceFile" relative if an absolute Url is passed.
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- // Applying the SourceMap can add and remove items from the sources and
- // the names array.
- var newSources = new ArraySet$1();
- var newNames = new ArraySet$1();
- // Find mappings for the "sourceFile"
- this._mappings.unsortedForEach(function (mapping) {
- if (mapping.source === sourceFile && mapping.originalLine != null) {
- // Check if it can be mapped by the source map, then update the mapping.
- var original = aSourceMapConsumer.originalPositionFor({
- line: mapping.originalLine,
- column: mapping.originalColumn
- });
- if (original.source != null) {
- // Copy mapping
- mapping.source = original.source;
- if (aSourceMapPath != null) {
- mapping.source = util.join(aSourceMapPath, mapping.source);
- }
- if (sourceRoot != null) {
- mapping.source = util.relative(sourceRoot, mapping.source);
- }
- mapping.originalLine = original.line;
- mapping.originalColumn = original.column;
- if (original.name != null) {
- mapping.name = original.name;
- }
- }
- }
- var source = mapping.source;
- if (source != null && !newSources.has(source)) {
- newSources.add(source);
- }
- var name = mapping.name;
- if (name != null && !newNames.has(name)) {
- newNames.add(name);
- }
- }, this);
- this._sources = newSources;
- this._names = newNames;
- // Copy sourcesContents of applied map.
- aSourceMapConsumer.sources.forEach(function (sourceFile) {
- var content = aSourceMapConsumer.sourceContentFor(sourceFile);
- if (content != null) {
- if (aSourceMapPath != null) {
- sourceFile = util.join(aSourceMapPath, sourceFile);
- }
- if (sourceRoot != null) {
- sourceFile = util.relative(sourceRoot, sourceFile);
- }
- this.setSourceContent(sourceFile, content);
- }
- }, this);
- };
- /**
- * A mapping can have one of the three levels of data:
- *
- * 1. Just the generated position.
- * 2. The Generated position, original position, and original source.
- * 3. Generated and original position, original source, as well as a name
- * token.
- *
- * To maintain consistency, we validate that any new mapping being added falls
- * in to one of these categories.
- */
- SourceMapGenerator.prototype._validateMapping =
- function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource,
- aName) {
- // When aOriginal is truthy but has empty values for .line and .column,
- // it is most likely a programmer error. In this case we throw a very
- // specific error message to try to guide them the right way.
- // For example: https://github.com/Polymer/polymer-bundler/pull/519
- if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') {
- throw new Error(
- 'original.line and original.column are not numbers -- you probably meant to omit ' +
- 'the original mapping entirely and only map the generated position. If so, pass ' +
- 'null for the original mapping instead of an object with empty or null values.'
- );
- }
- if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aGenerated.line > 0 && aGenerated.column >= 0
- && !aOriginal && !aSource && !aName) {
- // Case 1.
- return;
- }
- else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated
- && aOriginal && 'line' in aOriginal && 'column' in aOriginal
- && aGenerated.line > 0 && aGenerated.column >= 0
- && aOriginal.line > 0 && aOriginal.column >= 0
- && aSource) {
- // Cases 2 and 3.
- return;
- }
- else {
- throw new Error('Invalid mapping: ' + JSON.stringify({
- generated: aGenerated,
- source: aSource,
- original: aOriginal,
- name: aName
- }));
- }
- };
- /**
- * Serialize the accumulated mappings in to the stream of base 64 VLQs
- * specified by the source map format.
- */
- SourceMapGenerator.prototype._serializeMappings =
- function SourceMapGenerator_serializeMappings() {
- var previousGeneratedColumn = 0;
- var previousGeneratedLine = 1;
- var previousOriginalColumn = 0;
- var previousOriginalLine = 0;
- var previousName = 0;
- var previousSource = 0;
- var result = '';
- var next;
- var mapping;
- var nameIdx;
- var sourceIdx;
- var mappings = this._mappings.toArray();
- for (var i = 0, len = mappings.length; i < len; i++) {
- mapping = mappings[i];
- next = '';
- if (mapping.generatedLine !== previousGeneratedLine) {
- previousGeneratedColumn = 0;
- while (mapping.generatedLine !== previousGeneratedLine) {
- next += ';';
- previousGeneratedLine++;
- }
- }
- else {
- if (i > 0) {
- if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) {
- continue;
- }
- next += ',';
- }
- }
- next += base64Vlq.encode(mapping.generatedColumn
- - previousGeneratedColumn);
- previousGeneratedColumn = mapping.generatedColumn;
- if (mapping.source != null) {
- sourceIdx = this._sources.indexOf(mapping.source);
- next += base64Vlq.encode(sourceIdx - previousSource);
- previousSource = sourceIdx;
- // lines are stored 0-based in SourceMap spec version 3
- next += base64Vlq.encode(mapping.originalLine - 1
- - previousOriginalLine);
- previousOriginalLine = mapping.originalLine - 1;
- next += base64Vlq.encode(mapping.originalColumn
- - previousOriginalColumn);
- previousOriginalColumn = mapping.originalColumn;
- if (mapping.name != null) {
- nameIdx = this._names.indexOf(mapping.name);
- next += base64Vlq.encode(nameIdx - previousName);
- previousName = nameIdx;
- }
- }
- result += next;
- }
- return result;
- };
- SourceMapGenerator.prototype._generateSourcesContent =
- function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) {
- return aSources.map(function (source) {
- if (!this._sourcesContents) {
- return null;
- }
- if (aSourceRoot != null) {
- source = util.relative(aSourceRoot, source);
- }
- var key = util.toSetString(source);
- return Object.prototype.hasOwnProperty.call(this._sourcesContents, key)
- ? this._sourcesContents[key]
- : null;
- }, this);
- };
- /**
- * Externalize the source map.
- */
- SourceMapGenerator.prototype.toJSON =
- function SourceMapGenerator_toJSON() {
- var map = {
- version: this._version,
- sources: this._sources.toArray(),
- names: this._names.toArray(),
- mappings: this._serializeMappings()
- };
- if (this._file != null) {
- map.file = this._file;
- }
- if (this._sourceRoot != null) {
- map.sourceRoot = this._sourceRoot;
- }
- if (this._sourcesContents) {
- map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot);
- }
- return map;
- };
- /**
- * Render the source map being generated to a string.
- */
- SourceMapGenerator.prototype.toString =
- function SourceMapGenerator_toString() {
- return JSON.stringify(this.toJSON());
- };
- var SourceMapGenerator_1 = SourceMapGenerator;
- var sourceMapGenerator = {
- SourceMapGenerator: SourceMapGenerator_1
- };
- var SourceMapGenerator$1 = sourceMapGenerator.SourceMapGenerator;
- var trackNodes = {
- Atrule: true,
- Selector: true,
- Declaration: true
- };
- var sourceMap = function generateSourceMap(handlers) {
- var map = new SourceMapGenerator$1();
- var line = 1;
- var column = 0;
- var generated = {
- line: 1,
- column: 0
- };
- var original = {
- line: 0, // should be zero to add first mapping
- column: 0
- };
- var sourceMappingActive = false;
- var activatedGenerated = {
- line: 1,
- column: 0
- };
- var activatedMapping = {
- generated: activatedGenerated
- };
- var handlersNode = handlers.node;
- handlers.node = function(node) {
- if (node.loc && node.loc.start && trackNodes.hasOwnProperty(node.type)) {
- var nodeLine = node.loc.start.line;
- var nodeColumn = node.loc.start.column - 1;
- if (original.line !== nodeLine ||
- original.column !== nodeColumn) {
- original.line = nodeLine;
- original.column = nodeColumn;
- generated.line = line;
- generated.column = column;
- if (sourceMappingActive) {
- sourceMappingActive = false;
- if (generated.line !== activatedGenerated.line ||
- generated.column !== activatedGenerated.column) {
- map.addMapping(activatedMapping);
- }
- }
- sourceMappingActive = true;
- map.addMapping({
- source: node.loc.source,
- original: original,
- generated: generated
- });
- }
- }
- handlersNode.call(this, node);
- if (sourceMappingActive && trackNodes.hasOwnProperty(node.type)) {
- activatedGenerated.line = line;
- activatedGenerated.column = column;
- }
- };
- var handlersChunk = handlers.chunk;
- handlers.chunk = function(chunk) {
- for (var i = 0; i < chunk.length; i++) {
- if (chunk.charCodeAt(i) === 10) { // \n
- line++;
- column = 0;
- } else {
- column++;
- }
- }
- handlersChunk(chunk);
- };
- var handlersResult = handlers.result;
- handlers.result = function() {
- if (sourceMappingActive) {
- map.addMapping(activatedMapping);
- }
- return {
- css: handlersResult(),
- map: map
- };
- };
- return handlers;
- };
- var hasOwnProperty$3 = Object.prototype.hasOwnProperty;
- function processChildren(node, delimeter) {
- var list = node.children;
- var prev = null;
- if (typeof delimeter !== 'function') {
- list.forEach(this.node, this);
- } else {
- list.forEach(function(node) {
- if (prev !== null) {
- delimeter.call(this, prev);
- }
- this.node(node);
- prev = node;
- }, this);
- }
- }
- var create$1 = function createGenerator(config) {
- function processNode(node) {
- if (hasOwnProperty$3.call(types, node.type)) {
- types[node.type].call(this, node);
- } else {
- throw new Error('Unknown node type: ' + node.type);
- }
- }
- var types = {};
- if (config.node) {
- for (var name in config.node) {
- types[name] = config.node[name].generate;
- }
- }
- return function(node, options) {
- var buffer = '';
- var handlers = {
- children: processChildren,
- node: processNode,
- chunk: function(chunk) {
- buffer += chunk;
- },
- result: function() {
- return buffer;
- }
- };
- if (options) {
- if (typeof options.decorator === 'function') {
- handlers = options.decorator(handlers);
- }
- if (options.sourceMap) {
- handlers = sourceMap(handlers);
- }
- }
- handlers.node(node);
- return handlers.result();
- };
- };
- var create$2 = function createConvertors(walk) {
- return {
- fromPlainObject: function(ast) {
- walk(ast, {
- enter: function(node) {
- if (node.children && node.children instanceof List_1 === false) {
- node.children = new List_1().fromArray(node.children);
- }
- }
- });
- return ast;
- },
- toPlainObject: function(ast) {
- walk(ast, {
- leave: function(node) {
- if (node.children && node.children instanceof List_1) {
- node.children = node.children.toArray();
- }
- }
- });
- return ast;
- }
- };
- };
- var hasOwnProperty$4 = Object.prototype.hasOwnProperty;
- var noop$3 = function() {};
- function ensureFunction$1(value) {
- return typeof value === 'function' ? value : noop$3;
- }
- function invokeForType(fn, type) {
- return function(node, item, list) {
- if (node.type === type) {
- fn.call(this, node, item, list);
- }
- };
- }
- function getWalkersFromStructure(name, nodeType) {
- var structure = nodeType.structure;
- var walkers = [];
- for (var key in structure) {
- if (hasOwnProperty$4.call(structure, key) === false) {
- continue;
- }
- var fieldTypes = structure[key];
- var walker = {
- name: key,
- type: false,
- nullable: false
- };
- if (!Array.isArray(structure[key])) {
- fieldTypes = [structure[key]];
- }
- for (var i = 0; i < fieldTypes.length; i++) {
- var fieldType = fieldTypes[i];
- if (fieldType === null) {
- walker.nullable = true;
- } else if (typeof fieldType === 'string') {
- walker.type = 'node';
- } else if (Array.isArray(fieldType)) {
- walker.type = 'list';
- }
- }
- if (walker.type) {
- walkers.push(walker);
- }
- }
- if (walkers.length) {
- return {
- context: nodeType.walkContext,
- fields: walkers
- };
- }
- return null;
- }
- function getTypesFromConfig(config) {
- var types = {};
- for (var name in config.node) {
- if (hasOwnProperty$4.call(config.node, name)) {
- var nodeType = config.node[name];
- if (!nodeType.structure) {
- throw new Error('Missed `structure` field in `' + name + '` node type definition');
- }
- types[name] = getWalkersFromStructure(name, nodeType);
- }
- }
- return types;
- }
- function createTypeIterator(config, reverse) {
- var fields = config.fields.slice();
- var contextName = config.context;
- var useContext = typeof contextName === 'string';
- if (reverse) {
- fields.reverse();
- }
- return function(node, context, walk, walkReducer) {
- var prevContextValue;
- if (useContext) {
- prevContextValue = context[contextName];
- context[contextName] = node;
- }
- for (var i = 0; i < fields.length; i++) {
- var field = fields[i];
- var ref = node[field.name];
- if (!field.nullable || ref) {
- if (field.type === 'list') {
- var breakWalk = reverse
- ? ref.reduceRight(walkReducer, false)
- : ref.reduce(walkReducer, false);
- if (breakWalk) {
- return true;
- }
- } else if (walk(ref)) {
- return true;
- }
- }
- }
- if (useContext) {
- context[contextName] = prevContextValue;
- }
- };
- }
- function createFastTraveralMap(iterators) {
- return {
- Atrule: {
- StyleSheet: iterators.StyleSheet,
- Atrule: iterators.Atrule,
- Rule: iterators.Rule,
- Block: iterators.Block
- },
- Rule: {
- StyleSheet: iterators.StyleSheet,
- Atrule: iterators.Atrule,
- Rule: iterators.Rule,
- Block: iterators.Block
- },
- Declaration: {
- StyleSheet: iterators.StyleSheet,
- Atrule: iterators.Atrule,
- Rule: iterators.Rule,
- Block: iterators.Block,
- DeclarationList: iterators.DeclarationList
- }
- };
- }
- var create$3 = function createWalker(config) {
- var types = getTypesFromConfig(config);
- var iteratorsNatural = {};
- var iteratorsReverse = {};
- var breakWalk = Symbol('break-walk');
- var skipNode = Symbol('skip-node');
- for (var name in types) {
- if (hasOwnProperty$4.call(types, name) && types[name] !== null) {
- iteratorsNatural[name] = createTypeIterator(types[name], false);
- iteratorsReverse[name] = createTypeIterator(types[name], true);
- }
- }
- var fastTraversalIteratorsNatural = createFastTraveralMap(iteratorsNatural);
- var fastTraversalIteratorsReverse = createFastTraveralMap(iteratorsReverse);
- var walk = function(root, options) {
- function walkNode(node, item, list) {
- var enterRet = enter.call(context, node, item, list);
- if (enterRet === breakWalk) {
- debugger;
- return true;
- }
- if (enterRet === skipNode) {
- return false;
- }
- if (iterators.hasOwnProperty(node.type)) {
- if (iterators[node.type](node, context, walkNode, walkReducer)) {
- return true;
- }
- }
- if (leave.call(context, node, item, list) === breakWalk) {
- return true;
- }
- return false;
- }
- var walkReducer = (ret, data, item, list) => ret || walkNode(data, item, list);
- var enter = noop$3;
- var leave = noop$3;
- var iterators = iteratorsNatural;
- var context = {
- break: breakWalk,
- skip: skipNode,
- root: root,
- stylesheet: null,
- atrule: null,
- atrulePrelude: null,
- rule: null,
- selector: null,
- block: null,
- declaration: null,
- function: null
- };
- if (typeof options === 'function') {
- enter = options;
- } else if (options) {
- enter = ensureFunction$1(options.enter);
- leave = ensureFunction$1(options.leave);
- if (options.reverse) {
- iterators = iteratorsReverse;
- }
- if (options.visit) {
- if (fastTraversalIteratorsNatural.hasOwnProperty(options.visit)) {
- iterators = options.reverse
- ? fastTraversalIteratorsReverse[options.visit]
- : fastTraversalIteratorsNatural[options.visit];
- } else if (!types.hasOwnProperty(options.visit)) {
- throw new Error('Bad value `' + options.visit + '` for `visit` option (should be: ' + Object.keys(types).join(', ') + ')');
- }
- enter = invokeForType(enter, options.visit);
- leave = invokeForType(leave, options.visit);
- }
- }
- if (enter === noop$3 && leave === noop$3) {
- throw new Error('Neither `enter` nor `leave` walker handler is set or both aren\'t a function');
- }
- walkNode(root);
- };
- walk.break = breakWalk;
- walk.skip = skipNode;
- walk.find = function(ast, fn) {
- var found = null;
- walk(ast, function(node, item, list) {
- if (fn.call(this, node, item, list)) {
- found = node;
- return breakWalk;
- }
- });
- return found;
- };
- walk.findLast = function(ast, fn) {
- var found = null;
- walk(ast, {
- reverse: true,
- enter: function(node, item, list) {
- if (fn.call(this, node, item, list)) {
- found = node;
- return breakWalk;
- }
- }
- });
- return found;
- };
- walk.findAll = function(ast, fn) {
- var found = [];
- walk(ast, function(node, item, list) {
- if (fn.call(this, node, item, list)) {
- found.push(node);
- }
- });
- return found;
- };
- return walk;
- };
- var clone = function clone(node) {
- var result = {};
- for (var key in node) {
- var value = node[key];
- if (value) {
- if (Array.isArray(value) || value instanceof List_1) {
- value = value.map(clone);
- } else if (value.constructor === Object) {
- value = clone(value);
- }
- }
- result[key] = value;
- }
- return result;
- };
- var hasOwnProperty$5 = Object.prototype.hasOwnProperty;
- var shape = {
- generic: true,
- types: {},
- atrules: {},
- properties: {},
- parseContext: {},
- scope: {},
- atrule: ['parse'],
- pseudo: ['parse'],
- node: ['name', 'structure', 'parse', 'generate', 'walkContext']
- };
- function isObject(value) {
- return value && value.constructor === Object;
- }
- function copy(value) {
- if (isObject(value)) {
- return Object.assign({}, value);
- } else {
- return value;
- }
- }
- function extend(dest, src) {
- for (var key in src) {
- if (hasOwnProperty$5.call(src, key)) {
- if (isObject(dest[key])) {
- extend(dest[key], copy(src[key]));
- } else {
- dest[key] = copy(src[key]);
- }
- }
- }
- }
- function mix(dest, src, shape) {
- for (var key in shape) {
- if (hasOwnProperty$5.call(shape, key) === false) {
- continue;
- }
- if (shape[key] === true) {
- if (key in src) {
- if (hasOwnProperty$5.call(src, key)) {
- dest[key] = copy(src[key]);
- }
- }
- } else if (shape[key]) {
- if (isObject(shape[key])) {
- var res = {};
- extend(res, dest[key]);
- extend(res, src[key]);
- dest[key] = res;
- } else if (Array.isArray(shape[key])) {
- var res = {};
- var innerShape = shape[key].reduce(function(s, k) {
- s[k] = true;
- return s;
- }, {});
- for (var name in dest[key]) {
- if (hasOwnProperty$5.call(dest[key], name)) {
- res[name] = {};
- if (dest[key] && dest[key][name]) {
- mix(res[name], dest[key][name], innerShape);
- }
- }
- }
- for (var name in src[key]) {
- if (hasOwnProperty$5.call(src[key], name)) {
- if (!res[name]) {
- res[name] = {};
- }
- if (src[key] && src[key][name]) {
- mix(res[name], src[key][name], innerShape);
- }
- }
- }
- dest[key] = res;
- }
- }
- }
- return dest;
- }
- var mix_1 = function(dest, src) {
- return mix(dest, src, shape);
- };
- function createSyntax(config) {
- var parse = create(config);
- var walk = create$3(config);
- var generate = create$1(config);
- var convert = create$2(walk);
- var syntax = {
- List: List_1,
- SyntaxError: _SyntaxError,
- TokenStream: TokenStream_1,
- Lexer: Lexer_1,
- vendorPrefix: names.vendorPrefix,
- keyword: names.keyword,
- property: names.property,
- isCustomProperty: names.isCustomProperty,
- definitionSyntax: definitionSyntax,
- lexer: null,
- createLexer: function(config) {
- return new Lexer_1(config, syntax, syntax.lexer.structure);
- },
- tokenize: tokenizer,
- parse: parse,
- walk: walk,
- generate: generate,
- find: walk.find,
- findLast: walk.findLast,
- findAll: walk.findAll,
- clone: clone,
- fromPlainObject: convert.fromPlainObject,
- toPlainObject: convert.toPlainObject,
- createSyntax: function(config) {
- return createSyntax(mix_1({}, config));
- },
- fork: function(extension) {
- var base = mix_1({}, config); // copy of config
- return createSyntax(
- typeof extension === 'function'
- ? extension(base, Object.assign)
- : mix_1(base, extension)
- );
- }
- };
- syntax.lexer = new Lexer_1({
- generic: true,
- types: config.types,
- atrules: config.atrules,
- properties: config.properties,
- node: config.node
- }, syntax);
- return syntax;
- }
- var create_1 = function(config) {
- return createSyntax(mix_1({}, config));
- };
- var create$4 = {
- create: create_1
- };
- var atRules = {
- "@charset": {
- syntax: "@charset \"<charset>\";",
- groups: [
- "CSS Charsets"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@charset"
- },
- "@counter-style": {
- 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}",
- interfaces: [
- "CSSCounterStyleRule"
- ],
- groups: [
- "CSS Counter Styles"
- ],
- descriptors: {
- "additive-symbols": {
- syntax: "[ <integer> && <symbol> ]#",
- media: "all",
- initial: "N/A",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- fallback: {
- syntax: "<counter-style-name>",
- media: "all",
- initial: "decimal",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- negative: {
- syntax: "<symbol> <symbol>?",
- media: "all",
- initial: "\"-\" hyphen-minus",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- pad: {
- syntax: "<integer> && <symbol>",
- media: "all",
- initial: "0 \"\"",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- prefix: {
- syntax: "<symbol>",
- media: "all",
- initial: "\"\"",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- range: {
- syntax: "[ [ <integer> | infinite ]{2} ]# | auto",
- media: "all",
- initial: "auto",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- "speak-as": {
- syntax: "auto | bullets | numbers | words | spell-out | <counter-style-name>",
- media: "all",
- initial: "auto",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- suffix: {
- syntax: "<symbol>",
- media: "all",
- initial: "\". \"",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- symbols: {
- syntax: "<symbol>+",
- media: "all",
- initial: "N/A",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- system: {
- syntax: "cyclic | numeric | alphabetic | symbolic | additive | [ fixed <integer>? ] | [ extends <counter-style-name> ]",
- media: "all",
- initial: "symbolic",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- }
- },
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@counter-style"
- },
- "@document": {
- syntax: "@document [ <url> | url-prefix(<string>) | domain(<string>) | media-document(<string>) | regexp(<string>) ]# {\n <group-rule-body>\n}",
- interfaces: [
- "CSSGroupingRule",
- "CSSConditionRule"
- ],
- groups: [
- "CSS Conditional Rules"
- ],
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@document"
- },
- "@font-face": {
- 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}",
- interfaces: [
- "CSSFontFaceRule"
- ],
- groups: [
- "CSS Fonts"
- ],
- descriptors: {
- "font-display": {
- syntax: "[ auto | block | swap | fallback | optional ]",
- media: "visual",
- percentages: "no",
- initial: "auto",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental"
- },
- "font-family": {
- syntax: "<family-name>",
- media: "all",
- initial: "n/a (required)",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "font-feature-settings": {
- syntax: "normal | <feature-tag-value>#",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- "font-variation-settings": {
- syntax: "normal | [ <string> <number> ]#",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- "font-stretch": {
- syntax: "<font-stretch-absolute>{1,2}",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "font-style": {
- syntax: "normal | italic | oblique <angle>{0,2}",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "font-weight": {
- syntax: "<font-weight-absolute>{1,2}",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "font-variant": {
- 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 ]",
- media: "all",
- initial: "normal",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- src: {
- syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#",
- media: "all",
- initial: "n/a (required)",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- "unicode-range": {
- syntax: "<unicode-range>#",
- media: "all",
- initial: "U+0-10FFFF",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- }
- },
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-face"
- },
- "@font-feature-values": {
- syntax: "@font-feature-values <family-name># {\n <feature-value-block-list>\n}",
- interfaces: [
- "CSSFontFeatureValuesRule"
- ],
- groups: [
- "CSS Fonts"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@font-feature-values"
- },
- "@import": {
- syntax: "@import [ <string> | <url> ] [ <media-query-list> ]?;",
- groups: [
- "Media Queries"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@import"
- },
- "@keyframes": {
- syntax: "@keyframes <keyframes-name> {\n <keyframe-block-list>\n}",
- interfaces: [
- "CSSKeyframeRule",
- "CSSKeyframesRule"
- ],
- groups: [
- "CSS Animations"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@keyframes"
- },
- "@media": {
- syntax: "@media <media-query-list> {\n <group-rule-body>\n}",
- interfaces: [
- "CSSGroupingRule",
- "CSSConditionRule",
- "CSSMediaRule",
- "CSSCustomMediaRule"
- ],
- groups: [
- "CSS Conditional Rules",
- "Media Queries"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@media"
- },
- "@namespace": {
- syntax: "@namespace <namespace-prefix>? [ <string> | <url> ];",
- groups: [
- "CSS Namespaces"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@namespace"
- },
- "@page": {
- syntax: "@page <page-selector-list> {\n <page-body>\n}",
- interfaces: [
- "CSSPageRule"
- ],
- groups: [
- "CSS Pages"
- ],
- descriptors: {
- bleed: {
- syntax: "auto | <length>",
- media: [
- "visual",
- "paged"
- ],
- initial: "auto",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- marks: {
- syntax: "none | [ crop || cross ]",
- media: [
- "visual",
- "paged"
- ],
- initial: "none",
- percentages: "no",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard"
- },
- size: {
- syntax: "<length>{1,2} | auto | [ <page-size> || [ portrait | landscape ] ]",
- media: [
- "visual",
- "paged"
- ],
- initial: "auto",
- percentages: "no",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "orderOfAppearance",
- status: "standard"
- }
- },
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@page"
- },
- "@supports": {
- syntax: "@supports <supports-condition> {\n <group-rule-body>\n}",
- interfaces: [
- "CSSGroupingRule",
- "CSSConditionRule",
- "CSSSupportsRule"
- ],
- groups: [
- "CSS Conditional Rules"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@supports"
- },
- "@viewport": {
- syntax: "@viewport {\n <group-rule-body>\n}",
- interfaces: [
- "CSSViewportRule"
- ],
- groups: [
- "CSS Device Adaptation"
- ],
- descriptors: {
- height: {
- syntax: "<viewport-length>{1,2}",
- media: [
- "visual",
- "continuous"
- ],
- initial: [
- "min-height",
- "max-height"
- ],
- percentages: [
- "min-height",
- "max-height"
- ],
- computed: [
- "min-height",
- "max-height"
- ],
- order: "orderOfAppearance",
- status: "standard"
- },
- "max-height": {
- syntax: "<viewport-length>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "referToHeightOfInitialViewport",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard"
- },
- "max-width": {
- syntax: "<viewport-length>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "referToWidthOfInitialViewport",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard"
- },
- "max-zoom": {
- syntax: "auto | <number> | <percentage>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "the zoom factor itself",
- computed: "autoNonNegativeOrPercentage",
- order: "uniqueOrder",
- status: "standard"
- },
- "min-height": {
- syntax: "<viewport-length>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "referToHeightOfInitialViewport",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard"
- },
- "min-width": {
- syntax: "<viewport-length>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "referToWidthOfInitialViewport",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard"
- },
- "min-zoom": {
- syntax: "auto | <number> | <percentage>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "the zoom factor itself",
- computed: "autoNonNegativeOrPercentage",
- order: "uniqueOrder",
- status: "standard"
- },
- orientation: {
- syntax: "auto | portrait | landscape",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "referToSizeOfBoundingBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "user-zoom": {
- syntax: "zoom | fixed",
- media: [
- "visual",
- "continuous"
- ],
- initial: "zoom",
- percentages: "referToSizeOfBoundingBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- "viewport-fit": {
- syntax: "auto | contain | cover",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "no",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard"
- },
- width: {
- syntax: "<viewport-length>{1,2}",
- media: [
- "visual",
- "continuous"
- ],
- initial: [
- "min-width",
- "max-width"
- ],
- percentages: [
- "min-width",
- "max-width"
- ],
- computed: [
- "min-width",
- "max-width"
- ],
- order: "orderOfAppearance",
- status: "standard"
- },
- zoom: {
- syntax: "auto | <number> | <percentage>",
- media: [
- "visual",
- "continuous"
- ],
- initial: "auto",
- percentages: "the zoom factor itself",
- computed: "autoNonNegativeOrPercentage",
- order: "uniqueOrder",
- status: "standard"
- }
- },
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/@viewport"
- }
- };
- var atRules$1 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- 'default': atRules
- });
- var all = {
- syntax: "initial | inherit | unset | revert",
- media: "noPracticalMedia",
- inherited: false,
- animationType: "eachOfShorthandPropertiesExceptUnicodeBiDiAndDirection",
- percentages: "no",
- groups: [
- "CSS Miscellaneous"
- ],
- initial: "noPracticalInitialValue",
- appliesto: "allElements",
- computed: "asSpecifiedAppliesToEachProperty",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/all"
- };
- var animation = {
- syntax: "<single-animation>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: [
- "animation-name",
- "animation-duration",
- "animation-timing-function",
- "animation-delay",
- "animation-iteration-count",
- "animation-direction",
- "animation-fill-mode",
- "animation-play-state"
- ],
- appliesto: "allElementsAndPseudos",
- computed: [
- "animation-name",
- "animation-duration",
- "animation-timing-function",
- "animation-delay",
- "animation-direction",
- "animation-iteration-count",
- "animation-fill-mode",
- "animation-play-state"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation"
- };
- var appearance = {
- syntax: "none | auto | textfield | menulist-button | <compat-auto>",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
- };
- var azimuth = {
- syntax: "<angle> | [ [ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards",
- media: "aural",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Speech"
- ],
- initial: "center",
- appliesto: "allElements",
- computed: "normalizedAngle",
- order: "orderOfAppearance",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/azimuth"
- };
- var background = {
- syntax: "[ <bg-layer> , ]* <final-bg-layer>",
- media: "visual",
- inherited: false,
- animationType: [
- "background-color",
- "background-image",
- "background-clip",
- "background-position",
- "background-size",
- "background-repeat",
- "background-attachment"
- ],
- percentages: [
- "background-position",
- "background-size"
- ],
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "background-image",
- "background-position",
- "background-size",
- "background-repeat",
- "background-origin",
- "background-clip",
- "background-attachment",
- "background-color"
- ],
- appliesto: "allElements",
- computed: [
- "background-image",
- "background-position",
- "background-size",
- "background-repeat",
- "background-origin",
- "background-clip",
- "background-attachment",
- "background-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background"
- };
- var border = {
- syntax: "<line-width> || <line-style> || <color>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-color",
- "border-style",
- "border-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-width",
- "border-style",
- "border-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-width",
- "border-style",
- "border-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border"
- };
- var bottom = {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToContainingBlockHeight",
- groups: [
- "CSS Positioning"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/bottom"
- };
- var clear = {
- syntax: "none | left | right | both | inline-start | inline-end",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Positioning"
- ],
- initial: "none",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clear"
- };
- var clip = {
- syntax: "<shape> | auto",
- media: "visual",
- inherited: false,
- animationType: "rectangle",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "auto",
- appliesto: "absolutelyPositionedElements",
- computed: "autoOrRectangle",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip"
- };
- var color = {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Color"
- ],
- initial: "variesFromBrowserToBrowser",
- appliesto: "allElements",
- computed: "translucentValuesRGBAOtherwiseRGB",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color"
- };
- var columns = {
- syntax: "<'column-width'> || <'column-count'>",
- media: "visual",
- inherited: false,
- animationType: [
- "column-width",
- "column-count"
- ],
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: [
- "column-width",
- "column-count"
- ],
- appliesto: "blockContainersExceptTableWrappers",
- computed: [
- "column-width",
- "column-count"
- ],
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/columns"
- };
- var contain = {
- syntax: "none | strict | content | [ size || layout || style || paint ]",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Containment"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/contain"
- };
- var content = {
- syntax: "normal | none | [ <content-replacement> | <content-list> ] [/ <string> ]?",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Generated Content"
- ],
- initial: "normal",
- appliesto: "beforeAndAfterPseudos",
- computed: "normalOnElementsForPseudosNoneAbsoluteURIStringOrAsSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/content"
- };
- var cursor = {
- 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 ] ]",
- media: [
- "visual",
- "interactive"
- ],
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecifiedURLsAbsolute",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/cursor"
- };
- var direction = {
- syntax: "ltr | rtl",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Writing Modes"
- ],
- initial: "ltr",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/direction"
- };
- var display = {
- syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy>",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Display"
- ],
- initial: "inline",
- appliesto: "allElements",
- computed: "asSpecifiedExceptPositionedFloatingAndRootElementsKeywordMaybeDifferent",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/display"
- };
- var filter = {
- syntax: "none | <filter-function-list>",
- media: "visual",
- inherited: false,
- animationType: "filterList",
- percentages: "no",
- groups: [
- "Filter Effects"
- ],
- initial: "none",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/filter"
- };
- var flex = {
- syntax: "none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]",
- media: "visual",
- inherited: false,
- animationType: [
- "flex-grow",
- "flex-shrink",
- "flex-basis"
- ],
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: [
- "flex-grow",
- "flex-shrink",
- "flex-basis"
- ],
- appliesto: "flexItemsAndInFlowPseudos",
- computed: [
- "flex-grow",
- "flex-shrink",
- "flex-basis"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex"
- };
- var float = {
- syntax: "left | right | none | inline-start | inline-end",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Positioning"
- ],
- initial: "none",
- appliesto: "allElementsNoEffectIfDisplayNone",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/float"
- };
- var font = {
- 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",
- media: "visual",
- inherited: true,
- animationType: [
- "font-style",
- "font-variant",
- "font-weight",
- "font-stretch",
- "font-size",
- "line-height",
- "font-family"
- ],
- percentages: [
- "font-size",
- "line-height"
- ],
- groups: [
- "CSS Fonts"
- ],
- initial: [
- "font-style",
- "font-variant",
- "font-weight",
- "font-stretch",
- "font-size",
- "line-height",
- "font-family"
- ],
- appliesto: "allElements",
- computed: [
- "font-style",
- "font-variant",
- "font-weight",
- "font-stretch",
- "font-size",
- "line-height",
- "font-family"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font"
- };
- var gap = {
- syntax: "<'row-gap'> <'column-gap'>?",
- media: "visual",
- inherited: false,
- animationType: [
- "row-gap",
- "column-gap"
- ],
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: [
- "row-gap",
- "column-gap"
- ],
- appliesto: "multiColumnElementsFlexContainersGridContainers",
- computed: [
- "row-gap",
- "column-gap"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
- };
- var grid = {
- syntax: "<'grid-template'> | <'grid-template-rows'> / [ auto-flow && dense? ] <'grid-auto-columns'>? | [ auto-flow && dense? ] <'grid-auto-rows'>? / <'grid-template-columns'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: [
- "grid-template-rows",
- "grid-template-columns",
- "grid-auto-rows",
- "grid-auto-columns"
- ],
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-template-rows",
- "grid-template-columns",
- "grid-template-areas",
- "grid-auto-rows",
- "grid-auto-columns",
- "grid-auto-flow",
- "grid-column-gap",
- "grid-row-gap",
- "column-gap",
- "row-gap"
- ],
- appliesto: "gridContainers",
- computed: [
- "grid-template-rows",
- "grid-template-columns",
- "grid-template-areas",
- "grid-auto-rows",
- "grid-auto-columns",
- "grid-auto-flow",
- "grid-column-gap",
- "grid-row-gap",
- "column-gap",
- "row-gap"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid"
- };
- var height = {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesRelativeToContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "allElementsButNonReplacedAndTableColumns",
- computed: "percentageAutoOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/height"
- };
- var hyphens = {
- syntax: "none | manual | auto",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "manual",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hyphens"
- };
- var inset = {
- syntax: "<'top'>{1,4}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalHeightOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset"
- };
- var isolation = {
- syntax: "auto | isolate",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Compositing and Blending"
- ],
- initial: "auto",
- appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/isolation"
- };
- var left = {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Positioning"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/left"
- };
- var margin = {
- syntax: "[ <length> | <percentage> | auto ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: [
- "margin-bottom",
- "margin-left",
- "margin-right",
- "margin-top"
- ],
- appliesto: "allElementsExceptTableDisplayTypes",
- computed: [
- "margin-bottom",
- "margin-left",
- "margin-right",
- "margin-top"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin"
- };
- var mask = {
- syntax: "<mask-layer>#",
- media: "visual",
- inherited: false,
- animationType: [
- "mask-image",
- "mask-mode",
- "mask-repeat",
- "mask-position",
- "mask-clip",
- "mask-origin",
- "mask-size",
- "mask-composite"
- ],
- percentages: [
- "mask-position"
- ],
- groups: [
- "CSS Masking"
- ],
- initial: [
- "mask-image",
- "mask-mode",
- "mask-repeat",
- "mask-position",
- "mask-clip",
- "mask-origin",
- "mask-size",
- "mask-composite"
- ],
- appliesto: "allElementsSVGContainerElements",
- computed: [
- "mask-image",
- "mask-mode",
- "mask-repeat",
- "mask-position",
- "mask-clip",
- "mask-origin",
- "mask-size",
- "mask-composite"
- ],
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
- };
- var offset = {
- syntax: "[ <'offset-position'>? [ <'offset-path'> [ <'offset-distance'> || <'offset-rotate'> ]? ]? ]! [ / <'offset-anchor'> ]?",
- media: "visual",
- inherited: false,
- animationType: [
- "offset-position",
- "offset-path",
- "offset-distance",
- "offset-anchor",
- "offset-rotate"
- ],
- percentages: [
- "offset-position",
- "offset-distance",
- "offset-anchor"
- ],
- groups: [
- "CSS Motion Path"
- ],
- initial: [
- "offset-position",
- "offset-path",
- "offset-distance",
- "offset-anchor",
- "offset-rotate"
- ],
- appliesto: "transformableElements",
- computed: [
- "offset-position",
- "offset-path",
- "offset-distance",
- "offset-anchor",
- "offset-rotate"
- ],
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset"
- };
- var opacity = {
- syntax: "<alpha-value>",
- media: "visual",
- inherited: false,
- animationType: "number",
- percentages: "no",
- groups: [
- "CSS Color"
- ],
- initial: "1.0",
- appliesto: "allElements",
- computed: "specifiedValueClipped0To1",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/opacity"
- };
- var order = {
- syntax: "<integer>",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "0",
- appliesto: "flexItemsGridItemsAbsolutelyPositionedContainerChildren",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/order"
- };
- var orphans = {
- syntax: "<integer>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "2",
- appliesto: "blockContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/orphans"
- };
- var outline = {
- syntax: "[ <'outline-color'> || <'outline-style'> || <'outline-width'> ]",
- media: [
- "visual",
- "interactive"
- ],
- inherited: false,
- animationType: [
- "outline-color",
- "outline-width",
- "outline-style"
- ],
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: [
- "outline-color",
- "outline-style",
- "outline-width"
- ],
- appliesto: "allElements",
- computed: [
- "outline-color",
- "outline-width",
- "outline-style"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline"
- };
- var overflow = {
- syntax: "[ visible | hidden | clip | scroll | auto ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "visible",
- appliesto: "blockContainersFlexContainersGridContainers",
- computed: [
- "overflow-x",
- "overflow-y"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow"
- };
- var padding = {
- syntax: "[ <length> | <percentage> ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: [
- "padding-bottom",
- "padding-left",
- "padding-right",
- "padding-top"
- ],
- appliesto: "allElementsExceptInternalTableDisplayTypes",
- computed: [
- "padding-bottom",
- "padding-left",
- "padding-right",
- "padding-top"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding"
- };
- var perspective = {
- syntax: "none | <length>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "absoluteLengthOrNone",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective"
- };
- var position = {
- syntax: "static | relative | absolute | sticky | fixed",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Positioning"
- ],
- initial: "static",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/position"
- };
- var quotes = {
- syntax: "none | auto | [ <string> <string> ]+",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Generated Content"
- ],
- initial: "dependsOnUserAgent",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/quotes"
- };
- var resize = {
- syntax: "none | both | horizontal | vertical | block | inline",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "none",
- appliesto: "elementsWithOverflowNotVisibleAndReplacedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/resize"
- };
- var right = {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Positioning"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/right"
- };
- var rotate = {
- syntax: "none | <angle> | [ x | y | z | <number>{3} ] && <angle>",
- media: "visual",
- inherited: false,
- animationType: "transform",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/rotate"
- };
- var scale = {
- syntax: "none | <number>{1,3}",
- media: "visual",
- inherited: false,
- animationType: "transform",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scale"
- };
- var top = {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToContainingBlockHeight",
- groups: [
- "CSS Positioning"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/top"
- };
- var transform = {
- syntax: "none | <transform-list>",
- media: "visual",
- inherited: false,
- animationType: "transform",
- percentages: "referToSizeOfBoundingBox",
- groups: [
- "CSS Transforms"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform"
- };
- var transition = {
- syntax: "<single-transition>#",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transitions"
- ],
- initial: [
- "transition-delay",
- "transition-duration",
- "transition-property",
- "transition-timing-function"
- ],
- appliesto: "allElementsAndPseudos",
- computed: [
- "transition-delay",
- "transition-duration",
- "transition-property",
- "transition-timing-function"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition"
- };
- var translate = {
- syntax: "none | <length-percentage> [ <length-percentage> <length>? ]?",
- media: "visual",
- inherited: false,
- animationType: "transform",
- percentages: "referToSizeOfBoundingBox",
- groups: [
- "CSS Transforms"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/translate"
- };
- var visibility = {
- syntax: "visible | hidden | collapse",
- media: "visual",
- inherited: true,
- animationType: "visibility",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "visible",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/visibility"
- };
- var widows = {
- syntax: "<integer>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "2",
- appliesto: "blockContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/widows"
- };
- var width = {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "allElementsButNonReplacedAndTableRows",
- computed: "percentageAutoOrAbsoluteLength",
- order: "lengthOrPercentageBeforeKeywordIfBothPresent",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/width"
- };
- var zoom = {
- syntax: "normal | reset | <number> | <percentage>",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/zoom"
- };
- var properties$1 = {
- "--*": {
- syntax: "<declaration-value>",
- media: "all",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Variables"
- ],
- initial: "seeProse",
- appliesto: "allElements",
- computed: "asSpecifiedWithVarsSubstituted",
- order: "perGrammar",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/--*"
- },
- "-ms-accelerator": {
- syntax: "false | true",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "false",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-accelerator"
- },
- "-ms-block-progression": {
- syntax: "tb | rl | bt | lr",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "tb",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-block-progression"
- },
- "-ms-content-zoom-chaining": {
- syntax: "none | chained",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-chaining"
- },
- "-ms-content-zooming": {
- syntax: "none | zoom",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "zoomForTheTopLevelNoneForTheRest",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zooming"
- },
- "-ms-content-zoom-limit": {
- syntax: "<'-ms-content-zoom-limit-min'> <'-ms-content-zoom-limit-max'>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: [
- "-ms-content-zoom-limit-max",
- "-ms-content-zoom-limit-min"
- ],
- groups: [
- "Microsoft Extensions"
- ],
- initial: [
- "-ms-content-zoom-limit-max",
- "-ms-content-zoom-limit-min"
- ],
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: [
- "-ms-content-zoom-limit-max",
- "-ms-content-zoom-limit-min"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit"
- },
- "-ms-content-zoom-limit-max": {
- syntax: "<percentage>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "maxZoomFactor",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "400%",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-max"
- },
- "-ms-content-zoom-limit-min": {
- syntax: "<percentage>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "minZoomFactor",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "100%",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-limit-min"
- },
- "-ms-content-zoom-snap": {
- syntax: "<'-ms-content-zoom-snap-type'> || <'-ms-content-zoom-snap-points'>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: [
- "-ms-content-zoom-snap-type",
- "-ms-content-zoom-snap-points"
- ],
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: [
- "-ms-content-zoom-snap-type",
- "-ms-content-zoom-snap-points"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap"
- },
- "-ms-content-zoom-snap-points": {
- syntax: "snapInterval( <percentage>, <percentage> ) | snapList( <percentage># )",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "snapInterval(0%, 100%)",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-points"
- },
- "-ms-content-zoom-snap-type": {
- syntax: "none | proximity | mandatory",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-content-zoom-snap-type"
- },
- "-ms-filter": {
- syntax: "<string>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "\"\"",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-filter"
- },
- "-ms-flow-from": {
- syntax: "[ none | <custom-ident> ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "nonReplacedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-from"
- },
- "-ms-flow-into": {
- syntax: "[ none | <custom-ident> ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "iframeElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-flow-into"
- },
- "-ms-grid-columns": {
- syntax: "none | <track-list> | <auto-track-list>",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpcDifferenceLpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "none",
- appliesto: "gridContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-columns"
- },
- "-ms-grid-rows": {
- syntax: "none | <track-list> | <auto-track-list>",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpcDifferenceLpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "none",
- appliesto: "gridContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-grid-rows"
- },
- "-ms-high-contrast-adjust": {
- syntax: "auto | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-high-contrast-adjust"
- },
- "-ms-hyphenate-limit-chars": {
- syntax: "auto | <integer>{1,3}",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-chars"
- },
- "-ms-hyphenate-limit-lines": {
- syntax: "no-limit | <integer>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "no-limit",
- appliesto: "blockContainerElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-lines"
- },
- "-ms-hyphenate-limit-zone": {
- syntax: "<percentage> | <length>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "referToLineBoxWidth",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "0",
- appliesto: "blockContainerElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-hyphenate-limit-zone"
- },
- "-ms-ime-align": {
- syntax: "auto | after",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-ime-align"
- },
- "-ms-overflow-style": {
- syntax: "auto | none | scrollbar | -ms-autohiding-scrollbar",
- media: "interactive",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-overflow-style"
- },
- "-ms-scrollbar-3dlight-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "dependsOnUserAgent",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-3dlight-color"
- },
- "-ms-scrollbar-arrow-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "ButtonText",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-arrow-color"
- },
- "-ms-scrollbar-base-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "dependsOnUserAgent",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-base-color"
- },
- "-ms-scrollbar-darkshadow-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "ThreeDDarkShadow",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-darkshadow-color"
- },
- "-ms-scrollbar-face-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "ThreeDFace",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-face-color"
- },
- "-ms-scrollbar-highlight-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "ThreeDHighlight",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-highlight-color"
- },
- "-ms-scrollbar-shadow-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "ThreeDDarkShadow",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-shadow-color"
- },
- "-ms-scrollbar-track-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "Scrollbar",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scrollbar-track-color"
- },
- "-ms-scroll-chaining": {
- syntax: "chained | none",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "chained",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-chaining"
- },
- "-ms-scroll-limit": {
- syntax: "<'-ms-scroll-limit-x-min'> <'-ms-scroll-limit-y-min'> <'-ms-scroll-limit-x-max'> <'-ms-scroll-limit-y-max'>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: [
- "-ms-scroll-limit-x-min",
- "-ms-scroll-limit-y-min",
- "-ms-scroll-limit-x-max",
- "-ms-scroll-limit-y-max"
- ],
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: [
- "-ms-scroll-limit-x-min",
- "-ms-scroll-limit-y-min",
- "-ms-scroll-limit-x-max",
- "-ms-scroll-limit-y-max"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit"
- },
- "-ms-scroll-limit-x-max": {
- syntax: "auto | <length>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-max"
- },
- "-ms-scroll-limit-x-min": {
- syntax: "<length>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "0",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-x-min"
- },
- "-ms-scroll-limit-y-max": {
- syntax: "auto | <length>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-max"
- },
- "-ms-scroll-limit-y-min": {
- syntax: "<length>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "0",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-limit-y-min"
- },
- "-ms-scroll-rails": {
- syntax: "none | railed",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "railed",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-rails"
- },
- "-ms-scroll-snap-points-x": {
- syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "snapInterval(0px, 100%)",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-x"
- },
- "-ms-scroll-snap-points-y": {
- syntax: "snapInterval( <length-percentage>, <length-percentage> ) | snapList( <length-percentage># )",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "snapInterval(0px, 100%)",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-points-y"
- },
- "-ms-scroll-snap-type": {
- syntax: "none | proximity | mandatory",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-type"
- },
- "-ms-scroll-snap-x": {
- syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-x'>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: [
- "-ms-scroll-snap-type",
- "-ms-scroll-snap-points-x"
- ],
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: [
- "-ms-scroll-snap-type",
- "-ms-scroll-snap-points-x"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-x"
- },
- "-ms-scroll-snap-y": {
- syntax: "<'-ms-scroll-snap-type'> <'-ms-scroll-snap-points-y'>",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: [
- "-ms-scroll-snap-type",
- "-ms-scroll-snap-points-y"
- ],
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: [
- "-ms-scroll-snap-type",
- "-ms-scroll-snap-points-y"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-snap-y"
- },
- "-ms-scroll-translation": {
- syntax: "none | vertical-to-horizontal",
- media: "interactive",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-scroll-translation"
- },
- "-ms-text-autospace": {
- syntax: "none | ideograph-alpha | ideograph-numeric | ideograph-parenthesis | ideograph-space",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-text-autospace"
- },
- "-ms-touch-select": {
- syntax: "grippers | none",
- media: "interactive",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "grippers",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-touch-select"
- },
- "-ms-user-select": {
- syntax: "none | element | text",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "text",
- appliesto: "nonReplacedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-user-select"
- },
- "-ms-wrap-flow": {
- syntax: "auto | both | start | end | maximum | clear",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "auto",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-flow"
- },
- "-ms-wrap-margin": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "0",
- appliesto: "exclusionElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-margin"
- },
- "-ms-wrap-through": {
- syntax: "wrap | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Microsoft Extensions"
- ],
- initial: "wrap",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-ms-wrap-through"
- },
- "-moz-appearance": {
- 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",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "noneButOverriddenInUserAgentCSS",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
- },
- "-moz-binding": {
- syntax: "<url> | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElementsExceptGeneratedContentOrPseudoElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-binding"
- },
- "-moz-border-bottom-colors": {
- syntax: "<color>+ | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-bottom-colors"
- },
- "-moz-border-left-colors": {
- syntax: "<color>+ | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-left-colors"
- },
- "-moz-border-right-colors": {
- syntax: "<color>+ | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-right-colors"
- },
- "-moz-border-top-colors": {
- syntax: "<color>+ | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-border-top-colors"
- },
- "-moz-context-properties": {
- syntax: "none | [ fill | fill-opacity | stroke | stroke-opacity ]#",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElementsThatCanReferenceImages",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-context-properties"
- },
- "-moz-float-edge": {
- syntax: "border-box | content-box | margin-box | padding-box",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "content-box",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-float-edge"
- },
- "-moz-force-broken-image-icon": {
- syntax: "<integer [0,1]>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "0",
- appliesto: "images",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-force-broken-image-icon"
- },
- "-moz-image-region": {
- syntax: "<shape> | auto",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "auto",
- appliesto: "xulImageElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-image-region"
- },
- "-moz-orient": {
- syntax: "inline | block | horizontal | vertical",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "inline",
- appliesto: "anyElementEffectOnProgressAndMeter",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-orient"
- },
- "-moz-outline-radius": {
- syntax: "<outline-radius>{1,4} [ / <outline-radius>{1,4} ]?",
- media: "visual",
- inherited: false,
- animationType: [
- "-moz-outline-radius-topleft",
- "-moz-outline-radius-topright",
- "-moz-outline-radius-bottomright",
- "-moz-outline-radius-bottomleft"
- ],
- percentages: [
- "-moz-outline-radius-topleft",
- "-moz-outline-radius-topright",
- "-moz-outline-radius-bottomright",
- "-moz-outline-radius-bottomleft"
- ],
- groups: [
- "Mozilla Extensions"
- ],
- initial: [
- "-moz-outline-radius-topleft",
- "-moz-outline-radius-topright",
- "-moz-outline-radius-bottomright",
- "-moz-outline-radius-bottomleft"
- ],
- appliesto: "allElements",
- computed: [
- "-moz-outline-radius-topleft",
- "-moz-outline-radius-topright",
- "-moz-outline-radius-bottomright",
- "-moz-outline-radius-bottomleft"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius"
- },
- "-moz-outline-radius-bottomleft": {
- syntax: "<outline-radius>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomleft"
- },
- "-moz-outline-radius-bottomright": {
- syntax: "<outline-radius>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-bottomright"
- },
- "-moz-outline-radius-topleft": {
- syntax: "<outline-radius>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topleft"
- },
- "-moz-outline-radius-topright": {
- syntax: "<outline-radius>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-outline-radius-topright"
- },
- "-moz-stack-sizing": {
- syntax: "ignore | stretch-to-fit",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "stretch-to-fit",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-stack-sizing"
- },
- "-moz-text-blink": {
- syntax: "none | blink",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-text-blink"
- },
- "-moz-user-focus": {
- syntax: "ignore | normal | select-after | select-before | select-menu | select-same | select-all | none",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-focus"
- },
- "-moz-user-input": {
- syntax: "auto | none | enabled | disabled",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-input"
- },
- "-moz-user-modify": {
- syntax: "read-only | read-write | write-only",
- media: "interactive",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "read-only",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-user-modify"
- },
- "-moz-window-dragging": {
- syntax: "drag | no-drag",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "drag",
- appliesto: "allElementsCreatingNativeWindows",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-dragging"
- },
- "-moz-window-shadow": {
- syntax: "default | menu | tooltip | sheet | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "default",
- appliesto: "allElementsCreatingNativeWindows",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-moz-window-shadow"
- },
- "-webkit-appearance": {
- 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",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "noneButOverriddenInUserAgentCSS",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/appearance"
- },
- "-webkit-border-before": {
- syntax: "<'border-width'> || <'border-style'> || <'color'>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: [
- "-webkit-border-before-width"
- ],
- groups: [
- "WebKit Extensions"
- ],
- initial: [
- "border-width",
- "border-style",
- "color"
- ],
- appliesto: "allElements",
- computed: [
- "border-width",
- "border-style",
- "color"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-border-before"
- },
- "-webkit-border-before-color": {
- syntax: "<'color'>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "nonstandard"
- },
- "-webkit-border-before-style": {
- syntax: "<'border-style'>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard"
- },
- "-webkit-border-before-width": {
- syntax: "<'border-width'>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "WebKit Extensions"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "nonstandard"
- },
- "-webkit-box-reflect": {
- syntax: "[ above | below | right | left ]? <length>? <image>?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-box-reflect"
- },
- "-webkit-line-clamp": {
- syntax: "none | <integer>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "WebKit Extensions",
- "CSS Overflow"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-line-clamp"
- },
- "-webkit-mask": {
- syntax: "[ <mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || [ <box> | border | padding | content | text ] || [ <box> | border | padding | content ] ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: [
- "-webkit-mask-image",
- "-webkit-mask-repeat",
- "-webkit-mask-attachment",
- "-webkit-mask-position",
- "-webkit-mask-origin",
- "-webkit-mask-clip"
- ],
- appliesto: "allElements",
- computed: [
- "-webkit-mask-image",
- "-webkit-mask-repeat",
- "-webkit-mask-attachment",
- "-webkit-mask-position",
- "-webkit-mask-origin",
- "-webkit-mask-clip"
- ],
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask"
- },
- "-webkit-mask-attachment": {
- syntax: "<attachment>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "scroll",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-attachment"
- },
- "-webkit-mask-clip": {
- syntax: "[ <box> | border | padding | content | text ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "border",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
- },
- "-webkit-mask-composite": {
- syntax: "<composite-style>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "source-over",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-composite"
- },
- "-webkit-mask-image": {
- syntax: "<mask-reference>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "absoluteURIOrNone",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
- },
- "-webkit-mask-origin": {
- syntax: "[ <box> | border | padding | content ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "padding",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
- },
- "-webkit-mask-position": {
- syntax: "<position>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToSizeOfElement",
- groups: [
- "WebKit Extensions"
- ],
- initial: "0% 0%",
- appliesto: "allElements",
- computed: "absoluteLengthOrPercentage",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
- },
- "-webkit-mask-position-x": {
- syntax: "[ <length-percentage> | left | center | right ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToSizeOfElement",
- groups: [
- "WebKit Extensions"
- ],
- initial: "0%",
- appliesto: "allElements",
- computed: "absoluteLengthOrPercentage",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-x"
- },
- "-webkit-mask-position-y": {
- syntax: "[ <length-percentage> | top | center | bottom ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToSizeOfElement",
- groups: [
- "WebKit Extensions"
- ],
- initial: "0%",
- appliesto: "allElements",
- computed: "absoluteLengthOrPercentage",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-position-y"
- },
- "-webkit-mask-repeat": {
- syntax: "<repeat-style>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "repeat",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
- },
- "-webkit-mask-repeat-x": {
- syntax: "repeat | no-repeat | space | round",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "repeat",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-x"
- },
- "-webkit-mask-repeat-y": {
- syntax: "repeat | no-repeat | space | round",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "repeat",
- appliesto: "allElements",
- computed: "absoluteLengthOrPercentage",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-mask-repeat-y"
- },
- "-webkit-mask-size": {
- syntax: "<bg-size>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "relativeToBackgroundPositioningArea",
- groups: [
- "WebKit Extensions"
- ],
- initial: "auto auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
- },
- "-webkit-overflow-scrolling": {
- syntax: "auto | touch",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "auto",
- appliesto: "scrollingBoxes",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-overflow-scrolling"
- },
- "-webkit-tap-highlight-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "black",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-tap-highlight-color"
- },
- "-webkit-text-fill-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "color",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-fill-color"
- },
- "-webkit-text-stroke": {
- syntax: "<length> || <color>",
- media: "visual",
- inherited: true,
- animationType: [
- "-webkit-text-stroke-width",
- "-webkit-text-stroke-color"
- ],
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: [
- "-webkit-text-stroke-width",
- "-webkit-text-stroke-color"
- ],
- appliesto: "allElements",
- computed: [
- "-webkit-text-stroke-width",
- "-webkit-text-stroke-color"
- ],
- order: "canonicalOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke"
- },
- "-webkit-text-stroke-color": {
- syntax: "<color>",
- media: "visual",
- inherited: true,
- animationType: "color",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-color"
- },
- "-webkit-text-stroke-width": {
- syntax: "<length>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "absoluteLength",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-text-stroke-width"
- },
- "-webkit-touch-callout": {
- syntax: "default | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "default",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/-webkit-touch-callout"
- },
- "-webkit-user-modify": {
- syntax: "read-only | read-write | read-write-plaintext-only",
- media: "interactive",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "WebKit Extensions"
- ],
- initial: "read-only",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard"
- },
- "align-content": {
- syntax: "normal | <baseline-position> | <content-distribution> | <overflow-position>? <content-position>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "multilineFlexContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-content"
- },
- "align-items": {
- syntax: "normal | stretch | <baseline-position> | [ <overflow-position>? <self-position> ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-items"
- },
- "align-self": {
- syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? <self-position>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "auto",
- appliesto: "flexItemsGridItemsAndAbsolutelyPositionedBoxes",
- computed: "autoOnAbsolutelyPositionedElementsValueOfAlignItemsOnParent",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/align-self"
- },
- all: all,
- animation: animation,
- "animation-delay": {
- syntax: "<time>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "0s",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-delay"
- },
- "animation-direction": {
- syntax: "<single-animation-direction>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "normal",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-direction"
- },
- "animation-duration": {
- syntax: "<time>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "0s",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-duration"
- },
- "animation-fill-mode": {
- syntax: "<single-animation-fill-mode>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "none",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-fill-mode"
- },
- "animation-iteration-count": {
- syntax: "<single-animation-iteration-count>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "1",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-iteration-count"
- },
- "animation-name": {
- syntax: "[ none | <keyframes-name> ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "none",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-name"
- },
- "animation-play-state": {
- syntax: "<single-animation-play-state>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "running",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-play-state"
- },
- "animation-timing-function": {
- syntax: "<timing-function>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Animations"
- ],
- initial: "ease",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/animation-timing-function"
- },
- appearance: appearance,
- "aspect-ratio": {
- syntax: "auto | <ratio>",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "allElementsExceptInlineBoxesAndInternalRubyOrTableBoxes",
- computed: "asSpecified",
- order: "perGrammar",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/aspect-ratio"
- },
- azimuth: azimuth,
- "backdrop-filter": {
- syntax: "none | <filter-function-list>",
- media: "visual",
- inherited: false,
- animationType: "filterList",
- percentages: "no",
- groups: [
- "Filter Effects"
- ],
- initial: "none",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backdrop-filter"
- },
- "backface-visibility": {
- syntax: "visible | hidden",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "visible",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/backface-visibility"
- },
- background: background,
- "background-attachment": {
- syntax: "<attachment>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "scroll",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-attachment"
- },
- "background-blend-mode": {
- syntax: "<blend-mode>#",
- media: "none",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Compositing and Blending"
- ],
- initial: "normal",
- appliesto: "allElementsSVGContainerGraphicsAndGraphicsReferencingElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-blend-mode"
- },
- "background-clip": {
- syntax: "<box>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "border-box",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-clip"
- },
- "background-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "transparent",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-color"
- },
- "background-image": {
- syntax: "<bg-image>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecifiedURLsAbsolute",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-image"
- },
- "background-origin": {
- syntax: "<box>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "padding-box",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-origin"
- },
- "background-position": {
- syntax: "<bg-position>#",
- media: "visual",
- inherited: false,
- animationType: "repeatableListOfSimpleListOfLpc",
- percentages: "referToSizeOfBackgroundPositioningAreaMinusBackgroundImageSize",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0% 0%",
- appliesto: "allElements",
- computed: "listEachItemTwoKeywordsOriginOffsets",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position"
- },
- "background-position-x": {
- syntax: "[ center | [ [ left | right | x-start | x-end ]? <length-percentage>? ]! ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToWidthOfBackgroundPositioningAreaMinusBackgroundImageHeight",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "left",
- appliesto: "allElements",
- computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-x"
- },
- "background-position-y": {
- syntax: "[ center | [ [ top | bottom | y-start | y-end ]? <length-percentage>? ]! ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToHeightOfBackgroundPositioningAreaMinusBackgroundImageHeight",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "top",
- appliesto: "allElements",
- computed: "listEachItemConsistingOfAbsoluteLengthPercentageAndOrigin",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-position-y"
- },
- "background-repeat": {
- syntax: "<repeat-style>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "repeat",
- appliesto: "allElements",
- computed: "listEachItemHasTwoKeywordsOnePerDimension",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-repeat"
- },
- "background-size": {
- syntax: "<bg-size>#",
- media: "visual",
- inherited: false,
- animationType: "repeatableListOfSimpleListOfLpc",
- percentages: "relativeToBackgroundPositioningArea",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "auto auto",
- appliesto: "allElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/background-size"
- },
- "block-overflow": {
- syntax: "clip | ellipsis | <string>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "clip",
- appliesto: "blockContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "experimental"
- },
- "block-size": {
- syntax: "<'width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "blockSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsWidthAndHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/block-size"
- },
- border: border,
- "border-block": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block"
- },
- "border-block-color": {
- syntax: "<'border-top-color'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-color"
- },
- "border-block-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-style"
- },
- "border-block-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-width"
- },
- "border-block-end": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-block-end-color",
- "border-block-end-style",
- "border-block-end-width"
- ],
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end"
- },
- "border-block-end-color": {
- syntax: "<'border-top-color'>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-color"
- },
- "border-block-end-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-style"
- },
- "border-block-end-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-end-width"
- },
- "border-block-start": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-block-start-color",
- "border-block-start-style",
- "border-block-start-width"
- ],
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-width",
- "border-style",
- "color"
- ],
- appliesto: "allElements",
- computed: [
- "border-width",
- "border-style",
- "border-block-start-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start"
- },
- "border-block-start-color": {
- syntax: "<'border-top-color'>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-color"
- },
- "border-block-start-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-style"
- },
- "border-block-start-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-block-start-width"
- },
- "border-bottom": {
- syntax: "<line-width> || <line-style> || <color>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-bottom-color",
- "border-bottom-style",
- "border-bottom-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-bottom-width",
- "border-bottom-style",
- "border-bottom-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-bottom-width",
- "border-bottom-style",
- "border-bottom-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom"
- },
- "border-bottom-color": {
- syntax: "<'border-top-color'>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-color"
- },
- "border-bottom-left-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-left-radius"
- },
- "border-bottom-right-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-right-radius"
- },
- "border-bottom-style": {
- syntax: "<line-style>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-style"
- },
- "border-bottom-width": {
- syntax: "<line-width>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthOr0IfBorderBottomStyleNoneOrHidden",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-bottom-width"
- },
- "border-collapse": {
- syntax: "collapse | separate",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Table"
- ],
- initial: "separate",
- appliesto: "tableElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-collapse"
- },
- "border-color": {
- syntax: "<color>{1,4}",
- media: "visual",
- inherited: false,
- animationType: [
- "border-bottom-color",
- "border-left-color",
- "border-right-color",
- "border-top-color"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-top-color",
- "border-right-color",
- "border-bottom-color",
- "border-left-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-bottom-color",
- "border-left-color",
- "border-right-color",
- "border-top-color"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-color"
- },
- "border-end-end-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-end-radius"
- },
- "border-end-start-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-end-start-radius"
- },
- "border-image": {
- syntax: "<'border-image-source'> || <'border-image-slice'> [ / <'border-image-width'> | / <'border-image-width'>? / <'border-image-outset'> ]? || <'border-image-repeat'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: [
- "border-image-slice",
- "border-image-width"
- ],
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-image-source",
- "border-image-slice",
- "border-image-width",
- "border-image-outset",
- "border-image-repeat"
- ],
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: [
- "border-image-outset",
- "border-image-repeat",
- "border-image-slice",
- "border-image-source",
- "border-image-width"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image"
- },
- "border-image-outset": {
- syntax: "[ <length> | <number> ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0",
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-outset"
- },
- "border-image-repeat": {
- syntax: "[ stretch | repeat | round | space ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "stretch",
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-repeat"
- },
- "border-image-slice": {
- syntax: "<number-percentage>{1,4} && fill?",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "referToSizeOfBorderImage",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "100%",
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: "oneToFourPercentagesOrAbsoluteLengthsPlusFill",
- order: "percentagesOrLengthsFollowedByFill",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-slice"
- },
- "border-image-source": {
- syntax: "none | <image>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: "noneOrImageWithAbsoluteURI",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-source"
- },
- "border-image-width": {
- syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "referToWidthOrHeightOfBorderImageArea",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "1",
- appliesto: "allElementsExceptTableElementsWhenCollapse",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-image-width"
- },
- "border-inline": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline"
- },
- "border-inline-end": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-inline-end-color",
- "border-inline-end-style",
- "border-inline-end-width"
- ],
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-width",
- "border-style",
- "color"
- ],
- appliesto: "allElements",
- computed: [
- "border-width",
- "border-style",
- "border-inline-end-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end"
- },
- "border-inline-color": {
- syntax: "<'border-top-color'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-color"
- },
- "border-inline-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-style"
- },
- "border-inline-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-width"
- },
- "border-inline-end-color": {
- syntax: "<'border-top-color'>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-color"
- },
- "border-inline-end-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-style"
- },
- "border-inline-end-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-end-width"
- },
- "border-inline-start": {
- syntax: "<'border-top-width'> || <'border-top-style'> || <'color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-inline-start-color",
- "border-inline-start-style",
- "border-inline-start-width"
- ],
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: [
- "border-width",
- "border-style",
- "color"
- ],
- appliesto: "allElements",
- computed: [
- "border-width",
- "border-style",
- "border-inline-start-color"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start"
- },
- "border-inline-start-color": {
- syntax: "<'border-top-color'>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-color"
- },
- "border-inline-start-style": {
- syntax: "<'border-top-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-style"
- },
- "border-inline-start-width": {
- syntax: "<'border-top-width'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthZeroIfBorderStyleNoneOrHidden",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-inline-start-width"
- },
- "border-left": {
- syntax: "<line-width> || <line-style> || <color>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-left-color",
- "border-left-style",
- "border-left-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-left-width",
- "border-left-style",
- "border-left-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-left-width",
- "border-left-style",
- "border-left-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left"
- },
- "border-left-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-color"
- },
- "border-left-style": {
- syntax: "<line-style>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-style"
- },
- "border-left-width": {
- syntax: "<line-width>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthOr0IfBorderLeftStyleNoneOrHidden",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-left-width"
- },
- "border-radius": {
- syntax: "<length-percentage>{1,4} [ / <length-percentage>{1,4} ]?",
- media: "visual",
- inherited: false,
- animationType: [
- "border-top-left-radius",
- "border-top-right-radius",
- "border-bottom-right-radius",
- "border-bottom-left-radius"
- ],
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-top-left-radius",
- "border-top-right-radius",
- "border-bottom-right-radius",
- "border-bottom-left-radius"
- ],
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: [
- "border-bottom-left-radius",
- "border-bottom-right-radius",
- "border-top-left-radius",
- "border-top-right-radius"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-radius"
- },
- "border-right": {
- syntax: "<line-width> || <line-style> || <color>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-right-color",
- "border-right-style",
- "border-right-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-right-width",
- "border-right-style",
- "border-right-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-right-width",
- "border-right-style",
- "border-right-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right"
- },
- "border-right-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-color"
- },
- "border-right-style": {
- syntax: "<line-style>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-style"
- },
- "border-right-width": {
- syntax: "<line-width>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthOr0IfBorderRightStyleNoneOrHidden",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-right-width"
- },
- "border-spacing": {
- syntax: "<length> <length>?",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Table"
- ],
- initial: "0",
- appliesto: "tableElements",
- computed: "twoAbsoluteLengths",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-spacing"
- },
- "border-start-end-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-end-radius"
- },
- "border-start-start-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-start-start-radius"
- },
- "border-style": {
- syntax: "<line-style>{1,4}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-top-style",
- "border-right-style",
- "border-bottom-style",
- "border-left-style"
- ],
- appliesto: "allElements",
- computed: [
- "border-bottom-style",
- "border-left-style",
- "border-right-style",
- "border-top-style"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-style"
- },
- "border-top": {
- syntax: "<line-width> || <line-style> || <color>",
- media: "visual",
- inherited: false,
- animationType: [
- "border-top-color",
- "border-top-style",
- "border-top-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- appliesto: "allElements",
- computed: [
- "border-top-width",
- "border-top-style",
- "border-top-color"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top"
- },
- "border-top-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-color"
- },
- "border-top-left-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-left-radius"
- },
- "border-top-right-radius": {
- syntax: "<length-percentage>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfBorderBox",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "0",
- appliesto: "allElementsUAsNotRequiredWhenCollapse",
- computed: "twoAbsoluteLengthOrPercentages",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-right-radius"
- },
- "border-top-style": {
- syntax: "<line-style>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-style"
- },
- "border-top-width": {
- syntax: "<line-width>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLengthOr0IfBorderTopStyleNoneOrHidden",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-top-width"
- },
- "border-width": {
- syntax: "<line-width>{1,4}",
- media: "visual",
- inherited: false,
- animationType: [
- "border-bottom-width",
- "border-left-width",
- "border-right-width",
- "border-top-width"
- ],
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: [
- "border-top-width",
- "border-right-width",
- "border-bottom-width",
- "border-left-width"
- ],
- appliesto: "allElements",
- computed: [
- "border-bottom-width",
- "border-left-width",
- "border-right-width",
- "border-top-width"
- ],
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/border-width"
- },
- bottom: bottom,
- "box-align": {
- syntax: "start | center | end | baseline | stretch",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "stretch",
- appliesto: "elementsWithDisplayBoxOrInlineBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-align"
- },
- "box-decoration-break": {
- syntax: "slice | clone",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "slice",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-decoration-break"
- },
- "box-direction": {
- syntax: "normal | reverse | inherit",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "normal",
- appliesto: "elementsWithDisplayBoxOrInlineBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-direction"
- },
- "box-flex": {
- syntax: "<number>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "0",
- appliesto: "directChildrenOfElementsWithDisplayMozBoxMozInlineBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex"
- },
- "box-flex-group": {
- syntax: "<integer>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "1",
- appliesto: "inFlowChildrenOfBoxElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-flex-group"
- },
- "box-lines": {
- syntax: "single | multiple",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "single",
- appliesto: "boxElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-lines"
- },
- "box-ordinal-group": {
- syntax: "<integer>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "1",
- appliesto: "childrenOfBoxElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-ordinal-group"
- },
- "box-orient": {
- syntax: "horizontal | vertical | inline-axis | block-axis | inherit",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "inlineAxisHorizontalInXUL",
- appliesto: "elementsWithDisplayBoxOrInlineBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-orient"
- },
- "box-pack": {
- syntax: "start | center | end | justify",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions",
- "WebKit Extensions"
- ],
- initial: "start",
- appliesto: "elementsWithDisplayMozBoxMozInlineBox",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-pack"
- },
- "box-shadow": {
- syntax: "none | <shadow>#",
- media: "visual",
- inherited: false,
- animationType: "shadowList",
- percentages: "no",
- groups: [
- "CSS Backgrounds and Borders"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "absoluteLengthsSpecifiedColorAsSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-shadow"
- },
- "box-sizing": {
- syntax: "content-box | border-box",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "content-box",
- appliesto: "allElementsAcceptingWidthOrHeight",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/box-sizing"
- },
- "break-after": {
- syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "auto",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-after"
- },
- "break-before": {
- syntax: "auto | avoid | always | all | avoid-page | page | left | right | recto | verso | avoid-column | column | avoid-region | region",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "auto",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-before"
- },
- "break-inside": {
- syntax: "auto | avoid | avoid-page | avoid-column | avoid-region",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fragmentation"
- ],
- initial: "auto",
- appliesto: "blockLevelElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/break-inside"
- },
- "caption-side": {
- syntax: "top | bottom | block-start | block-end | inline-start | inline-end",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Table"
- ],
- initial: "top",
- appliesto: "tableCaptionElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caption-side"
- },
- "caret-color": {
- syntax: "auto | <color>",
- media: "interactive",
- inherited: true,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asAutoOrColor",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/caret-color"
- },
- clear: clear,
- clip: clip,
- "clip-path": {
- syntax: "<clip-source> | [ <basic-shape> || <geometry-box> ] | none",
- media: "visual",
- inherited: false,
- animationType: "basicShapeOtherwiseNo",
- percentages: "referToReferenceBoxWhenSpecifiedOtherwiseBorderBox",
- groups: [
- "CSS Masking"
- ],
- initial: "none",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedURLsAbsolute",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/clip-path"
- },
- color: color,
- "color-adjust": {
- syntax: "economy | exact",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Color"
- ],
- initial: "economy",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/color-adjust"
- },
- "column-count": {
- syntax: "<integer> | auto",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "auto",
- appliesto: "blockContainersExceptTableWrappers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-count"
- },
- "column-fill": {
- syntax: "auto | balance | balance-all",
- media: "visualInContinuousMediaNoEffectInOverflowColumns",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "balance",
- appliesto: "multicolElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-fill"
- },
- "column-gap": {
- syntax: "normal | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "multiColumnElementsFlexContainersGridContainers",
- computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
- },
- "column-rule": {
- syntax: "<'column-rule-width'> || <'column-rule-style'> || <'column-rule-color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "column-rule-color",
- "column-rule-style",
- "column-rule-width"
- ],
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: [
- "column-rule-width",
- "column-rule-style",
- "column-rule-color"
- ],
- appliesto: "multicolElements",
- computed: [
- "column-rule-color",
- "column-rule-style",
- "column-rule-width"
- ],
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule"
- },
- "column-rule-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "currentcolor",
- appliesto: "multicolElements",
- computed: "computedColor",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-color"
- },
- "column-rule-style": {
- syntax: "<'border-style'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "none",
- appliesto: "multicolElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-style"
- },
- "column-rule-width": {
- syntax: "<'border-width'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "medium",
- appliesto: "multicolElements",
- computed: "absoluteLength0IfColumnRuleStyleNoneOrHidden",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-rule-width"
- },
- "column-span": {
- syntax: "none | all",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "none",
- appliesto: "inFlowBlockLevelElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-span"
- },
- "column-width": {
- syntax: "<length> | auto",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Columns"
- ],
- initial: "auto",
- appliesto: "blockContainersExceptTableWrappers",
- computed: "absoluteLengthZeroOrLarger",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-width"
- },
- columns: columns,
- contain: contain,
- content: content,
- "counter-increment": {
- syntax: "[ <custom-ident> <integer>? ]+ | none",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Counter Styles"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-increment"
- },
- "counter-reset": {
- syntax: "[ <custom-ident> <integer>? ]+ | none",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Counter Styles"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-reset"
- },
- "counter-set": {
- syntax: "[ <custom-ident> <integer>? ]+ | none",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Counter Styles"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/counter-set"
- },
- cursor: cursor,
- direction: direction,
- display: display,
- "empty-cells": {
- syntax: "show | hide",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Table"
- ],
- initial: "show",
- appliesto: "tableCellElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/empty-cells"
- },
- filter: filter,
- flex: flex,
- "flex-basis": {
- syntax: "content | <'width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToFlexContainersInnerMainSize",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "auto",
- appliesto: "flexItemsAndInFlowPseudos",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "lengthOrPercentageBeforeKeywordIfBothPresent",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-basis"
- },
- "flex-direction": {
- syntax: "row | row-reverse | column | column-reverse",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "row",
- appliesto: "flexContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-direction"
- },
- "flex-flow": {
- syntax: "<'flex-direction'> || <'flex-wrap'>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: [
- "flex-direction",
- "flex-wrap"
- ],
- appliesto: "flexContainers",
- computed: [
- "flex-direction",
- "flex-wrap"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-flow"
- },
- "flex-grow": {
- syntax: "<number>",
- media: "visual",
- inherited: false,
- animationType: "number",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "0",
- appliesto: "flexItemsAndInFlowPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-grow"
- },
- "flex-shrink": {
- syntax: "<number>",
- media: "visual",
- inherited: false,
- animationType: "number",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "1",
- appliesto: "flexItemsAndInFlowPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-shrink"
- },
- "flex-wrap": {
- syntax: "nowrap | wrap | wrap-reverse",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Flexible Box Layout"
- ],
- initial: "nowrap",
- appliesto: "flexContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/flex-wrap"
- },
- float: float,
- font: font,
- "font-family": {
- syntax: "[ <family-name> | <generic-family> ]#",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "dependsOnUserAgent",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-family"
- },
- "font-feature-settings": {
- syntax: "normal | <feature-tag-value>#",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-feature-settings"
- },
- "font-kerning": {
- syntax: "auto | normal | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-kerning"
- },
- "font-language-override": {
- syntax: "normal | <string>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-language-override"
- },
- "font-optical-sizing": {
- syntax: "auto | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-optical-sizing"
- },
- "font-variation-settings": {
- syntax: "normal | [ <string> <number> ]#",
- media: "visual",
- inherited: true,
- animationType: "transform",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variation-settings"
- },
- "font-size": {
- syntax: "<absolute-size> | <relative-size> | <length-percentage>",
- media: "visual",
- inherited: true,
- animationType: "length",
- percentages: "referToParentElementsFontSize",
- groups: [
- "CSS Fonts"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size"
- },
- "font-size-adjust": {
- syntax: "none | <number>",
- media: "visual",
- inherited: true,
- animationType: "number",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-size-adjust"
- },
- "font-smooth": {
- syntax: "auto | never | always | <absolute-size> | <length>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-smooth"
- },
- "font-stretch": {
- syntax: "<font-stretch-absolute>",
- media: "visual",
- inherited: true,
- animationType: "fontStretch",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-stretch"
- },
- "font-style": {
- syntax: "normal | italic | oblique <angle>?",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-style"
- },
- "font-synthesis": {
- syntax: "none | [ weight || style ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "weight style",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-synthesis"
- },
- "font-variant": {
- 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 ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant"
- },
- "font-variant-alternates": {
- 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> ) ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-alternates"
- },
- "font-variant-caps": {
- syntax: "normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-caps"
- },
- "font-variant-east-asian": {
- syntax: "normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-east-asian"
- },
- "font-variant-ligatures": {
- syntax: "normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-ligatures"
- },
- "font-variant-numeric": {
- syntax: "normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-numeric"
- },
- "font-variant-position": {
- syntax: "normal | sub | super",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-variant-position"
- },
- "font-weight": {
- syntax: "<font-weight-absolute> | bolder | lighter",
- media: "visual",
- inherited: true,
- animationType: "fontWeight",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "keywordOrNumericalValueBolderLighterTransformedToRealValue",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/font-weight"
- },
- gap: gap,
- grid: grid,
- "grid-area": {
- syntax: "<grid-line> [ / <grid-line> ]{0,3}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-row-start",
- "grid-column-start",
- "grid-row-end",
- "grid-column-end"
- ],
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: [
- "grid-row-start",
- "grid-column-start",
- "grid-row-end",
- "grid-column-end"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-area"
- },
- "grid-auto-columns": {
- syntax: "<track-size>+",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridContainers",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-columns"
- },
- "grid-auto-flow": {
- syntax: "[ row | column ] || dense",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "row",
- appliesto: "gridContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-flow"
- },
- "grid-auto-rows": {
- syntax: "<track-size>+",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridContainers",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-auto-rows"
- },
- "grid-column": {
- syntax: "<grid-line> [ / <grid-line> ]?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-column-start",
- "grid-column-end"
- ],
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: [
- "grid-column-start",
- "grid-column-end"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column"
- },
- "grid-column-end": {
- syntax: "<grid-line>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-end"
- },
- "grid-column-gap": {
- syntax: "<length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "0",
- appliesto: "gridContainers",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/column-gap"
- },
- "grid-column-start": {
- syntax: "<grid-line>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-column-start"
- },
- "grid-gap": {
- syntax: "<'grid-row-gap'> <'grid-column-gap'>?",
- media: "visual",
- inherited: false,
- animationType: [
- "grid-row-gap",
- "grid-column-gap"
- ],
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-row-gap",
- "grid-column-gap"
- ],
- appliesto: "gridContainers",
- computed: [
- "grid-row-gap",
- "grid-column-gap"
- ],
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/gap"
- },
- "grid-row": {
- syntax: "<grid-line> [ / <grid-line> ]?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-row-start",
- "grid-row-end"
- ],
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: [
- "grid-row-start",
- "grid-row-end"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row"
- },
- "grid-row-end": {
- syntax: "<grid-line>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-end"
- },
- "grid-row-gap": {
- syntax: "<length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "0",
- appliesto: "gridContainers",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
- },
- "grid-row-start": {
- syntax: "<grid-line>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "auto",
- appliesto: "gridItemsAndBoxesWithinGridContainer",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-row-start"
- },
- "grid-template": {
- syntax: "none | [ <'grid-template-rows'> / <'grid-template-columns'> ] | [ <line-names>? <string> <track-size>? <line-names>? ]+ [ / <explicit-track-list> ]?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: [
- "grid-template-columns",
- "grid-template-rows"
- ],
- groups: [
- "CSS Grid Layout"
- ],
- initial: [
- "grid-template-columns",
- "grid-template-rows",
- "grid-template-areas"
- ],
- appliesto: "gridContainers",
- computed: [
- "grid-template-columns",
- "grid-template-rows",
- "grid-template-areas"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template"
- },
- "grid-template-areas": {
- syntax: "none | <string>+",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "none",
- appliesto: "gridContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-areas"
- },
- "grid-template-columns": {
- syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpcDifferenceLpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "none",
- appliesto: "gridContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-columns"
- },
- "grid-template-rows": {
- syntax: "none | <track-list> | <auto-track-list> | subgrid <line-name-list>?",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpcDifferenceLpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Grid Layout"
- ],
- initial: "none",
- appliesto: "gridContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/grid-template-rows"
- },
- "hanging-punctuation": {
- syntax: "none | [ first || [ force-end | allow-end ] || last ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/hanging-punctuation"
- },
- height: height,
- hyphens: hyphens,
- "image-orientation": {
- syntax: "from-image | <angle> | [ <angle>? flip ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Images"
- ],
- initial: "0deg",
- appliesto: "allElements",
- computed: "angleRoundedToNextQuarter",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-orientation"
- },
- "image-rendering": {
- syntax: "auto | crisp-edges | pixelated",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Images"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/image-rendering"
- },
- "image-resolution": {
- syntax: "[ from-image || <resolution> ] && snap?",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Images"
- ],
- initial: "1dppx",
- appliesto: "allElements",
- computed: "asSpecifiedWithExceptionOfResolution",
- order: "uniqueOrder",
- status: "experimental"
- },
- "ime-mode": {
- syntax: "auto | normal | active | inactive | disabled",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "textFields",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ime-mode"
- },
- "initial-letter": {
- syntax: "normal | [ <number> <integer>? ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Inline"
- ],
- initial: "normal",
- appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter"
- },
- "initial-letter-align": {
- syntax: "[ auto | alphabetic | hanging | ideographic ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Inline"
- ],
- initial: "auto",
- appliesto: "firstLetterPseudoElementsAndInlineLevelFirstChildren",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/initial-letter-align"
- },
- "inline-size": {
- syntax: "<'width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "inlineSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsWidthAndHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inline-size"
- },
- inset: inset,
- "inset-block": {
- syntax: "<'top'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalHeightOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block"
- },
- "inset-block-end": {
- syntax: "<'top'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalHeightOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-end"
- },
- "inset-block-start": {
- syntax: "<'top'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalHeightOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-block-start"
- },
- "inset-inline": {
- syntax: "<'top'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline"
- },
- "inset-inline-end": {
- syntax: "<'top'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-end"
- },
- "inset-inline-start": {
- syntax: "<'top'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "sameAsBoxOffsets",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/inset-inline-start"
- },
- isolation: isolation,
- "justify-content": {
- syntax: "normal | <content-distribution> | <overflow-position>? [ <content-position> | left | right ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "flexContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-content"
- },
- "justify-items": {
- syntax: "normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ] | legacy | legacy && [ left | right | center ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "legacy",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-items"
- },
- "justify-self": {
- syntax: "auto | normal | stretch | <baseline-position> | <overflow-position>? [ <self-position> | left | right ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "auto",
- appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/justify-self"
- },
- left: left,
- "letter-spacing": {
- syntax: "normal | <length>",
- media: "visual",
- inherited: true,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "optimumValueOfAbsoluteLengthOrNormal",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/letter-spacing"
- },
- "line-break": {
- syntax: "auto | loose | normal | strict | anywhere",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-break"
- },
- "line-clamp": {
- syntax: "none | <integer>",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "none",
- appliesto: "blockContainersExceptMultiColumnContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "experimental"
- },
- "line-height": {
- syntax: "normal | <number> | <length> | <percentage>",
- media: "visual",
- inherited: true,
- animationType: "numberOrLength",
- percentages: "referToElementFontSize",
- groups: [
- "CSS Fonts"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "absoluteLengthOrAsSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height"
- },
- "line-height-step": {
- syntax: "<length>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Fonts"
- ],
- initial: "0",
- appliesto: "blockContainers",
- computed: "absoluteLength",
- order: "perGrammar",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/line-height-step"
- },
- "list-style": {
- syntax: "<'list-style-type'> || <'list-style-position'> || <'list-style-image'>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Lists and Counters"
- ],
- initial: [
- "list-style-type",
- "list-style-position",
- "list-style-image"
- ],
- appliesto: "listItems",
- computed: [
- "list-style-image",
- "list-style-position",
- "list-style-type"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style"
- },
- "list-style-image": {
- syntax: "<url> | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Lists and Counters"
- ],
- initial: "none",
- appliesto: "listItems",
- computed: "noneOrImageWithAbsoluteURI",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-image"
- },
- "list-style-position": {
- syntax: "inside | outside",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Lists and Counters"
- ],
- initial: "outside",
- appliesto: "listItems",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-position"
- },
- "list-style-type": {
- syntax: "<counter-style> | <string> | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Lists and Counters"
- ],
- initial: "disc",
- appliesto: "listItems",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/list-style-type"
- },
- margin: margin,
- "margin-block": {
- syntax: "<'margin-left'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block"
- },
- "margin-block-end": {
- syntax: "<'margin-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-end"
- },
- "margin-block-start": {
- syntax: "<'margin-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-block-start"
- },
- "margin-bottom": {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-bottom"
- },
- "margin-inline": {
- syntax: "<'margin-left'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline"
- },
- "margin-inline-end": {
- syntax: "<'margin-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-end"
- },
- "margin-inline-start": {
- syntax: "<'margin-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "dependsOnLayoutModel",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsMargin",
- computed: "lengthAbsolutePercentageAsSpecifiedOtherwiseAuto",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-inline-start"
- },
- "margin-left": {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-left"
- },
- "margin-right": {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-right"
- },
- "margin-top": {
- syntax: "<length> | <percentage> | auto",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-top"
- },
- "margin-trim": {
- syntax: "none | in-flow | all",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "none",
- appliesto: "blockContainersAndMultiColumnContainers",
- computed: "asSpecified",
- order: "perGrammar",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/margin-trim"
- },
- mask: mask,
- "mask-border": {
- syntax: "<'mask-border-source'> || <'mask-border-slice'> [ / <'mask-border-width'>? [ / <'mask-border-outset'> ]? ]? || <'mask-border-repeat'> || <'mask-border-mode'>",
- media: "visual",
- inherited: false,
- animationType: [
- "mask-border-mode",
- "mask-border-outset",
- "mask-border-repeat",
- "mask-border-slice",
- "mask-border-source",
- "mask-border-width"
- ],
- percentages: [
- "mask-border-slice",
- "mask-border-width"
- ],
- groups: [
- "CSS Masking"
- ],
- initial: [
- "mask-border-mode",
- "mask-border-outset",
- "mask-border-repeat",
- "mask-border-slice",
- "mask-border-source",
- "mask-border-width"
- ],
- appliesto: "allElementsSVGContainerElements",
- computed: [
- "mask-border-mode",
- "mask-border-outset",
- "mask-border-repeat",
- "mask-border-slice",
- "mask-border-source",
- "mask-border-width"
- ],
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border"
- },
- "mask-border-mode": {
- syntax: "luminance | alpha",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "alpha",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-mode"
- },
- "mask-border-outset": {
- syntax: "[ <length> | <number> ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "0",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-outset"
- },
- "mask-border-repeat": {
- syntax: "[ stretch | repeat | round | space ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "stretch",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-repeat"
- },
- "mask-border-slice": {
- syntax: "<number-percentage>{1,4} fill?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "referToSizeOfMaskBorderImage",
- groups: [
- "CSS Masking"
- ],
- initial: "0",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-slice"
- },
- "mask-border-source": {
- syntax: "none | <image>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "none",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedURLsAbsolute",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-source"
- },
- "mask-border-width": {
- syntax: "[ <length-percentage> | <number> | auto ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "relativeToMaskBorderImageArea",
- groups: [
- "CSS Masking"
- ],
- initial: "auto",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-border-width"
- },
- "mask-clip": {
- syntax: "[ <geometry-box> | no-clip ]#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "border-box",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-clip"
- },
- "mask-composite": {
- syntax: "<compositing-operator>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "add",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-composite"
- },
- "mask-image": {
- syntax: "<mask-reference>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "none",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedURLsAbsolute",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-image"
- },
- "mask-mode": {
- syntax: "<masking-mode>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "match-source",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-mode"
- },
- "mask-origin": {
- syntax: "<geometry-box>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "border-box",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-origin"
- },
- "mask-position": {
- syntax: "<position>#",
- media: "visual",
- inherited: false,
- animationType: "repeatableListOfSimpleListOfLpc",
- percentages: "referToSizeOfMaskPaintingArea",
- groups: [
- "CSS Masking"
- ],
- initial: "center",
- appliesto: "allElementsSVGContainerElements",
- computed: "consistsOfTwoKeywordsForOriginAndOffsets",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-position"
- },
- "mask-repeat": {
- syntax: "<repeat-style>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "no-repeat",
- appliesto: "allElementsSVGContainerElements",
- computed: "consistsOfTwoDimensionKeywords",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-repeat"
- },
- "mask-size": {
- syntax: "<bg-size>#",
- media: "visual",
- inherited: false,
- animationType: "repeatableListOfSimpleListOfLpc",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "auto",
- appliesto: "allElementsSVGContainerElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-size"
- },
- "mask-type": {
- syntax: "luminance | alpha",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Masking"
- ],
- initial: "luminance",
- appliesto: "maskElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mask-type"
- },
- "max-block-size": {
- syntax: "<'max-width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "blockSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsMaxWidthAndMaxHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-block-size"
- },
- "max-height": {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentagesNone",
- groups: [
- "CSS Box Model"
- ],
- initial: "none",
- appliesto: "allElementsButNonReplacedAndTableColumns",
- computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-height"
- },
- "max-inline-size": {
- syntax: "<'max-width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "inlineSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsMaxWidthAndMaxHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-inline-size"
- },
- "max-lines": {
- syntax: "none | <integer>",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "none",
- appliesto: "blockContainersExceptMultiColumnContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "experimental"
- },
- "max-width": {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "none",
- appliesto: "allElementsButNonReplacedAndTableRows",
- computed: "percentageAsSpecifiedAbsoluteLengthOrNone",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/max-width"
- },
- "min-block-size": {
- syntax: "<'min-width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "blockSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsMinWidthAndMinHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-block-size"
- },
- "min-height": {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "regardingHeightOfGeneratedBoxContainingBlockPercentages0",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "allElementsButNonReplacedAndTableColumns",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-height"
- },
- "min-inline-size": {
- syntax: "<'min-width'>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "inlineSizeOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "sameAsWidthAndHeight",
- computed: "sameAsMinWidthAndMinHeight",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-inline-size"
- },
- "min-width": {
- syntax: "auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "allElementsButNonReplacedAndTableRows",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/min-width"
- },
- "mix-blend-mode": {
- syntax: "<blend-mode>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Compositing and Blending"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/mix-blend-mode"
- },
- "object-fit": {
- syntax: "fill | contain | cover | none | scale-down",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Images"
- ],
- initial: "fill",
- appliesto: "replacedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-fit"
- },
- "object-position": {
- syntax: "<position>",
- media: "visual",
- inherited: true,
- animationType: "repeatableListOfSimpleListOfLpc",
- percentages: "referToWidthAndHeightOfElement",
- groups: [
- "CSS Images"
- ],
- initial: "50% 50%",
- appliesto: "replacedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/object-position"
- },
- offset: offset,
- "offset-anchor": {
- syntax: "auto | <position>",
- media: "visual",
- inherited: false,
- animationType: "position",
- percentages: "relativeToWidthAndHeight",
- groups: [
- "CSS Motion Path"
- ],
- initial: "auto",
- appliesto: "transformableElements",
- computed: "forLengthAbsoluteValueOtherwisePercentage",
- order: "perGrammar",
- status: "standard"
- },
- "offset-distance": {
- syntax: "<length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToTotalPathLength",
- groups: [
- "CSS Motion Path"
- ],
- initial: "0",
- appliesto: "transformableElements",
- computed: "forLengthAbsoluteValueOtherwisePercentage",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-distance"
- },
- "offset-path": {
- syntax: "none | ray( [ <angle> && <size>? && contain? ] ) | <path()> | <url> | [ <basic-shape> || <geometry-box> ]",
- media: "visual",
- inherited: false,
- animationType: "angleOrBasicShapeOrPath",
- percentages: "no",
- groups: [
- "CSS Motion Path"
- ],
- initial: "none",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "perGrammar",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-path"
- },
- "offset-position": {
- syntax: "auto | <position>",
- media: "visual",
- inherited: false,
- animationType: "position",
- percentages: "referToSizeOfContainingBlock",
- groups: [
- "CSS Motion Path"
- ],
- initial: "auto",
- appliesto: "transformableElements",
- computed: "forLengthAbsoluteValueOtherwisePercentage",
- order: "perGrammar",
- status: "experimental"
- },
- "offset-rotate": {
- syntax: "[ auto | reverse ] || <angle>",
- media: "visual",
- inherited: false,
- animationType: "angleOrBasicShapeOrPath",
- percentages: "no",
- groups: [
- "CSS Motion Path"
- ],
- initial: "auto",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/offset-rotate"
- },
- opacity: opacity,
- order: order,
- orphans: orphans,
- outline: outline,
- "outline-color": {
- syntax: "<color> | invert",
- media: [
- "visual",
- "interactive"
- ],
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "invertOrCurrentColor",
- appliesto: "allElements",
- computed: "invertForTranslucentColorRGBAOtherwiseRGB",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-color"
- },
- "outline-offset": {
- syntax: "<length>",
- media: [
- "visual",
- "interactive"
- ],
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-offset"
- },
- "outline-style": {
- syntax: "auto | <'border-style'>",
- media: [
- "visual",
- "interactive"
- ],
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-style"
- },
- "outline-width": {
- syntax: "<line-width>",
- media: [
- "visual",
- "interactive"
- ],
- inherited: false,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "medium",
- appliesto: "allElements",
- computed: "absoluteLength0ForNone",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/outline-width"
- },
- overflow: overflow,
- "overflow-anchor": {
- syntax: "auto | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Anchoring"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard"
- },
- "overflow-block": {
- syntax: "visible | hidden | clip | scroll | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "auto",
- appliesto: "blockContainersFlexContainersGridContainers",
- computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
- order: "perGrammar",
- status: "standard"
- },
- "overflow-clip-box": {
- syntax: "padding-box | content-box",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Mozilla Extensions"
- ],
- initial: "padding-box",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Mozilla/CSS/overflow-clip-box"
- },
- "overflow-inline": {
- syntax: "visible | hidden | clip | scroll | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "auto",
- appliesto: "blockContainersFlexContainersGridContainers",
- computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
- order: "perGrammar",
- status: "standard"
- },
- "overflow-wrap": {
- syntax: "normal | break-word | anywhere",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "nonReplacedInlineElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
- },
- "overflow-x": {
- syntax: "visible | hidden | clip | scroll | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "visible",
- appliesto: "blockContainersFlexContainersGridContainers",
- computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-x"
- },
- "overflow-y": {
- syntax: "visible | hidden | clip | scroll | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Overflow"
- ],
- initial: "visible",
- appliesto: "blockContainersFlexContainersGridContainers",
- computed: "asSpecifiedButVisibleOrClipReplacedToAutoOrHiddenIfOtherValueDifferent",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-y"
- },
- "overscroll-behavior": {
- syntax: "[ contain | none | auto ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior"
- },
- "overscroll-behavior-block": {
- syntax: "contain | none | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-block"
- },
- "overscroll-behavior-inline": {
- syntax: "contain | none | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-inline"
- },
- "overscroll-behavior-x": {
- syntax: "contain | none | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-x"
- },
- "overscroll-behavior-y": {
- syntax: "contain | none | auto",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Model"
- ],
- initial: "auto",
- appliesto: "nonReplacedBlockAndInlineBlockElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overscroll-behavior-y"
- },
- padding: padding,
- "padding-block": {
- syntax: "<'padding-left'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block"
- },
- "padding-block-end": {
- syntax: "<'padding-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-end"
- },
- "padding-block-start": {
- syntax: "<'padding-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-block-start"
- },
- "padding-bottom": {
- syntax: "<length> | <percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptInternalTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-bottom"
- },
- "padding-inline": {
- syntax: "<'padding-left'>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline"
- },
- "padding-inline-end": {
- syntax: "<'padding-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-end"
- },
- "padding-inline-start": {
- syntax: "<'padding-left'>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "logicalWidthOfContainingBlock",
- groups: [
- "CSS Logical Properties"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-inline-start"
- },
- "padding-left": {
- syntax: "<length> | <percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptInternalTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-left"
- },
- "padding-right": {
- syntax: "<length> | <percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptInternalTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-right"
- },
- "padding-top": {
- syntax: "<length> | <percentage>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Box Model"
- ],
- initial: "0",
- appliesto: "allElementsExceptInternalTableDisplayTypes",
- computed: "percentageAsSpecifiedOrAbsoluteLength",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/padding-top"
- },
- "page-break-after": {
- syntax: "auto | always | avoid | left | right | recto | verso",
- media: [
- "visual",
- "paged"
- ],
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Pages"
- ],
- initial: "auto",
- appliesto: "blockElementsInNormalFlow",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-after"
- },
- "page-break-before": {
- syntax: "auto | always | avoid | left | right | recto | verso",
- media: [
- "visual",
- "paged"
- ],
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Pages"
- ],
- initial: "auto",
- appliesto: "blockElementsInNormalFlow",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-before"
- },
- "page-break-inside": {
- syntax: "auto | avoid",
- media: [
- "visual",
- "paged"
- ],
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Pages"
- ],
- initial: "auto",
- appliesto: "blockElementsInNormalFlow",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/page-break-inside"
- },
- "paint-order": {
- syntax: "normal | [ fill || stroke || markers ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "textElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/paint-order"
- },
- perspective: perspective,
- "perspective-origin": {
- syntax: "<position>",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpc",
- percentages: "referToSizeOfBoundingBox",
- groups: [
- "CSS Transforms"
- ],
- initial: "50% 50%",
- appliesto: "transformableElements",
- computed: "forLengthAbsoluteValueOtherwisePercentage",
- order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/perspective-origin"
- },
- "place-content": {
- syntax: "<'align-content'> <'justify-content'>?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "multilineFlexContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-content"
- },
- "place-items": {
- syntax: "<'align-items'> <'justify-items'>?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: [
- "align-items",
- "justify-items"
- ],
- appliesto: "allElements",
- computed: [
- "align-items",
- "justify-items"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-items"
- },
- "place-self": {
- syntax: "<'align-self'> <'justify-self'>?",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Box Alignment"
- ],
- initial: [
- "align-self",
- "justify-self"
- ],
- appliesto: "blockLevelBoxesAndAbsolutelyPositionedBoxesAndGridItems",
- computed: [
- "align-self",
- "justify-self"
- ],
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/place-self"
- },
- "pointer-events": {
- syntax: "auto | none | visiblePainted | visibleFill | visibleStroke | visible | painted | fill | stroke | all | inherit",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Pointer Events"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/pointer-events"
- },
- position: position,
- quotes: quotes,
- resize: resize,
- right: right,
- rotate: rotate,
- "row-gap": {
- syntax: "normal | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToDimensionOfContentArea",
- groups: [
- "CSS Box Alignment"
- ],
- initial: "normal",
- appliesto: "multiColumnElementsFlexContainersGridContainers",
- computed: "asSpecifiedWithLengthsAbsoluteAndNormalComputingToZeroExceptMultiColumn",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/row-gap"
- },
- "ruby-align": {
- syntax: "start | center | space-between | space-around",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Ruby"
- ],
- initial: "space-around",
- appliesto: "rubyBasesAnnotationsBaseAnnotationContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-align"
- },
- "ruby-merge": {
- syntax: "separate | collapse | auto",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Ruby"
- ],
- initial: "separate",
- appliesto: "rubyAnnotationsContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental"
- },
- "ruby-position": {
- syntax: "over | under | inter-character",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Ruby"
- ],
- initial: "over",
- appliesto: "rubyAnnotationsContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/ruby-position"
- },
- scale: scale,
- "scrollbar-color": {
- syntax: "auto | dark | light | <color>{2}",
- media: "visual",
- inherited: true,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Scrollbars"
- ],
- initial: "auto",
- appliesto: "scrollingBoxes",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-color"
- },
- "scrollbar-width": {
- syntax: "auto | thin | none",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scrollbars"
- ],
- initial: "auto",
- appliesto: "scrollingBoxes",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scrollbar-width"
- },
- "scroll-behavior": {
- syntax: "auto | smooth",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSSOM View"
- ],
- initial: "auto",
- appliesto: "scrollingBoxes",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-behavior"
- },
- "scroll-margin": {
- syntax: "<length>{1,4}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin"
- },
- "scroll-margin-block": {
- syntax: "<length>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block"
- },
- "scroll-margin-block-start": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-start"
- },
- "scroll-margin-block-end": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-block-end"
- },
- "scroll-margin-bottom": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-bottom"
- },
- "scroll-margin-inline": {
- syntax: "<length>{1,2}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline"
- },
- "scroll-margin-inline-start": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-start"
- },
- "scroll-margin-inline-end": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-inline-end"
- },
- "scroll-margin-left": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-left"
- },
- "scroll-margin-right": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-right"
- },
- "scroll-margin-top": {
- syntax: "<length>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-margin-top"
- },
- "scroll-padding": {
- syntax: "[ auto | <length-percentage> ]{1,4}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding"
- },
- "scroll-padding-block": {
- syntax: "[ auto | <length-percentage> ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block"
- },
- "scroll-padding-block-start": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-start"
- },
- "scroll-padding-block-end": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-block-end"
- },
- "scroll-padding-bottom": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-bottom"
- },
- "scroll-padding-inline": {
- syntax: "[ auto | <length-percentage> ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline"
- },
- "scroll-padding-inline-start": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-start"
- },
- "scroll-padding-inline-end": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-inline-end"
- },
- "scroll-padding-left": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-left"
- },
- "scroll-padding-right": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-right"
- },
- "scroll-padding-top": {
- syntax: "auto | <length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "relativeToTheScrollContainersScrollport",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "auto",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-padding-top"
- },
- "scroll-snap-align": {
- syntax: "[ none | start | end | center ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-align"
- },
- "scroll-snap-coordinate": {
- syntax: "none | <position>#",
- media: "interactive",
- inherited: false,
- animationType: "position",
- percentages: "referToBorderBox",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-coordinate"
- },
- "scroll-snap-destination": {
- syntax: "<position>",
- media: "interactive",
- inherited: false,
- animationType: "position",
- percentages: "relativeToScrollContainerPaddingBoxAxis",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "0px 0px",
- appliesto: "scrollContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-destination"
- },
- "scroll-snap-points-x": {
- syntax: "none | repeat( <length-percentage> )",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "relativeToScrollContainerPaddingBoxAxis",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "scrollContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-x"
- },
- "scroll-snap-points-y": {
- syntax: "none | repeat( <length-percentage> )",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "relativeToScrollContainerPaddingBoxAxis",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "scrollContainers",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-points-y"
- },
- "scroll-snap-stop": {
- syntax: "normal | always",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-stop"
- },
- "scroll-snap-type": {
- syntax: "none | [ x | y | block | inline | both ] [ mandatory | proximity ]?",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type"
- },
- "scroll-snap-type-x": {
- syntax: "none | mandatory | proximity",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-x"
- },
- "scroll-snap-type-y": {
- syntax: "none | mandatory | proximity",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Scroll Snap"
- ],
- initial: "none",
- appliesto: "scrollContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "obsolete",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/scroll-snap-type-y"
- },
- "shape-image-threshold": {
- syntax: "<alpha-value>",
- media: "visual",
- inherited: false,
- animationType: "number",
- percentages: "no",
- groups: [
- "CSS Shapes"
- ],
- initial: "0.0",
- appliesto: "floats",
- computed: "specifiedValueNumberClipped0To1",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-image-threshold"
- },
- "shape-margin": {
- syntax: "<length-percentage>",
- media: "visual",
- inherited: false,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Shapes"
- ],
- initial: "0",
- appliesto: "floats",
- computed: "asSpecifiedRelativeToAbsoluteLengths",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-margin"
- },
- "shape-outside": {
- syntax: "none | <shape-box> || <basic-shape> | <image>",
- media: "visual",
- inherited: false,
- animationType: "basicShapeOtherwiseNo",
- percentages: "no",
- groups: [
- "CSS Shapes"
- ],
- initial: "none",
- appliesto: "floats",
- computed: "asDefinedForBasicShapeWithAbsoluteURIOtherwiseAsSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/shape-outside"
- },
- "tab-size": {
- syntax: "<integer> | <length>",
- media: "visual",
- inherited: true,
- animationType: "length",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "8",
- appliesto: "blockContainers",
- computed: "specifiedIntegerOrAbsoluteLength",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/tab-size"
- },
- "table-layout": {
- syntax: "auto | fixed",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Table"
- ],
- initial: "auto",
- appliesto: "tableElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/table-layout"
- },
- "text-align": {
- syntax: "start | end | left | right | center | justify | match-parent",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "startOrNamelessValueIfLTRRightIfRTL",
- appliesto: "blockContainers",
- computed: "asSpecifiedExceptMatchParent",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align"
- },
- "text-align-last": {
- syntax: "auto | start | end | left | right | center | justify",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "auto",
- appliesto: "blockContainers",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-align-last"
- },
- "text-combine-upright": {
- syntax: "none | all | [ digits <integer>? ]",
- media: "visual",
- inherited: true,
- animationType: "notAnimatable",
- percentages: "no",
- groups: [
- "CSS Writing Modes"
- ],
- initial: "none",
- appliesto: "nonReplacedInlineElements",
- computed: "keywordPlusIntegerIfDigits",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-combine-upright"
- },
- "text-decoration": {
- syntax: "<'text-decoration-line'> || <'text-decoration-style'> || <'text-decoration-color'> || <'text-decoration-thickness'>",
- media: "visual",
- inherited: false,
- animationType: [
- "text-decoration-color",
- "text-decoration-style",
- "text-decoration-line",
- "text-decoration-thickness"
- ],
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: [
- "text-decoration-color",
- "text-decoration-style",
- "text-decoration-line"
- ],
- appliesto: "allElements",
- computed: [
- "text-decoration-line",
- "text-decoration-style",
- "text-decoration-color",
- "text-decoration-thickness"
- ],
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration"
- },
- "text-decoration-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-color"
- },
- "text-decoration-line": {
- syntax: "none | [ underline || overline || line-through || blink ] | spelling-error | grammar-error",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-line"
- },
- "text-decoration-skip": {
- syntax: "none | [ objects || [ spaces | [ leading-spaces || trailing-spaces ] ] || edges || box-decoration ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "objects",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip"
- },
- "text-decoration-skip-ink": {
- syntax: "auto | all | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-skip-ink"
- },
- "text-decoration-style": {
- syntax: "solid | double | dotted | dashed | wavy",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "solid",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-style"
- },
- "text-decoration-thickness": {
- syntax: "auto | from-font | <length> | <percentage> ",
- media: "visual",
- inherited: false,
- animationType: "byComputedValueType",
- percentages: "referToElementFontSize",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-decoration-thickness"
- },
- "text-emphasis": {
- syntax: "<'text-emphasis-style'> || <'text-emphasis-color'>",
- media: "visual",
- inherited: false,
- animationType: [
- "text-emphasis-color",
- "text-emphasis-style"
- ],
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: [
- "text-emphasis-style",
- "text-emphasis-color"
- ],
- appliesto: "allElements",
- computed: [
- "text-emphasis-style",
- "text-emphasis-color"
- ],
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis"
- },
- "text-emphasis-color": {
- syntax: "<color>",
- media: "visual",
- inherited: false,
- animationType: "color",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "currentcolor",
- appliesto: "allElements",
- computed: "computedColor",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-color"
- },
- "text-emphasis-position": {
- syntax: "[ over | under ] && [ right | left ]",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "over right",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-position"
- },
- "text-emphasis-style": {
- syntax: "none | [ [ filled | open ] || [ dot | circle | double-circle | triangle | sesame ] ] | <string>",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-emphasis-style"
- },
- "text-indent": {
- syntax: "<length-percentage> && hanging? && each-line?",
- media: "visual",
- inherited: true,
- animationType: "lpc",
- percentages: "referToWidthOfContainingBlock",
- groups: [
- "CSS Text"
- ],
- initial: "0",
- appliesto: "blockContainers",
- computed: "percentageOrAbsoluteLengthPlusKeywords",
- order: "lengthOrPercentageBeforeKeywords",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-indent"
- },
- "text-justify": {
- syntax: "auto | inter-character | inter-word | none",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "auto",
- appliesto: "inlineLevelAndTableCellElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-justify"
- },
- "text-orientation": {
- syntax: "mixed | upright | sideways",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Writing Modes"
- ],
- initial: "mixed",
- appliesto: "allElementsExceptTableRowGroupsRowsColumnGroupsAndColumns",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-orientation"
- },
- "text-overflow": {
- syntax: "[ clip | ellipsis | <string> ]{1,2}",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "clip",
- appliesto: "blockContainerElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-overflow"
- },
- "text-rendering": {
- syntax: "auto | optimizeSpeed | optimizeLegibility | geometricPrecision",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Miscellaneous"
- ],
- initial: "auto",
- appliesto: "textElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-rendering"
- },
- "text-shadow": {
- syntax: "none | <shadow-t>#",
- media: "visual",
- inherited: true,
- animationType: "shadowList",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "colorPlusThreeAbsoluteLengths",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-shadow"
- },
- "text-size-adjust": {
- syntax: "none | auto | <percentage>",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "referToSizeOfFont",
- groups: [
- "CSS Text"
- ],
- initial: "autoForSmartphoneBrowsersSupportingInflation",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "experimental",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-size-adjust"
- },
- "text-transform": {
- syntax: "none | capitalize | uppercase | lowercase | full-width | full-size-kana",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "none",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-transform"
- },
- "text-underline-offset": {
- syntax: "auto | <length> | <percentage> ",
- media: "visual",
- inherited: true,
- animationType: "byComputedValueType",
- percentages: "referToElementFontSize",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-offset"
- },
- "text-underline-position": {
- syntax: "auto | from-font | [ under || [ left | right ] ]",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text Decoration"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "orderOfAppearance",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/text-underline-position"
- },
- top: top,
- "touch-action": {
- syntax: "auto | none | [ [ pan-x | pan-left | pan-right ] || [ pan-y | pan-up | pan-down ] || pinch-zoom ] | manipulation",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "Pointer Events"
- ],
- initial: "auto",
- appliesto: "allElementsExceptNonReplacedInlineElementsTableRowsColumnsRowColumnGroups",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/touch-action"
- },
- transform: transform,
- "transform-box": {
- syntax: "content-box | border-box | fill-box | stroke-box | view-box",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "view-box",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "perGrammar",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-box"
- },
- "transform-origin": {
- syntax: "[ <length-percentage> | left | center | right | top | bottom ] | [ [ <length-percentage> | left | center | right ] && [ <length-percentage> | top | center | bottom ] ] <length>?",
- media: "visual",
- inherited: false,
- animationType: "simpleListOfLpc",
- percentages: "referToSizeOfBoundingBox",
- groups: [
- "CSS Transforms"
- ],
- initial: "50% 50% 0",
- appliesto: "transformableElements",
- computed: "forLengthAbsoluteValueOtherwisePercentage",
- order: "oneOrTwoValuesLengthAbsoluteKeywordsPercentages",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-origin"
- },
- "transform-style": {
- syntax: "flat | preserve-3d",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transforms"
- ],
- initial: "flat",
- appliesto: "transformableElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transform-style"
- },
- transition: transition,
- "transition-delay": {
- syntax: "<time>#",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transitions"
- ],
- initial: "0s",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-delay"
- },
- "transition-duration": {
- syntax: "<time>#",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transitions"
- ],
- initial: "0s",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-duration"
- },
- "transition-property": {
- syntax: "none | <single-transition-property>#",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transitions"
- ],
- initial: "all",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-property"
- },
- "transition-timing-function": {
- syntax: "<timing-function>#",
- media: "interactive",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Transitions"
- ],
- initial: "ease",
- appliesto: "allElementsAndPseudos",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/transition-timing-function"
- },
- translate: translate,
- "unicode-bidi": {
- syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Writing Modes"
- ],
- initial: "normal",
- appliesto: "allElementsSomeValuesNoEffectOnNonInlineElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/unicode-bidi"
- },
- "user-select": {
- syntax: "auto | text | none | contain | all",
- media: "visual",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Basic User Interface"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "nonstandard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/user-select"
- },
- "vertical-align": {
- syntax: "baseline | sub | super | text-top | text-bottom | middle | top | bottom | <percentage> | <length>",
- media: "visual",
- inherited: false,
- animationType: "length",
- percentages: "referToLineHeight",
- groups: [
- "CSS Table"
- ],
- initial: "baseline",
- appliesto: "inlineLevelAndTableCellElements",
- computed: "absoluteLengthOrKeyword",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/vertical-align"
- },
- visibility: visibility,
- "white-space": {
- syntax: "normal | pre | nowrap | pre-wrap | pre-line | break-spaces",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/white-space"
- },
- widows: widows,
- width: width,
- "will-change": {
- syntax: "auto | <animateable-feature>#",
- media: "all",
- inherited: false,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Will Change"
- ],
- initial: "auto",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/will-change"
- },
- "word-break": {
- syntax: "normal | break-all | keep-all | break-word",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-break"
- },
- "word-spacing": {
- syntax: "normal | <length-percentage>",
- media: "visual",
- inherited: true,
- animationType: "length",
- percentages: "referToWidthOfAffectedGlyph",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "allElements",
- computed: "optimumMinAndMaxValueOfAbsoluteLengthPercentageOrNormal",
- order: "uniqueOrder",
- alsoAppliesTo: [
- "::first-letter",
- "::first-line",
- "::placeholder"
- ],
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/word-spacing"
- },
- "word-wrap": {
- syntax: "normal | break-word",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Text"
- ],
- initial: "normal",
- appliesto: "nonReplacedInlineElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/overflow-wrap"
- },
- "writing-mode": {
- syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr",
- media: "visual",
- inherited: true,
- animationType: "discrete",
- percentages: "no",
- groups: [
- "CSS Writing Modes"
- ],
- initial: "horizontal-tb",
- appliesto: "allElementsExceptTableRowColumnGroupsTableRowsColumns",
- computed: "asSpecified",
- order: "uniqueOrder",
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/writing-mode"
- },
- "z-index": {
- syntax: "auto | <integer>",
- media: "visual",
- inherited: false,
- animationType: "integer",
- percentages: "no",
- groups: [
- "CSS Positioning"
- ],
- initial: "auto",
- appliesto: "positionedElements",
- computed: "asSpecified",
- order: "uniqueOrder",
- stacking: true,
- status: "standard",
- mdn_url: "https://developer.mozilla.org/docs/Web/CSS/z-index"
- },
- zoom: zoom
- };
- var properties$2 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- all: all,
- animation: animation,
- appearance: appearance,
- azimuth: azimuth,
- background: background,
- border: border,
- bottom: bottom,
- clear: clear,
- clip: clip,
- color: color,
- columns: columns,
- contain: contain,
- content: content,
- cursor: cursor,
- direction: direction,
- display: display,
- filter: filter,
- flex: flex,
- float: float,
- font: font,
- gap: gap,
- grid: grid,
- height: height,
- hyphens: hyphens,
- inset: inset,
- isolation: isolation,
- left: left,
- margin: margin,
- mask: mask,
- offset: offset,
- opacity: opacity,
- order: order,
- orphans: orphans,
- outline: outline,
- overflow: overflow,
- padding: padding,
- perspective: perspective,
- position: position,
- quotes: quotes,
- resize: resize,
- right: right,
- rotate: rotate,
- scale: scale,
- top: top,
- transform: transform,
- transition: transition,
- translate: translate,
- visibility: visibility,
- widows: widows,
- width: width,
- zoom: zoom,
- 'default': properties$1
- });
- var attachment = {
- syntax: "scroll | fixed | local"
- };
- var box = {
- syntax: "border-box | padding-box | content-box"
- };
- var color$1 = {
- syntax: "<rgb()> | <rgba()> | <hsl()> | <hsla()> | <hex-color> | <named-color> | currentcolor | <deprecated-system-color>"
- };
- var combinator = {
- syntax: "'>' | '+' | '~' | [ '||' ]"
- };
- var gradient = {
- syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()>"
- };
- var hue = {
- syntax: "<number> | <angle>"
- };
- var image = {
- syntax: "<url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>"
- };
- var nth = {
- syntax: "<an-plus-b> | even | odd"
- };
- var position$1 = {
- 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> ] ]"
- };
- var quote = {
- syntax: "open-quote | close-quote | no-open-quote | no-close-quote"
- };
- var shadow = {
- syntax: "inset? && <length>{2,4} && <color>?"
- };
- var shape$1 = {
- syntax: "rect(<top>, <right>, <bottom>, <left>)"
- };
- var size = {
- syntax: "closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}"
- };
- var symbol = {
- syntax: "<string> | <image> | <custom-ident>"
- };
- var target = {
- syntax: "<target-counter()> | <target-counters()> | <target-text()>"
- };
- var syntaxes = {
- "absolute-size": {
- syntax: "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large"
- },
- "alpha-value": {
- syntax: "<number> | <percentage>"
- },
- "angle-percentage": {
- syntax: "<angle> | <percentage>"
- },
- "angular-color-hint": {
- syntax: "<angle-percentage>"
- },
- "angular-color-stop": {
- syntax: "<color> && <color-stop-angle>?"
- },
- "angular-color-stop-list": {
- syntax: "[ <angular-color-stop> [, <angular-color-hint>]? ]# , <angular-color-stop>"
- },
- "animateable-feature": {
- syntax: "scroll-position | contents | <custom-ident>"
- },
- attachment: attachment,
- "attr()": {
- syntax: "attr( <attr-name> <type-or-unit>? [, <attr-fallback> ]? )"
- },
- "attr-matcher": {
- syntax: "[ '~' | '|' | '^' | '$' | '*' ]? '='"
- },
- "attr-modifier": {
- syntax: "i | s"
- },
- "attribute-selector": {
- syntax: "'[' <wq-name> ']' | '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'"
- },
- "auto-repeat": {
- syntax: "repeat( [ auto-fill | auto-fit ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
- },
- "auto-track-list": {
- syntax: "[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>? <auto-repeat>\n[ <line-names>? [ <fixed-size> | <fixed-repeat> ] ]* <line-names>?"
- },
- "baseline-position": {
- syntax: "[ first | last ]? baseline"
- },
- "basic-shape": {
- syntax: "<inset()> | <circle()> | <ellipse()> | <polygon()> | <path()>"
- },
- "bg-image": {
- syntax: "none | <image>"
- },
- "bg-layer": {
- syntax: "<bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
- },
- "bg-position": {
- 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>? ] ]"
- },
- "bg-size": {
- syntax: "[ <length-percentage> | auto ]{1,2} | cover | contain"
- },
- "blur()": {
- syntax: "blur( <length> )"
- },
- "blend-mode": {
- syntax: "normal | multiply | screen | overlay | darken | lighten | color-dodge | color-burn | hard-light | soft-light | difference | exclusion | hue | saturation | color | luminosity"
- },
- box: box,
- "brightness()": {
- syntax: "brightness( <number-percentage> )"
- },
- "calc()": {
- syntax: "calc( <calc-sum> )"
- },
- "calc-sum": {
- syntax: "<calc-product> [ [ '+' | '-' ] <calc-product> ]*"
- },
- "calc-product": {
- syntax: "<calc-value> [ '*' <calc-value> | '/' <number> ]*"
- },
- "calc-value": {
- syntax: "<number> | <dimension> | <percentage> | ( <calc-sum> )"
- },
- "cf-final-image": {
- syntax: "<image> | <color>"
- },
- "cf-mixing-image": {
- syntax: "<percentage>? && <image>"
- },
- "circle()": {
- syntax: "circle( [ <shape-radius> ]? [ at <position> ]? )"
- },
- "clamp()": {
- syntax: "clamp( <calc-sum>#{3} )"
- },
- "class-selector": {
- syntax: "'.' <ident-token>"
- },
- "clip-source": {
- syntax: "<url>"
- },
- color: color$1,
- "color-stop": {
- syntax: "<color-stop-length> | <color-stop-angle>"
- },
- "color-stop-angle": {
- syntax: "<angle-percentage>{1,2}"
- },
- "color-stop-length": {
- syntax: "<length-percentage>{1,2}"
- },
- "color-stop-list": {
- syntax: "[ <linear-color-stop> [, <linear-color-hint>]? ]# , <linear-color-stop>"
- },
- combinator: combinator,
- "common-lig-values": {
- syntax: "[ common-ligatures | no-common-ligatures ]"
- },
- "compat-auto": {
- syntax: "searchfield | textarea | push-button | slider-horizontal | checkbox | radio | square-button | menulist | listbox | meter | progress-bar | button"
- },
- "composite-style": {
- syntax: "clear | copy | source-over | source-in | source-out | source-atop | destination-over | destination-in | destination-out | destination-atop | xor"
- },
- "compositing-operator": {
- syntax: "add | subtract | intersect | exclude"
- },
- "compound-selector": {
- syntax: "[ <type-selector>? <subclass-selector>* [ <pseudo-element-selector> <pseudo-class-selector>* ]* ]!"
- },
- "compound-selector-list": {
- syntax: "<compound-selector>#"
- },
- "complex-selector": {
- syntax: "<compound-selector> [ <combinator>? <compound-selector> ]*"
- },
- "complex-selector-list": {
- syntax: "<complex-selector>#"
- },
- "conic-gradient()": {
- syntax: "conic-gradient( [ from <angle> ]? [ at <position> ]?, <angular-color-stop-list> )"
- },
- "contextual-alt-values": {
- syntax: "[ contextual | no-contextual ]"
- },
- "content-distribution": {
- syntax: "space-between | space-around | space-evenly | stretch"
- },
- "content-list": {
- syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> ]+"
- },
- "content-position": {
- syntax: "center | start | end | flex-start | flex-end"
- },
- "content-replacement": {
- syntax: "<image>"
- },
- "contrast()": {
- syntax: "contrast( [ <number-percentage> ] )"
- },
- "counter()": {
- syntax: "counter( <custom-ident>, <counter-style>? )"
- },
- "counter-style": {
- syntax: "<counter-style-name> | symbols()"
- },
- "counter-style-name": {
- syntax: "<custom-ident>"
- },
- "counters()": {
- syntax: "counters( <custom-ident>, <string>, <counter-style>? )"
- },
- "cross-fade()": {
- syntax: "cross-fade( <cf-mixing-image> , <cf-final-image>? )"
- },
- "cubic-bezier-timing-function": {
- syntax: "ease | ease-in | ease-out | ease-in-out | cubic-bezier(<number [0,1]>, <number>, <number [0,1]>, <number>)"
- },
- "deprecated-system-color": {
- 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"
- },
- "discretionary-lig-values": {
- syntax: "[ discretionary-ligatures | no-discretionary-ligatures ]"
- },
- "display-box": {
- syntax: "contents | none"
- },
- "display-inside": {
- syntax: "flow | flow-root | table | flex | grid | ruby"
- },
- "display-internal": {
- 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"
- },
- "display-legacy": {
- syntax: "inline-block | inline-list-item | inline-table | inline-flex | inline-grid"
- },
- "display-listitem": {
- syntax: "<display-outside>? && [ flow | flow-root ]? && list-item"
- },
- "display-outside": {
- syntax: "block | inline | run-in"
- },
- "drop-shadow()": {
- syntax: "drop-shadow( <length>{2,3} <color>? )"
- },
- "east-asian-variant-values": {
- syntax: "[ jis78 | jis83 | jis90 | jis04 | simplified | traditional ]"
- },
- "east-asian-width-values": {
- syntax: "[ full-width | proportional-width ]"
- },
- "element()": {
- syntax: "element( <id-selector> )"
- },
- "ellipse()": {
- syntax: "ellipse( [ <shape-radius>{2} ]? [ at <position> ]? )"
- },
- "ending-shape": {
- syntax: "circle | ellipse"
- },
- "env()": {
- syntax: "env( <custom-ident> , <declaration-value>? )"
- },
- "explicit-track-list": {
- syntax: "[ <line-names>? <track-size> ]+ <line-names>?"
- },
- "family-name": {
- syntax: "<string> | <custom-ident>+"
- },
- "feature-tag-value": {
- syntax: "<string> [ <integer> | on | off ]?"
- },
- "feature-type": {
- syntax: "@stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation"
- },
- "feature-value-block": {
- syntax: "<feature-type> '{' <feature-value-declaration-list> '}'"
- },
- "feature-value-block-list": {
- syntax: "<feature-value-block>+"
- },
- "feature-value-declaration": {
- syntax: "<custom-ident>: <integer>+;"
- },
- "feature-value-declaration-list": {
- syntax: "<feature-value-declaration>"
- },
- "feature-value-name": {
- syntax: "<custom-ident>"
- },
- "fill-rule": {
- syntax: "nonzero | evenodd"
- },
- "filter-function": {
- syntax: "<blur()> | <brightness()> | <contrast()> | <drop-shadow()> | <grayscale()> | <hue-rotate()> | <invert()> | <opacity()> | <saturate()> | <sepia()>"
- },
- "filter-function-list": {
- syntax: "[ <filter-function> | <url> ]+"
- },
- "final-bg-layer": {
- syntax: "<'background-color'> || <bg-image> || <bg-position> [ / <bg-size> ]? || <repeat-style> || <attachment> || <box> || <box>"
- },
- "fit-content()": {
- syntax: "fit-content( [ <length> | <percentage> ] )"
- },
- "fixed-breadth": {
- syntax: "<length-percentage>"
- },
- "fixed-repeat": {
- syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <fixed-size> ]+ <line-names>? )"
- },
- "fixed-size": {
- syntax: "<fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )"
- },
- "font-stretch-absolute": {
- syntax: "normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage>"
- },
- "font-variant-css21": {
- syntax: "[ normal | small-caps ]"
- },
- "font-weight-absolute": {
- syntax: "normal | bold | <number [1,1000]>"
- },
- "frequency-percentage": {
- syntax: "<frequency> | <percentage>"
- },
- "general-enclosed": {
- syntax: "[ <function-token> <any-value> ) ] | ( <ident> <any-value> )"
- },
- "generic-family": {
- syntax: "serif | sans-serif | cursive | fantasy | monospace"
- },
- "generic-name": {
- syntax: "serif | sans-serif | cursive | fantasy | monospace"
- },
- "geometry-box": {
- syntax: "<shape-box> | fill-box | stroke-box | view-box"
- },
- gradient: gradient,
- "grayscale()": {
- syntax: "grayscale( <number-percentage> )"
- },
- "grid-line": {
- syntax: "auto | <custom-ident> | [ <integer> && <custom-ident>? ] | [ span && [ <integer> || <custom-ident> ] ]"
- },
- "historical-lig-values": {
- syntax: "[ historical-ligatures | no-historical-ligatures ]"
- },
- "hsl()": {
- syntax: "hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsl( <hue>, <percentage>, <percentage>, <alpha-value>? )"
- },
- "hsla()": {
- syntax: "hsla( <hue> <percentage> <percentage> [ / <alpha-value> ]? ) | hsla( <hue>, <percentage>, <percentage>, <alpha-value>? )"
- },
- hue: hue,
- "hue-rotate()": {
- syntax: "hue-rotate( <angle> )"
- },
- "id-selector": {
- syntax: "<hash-token>"
- },
- image: image,
- "image()": {
- syntax: "image( <image-tags>? [ <image-src>? , <color>? ]! )"
- },
- "image-set()": {
- syntax: "image-set( <image-set-option># )"
- },
- "image-set-option": {
- syntax: "[ <image> | <string> ] <resolution>"
- },
- "image-src": {
- syntax: "<url> | <string>"
- },
- "image-tags": {
- syntax: "ltr | rtl"
- },
- "inflexible-breadth": {
- syntax: "<length> | <percentage> | min-content | max-content | auto"
- },
- "inset()": {
- syntax: "inset( <length-percentage>{1,4} [ round <'border-radius'> ]? )"
- },
- "invert()": {
- syntax: "invert( <number-percentage> )"
- },
- "keyframes-name": {
- syntax: "<custom-ident> | <string>"
- },
- "keyframe-block": {
- syntax: "<keyframe-selector># {\n <declaration-list>\n}"
- },
- "keyframe-block-list": {
- syntax: "<keyframe-block>+"
- },
- "keyframe-selector": {
- syntax: "from | to | <percentage>"
- },
- "leader()": {
- syntax: "leader( <leader-type> )"
- },
- "leader-type": {
- syntax: "dotted | solid | space | <string>"
- },
- "length-percentage": {
- syntax: "<length> | <percentage>"
- },
- "line-names": {
- syntax: "'[' <custom-ident>* ']'"
- },
- "line-name-list": {
- syntax: "[ <line-names> | <name-repeat> ]+"
- },
- "line-style": {
- syntax: "none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset"
- },
- "line-width": {
- syntax: "<length> | thin | medium | thick"
- },
- "linear-color-hint": {
- syntax: "<length-percentage>"
- },
- "linear-color-stop": {
- syntax: "<color> <color-stop-length>?"
- },
- "linear-gradient()": {
- syntax: "linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
- },
- "mask-layer": {
- syntax: "<mask-reference> || <position> [ / <bg-size> ]? || <repeat-style> || <geometry-box> || [ <geometry-box> | no-clip ] || <compositing-operator> || <masking-mode>"
- },
- "mask-position": {
- syntax: "[ <length-percentage> | left | center | right ] [ <length-percentage> | top | center | bottom ]?"
- },
- "mask-reference": {
- syntax: "none | <image> | <mask-source>"
- },
- "mask-source": {
- syntax: "<url>"
- },
- "masking-mode": {
- syntax: "alpha | luminance | match-source"
- },
- "matrix()": {
- syntax: "matrix( <number>#{6} )"
- },
- "matrix3d()": {
- syntax: "matrix3d( <number>#{16} )"
- },
- "max()": {
- syntax: "max( <calc-sum># )"
- },
- "media-and": {
- syntax: "<media-in-parens> [ and <media-in-parens> ]+"
- },
- "media-condition": {
- syntax: "<media-not> | <media-and> | <media-or> | <media-in-parens>"
- },
- "media-condition-without-or": {
- syntax: "<media-not> | <media-and> | <media-in-parens>"
- },
- "media-feature": {
- syntax: "( [ <mf-plain> | <mf-boolean> | <mf-range> ] )"
- },
- "media-in-parens": {
- syntax: "( <media-condition> ) | <media-feature> | <general-enclosed>"
- },
- "media-not": {
- syntax: "not <media-in-parens>"
- },
- "media-or": {
- syntax: "<media-in-parens> [ or <media-in-parens> ]+"
- },
- "media-query": {
- syntax: "<media-condition> | [ not | only ]? <media-type> [ and <media-condition-without-or> ]?"
- },
- "media-query-list": {
- syntax: "<media-query>#"
- },
- "media-type": {
- syntax: "<ident>"
- },
- "mf-boolean": {
- syntax: "<mf-name>"
- },
- "mf-name": {
- syntax: "<ident>"
- },
- "mf-plain": {
- syntax: "<mf-name> : <mf-value>"
- },
- "mf-range": {
- syntax: "<mf-name> [ '<' | '>' ]? '='? <mf-value>\n| <mf-value> [ '<' | '>' ]? '='? <mf-name>\n| <mf-value> '<' '='? <mf-name> '<' '='? <mf-value>\n| <mf-value> '>' '='? <mf-name> '>' '='? <mf-value>"
- },
- "mf-value": {
- syntax: "<number> | <dimension> | <ident> | <ratio>"
- },
- "min()": {
- syntax: "min( <calc-sum># )"
- },
- "minmax()": {
- syntax: "minmax( [ <length> | <percentage> | min-content | max-content | auto ] , [ <length> | <percentage> | <flex> | min-content | max-content | auto ] )"
- },
- "named-color": {
- 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"
- },
- "namespace-prefix": {
- syntax: "<ident>"
- },
- "ns-prefix": {
- syntax: "[ <ident-token> | '*' ]? '|'"
- },
- "number-percentage": {
- syntax: "<number> | <percentage>"
- },
- "numeric-figure-values": {
- syntax: "[ lining-nums | oldstyle-nums ]"
- },
- "numeric-fraction-values": {
- syntax: "[ diagonal-fractions | stacked-fractions ]"
- },
- "numeric-spacing-values": {
- syntax: "[ proportional-nums | tabular-nums ]"
- },
- nth: nth,
- "opacity()": {
- syntax: "opacity( [ <number-percentage> ] )"
- },
- "overflow-position": {
- syntax: "unsafe | safe"
- },
- "outline-radius": {
- syntax: "<length> | <percentage>"
- },
- "page-body": {
- syntax: "<declaration>? [ ; <page-body> ]? | <page-margin-box> <page-body>"
- },
- "page-margin-box": {
- syntax: "<page-margin-box-type> '{' <declaration-list> '}'"
- },
- "page-margin-box-type": {
- 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"
- },
- "page-selector-list": {
- syntax: "[ <page-selector># ]?"
- },
- "page-selector": {
- syntax: "<pseudo-page>+ | <ident> <pseudo-page>*"
- },
- "path()": {
- syntax: "path( [ <fill-rule>, ]? <string> )"
- },
- "paint()": {
- syntax: "paint( <ident>, <declaration-value>? )"
- },
- "perspective()": {
- syntax: "perspective( <length> )"
- },
- "polygon()": {
- syntax: "polygon( <fill-rule>? , [ <length-percentage> <length-percentage> ]# )"
- },
- position: position$1,
- "pseudo-class-selector": {
- syntax: "':' <ident-token> | ':' <function-token> <any-value> ')'"
- },
- "pseudo-element-selector": {
- syntax: "':' <pseudo-class-selector>"
- },
- "pseudo-page": {
- syntax: ": [ left | right | first | blank ]"
- },
- quote: quote,
- "radial-gradient()": {
- syntax: "radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
- },
- "relative-selector": {
- syntax: "<combinator>? <complex-selector>"
- },
- "relative-selector-list": {
- syntax: "<relative-selector>#"
- },
- "relative-size": {
- syntax: "larger | smaller"
- },
- "repeat-style": {
- syntax: "repeat-x | repeat-y | [ repeat | space | round | no-repeat ]{1,2}"
- },
- "repeating-linear-gradient()": {
- syntax: "repeating-linear-gradient( [ <angle> | to <side-or-corner> ]? , <color-stop-list> )"
- },
- "repeating-radial-gradient()": {
- syntax: "repeating-radial-gradient( [ <ending-shape> || <size> ]? [ at <position> ]? , <color-stop-list> )"
- },
- "rgb()": {
- syntax: "rgb( <percentage>{3} [ / <alpha-value> ]? ) | rgb( <number>{3} [ / <alpha-value> ]? ) | rgb( <percentage>#{3} , <alpha-value>? ) | rgb( <number>#{3} , <alpha-value>? )"
- },
- "rgba()": {
- syntax: "rgba( <percentage>{3} [ / <alpha-value> ]? ) | rgba( <number>{3} [ / <alpha-value> ]? ) | rgba( <percentage>#{3} , <alpha-value>? ) | rgba( <number>#{3} , <alpha-value>? )"
- },
- "rotate()": {
- syntax: "rotate( [ <angle> | <zero> ] )"
- },
- "rotate3d()": {
- syntax: "rotate3d( <number> , <number> , <number> , [ <angle> | <zero> ] )"
- },
- "rotateX()": {
- syntax: "rotateX( [ <angle> | <zero> ] )"
- },
- "rotateY()": {
- syntax: "rotateY( [ <angle> | <zero> ] )"
- },
- "rotateZ()": {
- syntax: "rotateZ( [ <angle> | <zero> ] )"
- },
- "saturate()": {
- syntax: "saturate( <number-percentage> )"
- },
- "scale()": {
- syntax: "scale( <number> , <number>? )"
- },
- "scale3d()": {
- syntax: "scale3d( <number> , <number> , <number> )"
- },
- "scaleX()": {
- syntax: "scaleX( <number> )"
- },
- "scaleY()": {
- syntax: "scaleY( <number> )"
- },
- "scaleZ()": {
- syntax: "scaleZ( <number> )"
- },
- "self-position": {
- syntax: "center | start | end | self-start | self-end | flex-start | flex-end"
- },
- "shape-radius": {
- syntax: "<length-percentage> | closest-side | farthest-side"
- },
- "skew()": {
- syntax: "skew( [ <angle> | <zero> ] , [ <angle> | <zero> ]? )"
- },
- "skewX()": {
- syntax: "skewX( [ <angle> | <zero> ] )"
- },
- "skewY()": {
- syntax: "skewY( [ <angle> | <zero> ] )"
- },
- "sepia()": {
- syntax: "sepia( <number-percentage> )"
- },
- shadow: shadow,
- "shadow-t": {
- syntax: "[ <length>{2,3} && <color>? ]"
- },
- shape: shape$1,
- "shape-box": {
- syntax: "<box> | margin-box"
- },
- "side-or-corner": {
- syntax: "[ left | right ] || [ top | bottom ]"
- },
- "single-animation": {
- syntax: "<time> || <timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state> || [ none | <keyframes-name> ]"
- },
- "single-animation-direction": {
- syntax: "normal | reverse | alternate | alternate-reverse"
- },
- "single-animation-fill-mode": {
- syntax: "none | forwards | backwards | both"
- },
- "single-animation-iteration-count": {
- syntax: "infinite | <number>"
- },
- "single-animation-play-state": {
- syntax: "running | paused"
- },
- "single-transition": {
- syntax: "[ none | <single-transition-property> ] || <time> || <timing-function> || <time>"
- },
- "single-transition-property": {
- syntax: "all | <custom-ident>"
- },
- size: size,
- "step-position": {
- syntax: "jump-start | jump-end | jump-none | jump-both | start | end"
- },
- "step-timing-function": {
- syntax: "step-start | step-end | steps(<integer>[, <step-position>]?)"
- },
- "subclass-selector": {
- syntax: "<id-selector> | <class-selector> | <attribute-selector> | <pseudo-class-selector>"
- },
- "supports-condition": {
- syntax: "not <supports-in-parens> | <supports-in-parens> [ and <supports-in-parens> ]* | <supports-in-parens> [ or <supports-in-parens> ]*"
- },
- "supports-in-parens": {
- syntax: "( <supports-condition> ) | <supports-feature> | <general-enclosed>"
- },
- "supports-feature": {
- syntax: "<supports-decl> | <supports-selector-fn>"
- },
- "supports-decl": {
- syntax: "( <declaration> )"
- },
- "supports-selector-fn": {
- syntax: "selector( <complex-selector> )"
- },
- symbol: symbol,
- target: target,
- "target-counter()": {
- syntax: "target-counter( [ <string> | <url> ] , <custom-ident> , <counter-style>? )"
- },
- "target-counters()": {
- syntax: "target-counters( [ <string> | <url> ] , <custom-ident> , <string> , <counter-style>? )"
- },
- "target-text()": {
- syntax: "target-text( [ <string> | <url> ] , [ content | before | after | first-letter ]? )"
- },
- "time-percentage": {
- syntax: "<time> | <percentage>"
- },
- "timing-function": {
- syntax: "linear | <cubic-bezier-timing-function> | <step-timing-function>"
- },
- "track-breadth": {
- syntax: "<length-percentage> | <flex> | min-content | max-content | auto"
- },
- "track-list": {
- syntax: "[ <line-names>? [ <track-size> | <track-repeat> ] ]+ <line-names>?"
- },
- "track-repeat": {
- syntax: "repeat( [ <positive-integer> ] , [ <line-names>? <track-size> ]+ <line-names>? )"
- },
- "track-size": {
- syntax: "<track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )"
- },
- "transform-function": {
- syntax: "<matrix()> | <translate()> | <translateX()> | <translateY()> | <scale()> | <scaleX()> | <scaleY()> | <rotate()> | <skew()> | <skewX()> | <skewY()> | <matrix3d()> | <translate3d()> | <translateZ()> | <scale3d()> | <scaleZ()> | <rotate3d()> | <rotateX()> | <rotateY()> | <rotateZ()> | <perspective()>"
- },
- "transform-list": {
- syntax: "<transform-function>+"
- },
- "translate()": {
- syntax: "translate( <length-percentage> , <length-percentage>? )"
- },
- "translate3d()": {
- syntax: "translate3d( <length-percentage> , <length-percentage> , <length> )"
- },
- "translateX()": {
- syntax: "translateX( <length-percentage> )"
- },
- "translateY()": {
- syntax: "translateY( <length-percentage> )"
- },
- "translateZ()": {
- syntax: "translateZ( <length> )"
- },
- "type-or-unit": {
- 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 | %"
- },
- "type-selector": {
- syntax: "<wq-name> | <ns-prefix>? '*'"
- },
- "var()": {
- syntax: "var( <custom-property-name> , <declaration-value>? )"
- },
- "viewport-length": {
- syntax: "auto | <length-percentage>"
- },
- "wq-name": {
- syntax: "<ns-prefix>? <ident-token>"
- }
- };
- var syntaxes$1 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- attachment: attachment,
- box: box,
- color: color$1,
- combinator: combinator,
- gradient: gradient,
- hue: hue,
- image: image,
- nth: nth,
- position: position$1,
- quote: quote,
- shadow: shadow,
- shape: shape$1,
- size: size,
- symbol: symbol,
- target: target,
- 'default': syntaxes
- });
- var properties$3 = {
- "-moz-background-clip": {
- comment: "deprecated syntax in old Firefox, https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
- syntax: "padding | border"
- },
- "-moz-border-radius-bottomleft": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-left-radius",
- syntax: "<'border-bottom-left-radius'>"
- },
- "-moz-border-radius-bottomright": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
- syntax: "<'border-bottom-right-radius'>"
- },
- "-moz-border-radius-topleft": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-top-left-radius",
- syntax: "<'border-top-left-radius'>"
- },
- "-moz-border-radius-topright": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/border-bottom-right-radius",
- syntax: "<'border-bottom-right-radius'>"
- },
- "-moz-control-character-visibility": {
- comment: "firefox specific keywords, https://bugzilla.mozilla.org/show_bug.cgi?id=947588",
- syntax: "visible | hidden"
- },
- "-moz-osx-font-smoothing": {
- comment: "misssed old syntax https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
- syntax: "auto | grayscale"
- },
- "-moz-user-select": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
- syntax: "none | text | all | -moz-none"
- },
- "-ms-flex-align": {
- comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
- syntax: "start | end | center | baseline | stretch"
- },
- "-ms-flex-item-align": {
- comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-align",
- syntax: "auto | start | end | center | baseline | stretch"
- },
- "-ms-flex-line-pack": {
- comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-line-pack",
- syntax: "start | end | center | justify | distribute | stretch"
- },
- "-ms-flex-negative": {
- comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
- syntax: "<'flex-shrink'>"
- },
- "-ms-flex-pack": {
- comment: "misssed old syntax implemented in IE, https://www.w3.org/TR/2012/WD-css3-flexbox-20120322/#flex-pack",
- syntax: "start | end | center | justify | distribute"
- },
- "-ms-flex-order": {
- comment: "misssed old syntax implemented in IE; https://msdn.microsoft.com/en-us/library/jj127303(v=vs.85).aspx",
- syntax: "<integer>"
- },
- "-ms-flex-positive": {
- comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
- syntax: "<'flex-grow'>"
- },
- "-ms-flex-preferred-size": {
- comment: "misssed old syntax implemented in IE; TODO: find references for comfirmation",
- syntax: "<'flex-basis'>"
- },
- "-ms-interpolation-mode": {
- comment: "https://msdn.microsoft.com/en-us/library/ff521095(v=vs.85).aspx",
- syntax: "nearest-neighbor | bicubic"
- },
- "-ms-grid-column-align": {
- comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466338.aspx",
- syntax: "start | end | center | stretch"
- },
- "-ms-grid-row-align": {
- comment: "add this property first since it uses as fallback for flexbox, https://msdn.microsoft.com/en-us/library/windows/apps/hh466348.aspx",
- syntax: "start | end | center | stretch"
- },
- "-ms-hyphenate-limit-last": {
- comment: "misssed old syntax implemented in IE; https://www.w3.org/TR/css-text-4/#hyphenate-line-limits",
- syntax: "none | always | column | page | spread"
- },
- "-webkit-appearance": {
- comment: "webkit specific keywords",
- references: [
- "http://css-infos.net/property/-webkit-appearance"
- ],
- 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"
- },
- "-webkit-background-clip": {
- comment: "https://developer.mozilla.org/en/docs/Web/CSS/background-clip",
- syntax: "[ <box> | border | padding | content | text ]#"
- },
- "-webkit-column-break-after": {
- comment: "added, http://help.dottoro.com/lcrthhhv.php",
- syntax: "always | auto | avoid"
- },
- "-webkit-column-break-before": {
- comment: "added, http://help.dottoro.com/lcxquvkf.php",
- syntax: "always | auto | avoid"
- },
- "-webkit-column-break-inside": {
- comment: "added, http://help.dottoro.com/lclhnthl.php",
- syntax: "always | auto | avoid"
- },
- "-webkit-font-smoothing": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/font-smooth",
- syntax: "auto | none | antialiased | subpixel-antialiased"
- },
- "-webkit-mask-box-image": {
- comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
- syntax: "[ <url> | <gradient> | none ] [ <length-percentage>{4} <-webkit-mask-box-repeat>{2} ]?"
- },
- "-webkit-print-color-adjust": {
- comment: "missed",
- references: [
- "https://developer.mozilla.org/en/docs/Web/CSS/-webkit-print-color-adjust"
- ],
- syntax: "economy | exact"
- },
- "-webkit-text-security": {
- comment: "missed; http://help.dottoro.com/lcbkewgt.php",
- syntax: "none | circle | disc | square"
- },
- "-webkit-user-drag": {
- comment: "missed; http://help.dottoro.com/lcbixvwm.php",
- syntax: "none | element | auto"
- },
- "-webkit-user-select": {
- comment: "auto is supported by old webkit, https://developer.mozilla.org/en-US/docs/Web/CSS/user-select",
- syntax: "auto | none | text | all"
- },
- "alignment-baseline": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#AlignmentBaselineProperty"
- ],
- syntax: "auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical"
- },
- "baseline-shift": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#BaselineShiftProperty"
- ],
- syntax: "baseline | sub | super | <svg-length>"
- },
- behavior: {
- comment: "added old IE property https://msdn.microsoft.com/en-us/library/ms530723(v=vs.85).aspx",
- syntax: "<url>+"
- },
- "clip-rule": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/masking.html#ClipRuleProperty"
- ],
- syntax: "nonzero | evenodd"
- },
- cue: {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<'cue-before'> <'cue-after'>?"
- },
- "cue-after": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<url> <decibel>? | none"
- },
- "cue-before": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<url> <decibel>? | none"
- },
- cursor: {
- 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",
- references: [
- "https://www.sitepoint.com/css3-cursor-styles/"
- ],
- 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 ] ]"
- },
- display: {
- comment: "extended with -ms-flexbox",
- syntax: "[ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-box> | <display-legacy> | <-non-standard-display>"
- },
- position: {
- comment: "extended with -webkit-sticky",
- syntax: "static | relative | absolute | sticky | fixed | -webkit-sticky"
- },
- "dominant-baseline": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#DominantBaselineProperty"
- ],
- syntax: "auto | use-script | no-change | reset-size | ideographic | alphabetic | hanging | mathematical | central | middle | text-after-edge | text-before-edge"
- },
- "image-rendering": {
- comment: "extended with <-non-standard-image-rendering>, added SVG keywords optimizeSpeed and optimizeQuality",
- references: [
- "https://developer.mozilla.org/en/docs/Web/CSS/image-rendering",
- "https://www.w3.org/TR/SVG/painting.html#ImageRenderingProperty"
- ],
- syntax: "auto | crisp-edges | pixelated | optimizeSpeed | optimizeQuality | <-non-standard-image-rendering>"
- },
- fill: {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#FillProperty"
- ],
- syntax: "<paint>"
- },
- "fill-opacity": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#FillProperty"
- ],
- syntax: "<number-zero-one>"
- },
- "fill-rule": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#FillProperty"
- ],
- syntax: "nonzero | evenodd"
- },
- filter: {
- comment: "extend with IE legacy syntaxes",
- syntax: "none | <filter-function-list> | <-ms-filter-function-list>"
- },
- "glyph-orientation-horizontal": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#GlyphOrientationHorizontalProperty"
- ],
- syntax: "<angle>"
- },
- "glyph-orientation-vertical": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#GlyphOrientationVerticalProperty"
- ],
- syntax: "<angle>"
- },
- kerning: {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#KerningProperty"
- ],
- syntax: "auto | <svg-length>"
- },
- "letter-spacing": {
- comment: "fix syntax <length> -> <length-percentage>",
- references: [
- "https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/letter-spacing"
- ],
- syntax: "normal | <length-percentage>"
- },
- marker: {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
- ],
- syntax: "none | <url>"
- },
- "marker-end": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
- ],
- syntax: "none | <url>"
- },
- "marker-mid": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
- ],
- syntax: "none | <url>"
- },
- "marker-start": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#MarkerProperties"
- ],
- syntax: "none | <url>"
- },
- "max-width": {
- 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",
- syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
- },
- "max-height": {
- comment: "fix auto -> none (https://github.com/mdn/data/pull/431)",
- syntax: "none | <length-percentage> | min-content | max-content | fit-content(<length-percentage>)"
- },
- "min-width": {
- comment: "extend by non-standard width keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
- syntax: "auto | <length-percentage> | min-content | max-content | fit-content(<length-percentage>) | <-non-standard-width>"
- },
- overflow: {
- comment: "extend by vendor keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
- syntax: "[ visible | hidden | clip | scroll | auto ]{1,2} | <-non-standard-overflow>"
- },
- pause: {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<'pause-before'> <'pause-after'>?"
- },
- "pause-after": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
- },
- "pause-before": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
- },
- rest: {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<'rest-before'> <'rest-after'>?"
- },
- "rest-after": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
- },
- "rest-before": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<time> | none | x-weak | weak | medium | strong | x-strong"
- },
- "shape-rendering": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#ShapeRenderingPropert"
- ],
- syntax: "auto | optimizeSpeed | crispEdges | geometricPrecision"
- },
- src: {
- comment: "added @font-face's src property https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src",
- syntax: "[ <url> [ format( <string># ) ]? | local( <family-name> ) ]#"
- },
- speak: {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "auto | none | normal"
- },
- "speak-as": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "normal | spell-out || digits || [ literal-punctuation | no-punctuation ]"
- },
- stroke: {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "<paint>"
- },
- "stroke-dasharray": {
- comment: "added SVG property; a list of comma and/or white space separated <length>s and <percentage>s",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "none | [ <svg-length>+ ]#"
- },
- "stroke-dashoffset": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "<svg-length>"
- },
- "stroke-linecap": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "butt | round | square"
- },
- "stroke-linejoin": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "miter | round | bevel"
- },
- "stroke-miterlimit": {
- comment: "added SVG property (<miterlimit> = <number-one-or-greater>) ",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "<number-one-or-greater>"
- },
- "stroke-opacity": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "<number-zero-one>"
- },
- "stroke-width": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/painting.html#StrokeProperties"
- ],
- syntax: "<svg-length>"
- },
- "text-anchor": {
- comment: "added SVG property",
- references: [
- "https://www.w3.org/TR/SVG/text.html#TextAlignmentProperties"
- ],
- syntax: "start | middle | end"
- },
- "unicode-bidi": {
- comment: "added prefixed keywords https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi",
- syntax: "normal | embed | isolate | bidi-override | isolate-override | plaintext | -moz-isolate | -moz-isolate-override | -moz-plaintext | -webkit-isolate"
- },
- "unicode-range": {
- comment: "added missed property https://developer.mozilla.org/en-US/docs/Web/CSS/%40font-face/unicode-range",
- syntax: "<urange>#"
- },
- "voice-balance": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<number> | left | center | right | leftwards | rightwards"
- },
- "voice-duration": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "auto | <time>"
- },
- "voice-family": {
- comment: "<name> -> <family-name>, https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "[ [ <family-name> | <generic-voice> ] , ]* [ <family-name> | <generic-voice> ] | preserve"
- },
- "voice-pitch": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
- },
- "voice-range": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "<frequency> && absolute | [ [ x-low | low | medium | high | x-high ] || [ <frequency> | <semitones> | <percentage> ] ]"
- },
- "voice-rate": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "[ normal | x-slow | slow | medium | fast | x-fast ] || <percentage>"
- },
- "voice-stress": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "normal | strong | moderate | none | reduced"
- },
- "voice-volume": {
- comment: "https://www.w3.org/TR/css3-speech/#property-index",
- syntax: "silent | [ [ x-soft | soft | medium | loud | x-loud ] || <decibel> ]"
- },
- "writing-mode": {
- comment: "extend with SVG keywords",
- syntax: "horizontal-tb | vertical-rl | vertical-lr | sideways-rl | sideways-lr | <svg-writing-mode>"
- }
- };
- var syntaxes$2 = {
- "-legacy-gradient": {
- comment: "added collection of legacy gradient syntaxes",
- syntax: "<-webkit-gradient()> | <-legacy-linear-gradient> | <-legacy-repeating-linear-gradient> | <-legacy-radial-gradient> | <-legacy-repeating-radial-gradient>"
- },
- "-legacy-linear-gradient": {
- comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
- syntax: "-moz-linear-gradient( <-legacy-linear-gradient-arguments> ) | -webkit-linear-gradient( <-legacy-linear-gradient-arguments> ) | -o-linear-gradient( <-legacy-linear-gradient-arguments> )"
- },
- "-legacy-repeating-linear-gradient": {
- comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
- 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> )"
- },
- "-legacy-linear-gradient-arguments": {
- comment: "like standard syntax but w/o `to` keyword https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient",
- syntax: "[ <angle> | <side-or-corner> ]? , <color-stop-list>"
- },
- "-legacy-radial-gradient": {
- comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
- syntax: "-moz-radial-gradient( <-legacy-radial-gradient-arguments> ) | -webkit-radial-gradient( <-legacy-radial-gradient-arguments> ) | -o-radial-gradient( <-legacy-radial-gradient-arguments> )"
- },
- "-legacy-repeating-radial-gradient": {
- comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
- 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> )"
- },
- "-legacy-radial-gradient-arguments": {
- comment: "deprecated syntax that implemented by some browsers https://www.w3.org/TR/2011/WD-css3-images-20110908/#radial-gradients",
- syntax: "[ <position> , ]? [ [ [ <-legacy-radial-gradient-shape> || <-legacy-radial-gradient-size> ] | [ <length> | <percentage> ]{2} ] , ]? <color-stop-list>"
- },
- "-legacy-radial-gradient-size": {
- comment: "before a standard it contains 2 extra keywords (`contain` and `cover`) https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltsize",
- syntax: "closest-side | closest-corner | farthest-side | farthest-corner | contain | cover"
- },
- "-legacy-radial-gradient-shape": {
- comment: "define to double sure it doesn't extends in future https://www.w3.org/TR/2011/WD-css3-images-20110908/#ltshape",
- syntax: "circle | ellipse"
- },
- "-non-standard-font": {
- comment: "non standard fonts",
- references: [
- "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
- ],
- 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"
- },
- "-non-standard-color": {
- comment: "non standard colors",
- references: [
- "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",
- "https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Mozilla_Color_Preference_Extensions"
- ],
- 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"
- },
- "-non-standard-image-rendering": {
- comment: "non-standard keywords http://phrogz.net/tmp/canvas_image_zoom.html",
- syntax: "optimize-contrast | -moz-crisp-edges | -o-crisp-edges | -webkit-optimize-contrast"
- },
- "-non-standard-overflow": {
- comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/overflow",
- syntax: "-moz-scrollbars-none | -moz-scrollbars-horizontal | -moz-scrollbars-vertical | -moz-hidden-unscrollable"
- },
- "-non-standard-width": {
- comment: "non-standard keywords https://developer.mozilla.org/en-US/docs/Web/CSS/width",
- syntax: "fill-available | min-intrinsic | intrinsic | -moz-available | -moz-fit-content | -moz-min-content | -moz-max-content | -webkit-min-content | -webkit-max-content"
- },
- "-webkit-gradient()": {
- 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 )",
- 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>]* )"
- },
- "-webkit-gradient-color-stop": {
- comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
- syntax: "from( <color> ) | color-stop( [ <number-zero-one> | <percentage> ] , <color> ) | to( <color> )"
- },
- "-webkit-gradient-point": {
- comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
- syntax: "[ left | center | right | <length-percentage> ] [ top | center | bottom | <length-percentage> ]"
- },
- "-webkit-gradient-radius": {
- comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
- syntax: "<length> | <percentage>"
- },
- "-webkit-gradient-type": {
- comment: "first Apple proposal gradient syntax https://webkit.org/blog/175/introducing-css-gradients/",
- syntax: "linear | radial"
- },
- "-webkit-mask-box-repeat": {
- comment: "missed; https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-mask-box-image",
- syntax: "repeat | stretch | round"
- },
- "-webkit-mask-clip-style": {
- comment: "missed; there is no enough information about `-webkit-mask-clip` property, but looks like all those keywords are working",
- syntax: "border | border-box | padding | padding-box | content | content-box | text"
- },
- "-ms-filter-function-list": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
- syntax: "<-ms-filter-function>+"
- },
- "-ms-filter-function": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
- syntax: "<-ms-filter-function-progid> | <-ms-filter-function-legacy>"
- },
- "-ms-filter-function-progid": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
- syntax: "'progid:' [ <ident-token> '.' ]* [ <ident-token> | <function-token> <any-value>? ) ]"
- },
- "-ms-filter-function-legacy": {
- comment: "https://developer.mozilla.org/en-US/docs/Web/CSS/-ms-filter",
- syntax: "<ident-token> | <function-token> <any-value>? )"
- },
- "-ms-filter": {
- syntax: "<string>"
- },
- age: {
- comment: "https://www.w3.org/TR/css3-speech/#voice-family",
- syntax: "child | young | old"
- },
- "attr-name": {
- syntax: "<wq-name>"
- },
- "attr-fallback": {
- syntax: "<any-value>"
- },
- "border-radius": {
- comment: "missed, https://drafts.csswg.org/css-backgrounds-3/#the-border-radius",
- syntax: "<length-percentage>{1,2}"
- },
- bottom: {
- 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",
- syntax: "<length> | auto"
- },
- "content-list": {
- comment: "missed -> https://drafts.csswg.org/css-content/#typedef-content-list (document-url, <target> and leader() is omitted util stabilization)",
- syntax: "[ <string> | contents | <image> | <quote> | <target> | <leader()> | <attr()> | counter( <ident>, <'list-style-type'>? ) ]+"
- },
- "element()": {
- comment: "https://drafts.csswg.org/css-gcpm/#element-syntax & https://drafts.csswg.org/css-images-4/#element-notation",
- syntax: "element( <custom-ident> , [ first | start | last | first-except ]? ) | element( <id-selector> )"
- },
- "generic-voice": {
- comment: "https://www.w3.org/TR/css3-speech/#voice-family",
- syntax: "[ <age>? <gender> <integer>? ]"
- },
- gender: {
- comment: "https://www.w3.org/TR/css3-speech/#voice-family",
- syntax: "male | female | neutral"
- },
- "generic-family": {
- comment: "added -apple-system",
- references: [
- "https://webkit.org/blog/3709/using-the-system-font-in-web-content/"
- ],
- syntax: "serif | sans-serif | cursive | fantasy | monospace | -apple-system"
- },
- gradient: {
- comment: "added legacy syntaxes support",
- syntax: "<linear-gradient()> | <repeating-linear-gradient()> | <radial-gradient()> | <repeating-radial-gradient()> | <conic-gradient()> | <-legacy-gradient>"
- },
- left: {
- 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",
- syntax: "<length> | auto"
- },
- "mask-image": {
- comment: "missed; https://drafts.fxtf.org/css-masking-1/#the-mask-image",
- syntax: "<mask-reference>#"
- },
- "name-repeat": {
- 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",
- syntax: "repeat( [ <positive-integer> | auto-fill ], <line-names>+)"
- },
- "named-color": {
- comment: "added non standard color names",
- 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>"
- },
- paint: {
- comment: "used by SVG https://www.w3.org/TR/SVG/painting.html#SpecifyingPaint",
- syntax: "none | <color> | <url> [ none | <color> ]? | context-fill | context-stroke"
- },
- ratio: {
- comment: "missed, https://drafts.csswg.org/mediaqueries-4/#typedef-ratio",
- syntax: "<integer> / <integer>"
- },
- right: {
- 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",
- syntax: "<length> | auto"
- },
- shape: {
- comment: "missed spaces in function body and add backwards compatible syntax",
- syntax: "rect( <top>, <right>, <bottom>, <left> ) | rect( <top> <right> <bottom> <left> )"
- },
- "svg-length": {
- comment: "All coordinates and lengths in SVG can be specified with or without a unit identifier",
- references: [
- "https://www.w3.org/TR/SVG11/coords.html#Units"
- ],
- syntax: "<percentage> | <length> | <number>"
- },
- "svg-writing-mode": {
- comment: "SVG specific keywords (deprecated for CSS)",
- references: [
- "https://developer.mozilla.org/en/docs/Web/CSS/writing-mode",
- "https://www.w3.org/TR/SVG/text.html#WritingModeProperty"
- ],
- syntax: "lr-tb | rl-tb | tb-rl | lr | rl | tb"
- },
- top: {
- 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",
- syntax: "<length> | auto"
- },
- "track-group": {
- comment: "used by old grid-columns and grid-rows syntax v0",
- syntax: "'(' [ <string>* <track-minmax> <string>* ]+ ')' [ '[' <positive-integer> ']' ]? | <track-minmax>"
- },
- "track-list-v0": {
- comment: "used by old grid-columns and grid-rows syntax v0",
- syntax: "[ <string>* <track-group> <string>* ]+ | none"
- },
- "track-minmax": {
- comment: "used by old grid-columns and grid-rows syntax v0",
- syntax: "minmax( <track-breadth> , <track-breadth> ) | auto | <track-breadth> | fit-content"
- },
- x: {
- 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",
- syntax: "<number>"
- },
- y: {
- 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",
- syntax: "<number>"
- },
- declaration: {
- comment: "missed, restored by https://drafts.csswg.org/css-syntax",
- syntax: "<ident-token> : <declaration-value>? [ '!' important ]?"
- },
- "declaration-list": {
- comment: "missed, restored by https://drafts.csswg.org/css-syntax",
- syntax: "[ <declaration>? ';' ]* <declaration>?"
- },
- url: {
- comment: "https://drafts.csswg.org/css-values-4/#urls",
- syntax: "url( <string> <url-modifier>* ) | <url-token>"
- },
- "url-modifier": {
- comment: "https://drafts.csswg.org/css-values-4/#typedef-url-modifier",
- syntax: "<ident> | <function-token> <any-value> )"
- },
- "number-zero-one": {
- syntax: "<number [0,1]>"
- },
- "number-one-or-greater": {
- syntax: "<number [1,∞]>"
- },
- "positive-integer": {
- syntax: "<integer [0,∞]>"
- },
- "-non-standard-display": {
- 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"
- }
- };
- var patch = {
- properties: properties$3,
- syntaxes: syntaxes$2
- };
- var patch$1 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- properties: properties$3,
- syntaxes: syntaxes$2,
- 'default': patch
- });
- var mdnAtrules = getCjsExportFromNamespace(atRules$1);
- var mdnProperties = getCjsExportFromNamespace(properties$2);
- var mdnSyntaxes = getCjsExportFromNamespace(syntaxes$1);
- var patch$2 = getCjsExportFromNamespace(patch$1);
- function preprocessAtrules(dict) {
- var result = Object.create(null);
- for (var atruleName in dict) {
- var atrule = dict[atruleName];
- var descriptors = null;
- if (atrule.descriptors) {
- descriptors = Object.create(null);
- for (var descriptor in atrule.descriptors) {
- descriptors[descriptor] = atrule.descriptors[descriptor].syntax;
- }
- }
- result[atruleName.substr(1)] = {
- prelude: atrule.syntax.trim().match(/^@\S+\s+([^;\{]*)/)[1].trim() || null,
- descriptors
- };
- }
- return result;
- }
- function buildDictionary(dict, patchDict) {
- var result = {};
- // copy all syntaxes for an original dict
- for (var key in dict) {
- result[key] = dict[key].syntax;
- }
- // apply a patch
- for (var key in patchDict) {
- if (key in dict) {
- if (patchDict[key].syntax) {
- result[key] = patchDict[key].syntax;
- } else {
- delete result[key];
- }
- } else {
- if (patchDict[key].syntax) {
- result[key] = patchDict[key].syntax;
- }
- }
- }
- return result;
- }
- var data = {
- types: buildDictionary(mdnSyntaxes, patch$2.syntaxes),
- atrules: preprocessAtrules(mdnAtrules),
- properties: buildDictionary(mdnProperties, patch$2.properties)
- };
- var cmpChar$3 = tokenizer.cmpChar;
- var isDigit$4 = tokenizer.isDigit;
- var TYPE$9 = tokenizer.TYPE;
- var WHITESPACE$4 = TYPE$9.WhiteSpace;
- var COMMENT$4 = TYPE$9.Comment;
- var IDENT$3 = TYPE$9.Ident;
- var NUMBER$3 = TYPE$9.Number;
- var DIMENSION$2 = TYPE$9.Dimension;
- var PLUSSIGN$3 = 0x002B; // U+002B PLUS SIGN (+)
- var HYPHENMINUS$3 = 0x002D; // U+002D HYPHEN-MINUS (-)
- var N$4 = 0x006E; // U+006E LATIN SMALL LETTER N (n)
- var DISALLOW_SIGN$1 = true;
- var ALLOW_SIGN$1 = false;
- function checkInteger$1(offset, disallowSign) {
- var pos = this.scanner.tokenStart + offset;
- var code = this.scanner.source.charCodeAt(pos);
- if (code === PLUSSIGN$3 || code === HYPHENMINUS$3) {
- if (disallowSign) {
- this.error('Number sign is not allowed');
- }
- pos++;
- }
- for (; pos < this.scanner.tokenEnd; pos++) {
- if (!isDigit$4(this.scanner.source.charCodeAt(pos))) {
- this.error('Integer is expected', pos);
- }
- }
- }
- function checkTokenIsInteger(disallowSign) {
- return checkInteger$1.call(this, 0, disallowSign);
- }
- function expectCharCode(offset, code) {
- if (!cmpChar$3(this.scanner.source, this.scanner.tokenStart + offset, code)) {
- var msg = '';
- switch (code) {
- case N$4:
- msg = 'N is expected';
- break;
- case HYPHENMINUS$3:
- msg = 'HyphenMinus is expected';
- break;
- }
- this.error(msg, this.scanner.tokenStart + offset);
- }
- }
- // ... <signed-integer>
- // ... ['+' | '-'] <signless-integer>
- function consumeB$1() {
- var offset = 0;
- var sign = 0;
- var type = this.scanner.tokenType;
- while (type === WHITESPACE$4 || type === COMMENT$4) {
- type = this.scanner.lookupType(++offset);
- }
- if (type !== NUMBER$3) {
- if (this.scanner.isDelim(PLUSSIGN$3, offset) ||
- this.scanner.isDelim(HYPHENMINUS$3, offset)) {
- sign = this.scanner.isDelim(PLUSSIGN$3, offset) ? PLUSSIGN$3 : HYPHENMINUS$3;
- do {
- type = this.scanner.lookupType(++offset);
- } while (type === WHITESPACE$4 || type === COMMENT$4);
- if (type !== NUMBER$3) {
- this.scanner.skip(offset);
- checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
- }
- } else {
- return null;
- }
- }
- if (offset > 0) {
- this.scanner.skip(offset);
- }
- if (sign === 0) {
- type = this.scanner.source.charCodeAt(this.scanner.tokenStart);
- if (type !== PLUSSIGN$3 && type !== HYPHENMINUS$3) {
- this.error('Number sign is expected');
- }
- }
- checkTokenIsInteger.call(this, sign !== 0);
- return sign === HYPHENMINUS$3 ? '-' + this.consume(NUMBER$3) : this.consume(NUMBER$3);
- }
- // An+B microsyntax https://www.w3.org/TR/css-syntax-3/#anb
- var AnPlusB = {
- name: 'AnPlusB',
- structure: {
- a: [String, null],
- b: [String, null]
- },
- parse: function() {
- /* eslint-disable brace-style*/
- var start = this.scanner.tokenStart;
- var a = null;
- var b = null;
- // <integer>
- if (this.scanner.tokenType === NUMBER$3) {
- checkTokenIsInteger.call(this, ALLOW_SIGN$1);
- b = this.consume(NUMBER$3);
- }
- // -n
- // -n <signed-integer>
- // -n ['+' | '-'] <signless-integer>
- // -n- <signless-integer>
- // <dashndashdigit-ident>
- else if (this.scanner.tokenType === IDENT$3 && cmpChar$3(this.scanner.source, this.scanner.tokenStart, HYPHENMINUS$3)) {
- a = '-1';
- expectCharCode.call(this, 1, N$4);
- switch (this.scanner.getTokenLength()) {
- // -n
- // -n <signed-integer>
- // -n ['+' | '-'] <signless-integer>
- case 2:
- this.scanner.next();
- b = consumeB$1.call(this);
- break;
- // -n- <signless-integer>
- case 3:
- expectCharCode.call(this, 2, HYPHENMINUS$3);
- this.scanner.next();
- this.scanner.skipSC();
- checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
- b = '-' + this.consume(NUMBER$3);
- break;
- // <dashndashdigit-ident>
- default:
- expectCharCode.call(this, 2, HYPHENMINUS$3);
- checkInteger$1.call(this, 3, DISALLOW_SIGN$1);
- this.scanner.next();
- b = this.scanner.substrToCursor(start + 2);
- }
- }
- // '+'? n
- // '+'? n <signed-integer>
- // '+'? n ['+' | '-'] <signless-integer>
- // '+'? n- <signless-integer>
- // '+'? <ndashdigit-ident>
- else if (this.scanner.tokenType === IDENT$3 || (this.scanner.isDelim(PLUSSIGN$3) && this.scanner.lookupType(1) === IDENT$3)) {
- var sign = 0;
- a = '1';
- // just ignore a plus
- if (this.scanner.isDelim(PLUSSIGN$3)) {
- sign = 1;
- this.scanner.next();
- }
- expectCharCode.call(this, 0, N$4);
- switch (this.scanner.getTokenLength()) {
- // '+'? n
- // '+'? n <signed-integer>
- // '+'? n ['+' | '-'] <signless-integer>
- case 1:
- this.scanner.next();
- b = consumeB$1.call(this);
- break;
- // '+'? n- <signless-integer>
- case 2:
- expectCharCode.call(this, 1, HYPHENMINUS$3);
- this.scanner.next();
- this.scanner.skipSC();
- checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
- b = '-' + this.consume(NUMBER$3);
- break;
- // '+'? <ndashdigit-ident>
- default:
- expectCharCode.call(this, 1, HYPHENMINUS$3);
- checkInteger$1.call(this, 2, DISALLOW_SIGN$1);
- this.scanner.next();
- b = this.scanner.substrToCursor(start + sign + 1);
- }
- }
- // <ndashdigit-dimension>
- // <ndash-dimension> <signless-integer>
- // <n-dimension>
- // <n-dimension> <signed-integer>
- // <n-dimension> ['+' | '-'] <signless-integer>
- else if (this.scanner.tokenType === DIMENSION$2) {
- var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
- var sign = code === PLUSSIGN$3 || code === HYPHENMINUS$3;
- for (var i = this.scanner.tokenStart + sign; i < this.scanner.tokenEnd; i++) {
- if (!isDigit$4(this.scanner.source.charCodeAt(i))) {
- break;
- }
- }
- if (i === this.scanner.tokenStart + sign) {
- this.error('Integer is expected', this.scanner.tokenStart + sign);
- }
- expectCharCode.call(this, i - this.scanner.tokenStart, N$4);
- a = this.scanner.source.substring(start, i);
- // <n-dimension>
- // <n-dimension> <signed-integer>
- // <n-dimension> ['+' | '-'] <signless-integer>
- if (i + 1 === this.scanner.tokenEnd) {
- this.scanner.next();
- b = consumeB$1.call(this);
- } else {
- expectCharCode.call(this, i - this.scanner.tokenStart + 1, HYPHENMINUS$3);
- // <ndash-dimension> <signless-integer>
- if (i + 2 === this.scanner.tokenEnd) {
- this.scanner.next();
- this.scanner.skipSC();
- checkTokenIsInteger.call(this, DISALLOW_SIGN$1);
- b = '-' + this.consume(NUMBER$3);
- }
- // <ndashdigit-dimension>
- else {
- checkInteger$1.call(this, i - this.scanner.tokenStart + 2, DISALLOW_SIGN$1);
- this.scanner.next();
- b = this.scanner.substrToCursor(i + 1);
- }
- }
- } else {
- this.error();
- }
- if (a !== null && a.charCodeAt(0) === PLUSSIGN$3) {
- a = a.substr(1);
- }
- if (b !== null && b.charCodeAt(0) === PLUSSIGN$3) {
- b = b.substr(1);
- }
- return {
- type: 'AnPlusB',
- loc: this.getLocation(start, this.scanner.tokenStart),
- a: a,
- b: b
- };
- },
- generate: function(node) {
- var a = node.a !== null && node.a !== undefined;
- var b = node.b !== null && node.b !== undefined;
- if (a) {
- this.chunk(
- node.a === '+1' ? '+n' : // eslint-disable-line operator-linebreak, indent
- node.a === '1' ? 'n' : // eslint-disable-line operator-linebreak, indent
- node.a === '-1' ? '-n' : // eslint-disable-line operator-linebreak, indent
- node.a + 'n' // eslint-disable-line operator-linebreak, indent
- );
- if (b) {
- b = String(node.b);
- if (b.charAt(0) === '-' || b.charAt(0) === '+') {
- this.chunk(b.charAt(0));
- this.chunk(b.substr(1));
- } else {
- this.chunk('+');
- this.chunk(b);
- }
- }
- } else {
- this.chunk(String(node.b));
- }
- }
- };
- var TYPE$a = tokenizer.TYPE;
- var WhiteSpace = TYPE$a.WhiteSpace;
- var Semicolon = TYPE$a.Semicolon;
- var LeftCurlyBracket = TYPE$a.LeftCurlyBracket;
- var Delim = TYPE$a.Delim;
- var EXCLAMATIONMARK$1 = 0x0021; // U+0021 EXCLAMATION MARK (!)
- function getOffsetExcludeWS() {
- if (this.scanner.tokenIndex > 0) {
- if (this.scanner.lookupType(-1) === WhiteSpace) {
- return this.scanner.tokenIndex > 1
- ? this.scanner.getTokenStart(this.scanner.tokenIndex - 1)
- : this.scanner.firstCharOffset;
- }
- }
- return this.scanner.tokenStart;
- }
- // 0, 0, false
- function balanceEnd() {
- return 0;
- }
- // LEFTCURLYBRACKET, 0, false
- function leftCurlyBracket(tokenType) {
- return tokenType === LeftCurlyBracket ? 1 : 0;
- }
- // LEFTCURLYBRACKET, SEMICOLON, false
- function leftCurlyBracketOrSemicolon(tokenType) {
- return tokenType === LeftCurlyBracket || tokenType === Semicolon ? 1 : 0;
- }
- // EXCLAMATIONMARK, SEMICOLON, false
- function exclamationMarkOrSemicolon(tokenType, source, offset) {
- if (tokenType === Delim && source.charCodeAt(offset) === EXCLAMATIONMARK$1) {
- return 1;
- }
- return tokenType === Semicolon ? 1 : 0;
- }
- // 0, SEMICOLON, true
- function semicolonIncluded(tokenType) {
- return tokenType === Semicolon ? 2 : 0;
- }
- var Raw = {
- name: 'Raw',
- structure: {
- value: String
- },
- parse: function(startToken, mode, excludeWhiteSpace) {
- var startOffset = this.scanner.getTokenStart(startToken);
- var endOffset;
- this.scanner.skip(
- this.scanner.getRawLength(startToken, mode || balanceEnd)
- );
- if (excludeWhiteSpace && this.scanner.tokenStart > startOffset) {
- endOffset = getOffsetExcludeWS.call(this);
- } else {
- endOffset = this.scanner.tokenStart;
- }
- return {
- type: 'Raw',
- loc: this.getLocation(startOffset, endOffset),
- value: this.scanner.source.substring(startOffset, endOffset)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- },
- mode: {
- default: balanceEnd,
- leftCurlyBracket: leftCurlyBracket,
- leftCurlyBracketOrSemicolon: leftCurlyBracketOrSemicolon,
- exclamationMarkOrSemicolon: exclamationMarkOrSemicolon,
- semicolonIncluded: semicolonIncluded
- }
- };
- var TYPE$b = tokenizer.TYPE;
- var rawMode = Raw.mode;
- var ATKEYWORD = TYPE$b.AtKeyword;
- var SEMICOLON = TYPE$b.Semicolon;
- var LEFTCURLYBRACKET$1 = TYPE$b.LeftCurlyBracket;
- var RIGHTCURLYBRACKET$1 = TYPE$b.RightCurlyBracket;
- function consumeRaw(startToken) {
- return this.Raw(startToken, rawMode.leftCurlyBracketOrSemicolon, true);
- }
- function isDeclarationBlockAtrule() {
- for (var offset = 1, type; type = this.scanner.lookupType(offset); offset++) {
- if (type === RIGHTCURLYBRACKET$1) {
- return true;
- }
- if (type === LEFTCURLYBRACKET$1 ||
- type === ATKEYWORD) {
- return false;
- }
- }
- return false;
- }
- var Atrule = {
- name: 'Atrule',
- structure: {
- name: String,
- prelude: ['AtrulePrelude', 'Raw', null],
- block: ['Block', null]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var name;
- var nameLowerCase;
- var prelude = null;
- var block = null;
- this.eat(ATKEYWORD);
- name = this.scanner.substrToCursor(start + 1);
- nameLowerCase = name.toLowerCase();
- this.scanner.skipSC();
- // parse prelude
- if (this.scanner.eof === false &&
- this.scanner.tokenType !== LEFTCURLYBRACKET$1 &&
- this.scanner.tokenType !== SEMICOLON) {
- if (this.parseAtrulePrelude) {
- prelude = this.parseWithFallback(this.AtrulePrelude.bind(this, name), consumeRaw);
- // turn empty AtrulePrelude into null
- if (prelude.type === 'AtrulePrelude' && prelude.children.head === null) {
- prelude = null;
- }
- } else {
- prelude = consumeRaw.call(this, this.scanner.tokenIndex);
- }
- this.scanner.skipSC();
- }
- switch (this.scanner.tokenType) {
- case SEMICOLON:
- this.scanner.next();
- break;
- case LEFTCURLYBRACKET$1:
- if (this.atrule.hasOwnProperty(nameLowerCase) &&
- typeof this.atrule[nameLowerCase].block === 'function') {
- block = this.atrule[nameLowerCase].block.call(this);
- } else {
- // TODO: should consume block content as Raw?
- block = this.Block(isDeclarationBlockAtrule.call(this));
- }
- break;
- }
- return {
- type: 'Atrule',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- prelude: prelude,
- block: block
- };
- },
- generate: function(node) {
- this.chunk('@');
- this.chunk(node.name);
- if (node.prelude !== null) {
- this.chunk(' ');
- this.node(node.prelude);
- }
- if (node.block) {
- this.node(node.block);
- } else {
- this.chunk(';');
- }
- },
- walkContext: 'atrule'
- };
- var TYPE$c = tokenizer.TYPE;
- var SEMICOLON$1 = TYPE$c.Semicolon;
- var LEFTCURLYBRACKET$2 = TYPE$c.LeftCurlyBracket;
- var AtrulePrelude = {
- name: 'AtrulePrelude',
- structure: {
- children: [[]]
- },
- parse: function(name) {
- var children = null;
- if (name !== null) {
- name = name.toLowerCase();
- }
- this.scanner.skipSC();
- if (this.atrule.hasOwnProperty(name) &&
- typeof this.atrule[name].prelude === 'function') {
- // custom consumer
- children = this.atrule[name].prelude.call(this);
- } else {
- // default consumer
- children = this.readSequence(this.scope.AtrulePrelude);
- }
- this.scanner.skipSC();
- if (this.scanner.eof !== true &&
- this.scanner.tokenType !== LEFTCURLYBRACKET$2 &&
- this.scanner.tokenType !== SEMICOLON$1) {
- this.error('Semicolon or block is expected');
- }
- if (children === null) {
- children = this.createList();
- }
- return {
- type: 'AtrulePrelude',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node);
- },
- walkContext: 'atrulePrelude'
- };
- var TYPE$d = tokenizer.TYPE;
- var IDENT$4 = TYPE$d.Ident;
- var STRING = TYPE$d.String;
- var COLON = TYPE$d.Colon;
- var LEFTSQUAREBRACKET$1 = TYPE$d.LeftSquareBracket;
- var RIGHTSQUAREBRACKET$1 = TYPE$d.RightSquareBracket;
- var DOLLARSIGN = 0x0024; // U+0024 DOLLAR SIGN ($)
- var ASTERISK$1 = 0x002A; // U+002A ASTERISK (*)
- var EQUALSSIGN = 0x003D; // U+003D EQUALS SIGN (=)
- var CIRCUMFLEXACCENT = 0x005E; // U+005E (^)
- var VERTICALLINE$1 = 0x007C; // U+007C VERTICAL LINE (|)
- var TILDE = 0x007E; // U+007E TILDE (~)
- function getAttributeName() {
- if (this.scanner.eof) {
- this.error('Unexpected end of input');
- }
- var start = this.scanner.tokenStart;
- var expectIdent = false;
- var checkColon = true;
- if (this.scanner.isDelim(ASTERISK$1)) {
- expectIdent = true;
- checkColon = false;
- this.scanner.next();
- } else if (!this.scanner.isDelim(VERTICALLINE$1)) {
- this.eat(IDENT$4);
- }
- if (this.scanner.isDelim(VERTICALLINE$1)) {
- if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 1) !== EQUALSSIGN) {
- this.scanner.next();
- this.eat(IDENT$4);
- } else if (expectIdent) {
- this.error('Identifier is expected', this.scanner.tokenEnd);
- }
- } else if (expectIdent) {
- this.error('Vertical line is expected');
- }
- if (checkColon && this.scanner.tokenType === COLON) {
- this.scanner.next();
- this.eat(IDENT$4);
- }
- return {
- type: 'Identifier',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: this.scanner.substrToCursor(start)
- };
- }
- function getOperator() {
- var start = this.scanner.tokenStart;
- var code = this.scanner.source.charCodeAt(start);
- if (code !== EQUALSSIGN && // =
- code !== TILDE && // ~=
- code !== CIRCUMFLEXACCENT && // ^=
- code !== DOLLARSIGN && // $=
- code !== ASTERISK$1 && // *=
- code !== VERTICALLINE$1 // |=
- ) {
- this.error('Attribute selector (=, ~=, ^=, $=, *=, |=) is expected');
- }
- this.scanner.next();
- if (code !== EQUALSSIGN) {
- if (!this.scanner.isDelim(EQUALSSIGN)) {
- this.error('Equal sign is expected');
- }
- this.scanner.next();
- }
- return this.scanner.substrToCursor(start);
- }
- // '[' <wq-name> ']'
- // '[' <wq-name> <attr-matcher> [ <string-token> | <ident-token> ] <attr-modifier>? ']'
- var AttributeSelector = {
- name: 'AttributeSelector',
- structure: {
- name: 'Identifier',
- matcher: [String, null],
- value: ['String', 'Identifier', null],
- flags: [String, null]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var name;
- var matcher = null;
- var value = null;
- var flags = null;
- this.eat(LEFTSQUAREBRACKET$1);
- this.scanner.skipSC();
- name = getAttributeName.call(this);
- this.scanner.skipSC();
- if (this.scanner.tokenType !== RIGHTSQUAREBRACKET$1) {
- // avoid case `[name i]`
- if (this.scanner.tokenType !== IDENT$4) {
- matcher = getOperator.call(this);
- this.scanner.skipSC();
- value = this.scanner.tokenType === STRING
- ? this.String()
- : this.Identifier();
- this.scanner.skipSC();
- }
- // attribute flags
- if (this.scanner.tokenType === IDENT$4) {
- flags = this.scanner.getTokenValue();
- this.scanner.next();
- this.scanner.skipSC();
- }
- }
- this.eat(RIGHTSQUAREBRACKET$1);
- return {
- type: 'AttributeSelector',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- matcher: matcher,
- value: value,
- flags: flags
- };
- },
- generate: function(node) {
- var flagsPrefix = ' ';
- this.chunk('[');
- this.node(node.name);
- if (node.matcher !== null) {
- this.chunk(node.matcher);
- if (node.value !== null) {
- this.node(node.value);
- // space between string and flags is not required
- if (node.value.type === 'String') {
- flagsPrefix = '';
- }
- }
- }
- if (node.flags !== null) {
- this.chunk(flagsPrefix);
- this.chunk(node.flags);
- }
- this.chunk(']');
- }
- };
- var TYPE$e = tokenizer.TYPE;
- var rawMode$1 = Raw.mode;
- var WHITESPACE$5 = TYPE$e.WhiteSpace;
- var COMMENT$5 = TYPE$e.Comment;
- var SEMICOLON$2 = TYPE$e.Semicolon;
- var ATKEYWORD$1 = TYPE$e.AtKeyword;
- var LEFTCURLYBRACKET$3 = TYPE$e.LeftCurlyBracket;
- var RIGHTCURLYBRACKET$2 = TYPE$e.RightCurlyBracket;
- function consumeRaw$1(startToken) {
- return this.Raw(startToken, null, true);
- }
- function consumeRule() {
- return this.parseWithFallback(this.Rule, consumeRaw$1);
- }
- function consumeRawDeclaration(startToken) {
- return this.Raw(startToken, rawMode$1.semicolonIncluded, true);
- }
- function consumeDeclaration() {
- if (this.scanner.tokenType === SEMICOLON$2) {
- return consumeRawDeclaration.call(this, this.scanner.tokenIndex);
- }
- var node = this.parseWithFallback(this.Declaration, consumeRawDeclaration);
- if (this.scanner.tokenType === SEMICOLON$2) {
- this.scanner.next();
- }
- return node;
- }
- var Block = {
- name: 'Block',
- structure: {
- children: [[
- 'Atrule',
- 'Rule',
- 'Declaration'
- ]]
- },
- parse: function(isDeclaration) {
- var consumer = isDeclaration ? consumeDeclaration : consumeRule;
- var start = this.scanner.tokenStart;
- var children = this.createList();
- this.eat(LEFTCURLYBRACKET$3);
- scan:
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case RIGHTCURLYBRACKET$2:
- break scan;
- case WHITESPACE$5:
- case COMMENT$5:
- this.scanner.next();
- break;
- case ATKEYWORD$1:
- children.push(this.parseWithFallback(this.Atrule, consumeRaw$1));
- break;
- default:
- children.push(consumer.call(this));
- }
- }
- if (!this.scanner.eof) {
- this.eat(RIGHTCURLYBRACKET$2);
- }
- return {
- type: 'Block',
- loc: this.getLocation(start, this.scanner.tokenStart),
- children: children
- };
- },
- generate: function(node) {
- this.chunk('{');
- this.children(node, function(prev) {
- if (prev.type === 'Declaration') {
- this.chunk(';');
- }
- });
- this.chunk('}');
- },
- walkContext: 'block'
- };
- var TYPE$f = tokenizer.TYPE;
- var LEFTSQUAREBRACKET$2 = TYPE$f.LeftSquareBracket;
- var RIGHTSQUAREBRACKET$2 = TYPE$f.RightSquareBracket;
- var Brackets = {
- name: 'Brackets',
- structure: {
- children: [[]]
- },
- parse: function(readSequence, recognizer) {
- var start = this.scanner.tokenStart;
- var children = null;
- this.eat(LEFTSQUAREBRACKET$2);
- children = readSequence.call(this, recognizer);
- if (!this.scanner.eof) {
- this.eat(RIGHTSQUAREBRACKET$2);
- }
- return {
- type: 'Brackets',
- loc: this.getLocation(start, this.scanner.tokenStart),
- children: children
- };
- },
- generate: function(node) {
- this.chunk('[');
- this.children(node);
- this.chunk(']');
- }
- };
- var CDC = tokenizer.TYPE.CDC;
- var CDC_1 = {
- name: 'CDC',
- structure: [],
- parse: function() {
- var start = this.scanner.tokenStart;
- this.eat(CDC); // -->
- return {
- type: 'CDC',
- loc: this.getLocation(start, this.scanner.tokenStart)
- };
- },
- generate: function() {
- this.chunk('-->');
- }
- };
- var CDO = tokenizer.TYPE.CDO;
- var CDO_1 = {
- name: 'CDO',
- structure: [],
- parse: function() {
- var start = this.scanner.tokenStart;
- this.eat(CDO); // <!--
- return {
- type: 'CDO',
- loc: this.getLocation(start, this.scanner.tokenStart)
- };
- },
- generate: function() {
- this.chunk('<!--');
- }
- };
- var TYPE$g = tokenizer.TYPE;
- var IDENT$5 = TYPE$g.Ident;
- var FULLSTOP = 0x002E; // U+002E FULL STOP (.)
- // '.' ident
- var ClassSelector = {
- name: 'ClassSelector',
- structure: {
- name: String
- },
- parse: function() {
- if (!this.scanner.isDelim(FULLSTOP)) {
- this.error('Full stop is expected');
- }
- this.scanner.next();
- return {
- type: 'ClassSelector',
- loc: this.getLocation(this.scanner.tokenStart - 1, this.scanner.tokenEnd),
- name: this.consume(IDENT$5)
- };
- },
- generate: function(node) {
- this.chunk('.');
- this.chunk(node.name);
- }
- };
- var TYPE$h = tokenizer.TYPE;
- var IDENT$6 = TYPE$h.Ident;
- var PLUSSIGN$4 = 0x002B; // U+002B PLUS SIGN (+)
- var SOLIDUS = 0x002F; // U+002F SOLIDUS (/)
- var GREATERTHANSIGN$1 = 0x003E; // U+003E GREATER-THAN SIGN (>)
- var TILDE$1 = 0x007E; // U+007E TILDE (~)
- // + | > | ~ | /deep/
- var Combinator = {
- name: 'Combinator',
- structure: {
- name: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
- switch (code) {
- case GREATERTHANSIGN$1:
- case PLUSSIGN$4:
- case TILDE$1:
- this.scanner.next();
- break;
- case SOLIDUS:
- this.scanner.next();
- if (this.scanner.tokenType !== IDENT$6 || this.scanner.lookupValue(0, 'deep') === false) {
- this.error('Identifier `deep` is expected');
- }
- this.scanner.next();
- if (!this.scanner.isDelim(SOLIDUS)) {
- this.error('Solidus is expected');
- }
- this.scanner.next();
- break;
- default:
- this.error('Combinator is expected');
- }
- return {
- type: 'Combinator',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: this.scanner.substrToCursor(start)
- };
- },
- generate: function(node) {
- this.chunk(node.name);
- }
- };
- var TYPE$i = tokenizer.TYPE;
- var COMMENT$6 = TYPE$i.Comment;
- var ASTERISK$2 = 0x002A; // U+002A ASTERISK (*)
- var SOLIDUS$1 = 0x002F; // U+002F SOLIDUS (/)
- // '/*' .* '*/'
- var Comment = {
- name: 'Comment',
- structure: {
- value: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var end = this.scanner.tokenEnd;
- this.eat(COMMENT$6);
- if ((end - start + 2) >= 2 &&
- this.scanner.source.charCodeAt(end - 2) === ASTERISK$2 &&
- this.scanner.source.charCodeAt(end - 1) === SOLIDUS$1) {
- end -= 2;
- }
- return {
- type: 'Comment',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.source.substring(start + 2, end)
- };
- },
- generate: function(node) {
- this.chunk('/*');
- this.chunk(node.value);
- this.chunk('*/');
- }
- };
- var isCustomProperty$1 = names.isCustomProperty;
- var TYPE$j = tokenizer.TYPE;
- var rawMode$2 = Raw.mode;
- var IDENT$7 = TYPE$j.Ident;
- var HASH$1 = TYPE$j.Hash;
- var COLON$1 = TYPE$j.Colon;
- var SEMICOLON$3 = TYPE$j.Semicolon;
- var DELIM$2 = TYPE$j.Delim;
- var EXCLAMATIONMARK$2 = 0x0021; // U+0021 EXCLAMATION MARK (!)
- var NUMBERSIGN$2 = 0x0023; // U+0023 NUMBER SIGN (#)
- var DOLLARSIGN$1 = 0x0024; // U+0024 DOLLAR SIGN ($)
- var AMPERSAND$1 = 0x0026; // U+0026 ANPERSAND (&)
- var ASTERISK$3 = 0x002A; // U+002A ASTERISK (*)
- var PLUSSIGN$5 = 0x002B; // U+002B PLUS SIGN (+)
- var SOLIDUS$2 = 0x002F; // U+002F SOLIDUS (/)
- function consumeValueRaw(startToken) {
- return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, true);
- }
- function consumeCustomPropertyRaw(startToken) {
- return this.Raw(startToken, rawMode$2.exclamationMarkOrSemicolon, false);
- }
- function consumeValue() {
- var startValueToken = this.scanner.tokenIndex;
- var value = this.Value();
- if (value.type !== 'Raw' &&
- this.scanner.eof === false &&
- this.scanner.tokenType !== SEMICOLON$3 &&
- this.scanner.isDelim(EXCLAMATIONMARK$2) === false &&
- this.scanner.isBalanceEdge(startValueToken) === false) {
- this.error();
- }
- return value;
- }
- var Declaration = {
- name: 'Declaration',
- structure: {
- important: [Boolean, String],
- property: String,
- value: ['Value', 'Raw']
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var startToken = this.scanner.tokenIndex;
- var property = readProperty$1.call(this);
- var customProperty = isCustomProperty$1(property);
- var parseValue = customProperty ? this.parseCustomProperty : this.parseValue;
- var consumeRaw = customProperty ? consumeCustomPropertyRaw : consumeValueRaw;
- var important = false;
- var value;
- this.scanner.skipSC();
- this.eat(COLON$1);
- if (!customProperty) {
- this.scanner.skipSC();
- }
- if (parseValue) {
- value = this.parseWithFallback(consumeValue, consumeRaw);
- } else {
- value = consumeRaw.call(this, this.scanner.tokenIndex);
- }
- if (this.scanner.isDelim(EXCLAMATIONMARK$2)) {
- important = getImportant.call(this);
- this.scanner.skipSC();
- }
- // Do not include semicolon to range per spec
- // https://drafts.csswg.org/css-syntax/#declaration-diagram
- if (this.scanner.eof === false &&
- this.scanner.tokenType !== SEMICOLON$3 &&
- this.scanner.isBalanceEdge(startToken) === false) {
- this.error();
- }
- return {
- type: 'Declaration',
- loc: this.getLocation(start, this.scanner.tokenStart),
- important: important,
- property: property,
- value: value
- };
- },
- generate: function(node) {
- this.chunk(node.property);
- this.chunk(':');
- this.node(node.value);
- if (node.important) {
- this.chunk(node.important === true ? '!important' : '!' + node.important);
- }
- },
- walkContext: 'declaration'
- };
- function readProperty$1() {
- var start = this.scanner.tokenStart;
- // hacks
- if (this.scanner.tokenType === DELIM$2) {
- switch (this.scanner.source.charCodeAt(this.scanner.tokenStart)) {
- case ASTERISK$3:
- case DOLLARSIGN$1:
- case PLUSSIGN$5:
- case NUMBERSIGN$2:
- case AMPERSAND$1:
- this.scanner.next();
- break;
- // TODO: not sure we should support this hack
- case SOLIDUS$2:
- this.scanner.next();
- if (this.scanner.isDelim(SOLIDUS$2)) {
- this.scanner.next();
- }
- break;
- }
- }
- if (this.scanner.tokenType === HASH$1) {
- this.eat(HASH$1);
- } else {
- this.eat(IDENT$7);
- }
- return this.scanner.substrToCursor(start);
- }
- // ! ws* important
- function getImportant() {
- this.eat(DELIM$2);
- this.scanner.skipSC();
- var important = this.consume(IDENT$7);
- // store original value in case it differ from `important`
- // for better original source restoring and hacks like `!ie` support
- return important === 'important' ? true : important;
- }
- var TYPE$k = tokenizer.TYPE;
- var rawMode$3 = Raw.mode;
- var WHITESPACE$6 = TYPE$k.WhiteSpace;
- var COMMENT$7 = TYPE$k.Comment;
- var SEMICOLON$4 = TYPE$k.Semicolon;
- function consumeRaw$2(startToken) {
- return this.Raw(startToken, rawMode$3.semicolonIncluded, true);
- }
- var DeclarationList = {
- name: 'DeclarationList',
- structure: {
- children: [[
- 'Declaration'
- ]]
- },
- parse: function() {
- var children = this.createList();
-
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case WHITESPACE$6:
- case COMMENT$7:
- case SEMICOLON$4:
- this.scanner.next();
- break;
- default:
- children.push(this.parseWithFallback(this.Declaration, consumeRaw$2));
- }
- }
- return {
- type: 'DeclarationList',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node, function(prev) {
- if (prev.type === 'Declaration') {
- this.chunk(';');
- }
- });
- }
- };
- var consumeNumber$3 = utils.consumeNumber;
- var TYPE$l = tokenizer.TYPE;
- var DIMENSION$3 = TYPE$l.Dimension;
- var Dimension = {
- name: 'Dimension',
- structure: {
- value: String,
- unit: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var numberEnd = consumeNumber$3(this.scanner.source, start);
- this.eat(DIMENSION$3);
- return {
- type: 'Dimension',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.source.substring(start, numberEnd),
- unit: this.scanner.source.substring(numberEnd, this.scanner.tokenStart)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- this.chunk(node.unit);
- }
- };
- var TYPE$m = tokenizer.TYPE;
- var RIGHTPARENTHESIS$2 = TYPE$m.RightParenthesis;
- // <function-token> <sequence> )
- var _Function = {
- name: 'Function',
- structure: {
- name: String,
- children: [[]]
- },
- parse: function(readSequence, recognizer) {
- var start = this.scanner.tokenStart;
- var name = this.consumeFunctionName();
- var nameLowerCase = name.toLowerCase();
- var children;
- children = recognizer.hasOwnProperty(nameLowerCase)
- ? recognizer[nameLowerCase].call(this, recognizer)
- : readSequence.call(this, recognizer);
- if (!this.scanner.eof) {
- this.eat(RIGHTPARENTHESIS$2);
- }
- return {
- type: 'Function',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- children: children
- };
- },
- generate: function(node) {
- this.chunk(node.name);
- this.chunk('(');
- this.children(node);
- this.chunk(')');
- },
- walkContext: 'function'
- };
- var TYPE$n = tokenizer.TYPE;
- var HASH$2 = TYPE$n.Hash;
- // '#' ident
- var Hash = {
- name: 'Hash',
- structure: {
- value: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- this.eat(HASH$2);
- return {
- type: 'Hash',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.substrToCursor(start + 1)
- };
- },
- generate: function(node) {
- this.chunk('#');
- this.chunk(node.value);
- }
- };
- var TYPE$o = tokenizer.TYPE;
- var IDENT$8 = TYPE$o.Ident;
- var Identifier = {
- name: 'Identifier',
- structure: {
- name: String
- },
- parse: function() {
- return {
- type: 'Identifier',
- loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
- name: this.consume(IDENT$8)
- };
- },
- generate: function(node) {
- this.chunk(node.name);
- }
- };
- var TYPE$p = tokenizer.TYPE;
- var HASH$3 = TYPE$p.Hash;
- // <hash-token>
- var IdSelector = {
- name: 'IdSelector',
- structure: {
- name: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- // TODO: check value is an ident
- this.eat(HASH$3);
- return {
- type: 'IdSelector',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: this.scanner.substrToCursor(start + 1)
- };
- },
- generate: function(node) {
- this.chunk('#');
- this.chunk(node.name);
- }
- };
- var TYPE$q = tokenizer.TYPE;
- var IDENT$9 = TYPE$q.Ident;
- var NUMBER$4 = TYPE$q.Number;
- var DIMENSION$4 = TYPE$q.Dimension;
- var LEFTPARENTHESIS$2 = TYPE$q.LeftParenthesis;
- var RIGHTPARENTHESIS$3 = TYPE$q.RightParenthesis;
- var COLON$2 = TYPE$q.Colon;
- var DELIM$3 = TYPE$q.Delim;
- var MediaFeature = {
- name: 'MediaFeature',
- structure: {
- name: String,
- value: ['Identifier', 'Number', 'Dimension', 'Ratio', null]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var name;
- var value = null;
- this.eat(LEFTPARENTHESIS$2);
- this.scanner.skipSC();
- name = this.consume(IDENT$9);
- this.scanner.skipSC();
- if (this.scanner.tokenType !== RIGHTPARENTHESIS$3) {
- this.eat(COLON$2);
- this.scanner.skipSC();
- switch (this.scanner.tokenType) {
- case NUMBER$4:
- if (this.lookupNonWSType(1) === DELIM$3) {
- value = this.Ratio();
- } else {
- value = this.Number();
- }
- break;
- case DIMENSION$4:
- value = this.Dimension();
- break;
- case IDENT$9:
- value = this.Identifier();
- break;
- default:
- this.error('Number, dimension, ratio or identifier is expected');
- }
- this.scanner.skipSC();
- }
- this.eat(RIGHTPARENTHESIS$3);
- return {
- type: 'MediaFeature',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- value: value
- };
- },
- generate: function(node) {
- this.chunk('(');
- this.chunk(node.name);
- if (node.value !== null) {
- this.chunk(':');
- this.node(node.value);
- }
- this.chunk(')');
- }
- };
- var TYPE$r = tokenizer.TYPE;
- var WHITESPACE$7 = TYPE$r.WhiteSpace;
- var COMMENT$8 = TYPE$r.Comment;
- var IDENT$a = TYPE$r.Ident;
- var LEFTPARENTHESIS$3 = TYPE$r.LeftParenthesis;
- var MediaQuery = {
- name: 'MediaQuery',
- structure: {
- children: [[
- 'Identifier',
- 'MediaFeature',
- 'WhiteSpace'
- ]]
- },
- parse: function() {
- this.scanner.skipSC();
- var children = this.createList();
- var child = null;
- var space = null;
- scan:
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case COMMENT$8:
- this.scanner.next();
- continue;
- case WHITESPACE$7:
- space = this.WhiteSpace();
- continue;
- case IDENT$a:
- child = this.Identifier();
- break;
- case LEFTPARENTHESIS$3:
- child = this.MediaFeature();
- break;
- default:
- break scan;
- }
- if (space !== null) {
- children.push(space);
- space = null;
- }
- children.push(child);
- }
- if (child === null) {
- this.error('Identifier or parenthesis is expected');
- }
- return {
- type: 'MediaQuery',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node);
- }
- };
- var COMMA$1 = tokenizer.TYPE.Comma;
- var MediaQueryList = {
- name: 'MediaQueryList',
- structure: {
- children: [[
- 'MediaQuery'
- ]]
- },
- parse: function(relative) {
- var children = this.createList();
- this.scanner.skipSC();
- while (!this.scanner.eof) {
- children.push(this.MediaQuery(relative));
- if (this.scanner.tokenType !== COMMA$1) {
- break;
- }
- this.scanner.next();
- }
- return {
- type: 'MediaQueryList',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node, function() {
- this.chunk(',');
- });
- }
- };
- var Nth = {
- name: 'Nth',
- structure: {
- nth: ['AnPlusB', 'Identifier'],
- selector: ['SelectorList', null]
- },
- parse: function(allowOfClause) {
- this.scanner.skipSC();
- var start = this.scanner.tokenStart;
- var end = start;
- var selector = null;
- var query;
- if (this.scanner.lookupValue(0, 'odd') || this.scanner.lookupValue(0, 'even')) {
- query = this.Identifier();
- } else {
- query = this.AnPlusB();
- }
- this.scanner.skipSC();
- if (allowOfClause && this.scanner.lookupValue(0, 'of')) {
- this.scanner.next();
- selector = this.SelectorList();
- if (this.needPositions) {
- end = this.getLastListNode(selector.children).loc.end.offset;
- }
- } else {
- if (this.needPositions) {
- end = query.loc.end.offset;
- }
- }
- return {
- type: 'Nth',
- loc: this.getLocation(start, end),
- nth: query,
- selector: selector
- };
- },
- generate: function(node) {
- this.node(node.nth);
- if (node.selector !== null) {
- this.chunk(' of ');
- this.node(node.selector);
- }
- }
- };
- var NUMBER$5 = tokenizer.TYPE.Number;
- var _Number = {
- name: 'Number',
- structure: {
- value: String
- },
- parse: function() {
- return {
- type: 'Number',
- loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
- value: this.consume(NUMBER$5)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- }
- };
- // '/' | '*' | ',' | ':' | '+' | '-'
- var Operator = {
- name: 'Operator',
- structure: {
- value: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- this.scanner.next();
- return {
- type: 'Operator',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.substrToCursor(start)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- }
- };
- var TYPE$s = tokenizer.TYPE;
- var LEFTPARENTHESIS$4 = TYPE$s.LeftParenthesis;
- var RIGHTPARENTHESIS$4 = TYPE$s.RightParenthesis;
- var Parentheses = {
- name: 'Parentheses',
- structure: {
- children: [[]]
- },
- parse: function(readSequence, recognizer) {
- var start = this.scanner.tokenStart;
- var children = null;
- this.eat(LEFTPARENTHESIS$4);
- children = readSequence.call(this, recognizer);
- if (!this.scanner.eof) {
- this.eat(RIGHTPARENTHESIS$4);
- }
- return {
- type: 'Parentheses',
- loc: this.getLocation(start, this.scanner.tokenStart),
- children: children
- };
- },
- generate: function(node) {
- this.chunk('(');
- this.children(node);
- this.chunk(')');
- }
- };
- var consumeNumber$4 = utils.consumeNumber;
- var TYPE$t = tokenizer.TYPE;
- var PERCENTAGE$1 = TYPE$t.Percentage;
- var Percentage = {
- name: 'Percentage',
- structure: {
- value: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var numberEnd = consumeNumber$4(this.scanner.source, start);
- this.eat(PERCENTAGE$1);
- return {
- type: 'Percentage',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.source.substring(start, numberEnd)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- this.chunk('%');
- }
- };
- var TYPE$u = tokenizer.TYPE;
- var IDENT$b = TYPE$u.Ident;
- var FUNCTION$1 = TYPE$u.Function;
- var COLON$3 = TYPE$u.Colon;
- var RIGHTPARENTHESIS$5 = TYPE$u.RightParenthesis;
- // : [ <ident> | <function-token> <any-value>? ) ]
- var PseudoClassSelector = {
- name: 'PseudoClassSelector',
- structure: {
- name: String,
- children: [['Raw'], null]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var children = null;
- var name;
- var nameLowerCase;
- this.eat(COLON$3);
- if (this.scanner.tokenType === FUNCTION$1) {
- name = this.consumeFunctionName();
- nameLowerCase = name.toLowerCase();
- if (this.pseudo.hasOwnProperty(nameLowerCase)) {
- this.scanner.skipSC();
- children = this.pseudo[nameLowerCase].call(this);
- this.scanner.skipSC();
- } else {
- children = this.createList();
- children.push(
- this.Raw(this.scanner.tokenIndex, null, false)
- );
- }
- this.eat(RIGHTPARENTHESIS$5);
- } else {
- name = this.consume(IDENT$b);
- }
- return {
- type: 'PseudoClassSelector',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- children: children
- };
- },
- generate: function(node) {
- this.chunk(':');
- this.chunk(node.name);
- if (node.children !== null) {
- this.chunk('(');
- this.children(node);
- this.chunk(')');
- }
- },
- walkContext: 'function'
- };
- var TYPE$v = tokenizer.TYPE;
- var IDENT$c = TYPE$v.Ident;
- var FUNCTION$2 = TYPE$v.Function;
- var COLON$4 = TYPE$v.Colon;
- var RIGHTPARENTHESIS$6 = TYPE$v.RightParenthesis;
- // :: [ <ident> | <function-token> <any-value>? ) ]
- var PseudoElementSelector = {
- name: 'PseudoElementSelector',
- structure: {
- name: String,
- children: [['Raw'], null]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var children = null;
- var name;
- var nameLowerCase;
- this.eat(COLON$4);
- this.eat(COLON$4);
- if (this.scanner.tokenType === FUNCTION$2) {
- name = this.consumeFunctionName();
- nameLowerCase = name.toLowerCase();
- if (this.pseudo.hasOwnProperty(nameLowerCase)) {
- this.scanner.skipSC();
- children = this.pseudo[nameLowerCase].call(this);
- this.scanner.skipSC();
- } else {
- children = this.createList();
- children.push(
- this.Raw(this.scanner.tokenIndex, null, false)
- );
- }
- this.eat(RIGHTPARENTHESIS$6);
- } else {
- name = this.consume(IDENT$c);
- }
- return {
- type: 'PseudoElementSelector',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: name,
- children: children
- };
- },
- generate: function(node) {
- this.chunk('::');
- this.chunk(node.name);
- if (node.children !== null) {
- this.chunk('(');
- this.children(node);
- this.chunk(')');
- }
- },
- walkContext: 'function'
- };
- var isDigit$5 = tokenizer.isDigit;
- var TYPE$w = tokenizer.TYPE;
- var NUMBER$6 = TYPE$w.Number;
- var DELIM$4 = TYPE$w.Delim;
- var SOLIDUS$3 = 0x002F; // U+002F SOLIDUS (/)
- var FULLSTOP$1 = 0x002E; // U+002E FULL STOP (.)
- // Terms of <ratio> should be a positive numbers (not zero or negative)
- // (see https://drafts.csswg.org/mediaqueries-3/#values)
- // However, -o-min-device-pixel-ratio takes fractional values as a ratio's term
- // and this is using by various sites. Therefore we relax checking on parse
- // to test a term is unsigned number without an exponent part.
- // Additional checking may be applied on lexer validation.
- function consumeNumber$5() {
- this.scanner.skipWS();
- var value = this.consume(NUMBER$6);
- for (var i = 0; i < value.length; i++) {
- var code = value.charCodeAt(i);
- if (!isDigit$5(code) && code !== FULLSTOP$1) {
- this.error('Unsigned number is expected', this.scanner.tokenStart - value.length + i);
- }
- }
- if (Number(value) === 0) {
- this.error('Zero number is not allowed', this.scanner.tokenStart - value.length);
- }
- return value;
- }
- // <positive-integer> S* '/' S* <positive-integer>
- var Ratio = {
- name: 'Ratio',
- structure: {
- left: String,
- right: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var left = consumeNumber$5.call(this);
- var right;
- this.scanner.skipWS();
- if (!this.scanner.isDelim(SOLIDUS$3)) {
- this.error('Solidus is expected');
- }
- this.eat(DELIM$4);
- right = consumeNumber$5.call(this);
- return {
- type: 'Ratio',
- loc: this.getLocation(start, this.scanner.tokenStart),
- left: left,
- right: right
- };
- },
- generate: function(node) {
- this.chunk(node.left);
- this.chunk('/');
- this.chunk(node.right);
- }
- };
- var TYPE$x = tokenizer.TYPE;
- var rawMode$4 = Raw.mode;
- var LEFTCURLYBRACKET$4 = TYPE$x.LeftCurlyBracket;
- function consumeRaw$3(startToken) {
- return this.Raw(startToken, rawMode$4.leftCurlyBracket, true);
- }
- function consumePrelude() {
- var prelude = this.SelectorList();
- if (prelude.type !== 'Raw' &&
- this.scanner.eof === false &&
- this.scanner.tokenType !== LEFTCURLYBRACKET$4) {
- this.error();
- }
- return prelude;
- }
- var Rule = {
- name: 'Rule',
- structure: {
- prelude: ['SelectorList', 'Raw'],
- block: ['Block']
- },
- parse: function() {
- var startToken = this.scanner.tokenIndex;
- var startOffset = this.scanner.tokenStart;
- var prelude;
- var block;
- if (this.parseRulePrelude) {
- prelude = this.parseWithFallback(consumePrelude, consumeRaw$3);
- } else {
- prelude = consumeRaw$3.call(this, startToken);
- }
- block = this.Block(true);
- return {
- type: 'Rule',
- loc: this.getLocation(startOffset, this.scanner.tokenStart),
- prelude: prelude,
- block: block
- };
- },
- generate: function(node) {
- this.node(node.prelude);
- this.node(node.block);
- },
- walkContext: 'rule'
- };
- var Selector = {
- name: 'Selector',
- structure: {
- children: [[
- 'TypeSelector',
- 'IdSelector',
- 'ClassSelector',
- 'AttributeSelector',
- 'PseudoClassSelector',
- 'PseudoElementSelector',
- 'Combinator',
- 'WhiteSpace'
- ]]
- },
- parse: function() {
- var children = this.readSequence(this.scope.Selector);
- // nothing were consumed
- if (this.getFirstListNode(children) === null) {
- this.error('Selector is expected');
- }
- return {
- type: 'Selector',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node);
- }
- };
- var TYPE$y = tokenizer.TYPE;
- var COMMA$2 = TYPE$y.Comma;
- var SelectorList = {
- name: 'SelectorList',
- structure: {
- children: [[
- 'Selector',
- 'Raw'
- ]]
- },
- parse: function() {
- var children = this.createList();
- while (!this.scanner.eof) {
- children.push(this.Selector());
- if (this.scanner.tokenType === COMMA$2) {
- this.scanner.next();
- continue;
- }
- break;
- }
- return {
- type: 'SelectorList',
- loc: this.getLocationFromList(children),
- children: children
- };
- },
- generate: function(node) {
- this.children(node, function() {
- this.chunk(',');
- });
- },
- walkContext: 'selector'
- };
- var STRING$1 = tokenizer.TYPE.String;
- var _String = {
- name: 'String',
- structure: {
- value: String
- },
- parse: function() {
- return {
- type: 'String',
- loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
- value: this.consume(STRING$1)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- }
- };
- var TYPE$z = tokenizer.TYPE;
- var WHITESPACE$8 = TYPE$z.WhiteSpace;
- var COMMENT$9 = TYPE$z.Comment;
- var ATKEYWORD$2 = TYPE$z.AtKeyword;
- var CDO$1 = TYPE$z.CDO;
- var CDC$1 = TYPE$z.CDC;
- var EXCLAMATIONMARK$3 = 0x0021; // U+0021 EXCLAMATION MARK (!)
- function consumeRaw$4(startToken) {
- return this.Raw(startToken, null, false);
- }
- var StyleSheet = {
- name: 'StyleSheet',
- structure: {
- children: [[
- 'Comment',
- 'CDO',
- 'CDC',
- 'Atrule',
- 'Rule',
- 'Raw'
- ]]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var children = this.createList();
- var child;
-
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case WHITESPACE$8:
- this.scanner.next();
- continue;
- case COMMENT$9:
- // ignore comments except exclamation comments (i.e. /*! .. */) on top level
- if (this.scanner.source.charCodeAt(this.scanner.tokenStart + 2) !== EXCLAMATIONMARK$3) {
- this.scanner.next();
- continue;
- }
- child = this.Comment();
- break;
- case CDO$1: // <!--
- child = this.CDO();
- break;
- case CDC$1: // -->
- child = this.CDC();
- break;
- // CSS Syntax Module Level 3
- // §2.2 Error handling
- // At the "top level" of a stylesheet, an <at-keyword-token> starts an at-rule.
- case ATKEYWORD$2:
- child = this.parseWithFallback(this.Atrule, consumeRaw$4);
- break;
- // Anything else starts a qualified rule ...
- default:
- child = this.parseWithFallback(this.Rule, consumeRaw$4);
- }
- children.push(child);
- }
- return {
- type: 'StyleSheet',
- loc: this.getLocation(start, this.scanner.tokenStart),
- children: children
- };
- },
- generate: function(node) {
- this.children(node);
- },
- walkContext: 'stylesheet'
- };
- var TYPE$A = tokenizer.TYPE;
- var IDENT$d = TYPE$A.Ident;
- var ASTERISK$4 = 0x002A; // U+002A ASTERISK (*)
- var VERTICALLINE$2 = 0x007C; // U+007C VERTICAL LINE (|)
- function eatIdentifierOrAsterisk() {
- if (this.scanner.tokenType !== IDENT$d &&
- this.scanner.isDelim(ASTERISK$4) === false) {
- this.error('Identifier or asterisk is expected');
- }
- this.scanner.next();
- }
- // ident
- // ident|ident
- // ident|*
- // *
- // *|ident
- // *|*
- // |ident
- // |*
- var TypeSelector = {
- name: 'TypeSelector',
- structure: {
- name: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- if (this.scanner.isDelim(VERTICALLINE$2)) {
- this.scanner.next();
- eatIdentifierOrAsterisk.call(this);
- } else {
- eatIdentifierOrAsterisk.call(this);
- if (this.scanner.isDelim(VERTICALLINE$2)) {
- this.scanner.next();
- eatIdentifierOrAsterisk.call(this);
- }
- }
- return {
- type: 'TypeSelector',
- loc: this.getLocation(start, this.scanner.tokenStart),
- name: this.scanner.substrToCursor(start)
- };
- },
- generate: function(node) {
- this.chunk(node.name);
- }
- };
- var isHexDigit$4 = tokenizer.isHexDigit;
- var cmpChar$4 = tokenizer.cmpChar;
- var TYPE$B = tokenizer.TYPE;
- var NAME$3 = tokenizer.NAME;
- var IDENT$e = TYPE$B.Ident;
- var NUMBER$7 = TYPE$B.Number;
- var DIMENSION$5 = TYPE$B.Dimension;
- var PLUSSIGN$6 = 0x002B; // U+002B PLUS SIGN (+)
- var HYPHENMINUS$4 = 0x002D; // U+002D HYPHEN-MINUS (-)
- var QUESTIONMARK$2 = 0x003F; // U+003F QUESTION MARK (?)
- var U$1 = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
- function eatHexSequence(offset, allowDash) {
- for (var pos = this.scanner.tokenStart + offset, len = 0; pos < this.scanner.tokenEnd; pos++) {
- var code = this.scanner.source.charCodeAt(pos);
- if (code === HYPHENMINUS$4 && allowDash && len !== 0) {
- if (eatHexSequence.call(this, offset + len + 1, false) === 0) {
- this.error();
- }
- return -1;
- }
- if (!isHexDigit$4(code)) {
- this.error(
- allowDash && len !== 0
- ? 'HyphenMinus' + (len < 6 ? ' or hex digit' : '') + ' is expected'
- : (len < 6 ? 'Hex digit is expected' : 'Unexpected input'),
- pos
- );
- }
- if (++len > 6) {
- this.error('Too many hex digits', pos);
- } }
- this.scanner.next();
- return len;
- }
- function eatQuestionMarkSequence(max) {
- var count = 0;
- while (this.scanner.isDelim(QUESTIONMARK$2)) {
- if (++count > max) {
- this.error('Too many question marks');
- }
- this.scanner.next();
- }
- }
- function startsWith$1(code) {
- if (this.scanner.source.charCodeAt(this.scanner.tokenStart) !== code) {
- this.error(NAME$3[code] + ' is expected');
- }
- }
- // https://drafts.csswg.org/css-syntax/#urange
- // Informally, the <urange> production has three forms:
- // U+0001
- // Defines a range consisting of a single code point, in this case the code point "1".
- // U+0001-00ff
- // Defines a range of codepoints between the first and the second value, in this case
- // the range between "1" and "ff" (255 in decimal) inclusive.
- // U+00??
- // Defines a range of codepoints where the "?" characters range over all hex digits,
- // in this case defining the same as the value U+0000-00ff.
- // In each form, a maximum of 6 digits is allowed for each hexadecimal number (if you treat "?" as a hexadecimal digit).
- //
- // <urange> =
- // u '+' <ident-token> '?'* |
- // u <dimension-token> '?'* |
- // u <number-token> '?'* |
- // u <number-token> <dimension-token> |
- // u <number-token> <number-token> |
- // u '+' '?'+
- function scanUnicodeRange() {
- var hexLength = 0;
- // u '+' <ident-token> '?'*
- // u '+' '?'+
- if (this.scanner.isDelim(PLUSSIGN$6)) {
- this.scanner.next();
- if (this.scanner.tokenType === IDENT$e) {
- hexLength = eatHexSequence.call(this, 0, true);
- if (hexLength > 0) {
- eatQuestionMarkSequence.call(this, 6 - hexLength);
- }
- return;
- }
- if (this.scanner.isDelim(QUESTIONMARK$2)) {
- this.scanner.next();
- eatQuestionMarkSequence.call(this, 5);
- return;
- }
- this.error('Hex digit or question mark is expected');
- return;
- }
- // u <number-token> '?'*
- // u <number-token> <dimension-token>
- // u <number-token> <number-token>
- if (this.scanner.tokenType === NUMBER$7) {
- startsWith$1.call(this, PLUSSIGN$6);
- hexLength = eatHexSequence.call(this, 1, true);
- if (this.scanner.isDelim(QUESTIONMARK$2)) {
- eatQuestionMarkSequence.call(this, 6 - hexLength);
- return;
- }
- if (this.scanner.tokenType === DIMENSION$5 ||
- this.scanner.tokenType === NUMBER$7) {
- startsWith$1.call(this, HYPHENMINUS$4);
- eatHexSequence.call(this, 1, false);
- return;
- }
- return;
- }
- // u <dimension-token> '?'*
- if (this.scanner.tokenType === DIMENSION$5) {
- startsWith$1.call(this, PLUSSIGN$6);
- hexLength = eatHexSequence.call(this, 1, true);
- if (hexLength > 0) {
- eatQuestionMarkSequence.call(this, 6 - hexLength);
- }
- return;
- }
- this.error();
- }
- var UnicodeRange = {
- name: 'UnicodeRange',
- structure: {
- value: String
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- // U or u
- if (!cmpChar$4(this.scanner.source, start, U$1)) {
- this.error('U is expected');
- }
- if (!cmpChar$4(this.scanner.source, start + 1, PLUSSIGN$6)) {
- this.error('Plus sign is expected');
- }
- this.scanner.next();
- scanUnicodeRange.call(this);
- return {
- type: 'UnicodeRange',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: this.scanner.substrToCursor(start)
- };
- },
- generate: function(node) {
- this.chunk(node.value);
- }
- };
- var isWhiteSpace$2 = tokenizer.isWhiteSpace;
- var cmpStr$5 = tokenizer.cmpStr;
- var TYPE$C = tokenizer.TYPE;
- var FUNCTION$3 = TYPE$C.Function;
- var URL$1 = TYPE$C.Url;
- var RIGHTPARENTHESIS$7 = TYPE$C.RightParenthesis;
- // <url-token> | <function-token> <string> )
- var Url = {
- name: 'Url',
- structure: {
- value: ['String', 'Raw']
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var value;
- switch (this.scanner.tokenType) {
- case URL$1:
- var rawStart = start + 4;
- var rawEnd = this.scanner.tokenEnd - 1;
- while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawStart))) {
- rawStart++;
- }
- while (rawStart < rawEnd && isWhiteSpace$2(this.scanner.source.charCodeAt(rawEnd - 1))) {
- rawEnd--;
- }
- value = {
- type: 'Raw',
- loc: this.getLocation(rawStart, rawEnd),
- value: this.scanner.source.substring(rawStart, rawEnd)
- };
- this.eat(URL$1);
- break;
- case FUNCTION$3:
- if (!cmpStr$5(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')) {
- this.error('Function name must be `url`');
- }
- this.eat(FUNCTION$3);
- this.scanner.skipSC();
- value = this.String();
- this.scanner.skipSC();
- this.eat(RIGHTPARENTHESIS$7);
- break;
- default:
- this.error('Url or Function is expected');
- }
- return {
- type: 'Url',
- loc: this.getLocation(start, this.scanner.tokenStart),
- value: value
- };
- },
- generate: function(node) {
- this.chunk('url');
- this.chunk('(');
- this.node(node.value);
- this.chunk(')');
- }
- };
- var Value = {
- name: 'Value',
- structure: {
- children: [[]]
- },
- parse: function() {
- var start = this.scanner.tokenStart;
- var children = this.readSequence(this.scope.Value);
- return {
- type: 'Value',
- loc: this.getLocation(start, this.scanner.tokenStart),
- children: children
- };
- },
- generate: function(node) {
- this.children(node);
- }
- };
- var WHITESPACE$9 = tokenizer.TYPE.WhiteSpace;
- var SPACE$2 = Object.freeze({
- type: 'WhiteSpace',
- loc: null,
- value: ' '
- });
- var WhiteSpace$1 = {
- name: 'WhiteSpace',
- structure: {
- value: String
- },
- parse: function() {
- this.eat(WHITESPACE$9);
- return SPACE$2;
- // return {
- // type: 'WhiteSpace',
- // loc: this.getLocation(this.scanner.tokenStart, this.scanner.tokenEnd),
- // value: this.consume(WHITESPACE)
- // };
- },
- generate: function(node) {
- this.chunk(node.value);
- }
- };
- var node = {
- AnPlusB: AnPlusB,
- Atrule: Atrule,
- AtrulePrelude: AtrulePrelude,
- AttributeSelector: AttributeSelector,
- Block: Block,
- Brackets: Brackets,
- CDC: CDC_1,
- CDO: CDO_1,
- ClassSelector: ClassSelector,
- Combinator: Combinator,
- Comment: Comment,
- Declaration: Declaration,
- DeclarationList: DeclarationList,
- Dimension: Dimension,
- Function: _Function,
- Hash: Hash,
- Identifier: Identifier,
- IdSelector: IdSelector,
- MediaFeature: MediaFeature,
- MediaQuery: MediaQuery,
- MediaQueryList: MediaQueryList,
- Nth: Nth,
- Number: _Number,
- Operator: Operator,
- Parentheses: Parentheses,
- Percentage: Percentage,
- PseudoClassSelector: PseudoClassSelector,
- PseudoElementSelector: PseudoElementSelector,
- Ratio: Ratio,
- Raw: Raw,
- Rule: Rule,
- Selector: Selector,
- SelectorList: SelectorList,
- String: _String,
- StyleSheet: StyleSheet,
- TypeSelector: TypeSelector,
- UnicodeRange: UnicodeRange,
- Url: Url,
- Value: Value,
- WhiteSpace: WhiteSpace$1
- };
- var lexer = {
- generic: true,
- types: data.types,
- atrules: data.atrules,
- properties: data.properties,
- node: node
- };
- var cmpChar$5 = tokenizer.cmpChar;
- var cmpStr$6 = tokenizer.cmpStr;
- var TYPE$D = tokenizer.TYPE;
- var IDENT$f = TYPE$D.Ident;
- var STRING$2 = TYPE$D.String;
- var NUMBER$8 = TYPE$D.Number;
- var FUNCTION$4 = TYPE$D.Function;
- var URL$2 = TYPE$D.Url;
- var HASH$4 = TYPE$D.Hash;
- var DIMENSION$6 = TYPE$D.Dimension;
- var PERCENTAGE$2 = TYPE$D.Percentage;
- var LEFTPARENTHESIS$5 = TYPE$D.LeftParenthesis;
- var LEFTSQUAREBRACKET$3 = TYPE$D.LeftSquareBracket;
- var COMMA$3 = TYPE$D.Comma;
- var DELIM$5 = TYPE$D.Delim;
- var NUMBERSIGN$3 = 0x0023; // U+0023 NUMBER SIGN (#)
- var ASTERISK$5 = 0x002A; // U+002A ASTERISK (*)
- var PLUSSIGN$7 = 0x002B; // U+002B PLUS SIGN (+)
- var HYPHENMINUS$5 = 0x002D; // U+002D HYPHEN-MINUS (-)
- var SOLIDUS$4 = 0x002F; // U+002F SOLIDUS (/)
- var U$2 = 0x0075; // U+0075 LATIN SMALL LETTER U (u)
- var _default = function defaultRecognizer(context) {
- switch (this.scanner.tokenType) {
- case HASH$4:
- return this.Hash();
- case COMMA$3:
- context.space = null;
- context.ignoreWSAfter = true;
- return this.Operator();
- case LEFTPARENTHESIS$5:
- return this.Parentheses(this.readSequence, context.recognizer);
- case LEFTSQUAREBRACKET$3:
- return this.Brackets(this.readSequence, context.recognizer);
- case STRING$2:
- return this.String();
- case DIMENSION$6:
- return this.Dimension();
- case PERCENTAGE$2:
- return this.Percentage();
- case NUMBER$8:
- return this.Number();
- case FUNCTION$4:
- return cmpStr$6(this.scanner.source, this.scanner.tokenStart, this.scanner.tokenEnd, 'url(')
- ? this.Url()
- : this.Function(this.readSequence, context.recognizer);
- case URL$2:
- return this.Url();
- case IDENT$f:
- // check for unicode range, it should start with u+ or U+
- if (cmpChar$5(this.scanner.source, this.scanner.tokenStart, U$2) &&
- cmpChar$5(this.scanner.source, this.scanner.tokenStart + 1, PLUSSIGN$7)) {
- return this.UnicodeRange();
- } else {
- return this.Identifier();
- }
- case DELIM$5:
- var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
- if (code === SOLIDUS$4 ||
- code === ASTERISK$5 ||
- code === PLUSSIGN$7 ||
- code === HYPHENMINUS$5) {
- return this.Operator(); // TODO: replace with Delim
- }
- // TODO: produce a node with Delim node type
- if (code === NUMBERSIGN$3) {
- this.error('Hex or identifier is expected', this.scanner.tokenStart + 1);
- }
- break;
- }
- };
- var atrulePrelude = {
- getNode: _default
- };
- var TYPE$E = tokenizer.TYPE;
- var DELIM$6 = TYPE$E.Delim;
- var IDENT$g = TYPE$E.Ident;
- var DIMENSION$7 = TYPE$E.Dimension;
- var PERCENTAGE$3 = TYPE$E.Percentage;
- var NUMBER$9 = TYPE$E.Number;
- var HASH$5 = TYPE$E.Hash;
- var COLON$5 = TYPE$E.Colon;
- var LEFTSQUAREBRACKET$4 = TYPE$E.LeftSquareBracket;
- var NUMBERSIGN$4 = 0x0023; // U+0023 NUMBER SIGN (#)
- var ASTERISK$6 = 0x002A; // U+002A ASTERISK (*)
- var PLUSSIGN$8 = 0x002B; // U+002B PLUS SIGN (+)
- var SOLIDUS$5 = 0x002F; // U+002F SOLIDUS (/)
- var FULLSTOP$2 = 0x002E; // U+002E FULL STOP (.)
- var GREATERTHANSIGN$2 = 0x003E; // U+003E GREATER-THAN SIGN (>)
- var VERTICALLINE$3 = 0x007C; // U+007C VERTICAL LINE (|)
- var TILDE$2 = 0x007E; // U+007E TILDE (~)
- function getNode(context) {
- switch (this.scanner.tokenType) {
- case LEFTSQUAREBRACKET$4:
- return this.AttributeSelector();
- case HASH$5:
- return this.IdSelector();
- case COLON$5:
- if (this.scanner.lookupType(1) === COLON$5) {
- return this.PseudoElementSelector();
- } else {
- return this.PseudoClassSelector();
- }
- case IDENT$g:
- return this.TypeSelector();
- case NUMBER$9:
- case PERCENTAGE$3:
- return this.Percentage();
- case DIMENSION$7:
- // throws when .123ident
- if (this.scanner.source.charCodeAt(this.scanner.tokenStart) === FULLSTOP$2) {
- this.error('Identifier is expected', this.scanner.tokenStart + 1);
- }
- break;
- case DELIM$6:
- var code = this.scanner.source.charCodeAt(this.scanner.tokenStart);
- switch (code) {
- case PLUSSIGN$8:
- case GREATERTHANSIGN$2:
- case TILDE$2:
- context.space = null;
- context.ignoreWSAfter = true;
- return this.Combinator();
- case SOLIDUS$5: // /deep/
- return this.Combinator();
- case FULLSTOP$2:
- return this.ClassSelector();
- case ASTERISK$6:
- case VERTICALLINE$3:
- return this.TypeSelector();
- case NUMBERSIGN$4:
- return this.IdSelector();
- }
- break;
- }
- }
- var selector = {
- getNode: getNode
- };
- // legacy IE function
- // expression( <any-value> )
- var expression = function() {
- return this.createSingleNodeList(
- this.Raw(this.scanner.tokenIndex, null, false)
- );
- };
- var TYPE$F = tokenizer.TYPE;
- var rawMode$5 = Raw.mode;
- var COMMA$4 = TYPE$F.Comma;
- // var( <ident> , <value>? )
- var _var = function() {
- var children = this.createList();
- this.scanner.skipSC();
- // NOTE: Don't check more than a first argument is an ident, rest checks are for lexer
- children.push(this.Identifier());
- this.scanner.skipSC();
- if (this.scanner.tokenType === COMMA$4) {
- children.push(this.Operator());
- children.push(this.parseCustomProperty
- ? this.Value(null)
- : this.Raw(this.scanner.tokenIndex, rawMode$5.exclamationMarkOrSemicolon, false)
- );
- }
- return children;
- };
- var value = {
- getNode: _default,
- 'expression': expression,
- 'var': _var
- };
- var scope = {
- AtrulePrelude: atrulePrelude,
- Selector: selector,
- Value: value
- };
- var fontFace = {
- parse: {
- prelude: null,
- block: function() {
- return this.Block(true);
- }
- }
- };
- var TYPE$G = tokenizer.TYPE;
- var STRING$3 = TYPE$G.String;
- var IDENT$h = TYPE$G.Ident;
- var URL$3 = TYPE$G.Url;
- var FUNCTION$5 = TYPE$G.Function;
- var LEFTPARENTHESIS$6 = TYPE$G.LeftParenthesis;
- var _import = {
- parse: {
- prelude: function() {
- var children = this.createList();
- this.scanner.skipSC();
- switch (this.scanner.tokenType) {
- case STRING$3:
- children.push(this.String());
- break;
- case URL$3:
- case FUNCTION$5:
- children.push(this.Url());
- break;
- default:
- this.error('String or url() is expected');
- }
- if (this.lookupNonWSType(0) === IDENT$h ||
- this.lookupNonWSType(0) === LEFTPARENTHESIS$6) {
- children.push(this.WhiteSpace());
- children.push(this.MediaQueryList());
- }
- return children;
- },
- block: null
- }
- };
- var media = {
- parse: {
- prelude: function() {
- return this.createSingleNodeList(
- this.MediaQueryList()
- );
- },
- block: function() {
- return this.Block(false);
- }
- }
- };
- var page = {
- parse: {
- prelude: function() {
- return this.createSingleNodeList(
- this.SelectorList()
- );
- },
- block: function() {
- return this.Block(true);
- }
- }
- };
- var TYPE$H = tokenizer.TYPE;
- var WHITESPACE$a = TYPE$H.WhiteSpace;
- var COMMENT$a = TYPE$H.Comment;
- var IDENT$i = TYPE$H.Ident;
- var FUNCTION$6 = TYPE$H.Function;
- var COLON$6 = TYPE$H.Colon;
- var LEFTPARENTHESIS$7 = TYPE$H.LeftParenthesis;
- function consumeRaw$5() {
- return this.createSingleNodeList(
- this.Raw(this.scanner.tokenIndex, null, false)
- );
- }
- function parentheses() {
- this.scanner.skipSC();
- if (this.scanner.tokenType === IDENT$i &&
- this.lookupNonWSType(1) === COLON$6) {
- return this.createSingleNodeList(
- this.Declaration()
- );
- }
- return readSequence.call(this);
- }
- function readSequence() {
- var children = this.createList();
- var space = null;
- var child;
- this.scanner.skipSC();
- scan:
- while (!this.scanner.eof) {
- switch (this.scanner.tokenType) {
- case WHITESPACE$a:
- space = this.WhiteSpace();
- continue;
- case COMMENT$a:
- this.scanner.next();
- continue;
- case FUNCTION$6:
- child = this.Function(consumeRaw$5, this.scope.AtrulePrelude);
- break;
- case IDENT$i:
- child = this.Identifier();
- break;
- case LEFTPARENTHESIS$7:
- child = this.Parentheses(parentheses, this.scope.AtrulePrelude);
- break;
- default:
- break scan;
- }
- if (space !== null) {
- children.push(space);
- space = null;
- }
- children.push(child);
- }
- return children;
- }
- var supports = {
- parse: {
- prelude: function() {
- var children = readSequence.call(this);
- if (this.getFirstListNode(children) === null) {
- this.error('Condition is expected');
- }
- return children;
- },
- block: function() {
- return this.Block(false);
- }
- }
- };
- var atrule = {
- 'font-face': fontFace,
- 'import': _import,
- 'media': media,
- 'page': page,
- 'supports': supports
- };
- var dir = {
- parse: function() {
- return this.createSingleNodeList(
- this.Identifier()
- );
- }
- };
- var has$1 = {
- parse: function() {
- return this.createSingleNodeList(
- this.SelectorList()
- );
- }
- };
- var lang = {
- parse: function() {
- return this.createSingleNodeList(
- this.Identifier()
- );
- }
- };
- var selectorList = {
- parse: function selectorList() {
- return this.createSingleNodeList(
- this.SelectorList()
- );
- }
- };
- var matches = selectorList;
- var not = selectorList;
- var ALLOW_OF_CLAUSE = true;
- var nthWithOfClause = {
- parse: function nthWithOfClause() {
- return this.createSingleNodeList(
- this.Nth(ALLOW_OF_CLAUSE)
- );
- }
- };
- var nthChild = nthWithOfClause;
- var nthLastChild = nthWithOfClause;
- var DISALLOW_OF_CLAUSE = false;
- var nth$1 = {
- parse: function nth() {
- return this.createSingleNodeList(
- this.Nth(DISALLOW_OF_CLAUSE)
- );
- }
- };
- var nthLastOfType = nth$1;
- var nthOfType = nth$1;
- var slotted = {
- parse: function compoundSelector() {
- return this.createSingleNodeList(
- this.Selector()
- );
- }
- };
- var pseudo = {
- 'dir': dir,
- 'has': has$1,
- 'lang': lang,
- 'matches': matches,
- 'not': not,
- 'nth-child': nthChild,
- 'nth-last-child': nthLastChild,
- 'nth-last-of-type': nthLastOfType,
- 'nth-of-type': nthOfType,
- 'slotted': slotted
- };
- var parser = {
- parseContext: {
- default: 'StyleSheet',
- stylesheet: 'StyleSheet',
- atrule: 'Atrule',
- atrulePrelude: function(options) {
- return this.AtrulePrelude(options.atrule ? String(options.atrule) : null);
- },
- mediaQueryList: 'MediaQueryList',
- mediaQuery: 'MediaQuery',
- rule: 'Rule',
- selectorList: 'SelectorList',
- selector: 'Selector',
- block: function() {
- return this.Block(true);
- },
- declarationList: 'DeclarationList',
- declaration: 'Declaration',
- value: 'Value'
- },
- scope: scope,
- atrule: atrule,
- pseudo: pseudo,
- node: node
- };
- var walker = {
- node: node
- };
- var _from = "css-tree@^1.0.0";
- var _id = "css-tree@1.0.0";
- var _inBundle = false;
- var _integrity = "sha512-CdVYz/Yuqw0VdKhXPBIgi8DO3NicJVYZNWeX9XcIuSp9ZoFT5IcleVRW07O5rMjdcx1mb+MEJPknTTEW7DdsYw==";
- var _location = "/css-tree";
- var _phantomChildren = {
- };
- var _requested = {
- type: "range",
- registry: true,
- raw: "css-tree@^1.0.0",
- name: "css-tree",
- escapedName: "css-tree",
- rawSpec: "^1.0.0",
- saveSpec: null,
- fetchSpec: "^1.0.0"
- };
- var _requiredBy = [
- "/"
- ];
- var _resolved = "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0.tgz";
- var _shasum = "21993fa270d742642a90409a2c0cb3ac0298adf6";
- var _spec = "css-tree@^1.0.0";
- var _where = "/Users/rdvornov/git/csso";
- var author = {
- name: "Roman Dvornov",
- email: "rdvornov@gmail.com",
- url: "https://github.com/lahmatiy"
- };
- var bugs = {
- url: "https://github.com/csstree/csstree/issues"
- };
- var bundleDependencies = false;
- var dependencies = {
- "mdn-data": "2.0.12",
- "source-map": "^0.6.1"
- };
- var deprecated = false;
- 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";
- var devDependencies = {
- "@rollup/plugin-commonjs": "^11.0.2",
- "@rollup/plugin-json": "^4.0.2",
- "@rollup/plugin-node-resolve": "^7.1.1",
- coveralls: "^3.0.9",
- eslint: "^6.8.0",
- "json-to-ast": "^2.1.0",
- mocha: "^5.2.0",
- nyc: "^14.1.1",
- rollup: "^1.32.1",
- "rollup-plugin-terser": "^5.3.0"
- };
- var engines = {
- node: ">=8.0.0"
- };
- var files = [
- "data",
- "dist",
- "lib"
- ];
- var homepage = "https://github.com/csstree/csstree#readme";
- var jsdelivr = "dist/csstree.min.js";
- var keywords$1 = [
- "css",
- "ast",
- "tokenizer",
- "parser",
- "walker",
- "lexer",
- "generator",
- "utils",
- "syntax",
- "validation"
- ];
- var license = "MIT";
- var main = "lib/index.js";
- var name = "css-tree";
- var repository = {
- type: "git",
- url: "git+https://github.com/csstree/csstree.git"
- };
- var scripts = {
- build: "rollup --config",
- coverage: "nyc npm test",
- coveralls: "nyc report --reporter=text-lcov | coveralls",
- 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",
- lint: "eslint data lib scripts test && node scripts/review-syntax-patch --lint && node scripts/update-docs --lint",
- "lint-and-test": "npm run lint && npm test",
- prepublishOnly: "npm run build",
- "review:syntax-patch": "node scripts/review-syntax-patch",
- test: "mocha --reporter progress",
- travis: "nyc npm run lint-and-test && npm run coveralls",
- "update:docs": "node scripts/update-docs"
- };
- var unpkg = "dist/csstree.min.js";
- var version = "1.0.0";
- var _package = {
- _from: _from,
- _id: _id,
- _inBundle: _inBundle,
- _integrity: _integrity,
- _location: _location,
- _phantomChildren: _phantomChildren,
- _requested: _requested,
- _requiredBy: _requiredBy,
- _resolved: _resolved,
- _shasum: _shasum,
- _spec: _spec,
- _where: _where,
- author: author,
- bugs: bugs,
- bundleDependencies: bundleDependencies,
- dependencies: dependencies,
- deprecated: deprecated,
- description: description,
- devDependencies: devDependencies,
- engines: engines,
- files: files,
- homepage: homepage,
- jsdelivr: jsdelivr,
- keywords: keywords$1,
- license: license,
- main: main,
- name: name,
- repository: repository,
- scripts: scripts,
- unpkg: unpkg,
- version: version
- };
- var _package$1 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- _from: _from,
- _id: _id,
- _inBundle: _inBundle,
- _integrity: _integrity,
- _location: _location,
- _phantomChildren: _phantomChildren,
- _requested: _requested,
- _requiredBy: _requiredBy,
- _resolved: _resolved,
- _shasum: _shasum,
- _spec: _spec,
- _where: _where,
- author: author,
- bugs: bugs,
- bundleDependencies: bundleDependencies,
- dependencies: dependencies,
- deprecated: deprecated,
- description: description,
- devDependencies: devDependencies,
- engines: engines,
- files: files,
- homepage: homepage,
- jsdelivr: jsdelivr,
- keywords: keywords$1,
- license: license,
- main: main,
- name: name,
- repository: repository,
- scripts: scripts,
- unpkg: unpkg,
- version: version,
- 'default': _package
- });
- var require$$4 = getCjsExportFromNamespace(_package$1);
- function merge() {
- var dest = {};
- for (var i = 0; i < arguments.length; i++) {
- var src = arguments[i];
- for (var key in src) {
- dest[key] = src[key];
- }
- }
- return dest;
- }
- var syntax = create$4.create(
- merge(
- lexer,
- parser,
- walker
- )
- );
- var version$1 = require$$4.version;
- syntax.version = version$1;
- var lib = syntax;
- var hasOwnProperty$6 = Object.prototype.hasOwnProperty;
- function buildMap(list, caseInsensitive) {
- var map = Object.create(null);
- if (!Array.isArray(list)) {
- return null;
- }
- for (var i = 0; i < list.length; i++) {
- var name = list[i];
- if (caseInsensitive) {
- name = name.toLowerCase();
- }
- map[name] = true;
- }
- return map;
- }
- function buildList(data) {
- if (!data) {
- return null;
- }
- var tags = buildMap(data.tags, true);
- var ids = buildMap(data.ids);
- var classes = buildMap(data.classes);
- if (tags === null &&
- ids === null &&
- classes === null) {
- return null;
- }
- return {
- tags: tags,
- ids: ids,
- classes: classes
- };
- }
- function buildIndex(data) {
- var scopes = false;
- if (data.scopes && Array.isArray(data.scopes)) {
- scopes = Object.create(null);
- for (var i = 0; i < data.scopes.length; i++) {
- var list = data.scopes[i];
- if (!list || !Array.isArray(list)) {
- throw new Error('Wrong usage format');
- }
- for (var j = 0; j < list.length; j++) {
- var name = list[j];
- if (hasOwnProperty$6.call(scopes, name)) {
- throw new Error('Class can\'t be used for several scopes: ' + name);
- }
- scopes[name] = i + 1;
- }
- }
- }
- return {
- whitelist: buildList(data),
- blacklist: buildList(data.blacklist),
- scopes: scopes
- };
- }
- var usage = {
- buildIndex: buildIndex
- };
- var utils$1 = {
- hasNoChildren: function(node) {
- return !node || !node.children || node.children.isEmpty();
- },
- isNodeChildrenList: function(node, list) {
- return node !== null && node.children === list;
- }
- };
- var resolveKeyword = lib.keyword;
- var { hasNoChildren } = utils$1;
- var Atrule$1 = function cleanAtrule(node, item, list) {
- if (node.block) {
- // otherwise removed at-rule don't prevent @import for removal
- if (this.stylesheet !== null) {
- this.stylesheet.firstAtrulesAllowed = false;
- }
- if (hasNoChildren(node.block)) {
- list.remove(item);
- return;
- }
- }
- switch (node.name) {
- case 'charset':
- if (hasNoChildren(node.prelude)) {
- list.remove(item);
- return;
- }
- // if there is any rule before @charset -> remove it
- if (item.prev) {
- list.remove(item);
- return;
- }
- break;
- case 'import':
- if (this.stylesheet === null || !this.stylesheet.firstAtrulesAllowed) {
- list.remove(item);
- return;
- }
- // if there are some rules that not an @import or @charset before @import
- // remove it
- list.prevUntil(item.prev, function(rule) {
- if (rule.type === 'Atrule') {
- if (rule.name === 'import' || rule.name === 'charset') {
- return;
- }
- }
- this.root.firstAtrulesAllowed = false;
- list.remove(item);
- return true;
- }, this);
- break;
- default:
- var name = resolveKeyword(node.name).basename;
- if (name === 'keyframes' ||
- name === 'media' ||
- name === 'supports') {
- // drop at-rule with no prelude
- if (hasNoChildren(node.prelude) || hasNoChildren(node.block)) {
- list.remove(item);
- }
- }
- }
- };
- var Comment$1 = function cleanComment(data, item, list) {
- list.remove(item);
- };
- var Declaration$1 = function cleanDeclartion(node, item, list) {
- if (node.value.children && node.value.children.isEmpty()) {
- list.remove(item);
- }
- };
- var { isNodeChildrenList } = utils$1;
- var Raw$1 = function cleanRaw(node, item, list) {
- // raw in stylesheet or block children
- if (isNodeChildrenList(this.stylesheet, list) ||
- isNodeChildrenList(this.block, list)) {
- list.remove(item);
- }
- };
- var hasOwnProperty$7 = Object.prototype.hasOwnProperty;
- var walk$1 = lib.walk;
- var { hasNoChildren: hasNoChildren$1 } = utils$1;
- function cleanUnused(selectorList, usageData) {
- selectorList.children.each(function(selector, item, list) {
- var shouldRemove = false;
- walk$1(selector, function(node) {
- // ignore nodes in nested selectors
- if (this.selector === null || this.selector === selectorList) {
- switch (node.type) {
- case 'SelectorList':
- // TODO: remove toLowerCase when pseudo selectors will be normalized
- // ignore selectors inside :not()
- if (this.function === null || this.function.name.toLowerCase() !== 'not') {
- if (cleanUnused(node, usageData)) {
- shouldRemove = true;
- }
- }
- break;
- case 'ClassSelector':
- if (usageData.whitelist !== null &&
- usageData.whitelist.classes !== null &&
- !hasOwnProperty$7.call(usageData.whitelist.classes, node.name)) {
- shouldRemove = true;
- }
- if (usageData.blacklist !== null &&
- usageData.blacklist.classes !== null &&
- hasOwnProperty$7.call(usageData.blacklist.classes, node.name)) {
- shouldRemove = true;
- }
- break;
- case 'IdSelector':
- if (usageData.whitelist !== null &&
- usageData.whitelist.ids !== null &&
- !hasOwnProperty$7.call(usageData.whitelist.ids, node.name)) {
- shouldRemove = true;
- }
- if (usageData.blacklist !== null &&
- usageData.blacklist.ids !== null &&
- hasOwnProperty$7.call(usageData.blacklist.ids, node.name)) {
- shouldRemove = true;
- }
- break;
- case 'TypeSelector':
- // TODO: remove toLowerCase when type selectors will be normalized
- // ignore universal selectors
- if (node.name.charAt(node.name.length - 1) !== '*') {
- if (usageData.whitelist !== null &&
- usageData.whitelist.tags !== null &&
- !hasOwnProperty$7.call(usageData.whitelist.tags, node.name.toLowerCase())) {
- shouldRemove = true;
- }
- if (usageData.blacklist !== null &&
- usageData.blacklist.tags !== null &&
- hasOwnProperty$7.call(usageData.blacklist.tags, node.name.toLowerCase())) {
- shouldRemove = true;
- }
- }
- break;
- }
- }
- });
- if (shouldRemove) {
- list.remove(item);
- }
- });
- return selectorList.children.isEmpty();
- }
- var Rule$1 = function cleanRule(node, item, list, options) {
- if (hasNoChildren$1(node.prelude) || hasNoChildren$1(node.block)) {
- list.remove(item);
- return;
- }
- var usageData = options.usage;
- if (usageData && (usageData.whitelist !== null || usageData.blacklist !== null)) {
- cleanUnused(node.prelude, usageData);
- if (hasNoChildren$1(node.prelude)) {
- list.remove(item);
- return;
- }
- }
- };
- // remove useless universal selector
- var TypeSelector$1 = function cleanTypeSelector(node, item, list) {
- var name = item.data.name;
- // check it's a non-namespaced universal selector
- if (name !== '*') {
- return;
- }
- // remove when universal selector before other selectors
- var nextType = item.next && item.next.data.type;
- if (nextType === 'IdSelector' ||
- nextType === 'ClassSelector' ||
- nextType === 'AttributeSelector' ||
- nextType === 'PseudoClassSelector' ||
- nextType === 'PseudoElementSelector') {
- list.remove(item);
- }
- };
- var { isNodeChildrenList: isNodeChildrenList$1 } = utils$1;
- function isSafeOperator(node) {
- return node.type === 'Operator' && node.value !== '+' && node.value !== '-';
- }
- var WhiteSpace$2 = function cleanWhitespace(node, item, list) {
- // remove when first or last item in sequence
- if (item.next === null || item.prev === null) {
- list.remove(item);
- return;
- }
- // white space in stylesheet or block children
- if (isNodeChildrenList$1(this.stylesheet, list) ||
- isNodeChildrenList$1(this.block, list)) {
- list.remove(item);
- return;
- }
- if (item.next.data.type === 'WhiteSpace') {
- list.remove(item);
- return;
- }
- if (isSafeOperator(item.prev.data) || isSafeOperator(item.next.data)) {
- list.remove(item);
- return;
- }
- };
- var walk$2 = lib.walk;
- var handlers = {
- Atrule: Atrule$1,
- Comment: Comment$1,
- Declaration: Declaration$1,
- Raw: Raw$1,
- Rule: Rule$1,
- TypeSelector: TypeSelector$1,
- WhiteSpace: WhiteSpace$2
- };
- var clean = function(ast, options) {
- walk$2(ast, {
- leave: function(node, item, list) {
- if (handlers.hasOwnProperty(node.type)) {
- handlers[node.type].call(this, node, item, list, options);
- }
- }
- });
- };
- var keyframes = function(node) {
- node.block.children.each(function(rule) {
- rule.prelude.children.each(function(simpleselector) {
- simpleselector.children.each(function(data, item) {
- if (data.type === 'Percentage' && data.value === '100') {
- item.data = {
- type: 'TypeSelector',
- loc: data.loc,
- name: 'to'
- };
- } else if (data.type === 'TypeSelector' && data.name === 'from') {
- item.data = {
- type: 'Percentage',
- loc: data.loc,
- value: '0'
- };
- }
- });
- });
- });
- };
- var resolveKeyword$1 = lib.keyword;
- var Atrule$2 = function(node) {
- // compress @keyframe selectors
- if (resolveKeyword$1(node.name).basename === 'keyframes') {
- keyframes(node);
- }
- };
- // Can unquote attribute detection
- // Adopted implementation of Mathias Bynens
- // https://github.com/mathiasbynens/mothereff.in/blob/master/unquoted-attributes/eff.js
- var escapesRx = /\\([0-9A-Fa-f]{1,6})(\r\n|[ \t\n\f\r])?|\\./g;
- var blockUnquoteRx = /^(-?\d|--)|[\u0000-\u002c\u002e\u002f\u003A-\u0040\u005B-\u005E\u0060\u007B-\u009f]/;
- function canUnquote(value) {
- if (value === '' || value === '-') {
- return;
- }
- // Escapes are valid, so replace them with a valid non-empty string
- value = value.replace(escapesRx, 'a');
- return !blockUnquoteRx.test(value);
- }
- var AttributeSelector$1 = function(node) {
- var attrValue = node.value;
- if (!attrValue || attrValue.type !== 'String') {
- return;
- }
- var unquotedValue = attrValue.value.replace(/^(.)(.*)\1$/, '$2');
- if (canUnquote(unquotedValue)) {
- node.value = {
- type: 'Identifier',
- loc: attrValue.loc,
- name: unquotedValue
- };
- }
- };
- var font$1 = function compressFont(node) {
- var list = node.children;
- list.eachRight(function(node, item) {
- if (node.type === 'Identifier') {
- if (node.name === 'bold') {
- item.data = {
- type: 'Number',
- loc: node.loc,
- value: '700'
- };
- } else if (node.name === 'normal') {
- var prev = item.prev;
- if (prev && prev.data.type === 'Operator' && prev.data.value === '/') {
- this.remove(prev);
- }
- this.remove(item);
- } else if (node.name === 'medium') {
- var next = item.next;
- if (!next || next.data.type !== 'Operator') {
- this.remove(item);
- }
- }
- }
- });
- // remove redundant spaces
- list.each(function(node, item) {
- if (node.type === 'WhiteSpace') {
- if (!item.prev || !item.next || item.next.data.type === 'WhiteSpace') {
- this.remove(item);
- }
- }
- });
- if (list.isEmpty()) {
- list.insert(list.createItem({
- type: 'Identifier',
- name: 'normal'
- }));
- }
- };
- var fontWeight = function compressFontWeight(node) {
- var value = node.children.head.data;
- if (value.type === 'Identifier') {
- switch (value.name) {
- case 'normal':
- node.children.head.data = {
- type: 'Number',
- loc: value.loc,
- value: '400'
- };
- break;
- case 'bold':
- node.children.head.data = {
- type: 'Number',
- loc: value.loc,
- value: '700'
- };
- break;
- }
- }
- };
- var List$1 = lib.List;
- var background$1 = function compressBackground(node) {
- function lastType() {
- if (buffer.length) {
- return buffer[buffer.length - 1].type;
- }
- }
- function flush() {
- if (lastType() === 'WhiteSpace') {
- buffer.pop();
- }
- if (!buffer.length) {
- buffer.unshift(
- {
- type: 'Number',
- loc: null,
- value: '0'
- },
- {
- type: 'WhiteSpace',
- value: ' '
- },
- {
- type: 'Number',
- loc: null,
- value: '0'
- }
- );
- }
- newValue.push.apply(newValue, buffer);
- buffer = [];
- }
- var newValue = [];
- var buffer = [];
- node.children.each(function(node) {
- if (node.type === 'Operator' && node.value === ',') {
- flush();
- newValue.push(node);
- return;
- }
- // remove defaults
- if (node.type === 'Identifier') {
- if (node.name === 'transparent' ||
- node.name === 'none' ||
- node.name === 'repeat' ||
- node.name === 'scroll') {
- return;
- }
- }
- // don't add redundant spaces
- if (node.type === 'WhiteSpace' && (!buffer.length || lastType() === 'WhiteSpace')) {
- return;
- }
- buffer.push(node);
- });
- flush();
- node.children = new List$1().fromArray(newValue);
- };
- function removeItemAndRedundantWhiteSpace(list, item) {
- var prev = item.prev;
- var next = item.next;
- if (next !== null) {
- if (next.data.type === 'WhiteSpace' && (prev === null || prev.data.type === 'WhiteSpace')) {
- list.remove(next);
- }
- } else if (prev !== null && prev.data.type === 'WhiteSpace') {
- list.remove(prev);
- }
- list.remove(item);
- }
- var border$1 = function compressBorder(node) {
- node.children.each(function(node, item, list) {
- if (node.type === 'Identifier' && node.name.toLowerCase() === 'none') {
- if (list.head === list.tail) {
- // replace `none` for zero when `none` is a single term
- item.data = {
- type: 'Number',
- loc: node.loc,
- value: '0'
- };
- } else {
- removeItemAndRedundantWhiteSpace(list, item);
- }
- }
- });
- };
- var resolveName = lib.property;
- var handlers$1 = {
- 'font': font$1,
- 'font-weight': fontWeight,
- 'background': background$1,
- 'border': border$1,
- 'outline': border$1
- };
- var Value$1 = function compressValue(node) {
- if (!this.declaration) {
- return;
- }
- var property = resolveName(this.declaration.property);
- if (handlers$1.hasOwnProperty(property.basename)) {
- handlers$1[property.basename](node);
- }
- };
- var OMIT_PLUSSIGN = /^(?:\+|(-))?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
- var KEEP_PLUSSIGN = /^([\+\-])?0*(\d*)(?:\.0*|(\.\d*?)0*)?$/;
- var unsafeToRemovePlusSignAfter = {
- Dimension: true,
- Hash: true,
- Identifier: true,
- Number: true,
- Raw: true,
- UnicodeRange: true
- };
- function packNumber(value, item) {
- // omit plus sign only if no prev or prev is safe type
- var regexp = item && item.prev !== null && unsafeToRemovePlusSignAfter.hasOwnProperty(item.prev.data.type)
- ? KEEP_PLUSSIGN
- : OMIT_PLUSSIGN;
- // 100 -> '100'
- // 00100 -> '100'
- // +100 -> '100' (only when safe, e.g. omitting plus sign for 1px+1px leads to single dimension instead of two)
- // -100 -> '-100'
- // 0.123 -> '.123'
- // 0.12300 -> '.123'
- // 0.0 -> ''
- // 0 -> ''
- // -0 -> '-'
- value = String(value).replace(regexp, '$1$2$3');
- if (value === '' || value === '-') {
- value = '0';
- }
- return value;
- }
- var _Number$1 = function(node, item) {
- node.value = packNumber(node.value, item);
- };
- var pack = packNumber;
- _Number$1.pack = pack;
- var packNumber$1 = _Number$1.pack;
- var LENGTH_UNIT = {
- // absolute length units
- 'px': true,
- 'mm': true,
- 'cm': true,
- 'in': true,
- 'pt': true,
- 'pc': true,
- // relative length units
- 'em': true,
- 'ex': true,
- 'ch': true,
- 'rem': true,
- // viewport-percentage lengths
- 'vh': true,
- 'vw': true,
- 'vmin': true,
- 'vmax': true,
- 'vm': true
- };
- var Dimension$1 = function compressDimension(node, item) {
- var value = packNumber$1(node.value, item);
- node.value = value;
- if (value === '0' && this.declaration !== null && this.atrulePrelude === null) {
- var unit = node.unit.toLowerCase();
- // only length values can be compressed
- if (!LENGTH_UNIT.hasOwnProperty(unit)) {
- return;
- }
- // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11
- // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11
- if (this.declaration.property === '-ms-flex' ||
- this.declaration.property === 'flex') {
- return;
- }
- // issue #222: don't remove units inside calc
- if (this.function && this.function.name === 'calc') {
- return;
- }
- item.data = {
- type: 'Number',
- loc: node.loc,
- value: value
- };
- }
- };
- var lexer$1 = lib.lexer;
- var packNumber$2 = _Number$1.pack;
- var blacklist = new Set([
- // see https://github.com/jakubpawlowicz/clean-css/issues/957
- 'width',
- 'min-width',
- 'max-width',
- 'height',
- 'min-height',
- 'max-height',
- // issue #410: Don’t remove units in flex-basis value for (-ms-)flex shorthand
- // issue #362: shouldn't remove unit in -ms-flex since it breaks flex in IE10/11
- // issue #200: shouldn't remove unit in flex since it breaks flex in IE10/11
- 'flex',
- '-ms-flex'
- ]);
- var Percentage$1 = function compressPercentage(node, item) {
- node.value = packNumber$2(node.value, item);
- if (node.value === '0' && this.declaration && !blacklist.has(this.declaration.property)) {
- // try to convert a number
- item.data = {
- type: 'Number',
- loc: node.loc,
- value: node.value
- };
- // that's ok only when new value matches on length
- if (!lexer$1.matchDeclaration(this.declaration).isType(item.data, 'length')) {
- // otherwise rollback changes
- item.data = node;
- }
- }
- };
- var _String$1 = function(node) {
- var value = node.value;
- // remove escaped newlines, i.e.
- // .a { content: "foo\
- // bar"}
- // ->
- // .a { content: "foobar" }
- value = value.replace(/\\(\r\n|\r|\n|\f)/g, '');
- node.value = value;
- };
- var UNICODE = '\\\\[0-9a-f]{1,6}(\\r\\n|[ \\n\\r\\t\\f])?';
- var ESCAPE = '(' + UNICODE + '|\\\\[^\\n\\r\\f0-9a-fA-F])';
- var NONPRINTABLE = '\u0000\u0008\u000b\u000e-\u001f\u007f';
- var SAFE_URL = new RegExp('^(' + ESCAPE + '|[^\"\'\\(\\)\\\\\\s' + NONPRINTABLE + '])*$', 'i');
- var Url$1 = function(node) {
- var value = node.value;
- if (value.type !== 'String') {
- return;
- }
- var quote = value.value[0];
- var url = value.value.substr(1, value.value.length - 2);
- // convert `\\` to `/`
- url = url.replace(/\\\\/g, '/');
- // remove quotes when safe
- // https://www.w3.org/TR/css-syntax-3/#url-unquoted-diagram
- if (SAFE_URL.test(url)) {
- node.value = {
- type: 'Raw',
- loc: node.value.loc,
- value: url
- };
- } else {
- // use double quotes if string has no double quotes
- // otherwise use original quotes
- // TODO: make better quote type selection
- node.value.value = url.indexOf('"') === -1 ? '"' + url + '"' : quote + url + quote;
- }
- };
- var lexer$2 = lib.lexer;
- var packNumber$3 = _Number$1.pack;
- // http://www.w3.org/TR/css3-color/#svg-color
- var NAME_TO_HEX = {
- 'aliceblue': 'f0f8ff',
- 'antiquewhite': 'faebd7',
- 'aqua': '0ff',
- 'aquamarine': '7fffd4',
- 'azure': 'f0ffff',
- 'beige': 'f5f5dc',
- 'bisque': 'ffe4c4',
- 'black': '000',
- 'blanchedalmond': 'ffebcd',
- 'blue': '00f',
- 'blueviolet': '8a2be2',
- 'brown': 'a52a2a',
- 'burlywood': 'deb887',
- 'cadetblue': '5f9ea0',
- 'chartreuse': '7fff00',
- 'chocolate': 'd2691e',
- 'coral': 'ff7f50',
- 'cornflowerblue': '6495ed',
- 'cornsilk': 'fff8dc',
- 'crimson': 'dc143c',
- 'cyan': '0ff',
- 'darkblue': '00008b',
- 'darkcyan': '008b8b',
- 'darkgoldenrod': 'b8860b',
- 'darkgray': 'a9a9a9',
- 'darkgrey': 'a9a9a9',
- 'darkgreen': '006400',
- 'darkkhaki': 'bdb76b',
- 'darkmagenta': '8b008b',
- 'darkolivegreen': '556b2f',
- 'darkorange': 'ff8c00',
- 'darkorchid': '9932cc',
- 'darkred': '8b0000',
- 'darksalmon': 'e9967a',
- 'darkseagreen': '8fbc8f',
- 'darkslateblue': '483d8b',
- 'darkslategray': '2f4f4f',
- 'darkslategrey': '2f4f4f',
- 'darkturquoise': '00ced1',
- 'darkviolet': '9400d3',
- 'deeppink': 'ff1493',
- 'deepskyblue': '00bfff',
- 'dimgray': '696969',
- 'dimgrey': '696969',
- 'dodgerblue': '1e90ff',
- 'firebrick': 'b22222',
- 'floralwhite': 'fffaf0',
- 'forestgreen': '228b22',
- 'fuchsia': 'f0f',
- 'gainsboro': 'dcdcdc',
- 'ghostwhite': 'f8f8ff',
- 'gold': 'ffd700',
- 'goldenrod': 'daa520',
- 'gray': '808080',
- 'grey': '808080',
- 'green': '008000',
- 'greenyellow': 'adff2f',
- 'honeydew': 'f0fff0',
- 'hotpink': 'ff69b4',
- 'indianred': 'cd5c5c',
- 'indigo': '4b0082',
- 'ivory': 'fffff0',
- 'khaki': 'f0e68c',
- 'lavender': 'e6e6fa',
- 'lavenderblush': 'fff0f5',
- 'lawngreen': '7cfc00',
- 'lemonchiffon': 'fffacd',
- 'lightblue': 'add8e6',
- 'lightcoral': 'f08080',
- 'lightcyan': 'e0ffff',
- 'lightgoldenrodyellow': 'fafad2',
- 'lightgray': 'd3d3d3',
- 'lightgrey': 'd3d3d3',
- 'lightgreen': '90ee90',
- 'lightpink': 'ffb6c1',
- 'lightsalmon': 'ffa07a',
- 'lightseagreen': '20b2aa',
- 'lightskyblue': '87cefa',
- 'lightslategray': '789',
- 'lightslategrey': '789',
- 'lightsteelblue': 'b0c4de',
- 'lightyellow': 'ffffe0',
- 'lime': '0f0',
- 'limegreen': '32cd32',
- 'linen': 'faf0e6',
- 'magenta': 'f0f',
- 'maroon': '800000',
- 'mediumaquamarine': '66cdaa',
- 'mediumblue': '0000cd',
- 'mediumorchid': 'ba55d3',
- 'mediumpurple': '9370db',
- 'mediumseagreen': '3cb371',
- 'mediumslateblue': '7b68ee',
- 'mediumspringgreen': '00fa9a',
- 'mediumturquoise': '48d1cc',
- 'mediumvioletred': 'c71585',
- 'midnightblue': '191970',
- 'mintcream': 'f5fffa',
- 'mistyrose': 'ffe4e1',
- 'moccasin': 'ffe4b5',
- 'navajowhite': 'ffdead',
- 'navy': '000080',
- 'oldlace': 'fdf5e6',
- 'olive': '808000',
- 'olivedrab': '6b8e23',
- 'orange': 'ffa500',
- 'orangered': 'ff4500',
- 'orchid': 'da70d6',
- 'palegoldenrod': 'eee8aa',
- 'palegreen': '98fb98',
- 'paleturquoise': 'afeeee',
- 'palevioletred': 'db7093',
- 'papayawhip': 'ffefd5',
- 'peachpuff': 'ffdab9',
- 'peru': 'cd853f',
- 'pink': 'ffc0cb',
- 'plum': 'dda0dd',
- 'powderblue': 'b0e0e6',
- 'purple': '800080',
- 'rebeccapurple': '639',
- 'red': 'f00',
- 'rosybrown': 'bc8f8f',
- 'royalblue': '4169e1',
- 'saddlebrown': '8b4513',
- 'salmon': 'fa8072',
- 'sandybrown': 'f4a460',
- 'seagreen': '2e8b57',
- 'seashell': 'fff5ee',
- 'sienna': 'a0522d',
- 'silver': 'c0c0c0',
- 'skyblue': '87ceeb',
- 'slateblue': '6a5acd',
- 'slategray': '708090',
- 'slategrey': '708090',
- 'snow': 'fffafa',
- 'springgreen': '00ff7f',
- 'steelblue': '4682b4',
- 'tan': 'd2b48c',
- 'teal': '008080',
- 'thistle': 'd8bfd8',
- 'tomato': 'ff6347',
- 'turquoise': '40e0d0',
- 'violet': 'ee82ee',
- 'wheat': 'f5deb3',
- 'white': 'fff',
- 'whitesmoke': 'f5f5f5',
- 'yellow': 'ff0',
- 'yellowgreen': '9acd32'
- };
- var HEX_TO_NAME = {
- '800000': 'maroon',
- '800080': 'purple',
- '808000': 'olive',
- '808080': 'gray',
- '00ffff': 'cyan',
- 'f0ffff': 'azure',
- 'f5f5dc': 'beige',
- 'ffe4c4': 'bisque',
- '000000': 'black',
- '0000ff': 'blue',
- 'a52a2a': 'brown',
- 'ff7f50': 'coral',
- 'ffd700': 'gold',
- '008000': 'green',
- '4b0082': 'indigo',
- 'fffff0': 'ivory',
- 'f0e68c': 'khaki',
- '00ff00': 'lime',
- 'faf0e6': 'linen',
- '000080': 'navy',
- 'ffa500': 'orange',
- 'da70d6': 'orchid',
- 'cd853f': 'peru',
- 'ffc0cb': 'pink',
- 'dda0dd': 'plum',
- 'f00': 'red',
- 'ff0000': 'red',
- 'fa8072': 'salmon',
- 'a0522d': 'sienna',
- 'c0c0c0': 'silver',
- 'fffafa': 'snow',
- 'd2b48c': 'tan',
- '008080': 'teal',
- 'ff6347': 'tomato',
- 'ee82ee': 'violet',
- 'f5deb3': 'wheat',
- 'ffffff': 'white',
- 'ffff00': 'yellow'
- };
- function hueToRgb(p, q, t) {
- if (t < 0) {
- t += 1;
- }
- if (t > 1) {
- t -= 1;
- }
- if (t < 1 / 6) {
- return p + (q - p) * 6 * t;
- }
- if (t < 1 / 2) {
- return q;
- }
- if (t < 2 / 3) {
- return p + (q - p) * (2 / 3 - t) * 6;
- }
- return p;
- }
- function hslToRgb(h, s, l, a) {
- var r;
- var g;
- var b;
- if (s === 0) {
- r = g = b = l; // achromatic
- } else {
- var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
- var p = 2 * l - q;
- r = hueToRgb(p, q, h + 1 / 3);
- g = hueToRgb(p, q, h);
- b = hueToRgb(p, q, h - 1 / 3);
- }
- return [
- Math.round(r * 255),
- Math.round(g * 255),
- Math.round(b * 255),
- a
- ];
- }
- function toHex(value) {
- value = value.toString(16);
- return value.length === 1 ? '0' + value : value;
- }
- function parseFunctionArgs(functionArgs, count, rgb) {
- var cursor = functionArgs.head;
- var args = [];
- var wasValue = false;
- while (cursor !== null) {
- var node = cursor.data;
- var type = node.type;
- switch (type) {
- case 'Number':
- case 'Percentage':
- if (wasValue) {
- return;
- }
- wasValue = true;
- args.push({
- type: type,
- value: Number(node.value)
- });
- break;
- case 'Operator':
- if (node.value === ',') {
- if (!wasValue) {
- return;
- }
- wasValue = false;
- } else if (wasValue || node.value !== '+') {
- return;
- }
- break;
- default:
- // something we couldn't understand
- return;
- }
- cursor = cursor.next;
- }
- if (args.length !== count) {
- // invalid arguments count
- // TODO: remove those tokens
- return;
- }
- if (args.length === 4) {
- if (args[3].type !== 'Number') {
- // 4th argument should be a number
- // TODO: remove those tokens
- return;
- }
- args[3].type = 'Alpha';
- }
- if (rgb) {
- if (args[0].type !== args[1].type || args[0].type !== args[2].type) {
- // invalid color, numbers and percentage shouldn't be mixed
- // TODO: remove those tokens
- return;
- }
- } else {
- if (args[0].type !== 'Number' ||
- args[1].type !== 'Percentage' ||
- args[2].type !== 'Percentage') {
- // invalid color, for hsl values should be: number, percentage, percentage
- // TODO: remove those tokens
- return;
- }
- args[0].type = 'Angle';
- }
- return args.map(function(arg) {
- var value = Math.max(0, arg.value);
- switch (arg.type) {
- case 'Number':
- // fit value to [0..255] range
- value = Math.min(value, 255);
- break;
- case 'Percentage':
- // convert 0..100% to value in [0..255] range
- value = Math.min(value, 100) / 100;
- if (!rgb) {
- return value;
- }
- value = 255 * value;
- break;
- case 'Angle':
- // fit value to (-360..360) range
- return (((value % 360) + 360) % 360) / 360;
- case 'Alpha':
- // fit value to [0..1] range
- return Math.min(value, 1);
- }
- return Math.round(value);
- });
- }
- function compressFunction(node, item, list) {
- var functionName = node.name;
- var args;
- if (functionName === 'rgba' || functionName === 'hsla') {
- args = parseFunctionArgs(node.children, 4, functionName === 'rgba');
- if (!args) {
- // something went wrong
- return;
- }
- if (functionName === 'hsla') {
- args = hslToRgb.apply(null, args);
- node.name = 'rgba';
- }
- if (args[3] === 0) {
- // try to replace `rgba(x, x, x, 0)` to `transparent`
- // always replace `rgba(0, 0, 0, 0)` to `transparent`
- // otherwise avoid replacement in gradients since it may break color transition
- // http://stackoverflow.com/questions/11829410/css3-gradient-rendering-issues-from-transparent-to-white
- var scopeFunctionName = this.function && this.function.name;
- if ((args[0] === 0 && args[1] === 0 && args[2] === 0) ||
- !/^(?:to|from|color-stop)$|gradient$/i.test(scopeFunctionName)) {
- item.data = {
- type: 'Identifier',
- loc: node.loc,
- name: 'transparent'
- };
- return;
- }
- }
- if (args[3] !== 1) {
- // replace argument values for normalized/interpolated
- node.children.each(function(node, item, list) {
- if (node.type === 'Operator') {
- if (node.value !== ',') {
- list.remove(item);
- }
- return;
- }
- item.data = {
- type: 'Number',
- loc: node.loc,
- value: packNumber$3(args.shift(), null)
- };
- });
- return;
- }
- // otherwise convert to rgb, i.e. rgba(255, 0, 0, 1) -> rgb(255, 0, 0)
- functionName = 'rgb';
- }
- if (functionName === 'hsl') {
- args = args || parseFunctionArgs(node.children, 3, false);
- if (!args) {
- // something went wrong
- return;
- }
- // convert to rgb
- args = hslToRgb.apply(null, args);
- functionName = 'rgb';
- }
- if (functionName === 'rgb') {
- args = args || parseFunctionArgs(node.children, 3, true);
- if (!args) {
- // something went wrong
- return;
- }
- // check if color is not at the end and not followed by space
- var next = item.next;
- if (next && next.data.type !== 'WhiteSpace') {
- list.insert(list.createItem({
- type: 'WhiteSpace',
- value: ' '
- }), next);
- }
- item.data = {
- type: 'Hash',
- loc: node.loc,
- value: toHex(args[0]) + toHex(args[1]) + toHex(args[2])
- };
- compressHex(item.data, item);
- }
- }
- function compressIdent(node, item) {
- if (this.declaration === null) {
- return;
- }
- var color = node.name.toLowerCase();
- if (NAME_TO_HEX.hasOwnProperty(color) &&
- lexer$2.matchDeclaration(this.declaration).isType(node, 'color')) {
- var hex = NAME_TO_HEX[color];
- if (hex.length + 1 <= color.length) {
- // replace for shorter hex value
- item.data = {
- type: 'Hash',
- loc: node.loc,
- value: hex
- };
- } else {
- // special case for consistent colors
- if (color === 'grey') {
- color = 'gray';
- }
- // just replace value for lower cased name
- node.name = color;
- }
- }
- }
- function compressHex(node, item) {
- var color = node.value.toLowerCase();
- // #112233 -> #123
- if (color.length === 6 &&
- color[0] === color[1] &&
- color[2] === color[3] &&
- color[4] === color[5]) {
- color = color[0] + color[2] + color[4];
- }
- if (HEX_TO_NAME[color]) {
- item.data = {
- type: 'Identifier',
- loc: node.loc,
- name: HEX_TO_NAME[color]
- };
- } else {
- node.value = color;
- }
- }
- var color$2 = {
- compressFunction: compressFunction,
- compressIdent: compressIdent,
- compressHex: compressHex
- };
- var walk$3 = lib.walk;
- var handlers$2 = {
- Atrule: Atrule$2,
- AttributeSelector: AttributeSelector$1,
- Value: Value$1,
- Dimension: Dimension$1,
- Percentage: Percentage$1,
- Number: _Number$1,
- String: _String$1,
- Url: Url$1,
- Hash: color$2.compressHex,
- Identifier: color$2.compressIdent,
- Function: color$2.compressFunction
- };
- var replace = function(ast) {
- walk$3(ast, {
- leave: function(node, item, list) {
- if (handlers$2.hasOwnProperty(node.type)) {
- handlers$2[node.type].call(this, node, item, list);
- }
- }
- });
- };
- var generate$1 = lib.generate;
- function Index() {
- this.seed = 0;
- this.map = Object.create(null);
- }
- Index.prototype.resolve = function(str) {
- var index = this.map[str];
- if (!index) {
- index = ++this.seed;
- this.map[str] = index;
- }
- return index;
- };
- var createDeclarationIndexer = function createDeclarationIndexer() {
- var ids = new Index();
- return function markDeclaration(node) {
- var id = generate$1(node);
- node.id = ids.resolve(id);
- node.length = id.length;
- node.fingerprint = null;
- return node;
- };
- };
- var specificity = function specificity(simpleSelector) {
- var A = 0;
- var B = 0;
- var C = 0;
- simpleSelector.children.each(function walk(node) {
- switch (node.type) {
- case 'SelectorList':
- case 'Selector':
- node.children.each(walk);
- break;
- case 'IdSelector':
- A++;
- break;
- case 'ClassSelector':
- case 'AttributeSelector':
- B++;
- break;
- case 'PseudoClassSelector':
- switch (node.name.toLowerCase()) {
- case 'not':
- node.children.each(walk);
- break;
- case 'before':
- case 'after':
- case 'first-line':
- case 'first-letter':
- C++;
- break;
- // TODO: support for :nth-*(.. of <SelectorList>), :matches(), :has()
- default:
- B++;
- }
- break;
- case 'PseudoElementSelector':
- C++;
- break;
- case 'TypeSelector':
- // ignore universal selector
- if (node.name.charAt(node.name.length - 1) !== '*') {
- C++;
- }
- break;
- }
- });
- return [A, B, C];
- };
- var generate$2 = lib.generate;
- var nonFreezePseudoElements = {
- 'first-letter': true,
- 'first-line': true,
- 'after': true,
- 'before': true
- };
- var nonFreezePseudoClasses = {
- 'link': true,
- 'visited': true,
- 'hover': true,
- 'active': true,
- 'first-letter': true,
- 'first-line': true,
- 'after': true,
- 'before': true
- };
- var processSelector = function freeze(node, usageData) {
- var pseudos = Object.create(null);
- var hasPseudo = false;
- node.prelude.children.each(function(simpleSelector) {
- var tagName = '*';
- var scope = 0;
- simpleSelector.children.each(function(node) {
- switch (node.type) {
- case 'ClassSelector':
- if (usageData && usageData.scopes) {
- var classScope = usageData.scopes[node.name] || 0;
- if (scope !== 0 && classScope !== scope) {
- throw new Error('Selector can\'t has classes from different scopes: ' + generate$2(simpleSelector));
- }
- scope = classScope;
- }
- break;
- case 'PseudoClassSelector':
- var name = node.name.toLowerCase();
- if (!nonFreezePseudoClasses.hasOwnProperty(name)) {
- pseudos[':' + name] = true;
- hasPseudo = true;
- }
- break;
- case 'PseudoElementSelector':
- var name = node.name.toLowerCase();
- if (!nonFreezePseudoElements.hasOwnProperty(name)) {
- pseudos['::' + name] = true;
- hasPseudo = true;
- }
- break;
- case 'TypeSelector':
- tagName = node.name.toLowerCase();
- break;
- case 'AttributeSelector':
- if (node.flags) {
- pseudos['[' + node.flags.toLowerCase() + ']'] = true;
- hasPseudo = true;
- }
- break;
- case 'WhiteSpace':
- case 'Combinator':
- tagName = '*';
- break;
- }
- });
- simpleSelector.compareMarker = specificity(simpleSelector).toString();
- simpleSelector.id = null; // pre-init property to avoid multiple hidden class
- simpleSelector.id = generate$2(simpleSelector);
- if (scope) {
- simpleSelector.compareMarker += ':' + scope;
- }
- if (tagName !== '*') {
- simpleSelector.compareMarker += ',' + tagName;
- }
- });
- // add property to all rule nodes to avoid multiple hidden class
- node.pseudoSignature = hasPseudo && Object.keys(pseudos).sort().join(',');
- };
- var resolveKeyword$2 = lib.keyword;
- var walk$4 = lib.walk;
- var generate$3 = lib.generate;
- var prepare = function prepare(ast, options) {
- var markDeclaration = createDeclarationIndexer();
- walk$4(ast, {
- visit: 'Rule',
- enter: function processRule(node) {
- node.block.children.each(markDeclaration);
- processSelector(node, options.usage);
- }
- });
- walk$4(ast, {
- visit: 'Atrule',
- enter: function(node) {
- if (node.prelude) {
- node.prelude.id = null; // pre-init property to avoid multiple hidden class for generate
- node.prelude.id = generate$3(node.prelude);
- }
- // compare keyframe selectors by its values
- // NOTE: still no clarification about problems with keyframes selector grouping (issue #197)
- if (resolveKeyword$2(node.name).basename === 'keyframes') {
- node.block.avoidRulesMerge = true; /* probably we don't need to prevent those merges for @keyframes
- TODO: need to be checked */
- node.block.children.each(function(rule) {
- rule.prelude.children.each(function(simpleselector) {
- simpleselector.compareMarker = simpleselector.id;
- });
- });
- }
- }
- });
- return {
- declaration: markDeclaration
- };
- };
- var List$2 = lib.List;
- var resolveKeyword$3 = lib.keyword;
- var hasOwnProperty$8 = Object.prototype.hasOwnProperty;
- var walk$5 = lib.walk;
- function addRuleToMap(map, item, list, single) {
- var node = item.data;
- var name = resolveKeyword$3(node.name).basename;
- var id = node.name.toLowerCase() + '/' + (node.prelude ? node.prelude.id : null);
- if (!hasOwnProperty$8.call(map, name)) {
- map[name] = Object.create(null);
- }
- if (single) {
- delete map[name][id];
- }
- if (!hasOwnProperty$8.call(map[name], id)) {
- map[name][id] = new List$2();
- }
- map[name][id].append(list.remove(item));
- }
- function relocateAtrules(ast, options) {
- var collected = Object.create(null);
- var topInjectPoint = null;
- ast.children.each(function(node, item, list) {
- if (node.type === 'Atrule') {
- var name = resolveKeyword$3(node.name).basename;
- switch (name) {
- case 'keyframes':
- addRuleToMap(collected, item, list, true);
- return;
- case 'media':
- if (options.forceMediaMerge) {
- addRuleToMap(collected, item, list, false);
- return;
- }
- break;
- }
- if (topInjectPoint === null &&
- name !== 'charset' &&
- name !== 'import') {
- topInjectPoint = item;
- }
- } else {
- if (topInjectPoint === null) {
- topInjectPoint = item;
- }
- }
- });
- for (var atrule in collected) {
- for (var id in collected[atrule]) {
- ast.children.insertList(
- collected[atrule][id],
- atrule === 'media' ? null : topInjectPoint
- );
- }
- }
- }
- function isMediaRule(node) {
- return node.type === 'Atrule' && node.name === 'media';
- }
- function processAtrule(node, item, list) {
- if (!isMediaRule(node)) {
- return;
- }
- var prev = item.prev && item.prev.data;
- if (!prev || !isMediaRule(prev)) {
- return;
- }
- // merge @media with same query
- if (node.prelude &&
- prev.prelude &&
- node.prelude.id === prev.prelude.id) {
- prev.block.children.appendList(node.block.children);
- list.remove(item);
- // TODO: use it when we can refer to several points in source
- // prev.loc = {
- // primary: prev.loc,
- // merged: node.loc
- // };
- }
- }
- var _1MergeAtrule = function rejoinAtrule(ast, options) {
- relocateAtrules(ast, options);
- walk$5(ast, {
- visit: 'Atrule',
- reverse: true,
- enter: processAtrule
- });
- };
- var hasOwnProperty$9 = Object.prototype.hasOwnProperty;
- function isEqualSelectors(a, b) {
- var cursor1 = a.head;
- var cursor2 = b.head;
- while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
- cursor1 = cursor1.next;
- cursor2 = cursor2.next;
- }
- return cursor1 === null && cursor2 === null;
- }
- function isEqualDeclarations(a, b) {
- var cursor1 = a.head;
- var cursor2 = b.head;
- while (cursor1 !== null && cursor2 !== null && cursor1.data.id === cursor2.data.id) {
- cursor1 = cursor1.next;
- cursor2 = cursor2.next;
- }
- return cursor1 === null && cursor2 === null;
- }
- function compareDeclarations(declarations1, declarations2) {
- var result = {
- eq: [],
- ne1: [],
- ne2: [],
- ne2overrided: []
- };
- var fingerprints = Object.create(null);
- var declarations2hash = Object.create(null);
- for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
- declarations2hash[cursor.data.id] = true;
- }
- for (var cursor = declarations1.head; cursor; cursor = cursor.next) {
- var data = cursor.data;
- if (data.fingerprint) {
- fingerprints[data.fingerprint] = data.important;
- }
- if (declarations2hash[data.id]) {
- declarations2hash[data.id] = false;
- result.eq.push(data);
- } else {
- result.ne1.push(data);
- }
- }
- for (var cursor = declarations2.head; cursor; cursor = cursor.next) {
- var data = cursor.data;
- if (declarations2hash[data.id]) {
- // when declarations1 has an overriding declaration, this is not a difference
- // unless no !important is used on prev and !important is used on the following
- if (!hasOwnProperty$9.call(fingerprints, data.fingerprint) ||
- (!fingerprints[data.fingerprint] && data.important)) {
- result.ne2.push(data);
- }
- result.ne2overrided.push(data);
- }
- }
- return result;
- }
- function addSelectors(dest, source) {
- source.each(function(sourceData) {
- var newStr = sourceData.id;
- var cursor = dest.head;
- while (cursor) {
- var nextStr = cursor.data.id;
- if (nextStr === newStr) {
- return;
- }
- if (nextStr > newStr) {
- break;
- }
- cursor = cursor.next;
- }
- dest.insert(dest.createItem(sourceData), cursor);
- });
- return dest;
- }
- // check if simpleselectors has no equal specificity and element selector
- function hasSimilarSelectors(selectors1, selectors2) {
- var cursor1 = selectors1.head;
- while (cursor1 !== null) {
- var cursor2 = selectors2.head;
- while (cursor2 !== null) {
- if (cursor1.data.compareMarker === cursor2.data.compareMarker) {
- return true;
- }
- cursor2 = cursor2.next;
- }
- cursor1 = cursor1.next;
- }
- return false;
- }
- // test node can't to be skipped
- function unsafeToSkipNode(node) {
- switch (node.type) {
- case 'Rule':
- // unsafe skip ruleset with selector similarities
- return hasSimilarSelectors(node.prelude.children, this);
- case 'Atrule':
- // can skip at-rules with blocks
- if (node.block) {
- // unsafe skip at-rule if block contains something unsafe to skip
- return node.block.children.some(unsafeToSkipNode, this);
- }
- break;
- case 'Declaration':
- return false;
- }
- // unsafe by default
- return true;
- }
- var utils$2 = {
- isEqualSelectors: isEqualSelectors,
- isEqualDeclarations: isEqualDeclarations,
- compareDeclarations: compareDeclarations,
- addSelectors: addSelectors,
- hasSimilarSelectors: hasSimilarSelectors,
- unsafeToSkipNode: unsafeToSkipNode
- };
- var walk$6 = lib.walk;
- function processRule(node, item, list) {
- var selectors = node.prelude.children;
- var declarations = node.block.children;
- list.prevUntil(item.prev, function(prev) {
- // skip non-ruleset node if safe
- if (prev.type !== 'Rule') {
- return utils$2.unsafeToSkipNode.call(selectors, prev);
- }
- var prevSelectors = prev.prelude.children;
- var prevDeclarations = prev.block.children;
- // try to join rulesets with equal pseudo signature
- if (node.pseudoSignature === prev.pseudoSignature) {
- // try to join by selectors
- if (utils$2.isEqualSelectors(prevSelectors, selectors)) {
- prevDeclarations.appendList(declarations);
- list.remove(item);
- return true;
- }
- // try to join by declarations
- if (utils$2.isEqualDeclarations(declarations, prevDeclarations)) {
- utils$2.addSelectors(prevSelectors, selectors);
- list.remove(item);
- return true;
- }
- }
- // go to prev ruleset if has no selector similarities
- return utils$2.hasSimilarSelectors(selectors, prevSelectors);
- });
- }
- // NOTE: direction should be left to right, since rulesets merge to left
- // ruleset. When direction right to left unmerged rulesets may prevent lookup
- // TODO: remove initial merge
- var _2InitialMergeRuleset = function initialMergeRule(ast) {
- walk$6(ast, {
- visit: 'Rule',
- enter: processRule
- });
- };
- var List$3 = lib.List;
- var walk$7 = lib.walk;
- function processRule$1(node, item, list) {
- var selectors = node.prelude.children;
- // generate new rule sets:
- // .a, .b { color: red; }
- // ->
- // .a { color: red; }
- // .b { color: red; }
- // while there are more than 1 simple selector split for rulesets
- while (selectors.head !== selectors.tail) {
- var newSelectors = new List$3();
- newSelectors.insert(selectors.remove(selectors.head));
- list.insert(list.createItem({
- type: 'Rule',
- loc: node.loc,
- prelude: {
- type: 'SelectorList',
- loc: node.prelude.loc,
- children: newSelectors
- },
- block: {
- type: 'Block',
- loc: node.block.loc,
- children: node.block.children.copy()
- },
- pseudoSignature: node.pseudoSignature
- }), item);
- }
- }
- var _3DisjoinRuleset = function disjoinRule(ast) {
- walk$7(ast, {
- visit: 'Rule',
- reverse: true,
- enter: processRule$1
- });
- };
- var List$4 = lib.List;
- var generate$4 = lib.generate;
- var walk$8 = lib.walk;
- var REPLACE = 1;
- var REMOVE = 2;
- var TOP = 0;
- var RIGHT = 1;
- var BOTTOM = 2;
- var LEFT = 3;
- var SIDES = ['top', 'right', 'bottom', 'left'];
- var SIDE = {
- 'margin-top': 'top',
- 'margin-right': 'right',
- 'margin-bottom': 'bottom',
- 'margin-left': 'left',
- 'padding-top': 'top',
- 'padding-right': 'right',
- 'padding-bottom': 'bottom',
- 'padding-left': 'left',
- 'border-top-color': 'top',
- 'border-right-color': 'right',
- 'border-bottom-color': 'bottom',
- 'border-left-color': 'left',
- 'border-top-width': 'top',
- 'border-right-width': 'right',
- 'border-bottom-width': 'bottom',
- 'border-left-width': 'left',
- 'border-top-style': 'top',
- 'border-right-style': 'right',
- 'border-bottom-style': 'bottom',
- 'border-left-style': 'left'
- };
- var MAIN_PROPERTY = {
- 'margin': 'margin',
- 'margin-top': 'margin',
- 'margin-right': 'margin',
- 'margin-bottom': 'margin',
- 'margin-left': 'margin',
- 'padding': 'padding',
- 'padding-top': 'padding',
- 'padding-right': 'padding',
- 'padding-bottom': 'padding',
- 'padding-left': 'padding',
- 'border-color': 'border-color',
- 'border-top-color': 'border-color',
- 'border-right-color': 'border-color',
- 'border-bottom-color': 'border-color',
- 'border-left-color': 'border-color',
- 'border-width': 'border-width',
- 'border-top-width': 'border-width',
- 'border-right-width': 'border-width',
- 'border-bottom-width': 'border-width',
- 'border-left-width': 'border-width',
- 'border-style': 'border-style',
- 'border-top-style': 'border-style',
- 'border-right-style': 'border-style',
- 'border-bottom-style': 'border-style',
- 'border-left-style': 'border-style'
- };
- function TRBL(name) {
- this.name = name;
- this.loc = null;
- this.iehack = undefined;
- this.sides = {
- 'top': null,
- 'right': null,
- 'bottom': null,
- 'left': null
- };
- }
- TRBL.prototype.getValueSequence = function(declaration, count) {
- var values = [];
- var iehack = '';
- var hasBadValues = declaration.value.children.some(function(child) {
- var special = false;
- switch (child.type) {
- case 'Identifier':
- switch (child.name) {
- case '\\0':
- case '\\9':
- iehack = child.name;
- return;
- case 'inherit':
- case 'initial':
- case 'unset':
- case 'revert':
- special = child.name;
- break;
- }
- break;
- case 'Dimension':
- switch (child.unit) {
- // is not supported until IE11
- case 'rem':
- // v* units is too buggy across browsers and better
- // don't merge values with those units
- case 'vw':
- case 'vh':
- case 'vmin':
- case 'vmax':
- case 'vm': // IE9 supporting "vm" instead of "vmin".
- special = child.unit;
- break;
- }
- break;
- case 'Hash': // color
- case 'Number':
- case 'Percentage':
- break;
- case 'Function':
- if (child.name === 'var') {
- return true;
- }
- special = child.name;
- break;
- case 'WhiteSpace':
- return false; // ignore space
- default:
- return true; // bad value
- }
- values.push({
- node: child,
- special: special,
- important: declaration.important
- });
- });
- if (hasBadValues || values.length > count) {
- return false;
- }
- if (typeof this.iehack === 'string' && this.iehack !== iehack) {
- return false;
- }
- this.iehack = iehack; // move outside
- return values;
- };
- TRBL.prototype.canOverride = function(side, value) {
- var currentValue = this.sides[side];
- return !currentValue || (value.important && !currentValue.important);
- };
- TRBL.prototype.add = function(name, declaration) {
- function attemptToAdd() {
- var sides = this.sides;
- var side = SIDE[name];
- if (side) {
- if (side in sides === false) {
- return false;
- }
- var values = this.getValueSequence(declaration, 1);
- if (!values || !values.length) {
- return false;
- }
- // can mix only if specials are equal
- for (var key in sides) {
- if (sides[key] !== null && sides[key].special !== values[0].special) {
- return false;
- }
- }
- if (!this.canOverride(side, values[0])) {
- return true;
- }
- sides[side] = values[0];
- return true;
- } else if (name === this.name) {
- var values = this.getValueSequence(declaration, 4);
- if (!values || !values.length) {
- return false;
- }
- switch (values.length) {
- case 1:
- values[RIGHT] = values[TOP];
- values[BOTTOM] = values[TOP];
- values[LEFT] = values[TOP];
- break;
- case 2:
- values[BOTTOM] = values[TOP];
- values[LEFT] = values[RIGHT];
- break;
- case 3:
- values[LEFT] = values[RIGHT];
- break;
- }
- // can mix only if specials are equal
- for (var i = 0; i < 4; i++) {
- for (var key in sides) {
- if (sides[key] !== null && sides[key].special !== values[i].special) {
- return false;
- }
- }
- }
- for (var i = 0; i < 4; i++) {
- if (this.canOverride(SIDES[i], values[i])) {
- sides[SIDES[i]] = values[i];
- }
- }
- return true;
- }
- }
- if (!attemptToAdd.call(this)) {
- return false;
- }
- // TODO: use it when we can refer to several points in source
- // if (this.loc) {
- // this.loc = {
- // primary: this.loc,
- // merged: declaration.loc
- // };
- // } else {
- // this.loc = declaration.loc;
- // }
- if (!this.loc) {
- this.loc = declaration.loc;
- }
- return true;
- };
- TRBL.prototype.isOkToMinimize = function() {
- var top = this.sides.top;
- var right = this.sides.right;
- var bottom = this.sides.bottom;
- var left = this.sides.left;
- if (top && right && bottom && left) {
- var important =
- top.important +
- right.important +
- bottom.important +
- left.important;
- return important === 0 || important === 4;
- }
- return false;
- };
- TRBL.prototype.getValue = function() {
- var result = new List$4();
- var sides = this.sides;
- var values = [
- sides.top,
- sides.right,
- sides.bottom,
- sides.left
- ];
- var stringValues = [
- generate$4(sides.top.node),
- generate$4(sides.right.node),
- generate$4(sides.bottom.node),
- generate$4(sides.left.node)
- ];
- if (stringValues[LEFT] === stringValues[RIGHT]) {
- values.pop();
- if (stringValues[BOTTOM] === stringValues[TOP]) {
- values.pop();
- if (stringValues[RIGHT] === stringValues[TOP]) {
- values.pop();
- }
- }
- }
- for (var i = 0; i < values.length; i++) {
- if (i) {
- result.appendData({ type: 'WhiteSpace', value: ' ' });
- }
- result.appendData(values[i].node);
- }
- if (this.iehack) {
- result.appendData({ type: 'WhiteSpace', value: ' ' });
- result.appendData({
- type: 'Identifier',
- loc: null,
- name: this.iehack
- });
- }
- return {
- type: 'Value',
- loc: null,
- children: result
- };
- };
- TRBL.prototype.getDeclaration = function() {
- return {
- type: 'Declaration',
- loc: this.loc,
- important: this.sides.top.important,
- property: this.name,
- value: this.getValue()
- };
- };
- function processRule$2(rule, shorts, shortDeclarations, lastShortSelector) {
- var declarations = rule.block.children;
- var selector = rule.prelude.children.first().id;
- rule.block.children.eachRight(function(declaration, item) {
- var property = declaration.property;
- if (!MAIN_PROPERTY.hasOwnProperty(property)) {
- return;
- }
- var key = MAIN_PROPERTY[property];
- var shorthand;
- var operation;
- if (!lastShortSelector || selector === lastShortSelector) {
- if (key in shorts) {
- operation = REMOVE;
- shorthand = shorts[key];
- }
- }
- if (!shorthand || !shorthand.add(property, declaration)) {
- operation = REPLACE;
- shorthand = new TRBL(key);
- // if can't parse value ignore it and break shorthand children
- if (!shorthand.add(property, declaration)) {
- lastShortSelector = null;
- return;
- }
- }
- shorts[key] = shorthand;
- shortDeclarations.push({
- operation: operation,
- block: declarations,
- item: item,
- shorthand: shorthand
- });
- lastShortSelector = selector;
- });
- return lastShortSelector;
- }
- function processShorthands(shortDeclarations, markDeclaration) {
- shortDeclarations.forEach(function(item) {
- var shorthand = item.shorthand;
- if (!shorthand.isOkToMinimize()) {
- return;
- }
- if (item.operation === REPLACE) {
- item.item.data = markDeclaration(shorthand.getDeclaration());
- } else {
- item.block.remove(item.item);
- }
- });
- }
- var _4RestructShorthand = function restructBlock(ast, indexer) {
- var stylesheetMap = {};
- var shortDeclarations = [];
- walk$8(ast, {
- visit: 'Rule',
- reverse: true,
- enter: function(node) {
- var stylesheet = this.block || this.stylesheet;
- var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
- var ruleMap;
- var shorts;
- if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
- ruleMap = {
- lastShortSelector: null
- };
- stylesheetMap[stylesheet.id] = ruleMap;
- } else {
- ruleMap = stylesheetMap[stylesheet.id];
- }
- if (ruleMap.hasOwnProperty(ruleId)) {
- shorts = ruleMap[ruleId];
- } else {
- shorts = {};
- ruleMap[ruleId] = shorts;
- }
- ruleMap.lastShortSelector = processRule$2.call(this, node, shorts, shortDeclarations, ruleMap.lastShortSelector);
- }
- });
- processShorthands(shortDeclarations, indexer.declaration);
- };
- var resolveProperty = lib.property;
- var resolveKeyword$4 = lib.keyword;
- var walk$9 = lib.walk;
- var generate$5 = lib.generate;
- var fingerprintId = 1;
- var dontRestructure = {
- 'src': 1 // https://github.com/afelix/csso/issues/50
- };
- var DONT_MIX_VALUE = {
- // https://developer.mozilla.org/en-US/docs/Web/CSS/display#Browser_compatibility
- 'display': /table|ruby|flex|-(flex)?box$|grid|contents|run-in/i,
- // https://developer.mozilla.org/en/docs/Web/CSS/text-align
- 'text-align': /^(start|end|match-parent|justify-all)$/i
- };
- var SAFE_VALUES = {
- cursor: [
- 'auto', 'crosshair', 'default', 'move', 'text', 'wait', 'help',
- 'n-resize', 'e-resize', 's-resize', 'w-resize',
- 'ne-resize', 'nw-resize', 'se-resize', 'sw-resize',
- 'pointer', 'progress', 'not-allowed', 'no-drop', 'vertical-text', 'all-scroll',
- 'col-resize', 'row-resize'
- ],
- overflow: [
- 'hidden', 'visible', 'scroll', 'auto'
- ],
- position: [
- 'static', 'relative', 'absolute', 'fixed'
- ]
- };
- var NEEDLESS_TABLE = {
- 'border-width': ['border'],
- 'border-style': ['border'],
- 'border-color': ['border'],
- 'border-top': ['border'],
- 'border-right': ['border'],
- 'border-bottom': ['border'],
- 'border-left': ['border'],
- 'border-top-width': ['border-top', 'border-width', 'border'],
- 'border-right-width': ['border-right', 'border-width', 'border'],
- 'border-bottom-width': ['border-bottom', 'border-width', 'border'],
- 'border-left-width': ['border-left', 'border-width', 'border'],
- 'border-top-style': ['border-top', 'border-style', 'border'],
- 'border-right-style': ['border-right', 'border-style', 'border'],
- 'border-bottom-style': ['border-bottom', 'border-style', 'border'],
- 'border-left-style': ['border-left', 'border-style', 'border'],
- 'border-top-color': ['border-top', 'border-color', 'border'],
- 'border-right-color': ['border-right', 'border-color', 'border'],
- 'border-bottom-color': ['border-bottom', 'border-color', 'border'],
- 'border-left-color': ['border-left', 'border-color', 'border'],
- 'margin-top': ['margin'],
- 'margin-right': ['margin'],
- 'margin-bottom': ['margin'],
- 'margin-left': ['margin'],
- 'padding-top': ['padding'],
- 'padding-right': ['padding'],
- 'padding-bottom': ['padding'],
- 'padding-left': ['padding'],
- 'font-style': ['font'],
- 'font-variant': ['font'],
- 'font-weight': ['font'],
- 'font-size': ['font'],
- 'font-family': ['font'],
- 'list-style-type': ['list-style'],
- 'list-style-position': ['list-style'],
- 'list-style-image': ['list-style']
- };
- function getPropertyFingerprint(propertyName, declaration, fingerprints) {
- var realName = resolveProperty(propertyName).basename;
- if (realName === 'background') {
- return propertyName + ':' + generate$5(declaration.value);
- }
- var declarationId = declaration.id;
- var fingerprint = fingerprints[declarationId];
- if (!fingerprint) {
- switch (declaration.value.type) {
- case 'Value':
- var vendorId = '';
- var iehack = '';
- var special = {};
- var raw = false;
- declaration.value.children.each(function walk(node) {
- switch (node.type) {
- case 'Value':
- case 'Brackets':
- case 'Parentheses':
- node.children.each(walk);
- break;
- case 'Raw':
- raw = true;
- break;
- case 'Identifier':
- var name = node.name;
- if (!vendorId) {
- vendorId = resolveKeyword$4(name).vendor;
- }
- if (/\\[09]/.test(name)) {
- iehack = RegExp.lastMatch;
- }
- if (SAFE_VALUES.hasOwnProperty(realName)) {
- if (SAFE_VALUES[realName].indexOf(name) === -1) {
- special[name] = true;
- }
- } else if (DONT_MIX_VALUE.hasOwnProperty(realName)) {
- if (DONT_MIX_VALUE[realName].test(name)) {
- special[name] = true;
- }
- }
- break;
- case 'Function':
- var name = node.name;
- if (!vendorId) {
- vendorId = resolveKeyword$4(name).vendor;
- }
- if (name === 'rect') {
- // there are 2 forms of rect:
- // rect(<top>, <right>, <bottom>, <left>) - standart
- // rect(<top> <right> <bottom> <left>) – backwards compatible syntax
- // only the same form values can be merged
- var hasComma = node.children.some(function(node) {
- return node.type === 'Operator' && node.value === ',';
- });
- if (!hasComma) {
- name = 'rect-backward';
- }
- }
- special[name + '()'] = true;
- // check nested tokens too
- node.children.each(walk);
- break;
- case 'Dimension':
- var unit = node.unit;
- if (/\\[09]/.test(unit)) {
- iehack = RegExp.lastMatch;
- }
- switch (unit) {
- // is not supported until IE11
- case 'rem':
- // v* units is too buggy across browsers and better
- // don't merge values with those units
- case 'vw':
- case 'vh':
- case 'vmin':
- case 'vmax':
- case 'vm': // IE9 supporting "vm" instead of "vmin".
- special[unit] = true;
- break;
- }
- break;
- }
- });
- fingerprint = raw
- ? '!' + fingerprintId++
- : '!' + Object.keys(special).sort() + '|' + iehack + vendorId;
- break;
- case 'Raw':
- fingerprint = '!' + declaration.value.value;
- break;
- default:
- fingerprint = generate$5(declaration.value);
- }
- fingerprints[declarationId] = fingerprint;
- }
- return propertyName + fingerprint;
- }
- function needless(props, declaration, fingerprints) {
- var property = resolveProperty(declaration.property);
- if (NEEDLESS_TABLE.hasOwnProperty(property.basename)) {
- var table = NEEDLESS_TABLE[property.basename];
- for (var i = 0; i < table.length; i++) {
- var ppre = getPropertyFingerprint(property.prefix + table[i], declaration, fingerprints);
- var prev = props.hasOwnProperty(ppre) ? props[ppre] : null;
- if (prev && (!declaration.important || prev.item.data.important)) {
- return prev;
- }
- }
- }
- }
- function processRule$3(rule, item, list, props, fingerprints) {
- var declarations = rule.block.children;
- declarations.eachRight(function(declaration, declarationItem) {
- var property = declaration.property;
- var fingerprint = getPropertyFingerprint(property, declaration, fingerprints);
- var prev = props[fingerprint];
- if (prev && !dontRestructure.hasOwnProperty(property)) {
- if (declaration.important && !prev.item.data.important) {
- props[fingerprint] = {
- block: declarations,
- item: declarationItem
- };
- prev.block.remove(prev.item);
- // TODO: use it when we can refer to several points in source
- // declaration.loc = {
- // primary: declaration.loc,
- // merged: prev.item.data.loc
- // };
- } else {
- declarations.remove(declarationItem);
- // TODO: use it when we can refer to several points in source
- // prev.item.data.loc = {
- // primary: prev.item.data.loc,
- // merged: declaration.loc
- // };
- }
- } else {
- var prev = needless(props, declaration, fingerprints);
- if (prev) {
- declarations.remove(declarationItem);
- // TODO: use it when we can refer to several points in source
- // prev.item.data.loc = {
- // primary: prev.item.data.loc,
- // merged: declaration.loc
- // };
- } else {
- declaration.fingerprint = fingerprint;
- props[fingerprint] = {
- block: declarations,
- item: declarationItem
- };
- }
- }
- });
- if (declarations.isEmpty()) {
- list.remove(item);
- }
- }
- var _6RestructBlock = function restructBlock(ast) {
- var stylesheetMap = {};
- var fingerprints = Object.create(null);
- walk$9(ast, {
- visit: 'Rule',
- reverse: true,
- enter: function(node, item, list) {
- var stylesheet = this.block || this.stylesheet;
- var ruleId = (node.pseudoSignature || '') + '|' + node.prelude.children.first().id;
- var ruleMap;
- var props;
- if (!stylesheetMap.hasOwnProperty(stylesheet.id)) {
- ruleMap = {};
- stylesheetMap[stylesheet.id] = ruleMap;
- } else {
- ruleMap = stylesheetMap[stylesheet.id];
- }
- if (ruleMap.hasOwnProperty(ruleId)) {
- props = ruleMap[ruleId];
- } else {
- props = {};
- ruleMap[ruleId] = props;
- }
- processRule$3.call(this, node, item, list, props, fingerprints);
- }
- });
- };
- var walk$a = lib.walk;
- /*
- At this step all rules has single simple selector. We try to join by equal
- declaration blocks to first rule, e.g.
- .a { color: red }
- b { ... }
- .b { color: red }
- ->
- .a, .b { color: red }
- b { ... }
- */
- function processRule$4(node, item, list) {
- var selectors = node.prelude.children;
- var declarations = node.block.children;
- var nodeCompareMarker = selectors.first().compareMarker;
- var skippedCompareMarkers = {};
- list.nextUntil(item.next, function(next, nextItem) {
- // skip non-ruleset node if safe
- if (next.type !== 'Rule') {
- return utils$2.unsafeToSkipNode.call(selectors, next);
- }
- if (node.pseudoSignature !== next.pseudoSignature) {
- return true;
- }
- var nextFirstSelector = next.prelude.children.head;
- var nextDeclarations = next.block.children;
- var nextCompareMarker = nextFirstSelector.data.compareMarker;
- // if next ruleset has same marked as one of skipped then stop joining
- if (nextCompareMarker in skippedCompareMarkers) {
- return true;
- }
- // try to join by selectors
- if (selectors.head === selectors.tail) {
- if (selectors.first().id === nextFirstSelector.data.id) {
- declarations.appendList(nextDeclarations);
- list.remove(nextItem);
- return;
- }
- }
- // try to join by properties
- if (utils$2.isEqualDeclarations(declarations, nextDeclarations)) {
- var nextStr = nextFirstSelector.data.id;
- selectors.some(function(data, item) {
- var curStr = data.id;
- if (nextStr < curStr) {
- selectors.insert(nextFirstSelector, item);
- return true;
- }
- if (!item.next) {
- selectors.insert(nextFirstSelector);
- return true;
- }
- });
- list.remove(nextItem);
- return;
- }
- // go to next ruleset if current one can be skipped (has no equal specificity nor element selector)
- if (nextCompareMarker === nodeCompareMarker) {
- return true;
- }
- skippedCompareMarkers[nextCompareMarker] = true;
- });
- }
- var _7MergeRuleset = function mergeRule(ast) {
- walk$a(ast, {
- visit: 'Rule',
- enter: processRule$4
- });
- };
- var List$5 = lib.List;
- var walk$b = lib.walk;
- function calcSelectorLength(list) {
- var length = 0;
- list.each(function(data) {
- length += data.id.length + 1;
- });
- return length - 1;
- }
- function calcDeclarationsLength(tokens) {
- var length = 0;
- for (var i = 0; i < tokens.length; i++) {
- length += tokens[i].length;
- }
- return (
- length + // declarations
- tokens.length - 1 // delimeters
- );
- }
- function processRule$5(node, item, list) {
- var avoidRulesMerge = this.block !== null ? this.block.avoidRulesMerge : false;
- var selectors = node.prelude.children;
- var block = node.block;
- var disallowDownMarkers = Object.create(null);
- var allowMergeUp = true;
- var allowMergeDown = true;
- list.prevUntil(item.prev, function(prev, prevItem) {
- var prevBlock = prev.block;
- var prevType = prev.type;
- if (prevType !== 'Rule') {
- var unsafe = utils$2.unsafeToSkipNode.call(selectors, prev);
- if (!unsafe && prevType === 'Atrule' && prevBlock) {
- walk$b(prevBlock, {
- visit: 'Rule',
- enter: function(node) {
- node.prelude.children.each(function(data) {
- disallowDownMarkers[data.compareMarker] = true;
- });
- }
- });
- }
- return unsafe;
- }
- var prevSelectors = prev.prelude.children;
- if (node.pseudoSignature !== prev.pseudoSignature) {
- return true;
- }
- allowMergeDown = !prevSelectors.some(function(selector) {
- return selector.compareMarker in disallowDownMarkers;
- });
- // try prev ruleset if simpleselectors has no equal specifity and element selector
- if (!allowMergeDown && !allowMergeUp) {
- return true;
- }
- // try to join by selectors
- if (allowMergeUp && utils$2.isEqualSelectors(prevSelectors, selectors)) {
- prevBlock.children.appendList(block.children);
- list.remove(item);
- return true;
- }
- // try to join by properties
- var diff = utils$2.compareDeclarations(block.children, prevBlock.children);
- // console.log(diff.eq, diff.ne1, diff.ne2);
- if (diff.eq.length) {
- if (!diff.ne1.length && !diff.ne2.length) {
- // equal blocks
- if (allowMergeDown) {
- utils$2.addSelectors(selectors, prevSelectors);
- list.remove(prevItem);
- }
- return true;
- } else if (!avoidRulesMerge) { /* probably we don't need to prevent those merges for @keyframes
- TODO: need to be checked */
- if (diff.ne1.length && !diff.ne2.length) {
- // prevBlock is subset block
- var selectorLength = calcSelectorLength(selectors);
- var blockLength = calcDeclarationsLength(diff.eq); // declarations length
- if (allowMergeUp && selectorLength < blockLength) {
- utils$2.addSelectors(prevSelectors, selectors);
- block.children = new List$5().fromArray(diff.ne1);
- }
- } else if (!diff.ne1.length && diff.ne2.length) {
- // node is subset of prevBlock
- var selectorLength = calcSelectorLength(prevSelectors);
- var blockLength = calcDeclarationsLength(diff.eq); // declarations length
- if (allowMergeDown && selectorLength < blockLength) {
- utils$2.addSelectors(selectors, prevSelectors);
- prevBlock.children = new List$5().fromArray(diff.ne2);
- }
- } else {
- // diff.ne1.length && diff.ne2.length
- // extract equal block
- var newSelector = {
- type: 'SelectorList',
- loc: null,
- children: utils$2.addSelectors(prevSelectors.copy(), selectors)
- };
- var newBlockLength = calcSelectorLength(newSelector.children) + 2; // selectors length + curly braces length
- var blockLength = calcDeclarationsLength(diff.eq); // declarations length
- // create new ruleset if declarations length greater than
- // ruleset description overhead
- if (blockLength >= newBlockLength) {
- var newItem = list.createItem({
- type: 'Rule',
- loc: null,
- prelude: newSelector,
- block: {
- type: 'Block',
- loc: null,
- children: new List$5().fromArray(diff.eq)
- },
- pseudoSignature: node.pseudoSignature
- });
- block.children = new List$5().fromArray(diff.ne1);
- prevBlock.children = new List$5().fromArray(diff.ne2overrided);
- if (allowMergeUp) {
- list.insert(newItem, prevItem);
- } else {
- list.insert(newItem, item);
- }
- return true;
- }
- }
- }
- }
- if (allowMergeUp) {
- // TODO: disallow up merge only if any property interception only (i.e. diff.ne2overrided.length > 0);
- // await property families to find property interception correctly
- allowMergeUp = !prevSelectors.some(function(prevSelector) {
- return selectors.some(function(selector) {
- return selector.compareMarker === prevSelector.compareMarker;
- });
- });
- }
- prevSelectors.each(function(data) {
- disallowDownMarkers[data.compareMarker] = true;
- });
- });
- }
- var _8RestructRuleset = function restructRule(ast) {
- walk$b(ast, {
- visit: 'Rule',
- reverse: true,
- enter: processRule$5
- });
- };
- var restructure = function(ast, options) {
- // prepare ast for restructing
- var indexer = prepare(ast, options);
- options.logger('prepare', ast);
- _1MergeAtrule(ast, options);
- options.logger('mergeAtrule', ast);
- _2InitialMergeRuleset(ast);
- options.logger('initialMergeRuleset', ast);
- _3DisjoinRuleset(ast);
- options.logger('disjoinRuleset', ast);
- _4RestructShorthand(ast, indexer);
- options.logger('restructShorthand', ast);
- _6RestructBlock(ast);
- options.logger('restructBlock', ast);
- _7MergeRuleset(ast);
- options.logger('mergeRuleset', ast);
- _8RestructRuleset(ast);
- options.logger('restructRuleset', ast);
- };
- var List$6 = lib.List;
- var clone$1 = lib.clone;
- var walk$c = lib.walk;
- function readChunk(children, specialComments) {
- var buffer = new List$6();
- var nonSpaceTokenInBuffer = false;
- var protectedComment;
- children.nextUntil(children.head, function(node, item, list) {
- if (node.type === 'Comment') {
- if (!specialComments || node.value.charAt(0) !== '!') {
- list.remove(item);
- return;
- }
- if (nonSpaceTokenInBuffer || protectedComment) {
- return true;
- }
- list.remove(item);
- protectedComment = node;
- return;
- }
- if (node.type !== 'WhiteSpace') {
- nonSpaceTokenInBuffer = true;
- }
- buffer.insert(list.remove(item));
- });
- return {
- comment: protectedComment,
- stylesheet: {
- type: 'StyleSheet',
- loc: null,
- children: buffer
- }
- };
- }
- function compressChunk(ast, firstAtrulesAllowed, num, options) {
- options.logger('Compress block #' + num, null, true);
- var seed = 1;
- if (ast.type === 'StyleSheet') {
- ast.firstAtrulesAllowed = firstAtrulesAllowed;
- ast.id = seed++;
- }
- walk$c(ast, {
- visit: 'Atrule',
- enter: function markScopes(node) {
- if (node.block !== null) {
- node.block.id = seed++;
- }
- }
- });
- options.logger('init', ast);
- // remove redundant
- clean(ast, options);
- options.logger('clean', ast);
- // replace nodes for shortened forms
- replace(ast);
- options.logger('replace', ast);
- // structure optimisations
- if (options.restructuring) {
- restructure(ast, options);
- }
- return ast;
- }
- function getCommentsOption(options) {
- var comments = 'comments' in options ? options.comments : 'exclamation';
- if (typeof comments === 'boolean') {
- comments = comments ? 'exclamation' : false;
- } else if (comments !== 'exclamation' && comments !== 'first-exclamation') {
- comments = false;
- }
- return comments;
- }
- function getRestructureOption(options) {
- if ('restructure' in options) {
- return options.restructure;
- }
- return 'restructuring' in options ? options.restructuring : true;
- }
- function wrapBlock(block) {
- return new List$6().appendData({
- type: 'Rule',
- loc: null,
- prelude: {
- type: 'SelectorList',
- loc: null,
- children: new List$6().appendData({
- type: 'Selector',
- loc: null,
- children: new List$6().appendData({
- type: 'TypeSelector',
- loc: null,
- name: 'x'
- })
- })
- },
- block: block
- });
- }
- var compress = function compress(ast, options) {
- ast = ast || { type: 'StyleSheet', loc: null, children: new List$6() };
- options = options || {};
- var compressOptions = {
- logger: typeof options.logger === 'function' ? options.logger : function() {},
- restructuring: getRestructureOption(options),
- forceMediaMerge: Boolean(options.forceMediaMerge),
- usage: options.usage ? usage.buildIndex(options.usage) : false
- };
- var specialComments = getCommentsOption(options);
- var firstAtrulesAllowed = true;
- var input;
- var output = new List$6();
- var chunk;
- var chunkNum = 1;
- var chunkChildren;
- if (options.clone) {
- ast = clone$1(ast);
- }
- if (ast.type === 'StyleSheet') {
- input = ast.children;
- ast.children = output;
- } else {
- input = wrapBlock(ast);
- }
- do {
- chunk = readChunk(input, Boolean(specialComments));
- compressChunk(chunk.stylesheet, firstAtrulesAllowed, chunkNum++, compressOptions);
- chunkChildren = chunk.stylesheet.children;
- if (chunk.comment) {
- // add \n before comment if there is another content in output
- if (!output.isEmpty()) {
- output.insert(List$6.createItem({
- type: 'Raw',
- value: '\n'
- }));
- }
- output.insert(List$6.createItem(chunk.comment));
- // add \n after comment if chunk is not empty
- if (!chunkChildren.isEmpty()) {
- output.insert(List$6.createItem({
- type: 'Raw',
- value: '\n'
- }));
- }
- }
- if (firstAtrulesAllowed && !chunkChildren.isEmpty()) {
- var lastRule = chunkChildren.last();
- if (lastRule.type !== 'Atrule' ||
- (lastRule.name !== 'import' && lastRule.name !== 'charset')) {
- firstAtrulesAllowed = false;
- }
- }
- if (specialComments !== 'exclamation') {
- specialComments = false;
- }
- output.appendList(chunkChildren);
- } while (!input.isEmpty());
- return {
- ast: ast
- };
- };
- var version$2 = "4.1.0";
- var _package$2 = {
- version: version$2
- };
- var _package$3 = /*#__PURE__*/Object.freeze({
- __proto__: null,
- version: version$2,
- 'default': _package$2
- });
- var require$$0 = getCjsExportFromNamespace(_package$3);
- var parse$1 = lib.parse;
- var generate$6 = lib.generate;
- function debugOutput(name, options, startTime, data) {
- if (options.debug) {
- console.error('## ' + name + ' done in %d ms\n', Date.now() - startTime);
- }
- return data;
- }
- function createDefaultLogger(level) {
- var lastDebug;
- return function logger(title, ast) {
- var line = title;
- if (ast) {
- line = '[' + ((Date.now() - lastDebug) / 1000).toFixed(3) + 's] ' + line;
- }
- if (level > 1 && ast) {
- var css = generate$6(ast);
- // when level 2, limit css to 256 symbols
- if (level === 2 && css.length > 256) {
- css = css.substr(0, 256) + '...';
- }
- line += '\n ' + css + '\n';
- }
- console.error(line);
- lastDebug = Date.now();
- };
- }
- function copy$1(obj) {
- var result = {};
- for (var key in obj) {
- result[key] = obj[key];
- }
- return result;
- }
- function buildCompressOptions(options) {
- options = copy$1(options);
- if (typeof options.logger !== 'function' && options.debug) {
- options.logger = createDefaultLogger(options.debug);
- }
- return options;
- }
- function runHandler(ast, options, handlers) {
- if (!Array.isArray(handlers)) {
- handlers = [handlers];
- }
- handlers.forEach(function(fn) {
- fn(ast, options);
- });
- }
- function minify(context, source, options) {
- options = options || {};
- var filename = options.filename || '<unknown>';
- var result;
- // parse
- var ast = debugOutput('parsing', options, Date.now(),
- parse$1(source, {
- context: context,
- filename: filename,
- positions: Boolean(options.sourceMap)
- })
- );
- // before compress handlers
- if (options.beforeCompress) {
- debugOutput('beforeCompress', options, Date.now(),
- runHandler(ast, options, options.beforeCompress)
- );
- }
- // compress
- var compressResult = debugOutput('compress', options, Date.now(),
- compress(ast, buildCompressOptions(options))
- );
- // after compress handlers
- if (options.afterCompress) {
- debugOutput('afterCompress', options, Date.now(),
- runHandler(compressResult, options, options.afterCompress)
- );
- }
- // generate
- if (options.sourceMap) {
- result = debugOutput('generate(sourceMap: true)', options, Date.now(), (function() {
- var tmp = generate$6(compressResult.ast, { sourceMap: true });
- tmp.map._file = filename; // since other tools can relay on file in source map transform chain
- tmp.map.setSourceContent(filename, source);
- return tmp;
- }()));
- } else {
- result = debugOutput('generate', options, Date.now(), {
- css: generate$6(compressResult.ast),
- map: null
- });
- }
- return result;
- }
- function minifyStylesheet(source, options) {
- return minify('stylesheet', source, options);
- }
- function minifyBlock(source, options) {
- return minify('declarationList', source, options);
- }
- var lib$1 = {
- version: require$$0.version,
- // main methods
- minify: minifyStylesheet,
- minifyBlock: minifyBlock,
- // css syntax parser/walkers/generator/etc
- syntax: Object.assign({
- compress: compress
- }, lib)
- };
- var lib_1 = lib$1.version;
- var lib_2 = lib$1.minify;
- var lib_3 = lib$1.minifyBlock;
- var lib_4 = lib$1.syntax;
- exports.default = lib$1;
- exports.minify = lib_2;
- exports.minifyBlock = lib_3;
- exports.syntax = lib_4;
- exports.version = lib_1;
- Object.defineProperty(exports, '__esModule', { value: true });
- })));
|