properties.js 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826
  1. 'use strict';
  2. // autogenerated - 7/15/2019
  3. /*
  4. *
  5. * https://www.w3.org/Style/CSS/all-properties.en.html
  6. */
  7. var external_dependency_parsers_0 = require("./parsers.js");
  8. var external_dependency_constants_1 = require("./constants.js");
  9. var azimuth_export_definition;
  10. azimuth_export_definition = {
  11. set: function (v) {
  12. var valueType = external_dependency_parsers_0.valueType(v);
  13. if (valueType === external_dependency_parsers_0.TYPES.ANGLE) {
  14. return this._setProperty('azimuth', external_dependency_parsers_0.parseAngle(v));
  15. }
  16. if (valueType === external_dependency_parsers_0.TYPES.KEYWORD) {
  17. var keywords = v.toLowerCase().trim().split(/\s+/);
  18. var hasBehind = false;
  19. if (keywords.length > 2) {
  20. return;
  21. }
  22. var behindIndex = keywords.indexOf('behind');
  23. hasBehind = behindIndex !== -1;
  24. if (keywords.length === 2) {
  25. if (!hasBehind) {
  26. return;
  27. }
  28. keywords.splice(behindIndex, 1);
  29. }
  30. if (keywords[0] === 'leftwards' || keywords[0] === 'rightwards') {
  31. if (hasBehind) {
  32. return;
  33. }
  34. return this._setProperty('azimuth', keywords[0]);
  35. }
  36. if (keywords[0] === 'behind') {
  37. return this._setProperty('azimuth', '180deg');
  38. }
  39. switch (keywords[0]) {
  40. case 'left-side':
  41. return this._setProperty('azimuth', '270deg');
  42. case 'far-left':
  43. return this._setProperty('azimuth', (hasBehind ? 240 : 300) + 'deg');
  44. case 'left':
  45. return this._setProperty('azimuth', (hasBehind ? 220 : 320) + 'deg');
  46. case 'center-left':
  47. return this._setProperty('azimuth', (hasBehind ? 200 : 340) + 'deg');
  48. case 'center':
  49. return this._setProperty('azimuth', (hasBehind ? 180 : 0) + 'deg');
  50. case 'center-right':
  51. return this._setProperty('azimuth', (hasBehind ? 160 : 20) + 'deg');
  52. case 'right':
  53. return this._setProperty('azimuth', (hasBehind ? 140 : 40) + 'deg');
  54. case 'far-right':
  55. return this._setProperty('azimuth', (hasBehind ? 120 : 60) + 'deg');
  56. case 'right-side':
  57. return this._setProperty('azimuth', '90deg');
  58. default:
  59. return;
  60. }
  61. }
  62. },
  63. get: function () {
  64. return this.getPropertyValue('azimuth');
  65. },
  66. enumerable: true,
  67. configurable: true
  68. };
  69. var backgroundColor_export_isValid, backgroundColor_export_definition;
  70. var backgroundColor_local_var_parse = function parse(v) {
  71. var parsed = external_dependency_parsers_0.parseColor(v);
  72. if (parsed !== undefined) {
  73. return parsed;
  74. }
  75. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'transparent' || v.toLowerCase() === 'inherit')) {
  76. return v;
  77. }
  78. return undefined;
  79. };
  80. backgroundColor_export_isValid = function isValid(v) {
  81. return backgroundColor_local_var_parse(v) !== undefined;
  82. };
  83. backgroundColor_export_definition = {
  84. set: function (v) {
  85. var parsed = backgroundColor_local_var_parse(v);
  86. if (parsed === undefined) {
  87. return;
  88. }
  89. this._setProperty('background-color', parsed);
  90. },
  91. get: function () {
  92. return this.getPropertyValue('background-color');
  93. },
  94. enumerable: true,
  95. configurable: true
  96. };
  97. var backgroundImage_export_isValid, backgroundImage_export_definition;
  98. var backgroundImage_local_var_parse = function parse(v) {
  99. var parsed = external_dependency_parsers_0.parseUrl(v);
  100. if (parsed !== undefined) {
  101. return parsed;
  102. }
  103. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'none' || v.toLowerCase() === 'inherit')) {
  104. return v;
  105. }
  106. return undefined;
  107. };
  108. backgroundImage_export_isValid = function isValid(v) {
  109. return backgroundImage_local_var_parse(v) !== undefined;
  110. };
  111. backgroundImage_export_definition = {
  112. set: function (v) {
  113. this._setProperty('background-image', backgroundImage_local_var_parse(v));
  114. },
  115. get: function () {
  116. return this.getPropertyValue('background-image');
  117. },
  118. enumerable: true,
  119. configurable: true
  120. };
  121. var backgroundRepeat_export_isValid, backgroundRepeat_export_definition;
  122. var backgroundRepeat_local_var_parse = function parse(v) {
  123. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'repeat' || v.toLowerCase() === 'repeat-x' || v.toLowerCase() === 'repeat-y' || v.toLowerCase() === 'no-repeat' || v.toLowerCase() === 'inherit')) {
  124. return v;
  125. }
  126. return undefined;
  127. };
  128. backgroundRepeat_export_isValid = function isValid(v) {
  129. return backgroundRepeat_local_var_parse(v) !== undefined;
  130. };
  131. backgroundRepeat_export_definition = {
  132. set: function (v) {
  133. this._setProperty('background-repeat', backgroundRepeat_local_var_parse(v));
  134. },
  135. get: function () {
  136. return this.getPropertyValue('background-repeat');
  137. },
  138. enumerable: true,
  139. configurable: true
  140. };
  141. var backgroundAttachment_export_isValid, backgroundAttachment_export_definition;
  142. var backgroundAttachment_local_var_isValid = backgroundAttachment_export_isValid = function isValid(v) {
  143. return external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'scroll' || v.toLowerCase() === 'fixed' || v.toLowerCase() === 'inherit');
  144. };
  145. backgroundAttachment_export_definition = {
  146. set: function (v) {
  147. if (!backgroundAttachment_local_var_isValid(v)) {
  148. return;
  149. }
  150. this._setProperty('background-attachment', v);
  151. },
  152. get: function () {
  153. return this.getPropertyValue('background-attachment');
  154. },
  155. enumerable: true,
  156. configurable: true
  157. };
  158. var backgroundPosition_export_isValid, backgroundPosition_export_definition;
  159. var backgroundPosition_local_var_valid_keywords = ['top', 'center', 'bottom', 'left', 'right'];
  160. var backgroundPosition_local_var_parse = function parse(v) {
  161. if (v === '' || v === null) {
  162. return undefined;
  163. }
  164. var parts = v.split(/\s+/);
  165. if (parts.length > 2 || parts.length < 1) {
  166. return undefined;
  167. }
  168. var types = [];
  169. parts.forEach(function (part, index) {
  170. types[index] = external_dependency_parsers_0.valueType(part);
  171. });
  172. if (parts.length === 1) {
  173. if (types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) {
  174. return v;
  175. }
  176. if (types[0] === external_dependency_parsers_0.TYPES.KEYWORD) {
  177. if (backgroundPosition_local_var_valid_keywords.indexOf(v.toLowerCase()) !== -1 || v.toLowerCase() === 'inherit') {
  178. return v;
  179. }
  180. }
  181. return undefined;
  182. }
  183. if ((types[0] === external_dependency_parsers_0.TYPES.LENGTH || types[0] === external_dependency_parsers_0.TYPES.PERCENT) && (types[1] === external_dependency_parsers_0.TYPES.LENGTH || types[1] === external_dependency_parsers_0.TYPES.PERCENT)) {
  184. return v;
  185. }
  186. if (types[0] !== external_dependency_parsers_0.TYPES.KEYWORD || types[1] !== external_dependency_parsers_0.TYPES.KEYWORD) {
  187. return undefined;
  188. }
  189. if (backgroundPosition_local_var_valid_keywords.indexOf(parts[0]) !== -1 && backgroundPosition_local_var_valid_keywords.indexOf(parts[1]) !== -1) {
  190. return v;
  191. }
  192. return undefined;
  193. };
  194. backgroundPosition_export_isValid = function isValid(v) {
  195. return backgroundPosition_local_var_parse(v) !== undefined;
  196. };
  197. backgroundPosition_export_definition = {
  198. set: function (v) {
  199. this._setProperty('background-position', backgroundPosition_local_var_parse(v));
  200. },
  201. get: function () {
  202. return this.getPropertyValue('background-position');
  203. },
  204. enumerable: true,
  205. configurable: true
  206. };
  207. var background_export_definition;
  208. var background_local_var_shorthand_for = {
  209. 'background-color': {
  210. isValid: backgroundColor_export_isValid,
  211. definition: backgroundColor_export_definition
  212. },
  213. 'background-image': {
  214. isValid: backgroundImage_export_isValid,
  215. definition: backgroundImage_export_definition
  216. },
  217. 'background-repeat': {
  218. isValid: backgroundRepeat_export_isValid,
  219. definition: backgroundRepeat_export_definition
  220. },
  221. 'background-attachment': {
  222. isValid: backgroundAttachment_export_isValid,
  223. definition: backgroundAttachment_export_definition
  224. },
  225. 'background-position': {
  226. isValid: backgroundPosition_export_isValid,
  227. definition: backgroundPosition_export_definition
  228. }
  229. };
  230. background_export_definition = {
  231. set: external_dependency_parsers_0.shorthandSetter('background', background_local_var_shorthand_for),
  232. get: external_dependency_parsers_0.shorthandGetter('background', background_local_var_shorthand_for),
  233. enumerable: true,
  234. configurable: true
  235. };
  236. var borderWidth_export_isValid, borderWidth_export_definition;
  237. // the valid border-widths:
  238. var borderWidth_local_var_widths = ['thin', 'medium', 'thick'];
  239. borderWidth_export_isValid = function parse(v) {
  240. var length = external_dependency_parsers_0.parseLength(v);
  241. if (length !== undefined) {
  242. return true;
  243. }
  244. if (typeof v !== 'string') {
  245. return false;
  246. }
  247. if (v === '') {
  248. return true;
  249. }
  250. v = v.toLowerCase();
  251. if (borderWidth_local_var_widths.indexOf(v) === -1) {
  252. return false;
  253. }
  254. return true;
  255. };
  256. var borderWidth_local_var_isValid = borderWidth_export_isValid;
  257. var borderWidth_local_var_parser = function (v) {
  258. var length = external_dependency_parsers_0.parseLength(v);
  259. if (length !== undefined) {
  260. return length;
  261. }
  262. if (borderWidth_local_var_isValid(v)) {
  263. return v.toLowerCase();
  264. }
  265. return undefined;
  266. };
  267. borderWidth_export_definition = {
  268. set: external_dependency_parsers_0.implicitSetter('border', 'width', borderWidth_local_var_isValid, borderWidth_local_var_parser),
  269. get: function () {
  270. return this.getPropertyValue('border-width');
  271. },
  272. enumerable: true,
  273. configurable: true
  274. };
  275. var borderStyle_export_isValid, borderStyle_export_definition;
  276. // the valid border-styles:
  277. var borderStyle_local_var_styles = ['none', 'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
  278. borderStyle_export_isValid = function parse(v) {
  279. return typeof v === 'string' && (v === '' || borderStyle_local_var_styles.indexOf(v) !== -1);
  280. };
  281. var borderStyle_local_var_isValid = borderStyle_export_isValid;
  282. var borderStyle_local_var_parser = function (v) {
  283. if (borderStyle_local_var_isValid(v)) {
  284. return v.toLowerCase();
  285. }
  286. return undefined;
  287. };
  288. borderStyle_export_definition = {
  289. set: external_dependency_parsers_0.implicitSetter('border', 'style', borderStyle_local_var_isValid, borderStyle_local_var_parser),
  290. get: function () {
  291. return this.getPropertyValue('border-style');
  292. },
  293. enumerable: true,
  294. configurable: true
  295. };
  296. var borderColor_export_isValid, borderColor_export_definition;
  297. borderColor_export_isValid = function parse(v) {
  298. if (typeof v !== 'string') {
  299. return false;
  300. }
  301. return v === '' || v.toLowerCase() === 'transparent' || external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.COLOR;
  302. };
  303. var borderColor_local_var_isValid = borderColor_export_isValid;
  304. var borderColor_local_var_parser = function (v) {
  305. if (borderColor_local_var_isValid(v)) {
  306. return v.toLowerCase();
  307. }
  308. return undefined;
  309. };
  310. borderColor_export_definition = {
  311. set: external_dependency_parsers_0.implicitSetter('border', 'color', borderColor_local_var_isValid, borderColor_local_var_parser),
  312. get: function () {
  313. return this.getPropertyValue('border-color');
  314. },
  315. enumerable: true,
  316. configurable: true
  317. };
  318. var border_export_definition;
  319. var border_local_var_shorthand_for = {
  320. 'border-width': {
  321. isValid: borderWidth_export_isValid,
  322. definition: borderWidth_export_definition
  323. },
  324. 'border-style': {
  325. isValid: borderStyle_export_isValid,
  326. definition: borderStyle_export_definition
  327. },
  328. 'border-color': {
  329. isValid: borderColor_export_isValid,
  330. definition: borderColor_export_definition
  331. }
  332. };
  333. var border_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('border', border_local_var_shorthand_for);
  334. var border_local_var_myShorthandGetter = external_dependency_parsers_0.shorthandGetter('border', border_local_var_shorthand_for);
  335. border_export_definition = {
  336. set: function (v) {
  337. if (v.toString().toLowerCase() === 'none') {
  338. v = '';
  339. }
  340. border_local_var_myShorthandSetter.call(this, v);
  341. this.removeProperty('border-top');
  342. this.removeProperty('border-left');
  343. this.removeProperty('border-right');
  344. this.removeProperty('border-bottom');
  345. this._values['border-top'] = this._values.border;
  346. this._values['border-left'] = this._values.border;
  347. this._values['border-right'] = this._values.border;
  348. this._values['border-bottom'] = this._values.border;
  349. },
  350. get: border_local_var_myShorthandGetter,
  351. enumerable: true,
  352. configurable: true
  353. };
  354. var borderBottomWidth_export_isValid, borderBottomWidth_export_definition;
  355. var borderBottomWidth_local_var_isValid = borderBottomWidth_export_isValid = borderWidth_export_isValid;
  356. borderBottomWidth_export_definition = {
  357. set: function (v) {
  358. if (borderBottomWidth_local_var_isValid(v)) {
  359. this._setProperty('border-bottom-width', v);
  360. }
  361. },
  362. get: function () {
  363. return this.getPropertyValue('border-bottom-width');
  364. },
  365. enumerable: true,
  366. configurable: true
  367. };
  368. var borderBottomStyle_export_isValid, borderBottomStyle_export_definition;
  369. borderBottomStyle_export_isValid = borderStyle_export_isValid;
  370. borderBottomStyle_export_definition = {
  371. set: function (v) {
  372. if (borderStyle_export_isValid(v)) {
  373. if (v.toLowerCase() === 'none') {
  374. v = '';
  375. this.removeProperty('border-bottom-width');
  376. }
  377. this._setProperty('border-bottom-style', v);
  378. }
  379. },
  380. get: function () {
  381. return this.getPropertyValue('border-bottom-style');
  382. },
  383. enumerable: true,
  384. configurable: true
  385. };
  386. var borderBottomColor_export_isValid, borderBottomColor_export_definition;
  387. var borderBottomColor_local_var_isValid = borderBottomColor_export_isValid = borderColor_export_isValid;
  388. borderBottomColor_export_definition = {
  389. set: function (v) {
  390. if (borderBottomColor_local_var_isValid(v)) {
  391. this._setProperty('border-bottom-color', v);
  392. }
  393. },
  394. get: function () {
  395. return this.getPropertyValue('border-bottom-color');
  396. },
  397. enumerable: true,
  398. configurable: true
  399. };
  400. var borderBottom_export_definition;
  401. var borderBottom_local_var_shorthand_for = {
  402. 'border-bottom-width': {
  403. isValid: borderBottomWidth_export_isValid,
  404. definition: borderBottomWidth_export_definition
  405. },
  406. 'border-bottom-style': {
  407. isValid: borderBottomStyle_export_isValid,
  408. definition: borderBottomStyle_export_definition
  409. },
  410. 'border-bottom-color': {
  411. isValid: borderBottomColor_export_isValid,
  412. definition: borderBottomColor_export_definition
  413. }
  414. };
  415. borderBottom_export_definition = {
  416. set: external_dependency_parsers_0.shorthandSetter('border-bottom', borderBottom_local_var_shorthand_for),
  417. get: external_dependency_parsers_0.shorthandGetter('border-bottom', borderBottom_local_var_shorthand_for),
  418. enumerable: true,
  419. configurable: true
  420. };
  421. var borderCollapse_export_definition;
  422. var borderCollapse_local_var_parse = function parse(v) {
  423. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && (v.toLowerCase() === 'collapse' || v.toLowerCase() === 'separate' || v.toLowerCase() === 'inherit')) {
  424. return v;
  425. }
  426. return undefined;
  427. };
  428. borderCollapse_export_definition = {
  429. set: function (v) {
  430. this._setProperty('border-collapse', borderCollapse_local_var_parse(v));
  431. },
  432. get: function () {
  433. return this.getPropertyValue('border-collapse');
  434. },
  435. enumerable: true,
  436. configurable: true
  437. };
  438. var borderLeftWidth_export_isValid, borderLeftWidth_export_definition;
  439. var borderLeftWidth_local_var_isValid = borderLeftWidth_export_isValid = borderWidth_export_isValid;
  440. borderLeftWidth_export_definition = {
  441. set: function (v) {
  442. if (borderLeftWidth_local_var_isValid(v)) {
  443. this._setProperty('border-left-width', v);
  444. }
  445. },
  446. get: function () {
  447. return this.getPropertyValue('border-left-width');
  448. },
  449. enumerable: true,
  450. configurable: true
  451. };
  452. var borderLeftStyle_export_isValid, borderLeftStyle_export_definition;
  453. borderLeftStyle_export_isValid = borderStyle_export_isValid;
  454. borderLeftStyle_export_definition = {
  455. set: function (v) {
  456. if (borderStyle_export_isValid(v)) {
  457. if (v.toLowerCase() === 'none') {
  458. v = '';
  459. this.removeProperty('border-left-width');
  460. }
  461. this._setProperty('border-left-style', v);
  462. }
  463. },
  464. get: function () {
  465. return this.getPropertyValue('border-left-style');
  466. },
  467. enumerable: true,
  468. configurable: true
  469. };
  470. var borderLeftColor_export_isValid, borderLeftColor_export_definition;
  471. var borderLeftColor_local_var_isValid = borderLeftColor_export_isValid = borderColor_export_isValid;
  472. borderLeftColor_export_definition = {
  473. set: function (v) {
  474. if (borderLeftColor_local_var_isValid(v)) {
  475. this._setProperty('border-left-color', v);
  476. }
  477. },
  478. get: function () {
  479. return this.getPropertyValue('border-left-color');
  480. },
  481. enumerable: true,
  482. configurable: true
  483. };
  484. var borderLeft_export_definition;
  485. var borderLeft_local_var_shorthand_for = {
  486. 'border-left-width': {
  487. isValid: borderLeftWidth_export_isValid,
  488. definition: borderLeftWidth_export_definition
  489. },
  490. 'border-left-style': {
  491. isValid: borderLeftStyle_export_isValid,
  492. definition: borderLeftStyle_export_definition
  493. },
  494. 'border-left-color': {
  495. isValid: borderLeftColor_export_isValid,
  496. definition: borderLeftColor_export_definition
  497. }
  498. };
  499. borderLeft_export_definition = {
  500. set: external_dependency_parsers_0.shorthandSetter('border-left', borderLeft_local_var_shorthand_for),
  501. get: external_dependency_parsers_0.shorthandGetter('border-left', borderLeft_local_var_shorthand_for),
  502. enumerable: true,
  503. configurable: true
  504. };
  505. var borderRightWidth_export_isValid, borderRightWidth_export_definition;
  506. var borderRightWidth_local_var_isValid = borderRightWidth_export_isValid = borderWidth_export_isValid;
  507. borderRightWidth_export_definition = {
  508. set: function (v) {
  509. if (borderRightWidth_local_var_isValid(v)) {
  510. this._setProperty('border-right-width', v);
  511. }
  512. },
  513. get: function () {
  514. return this.getPropertyValue('border-right-width');
  515. },
  516. enumerable: true,
  517. configurable: true
  518. };
  519. var borderRightStyle_export_isValid, borderRightStyle_export_definition;
  520. borderRightStyle_export_isValid = borderStyle_export_isValid;
  521. borderRightStyle_export_definition = {
  522. set: function (v) {
  523. if (borderStyle_export_isValid(v)) {
  524. if (v.toLowerCase() === 'none') {
  525. v = '';
  526. this.removeProperty('border-right-width');
  527. }
  528. this._setProperty('border-right-style', v);
  529. }
  530. },
  531. get: function () {
  532. return this.getPropertyValue('border-right-style');
  533. },
  534. enumerable: true,
  535. configurable: true
  536. };
  537. var borderRightColor_export_isValid, borderRightColor_export_definition;
  538. var borderRightColor_local_var_isValid = borderRightColor_export_isValid = borderColor_export_isValid;
  539. borderRightColor_export_definition = {
  540. set: function (v) {
  541. if (borderRightColor_local_var_isValid(v)) {
  542. this._setProperty('border-right-color', v);
  543. }
  544. },
  545. get: function () {
  546. return this.getPropertyValue('border-right-color');
  547. },
  548. enumerable: true,
  549. configurable: true
  550. };
  551. var borderRight_export_definition;
  552. var borderRight_local_var_shorthand_for = {
  553. 'border-right-width': {
  554. isValid: borderRightWidth_export_isValid,
  555. definition: borderRightWidth_export_definition
  556. },
  557. 'border-right-style': {
  558. isValid: borderRightStyle_export_isValid,
  559. definition: borderRightStyle_export_definition
  560. },
  561. 'border-right-color': {
  562. isValid: borderRightColor_export_isValid,
  563. definition: borderRightColor_export_definition
  564. }
  565. };
  566. borderRight_export_definition = {
  567. set: external_dependency_parsers_0.shorthandSetter('border-right', borderRight_local_var_shorthand_for),
  568. get: external_dependency_parsers_0.shorthandGetter('border-right', borderRight_local_var_shorthand_for),
  569. enumerable: true,
  570. configurable: true
  571. };
  572. var borderSpacing_export_definition;
  573. // <length> <length>? | inherit
  574. // if one, it applies to both horizontal and verical spacing
  575. // if two, the first applies to the horizontal and the second applies to vertical spacing
  576. var borderSpacing_local_var_parse = function parse(v) {
  577. if (v === '' || v === null) {
  578. return undefined;
  579. }
  580. if (v === 0) {
  581. return '0px';
  582. }
  583. if (v.toLowerCase() === 'inherit') {
  584. return v;
  585. }
  586. var parts = v.split(/\s+/);
  587. if (parts.length !== 1 && parts.length !== 2) {
  588. return undefined;
  589. }
  590. parts.forEach(function (part) {
  591. if (external_dependency_parsers_0.valueType(part) !== external_dependency_parsers_0.TYPES.LENGTH) {
  592. return undefined;
  593. }
  594. });
  595. return v;
  596. };
  597. borderSpacing_export_definition = {
  598. set: function (v) {
  599. this._setProperty('border-spacing', borderSpacing_local_var_parse(v));
  600. },
  601. get: function () {
  602. return this.getPropertyValue('border-spacing');
  603. },
  604. enumerable: true,
  605. configurable: true
  606. };
  607. var borderTopWidth_export_isValid, borderTopWidth_export_definition;
  608. borderTopWidth_export_isValid = borderWidth_export_isValid;
  609. borderTopWidth_export_definition = {
  610. set: function (v) {
  611. if (borderWidth_export_isValid(v)) {
  612. this._setProperty('border-top-width', v);
  613. }
  614. },
  615. get: function () {
  616. return this.getPropertyValue('border-top-width');
  617. },
  618. enumerable: true,
  619. configurable: true
  620. };
  621. var borderTopStyle_export_isValid, borderTopStyle_export_definition;
  622. borderTopStyle_export_isValid = borderStyle_export_isValid;
  623. borderTopStyle_export_definition = {
  624. set: function (v) {
  625. if (borderStyle_export_isValid(v)) {
  626. if (v.toLowerCase() === 'none') {
  627. v = '';
  628. this.removeProperty('border-top-width');
  629. }
  630. this._setProperty('border-top-style', v);
  631. }
  632. },
  633. get: function () {
  634. return this.getPropertyValue('border-top-style');
  635. },
  636. enumerable: true,
  637. configurable: true
  638. };
  639. var borderTopColor_export_isValid, borderTopColor_export_definition;
  640. var borderTopColor_local_var_isValid = borderTopColor_export_isValid = borderColor_export_isValid;
  641. borderTopColor_export_definition = {
  642. set: function (v) {
  643. if (borderTopColor_local_var_isValid(v)) {
  644. this._setProperty('border-top-color', v);
  645. }
  646. },
  647. get: function () {
  648. return this.getPropertyValue('border-top-color');
  649. },
  650. enumerable: true,
  651. configurable: true
  652. };
  653. var borderTop_export_definition;
  654. var borderTop_local_var_shorthand_for = {
  655. 'border-top-width': {
  656. isValid: borderTopWidth_export_isValid,
  657. definition: borderTopWidth_export_definition
  658. },
  659. 'border-top-style': {
  660. isValid: borderTopStyle_export_isValid,
  661. definition: borderTopStyle_export_definition
  662. },
  663. 'border-top-color': {
  664. isValid: borderTopColor_export_isValid,
  665. definition: borderTopColor_export_definition
  666. }
  667. };
  668. borderTop_export_definition = {
  669. set: external_dependency_parsers_0.shorthandSetter('border-top', borderTop_local_var_shorthand_for),
  670. get: external_dependency_parsers_0.shorthandGetter('border-top', borderTop_local_var_shorthand_for),
  671. enumerable: true,
  672. configurable: true
  673. };
  674. var bottom_export_definition;
  675. bottom_export_definition = {
  676. set: function (v) {
  677. this._setProperty('bottom', external_dependency_parsers_0.parseMeasurement(v));
  678. },
  679. get: function () {
  680. return this.getPropertyValue('bottom');
  681. },
  682. enumerable: true,
  683. configurable: true
  684. };
  685. var clear_export_definition;
  686. var clear_local_var_clear_keywords = ['none', 'left', 'right', 'both', 'inherit'];
  687. clear_export_definition = {
  688. set: function (v) {
  689. this._setProperty('clear', external_dependency_parsers_0.parseKeyword(v, clear_local_var_clear_keywords));
  690. },
  691. get: function () {
  692. return this.getPropertyValue('clear');
  693. },
  694. enumerable: true,
  695. configurable: true
  696. };
  697. var clip_export_definition;
  698. var clip_local_var_shape_regex = /^rect\((.*)\)$/i;
  699. var clip_local_var_parse = function (val) {
  700. if (val === '' || val === null) {
  701. return val;
  702. }
  703. if (typeof val !== 'string') {
  704. return undefined;
  705. }
  706. val = val.toLowerCase();
  707. if (val === 'auto' || val === 'inherit') {
  708. return val;
  709. }
  710. var matches = val.match(clip_local_var_shape_regex);
  711. if (!matches) {
  712. return undefined;
  713. }
  714. var parts = matches[1].split(/\s*,\s*/);
  715. if (parts.length !== 4) {
  716. return undefined;
  717. }
  718. var valid = parts.every(function (part, index) {
  719. var measurement = external_dependency_parsers_0.parseMeasurement(part);
  720. parts[index] = measurement;
  721. return measurement !== undefined;
  722. });
  723. if (!valid) {
  724. return undefined;
  725. }
  726. parts = parts.join(', ');
  727. return val.replace(matches[1], parts);
  728. };
  729. clip_export_definition = {
  730. set: function (v) {
  731. this._setProperty('clip', clip_local_var_parse(v));
  732. },
  733. get: function () {
  734. return this.getPropertyValue('clip');
  735. },
  736. enumerable: true,
  737. configurable: true
  738. };
  739. var color_export_definition;
  740. color_export_definition = {
  741. set: function (v) {
  742. this._setProperty('color', external_dependency_parsers_0.parseColor(v));
  743. },
  744. get: function () {
  745. return this.getPropertyValue('color');
  746. },
  747. enumerable: true,
  748. configurable: true
  749. };
  750. var cssFloat_export_definition;
  751. cssFloat_export_definition = {
  752. set: function (v) {
  753. this._setProperty('float', v);
  754. },
  755. get: function () {
  756. return this.getPropertyValue('float');
  757. },
  758. enumerable: true,
  759. configurable: true
  760. };
  761. var flexGrow_export_isValid, flexGrow_export_definition;
  762. flexGrow_export_isValid = function isValid(v, positionAtFlexShorthand) {
  763. return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.first;
  764. };
  765. flexGrow_export_definition = {
  766. set: function (v) {
  767. this._setProperty('flex-grow', external_dependency_parsers_0.parseNumber(v));
  768. },
  769. get: function () {
  770. return this.getPropertyValue('flex-grow');
  771. },
  772. enumerable: true,
  773. configurable: true
  774. };
  775. var flexShrink_export_isValid, flexShrink_export_definition;
  776. flexShrink_export_isValid = function isValid(v, positionAtFlexShorthand) {
  777. return external_dependency_parsers_0.parseNumber(v) !== undefined && positionAtFlexShorthand === external_dependency_constants_1.POSITION_AT_SHORTHAND.second;
  778. };
  779. flexShrink_export_definition = {
  780. set: function (v) {
  781. this._setProperty('flex-shrink', external_dependency_parsers_0.parseNumber(v));
  782. },
  783. get: function () {
  784. return this.getPropertyValue('flex-shrink');
  785. },
  786. enumerable: true,
  787. configurable: true
  788. };
  789. var flexBasis_export_isValid, flexBasis_export_definition;
  790. function flexBasis_local_fn_parse(v) {
  791. if (String(v).toLowerCase() === 'auto') {
  792. return 'auto';
  793. }
  794. if (String(v).toLowerCase() === 'inherit') {
  795. return 'inherit';
  796. }
  797. return external_dependency_parsers_0.parseMeasurement(v);
  798. }
  799. flexBasis_export_isValid = function isValid(v) {
  800. return flexBasis_local_fn_parse(v) !== undefined;
  801. };
  802. flexBasis_export_definition = {
  803. set: function (v) {
  804. this._setProperty('flex-basis', flexBasis_local_fn_parse(v));
  805. },
  806. get: function () {
  807. return this.getPropertyValue('flex-basis');
  808. },
  809. enumerable: true,
  810. configurable: true
  811. };
  812. var flex_export_isValid, flex_export_definition;
  813. var flex_local_var_shorthand_for = {
  814. 'flex-grow': {
  815. isValid: flexGrow_export_isValid,
  816. definition: flexGrow_export_definition
  817. },
  818. 'flex-shrink': {
  819. isValid: flexShrink_export_isValid,
  820. definition: flexShrink_export_definition
  821. },
  822. 'flex-basis': {
  823. isValid: flexBasis_export_isValid,
  824. definition: flexBasis_export_definition
  825. }
  826. };
  827. var flex_local_var_myShorthandSetter = external_dependency_parsers_0.shorthandSetter('flex', flex_local_var_shorthand_for);
  828. flex_export_isValid = function isValid(v) {
  829. return external_dependency_parsers_0.shorthandParser(v, flex_local_var_shorthand_for) !== undefined;
  830. };
  831. flex_export_definition = {
  832. set: function (v) {
  833. var normalizedValue = String(v).trim().toLowerCase();
  834. if (normalizedValue === 'none') {
  835. flex_local_var_myShorthandSetter.call(this, '0 0 auto');
  836. return;
  837. }
  838. if (normalizedValue === 'initial') {
  839. flex_local_var_myShorthandSetter.call(this, '0 1 auto');
  840. return;
  841. }
  842. if (normalizedValue === 'auto') {
  843. this.removeProperty('flex-grow');
  844. this.removeProperty('flex-shrink');
  845. this.setProperty('flex-basis', normalizedValue);
  846. return;
  847. }
  848. flex_local_var_myShorthandSetter.call(this, v);
  849. },
  850. get: external_dependency_parsers_0.shorthandGetter('flex', flex_local_var_shorthand_for),
  851. enumerable: true,
  852. configurable: true
  853. };
  854. var float_export_definition;
  855. float_export_definition = {
  856. set: function (v) {
  857. this._setProperty('float', v);
  858. },
  859. get: function () {
  860. return this.getPropertyValue('float');
  861. },
  862. enumerable: true,
  863. configurable: true
  864. };
  865. var floodColor_export_definition;
  866. floodColor_export_definition = {
  867. set: function (v) {
  868. this._setProperty('flood-color', external_dependency_parsers_0.parseColor(v));
  869. },
  870. get: function () {
  871. return this.getPropertyValue('flood-color');
  872. },
  873. enumerable: true,
  874. configurable: true
  875. };
  876. var fontFamily_export_isValid, fontFamily_export_definition;
  877. var fontFamily_local_var_partsRegEx = /\s*,\s*/;
  878. fontFamily_export_isValid = function isValid(v) {
  879. if (v === '' || v === null) {
  880. return true;
  881. }
  882. var parts = v.split(fontFamily_local_var_partsRegEx);
  883. var len = parts.length;
  884. var i;
  885. var type;
  886. for (i = 0; i < len; i++) {
  887. type = external_dependency_parsers_0.valueType(parts[i]);
  888. if (type === external_dependency_parsers_0.TYPES.STRING || type === external_dependency_parsers_0.TYPES.KEYWORD) {
  889. return true;
  890. }
  891. }
  892. return false;
  893. };
  894. fontFamily_export_definition = {
  895. set: function (v) {
  896. this._setProperty('font-family', v);
  897. },
  898. get: function () {
  899. return this.getPropertyValue('font-family');
  900. },
  901. enumerable: true,
  902. configurable: true
  903. };
  904. var fontSize_export_isValid, fontSize_export_definition;
  905. var fontSize_local_var_absoluteSizes = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'];
  906. var fontSize_local_var_relativeSizes = ['larger', 'smaller'];
  907. fontSize_export_isValid = function (v) {
  908. var type = external_dependency_parsers_0.valueType(v.toLowerCase());
  909. return type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_absoluteSizes.indexOf(v.toLowerCase()) !== -1 || type === external_dependency_parsers_0.TYPES.KEYWORD && fontSize_local_var_relativeSizes.indexOf(v.toLowerCase()) !== -1;
  910. };
  911. fontSize_export_definition = {
  912. set: function (v) {
  913. this._setProperty('font-size', v);
  914. },
  915. get: function () {
  916. return this.getPropertyValue('font-size');
  917. },
  918. enumerable: true,
  919. configurable: true
  920. };
  921. var fontStyle_export_isValid, fontStyle_export_definition;
  922. var fontStyle_local_var_valid_styles = ['normal', 'italic', 'oblique', 'inherit'];
  923. fontStyle_export_isValid = function (v) {
  924. return fontStyle_local_var_valid_styles.indexOf(v.toLowerCase()) !== -1;
  925. };
  926. fontStyle_export_definition = {
  927. set: function (v) {
  928. this._setProperty('font-style', v);
  929. },
  930. get: function () {
  931. return this.getPropertyValue('font-style');
  932. },
  933. enumerable: true,
  934. configurable: true
  935. };
  936. var fontVariant_export_isValid, fontVariant_export_definition;
  937. var fontVariant_local_var_valid_variants = ['normal', 'small-caps', 'inherit'];
  938. fontVariant_export_isValid = function isValid(v) {
  939. return fontVariant_local_var_valid_variants.indexOf(v.toLowerCase()) !== -1;
  940. };
  941. fontVariant_export_definition = {
  942. set: function (v) {
  943. this._setProperty('font-variant', v);
  944. },
  945. get: function () {
  946. return this.getPropertyValue('font-variant');
  947. },
  948. enumerable: true,
  949. configurable: true
  950. };
  951. var fontWeight_export_isValid, fontWeight_export_definition;
  952. var fontWeight_local_var_valid_weights = ['normal', 'bold', 'bolder', 'lighter', '100', '200', '300', '400', '500', '600', '700', '800', '900', 'inherit'];
  953. fontWeight_export_isValid = function isValid(v) {
  954. return fontWeight_local_var_valid_weights.indexOf(v.toLowerCase()) !== -1;
  955. };
  956. fontWeight_export_definition = {
  957. set: function (v) {
  958. this._setProperty('font-weight', v);
  959. },
  960. get: function () {
  961. return this.getPropertyValue('font-weight');
  962. },
  963. enumerable: true,
  964. configurable: true
  965. };
  966. var lineHeight_export_isValid, lineHeight_export_definition;
  967. lineHeight_export_isValid = function isValid(v) {
  968. var type = external_dependency_parsers_0.valueType(v);
  969. return type === external_dependency_parsers_0.TYPES.KEYWORD && v.toLowerCase() === 'normal' || v.toLowerCase() === 'inherit' || type === external_dependency_parsers_0.TYPES.NUMBER || type === external_dependency_parsers_0.TYPES.LENGTH || type === external_dependency_parsers_0.TYPES.PERCENT;
  970. };
  971. lineHeight_export_definition = {
  972. set: function (v) {
  973. this._setProperty('line-height', v);
  974. },
  975. get: function () {
  976. return this.getPropertyValue('line-height');
  977. },
  978. enumerable: true,
  979. configurable: true
  980. };
  981. var font_export_definition;
  982. var font_local_var_shorthand_for = {
  983. 'font-family': {
  984. isValid: fontFamily_export_isValid,
  985. definition: fontFamily_export_definition
  986. },
  987. 'font-size': {
  988. isValid: fontSize_export_isValid,
  989. definition: fontSize_export_definition
  990. },
  991. 'font-style': {
  992. isValid: fontStyle_export_isValid,
  993. definition: fontStyle_export_definition
  994. },
  995. 'font-variant': {
  996. isValid: fontVariant_export_isValid,
  997. definition: fontVariant_export_definition
  998. },
  999. 'font-weight': {
  1000. isValid: fontWeight_export_isValid,
  1001. definition: fontWeight_export_definition
  1002. },
  1003. 'line-height': {
  1004. isValid: lineHeight_export_isValid,
  1005. definition: lineHeight_export_definition
  1006. }
  1007. };
  1008. var font_local_var_static_fonts = ['caption', 'icon', 'menu', 'message-box', 'small-caption', 'status-bar', 'inherit'];
  1009. var font_local_var_setter = external_dependency_parsers_0.shorthandSetter('font', font_local_var_shorthand_for);
  1010. font_export_definition = {
  1011. set: function (v) {
  1012. var short = external_dependency_parsers_0.shorthandParser(v, font_local_var_shorthand_for);
  1013. if (short !== undefined) {
  1014. return font_local_var_setter.call(this, v);
  1015. }
  1016. if (external_dependency_parsers_0.valueType(v) === external_dependency_parsers_0.TYPES.KEYWORD && font_local_var_static_fonts.indexOf(v.toLowerCase()) !== -1) {
  1017. this._setProperty('font', v);
  1018. }
  1019. },
  1020. get: external_dependency_parsers_0.shorthandGetter('font', font_local_var_shorthand_for),
  1021. enumerable: true,
  1022. configurable: true
  1023. };
  1024. var height_export_definition;
  1025. function height_local_fn_parse(v) {
  1026. if (String(v).toLowerCase() === 'auto') {
  1027. return 'auto';
  1028. }
  1029. if (String(v).toLowerCase() === 'inherit') {
  1030. return 'inherit';
  1031. }
  1032. return external_dependency_parsers_0.parseMeasurement(v);
  1033. }
  1034. height_export_definition = {
  1035. set: function (v) {
  1036. this._setProperty('height', height_local_fn_parse(v));
  1037. },
  1038. get: function () {
  1039. return this.getPropertyValue('height');
  1040. },
  1041. enumerable: true,
  1042. configurable: true
  1043. };
  1044. var left_export_definition;
  1045. left_export_definition = {
  1046. set: function (v) {
  1047. this._setProperty('left', external_dependency_parsers_0.parseMeasurement(v));
  1048. },
  1049. get: function () {
  1050. return this.getPropertyValue('left');
  1051. },
  1052. enumerable: true,
  1053. configurable: true
  1054. };
  1055. var lightingColor_export_definition;
  1056. lightingColor_export_definition = {
  1057. set: function (v) {
  1058. this._setProperty('lighting-color', external_dependency_parsers_0.parseColor(v));
  1059. },
  1060. get: function () {
  1061. return this.getPropertyValue('lighting-color');
  1062. },
  1063. enumerable: true,
  1064. configurable: true
  1065. };
  1066. var margin_export_definition, margin_export_isValid, margin_export_parser;
  1067. var margin_local_var_TYPES = external_dependency_parsers_0.TYPES;
  1068. var margin_local_var_isValid = function (v) {
  1069. if (v.toLowerCase() === 'auto') {
  1070. return true;
  1071. }
  1072. var type = external_dependency_parsers_0.valueType(v);
  1073. return type === margin_local_var_TYPES.LENGTH || type === margin_local_var_TYPES.PERCENT || type === margin_local_var_TYPES.INTEGER && (v === '0' || v === 0);
  1074. };
  1075. var margin_local_var_parser = function (v) {
  1076. var V = v.toLowerCase();
  1077. if (V === 'auto') {
  1078. return V;
  1079. }
  1080. return external_dependency_parsers_0.parseMeasurement(v);
  1081. };
  1082. var margin_local_var_mySetter = external_dependency_parsers_0.implicitSetter('margin', '', margin_local_var_isValid, margin_local_var_parser);
  1083. var margin_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('margin', '', function () {
  1084. return true;
  1085. }, function (v) {
  1086. return v;
  1087. });
  1088. margin_export_definition = {
  1089. set: function (v) {
  1090. if (typeof v === 'number') {
  1091. v = String(v);
  1092. }
  1093. if (typeof v !== 'string') {
  1094. return;
  1095. }
  1096. var V = v.toLowerCase();
  1097. switch (V) {
  1098. case 'inherit':
  1099. case 'initial':
  1100. case 'unset':
  1101. case '':
  1102. margin_local_var_myGlobal.call(this, V);
  1103. break;
  1104. default:
  1105. margin_local_var_mySetter.call(this, v);
  1106. break;
  1107. }
  1108. },
  1109. get: function () {
  1110. return this.getPropertyValue('margin');
  1111. },
  1112. enumerable: true,
  1113. configurable: true
  1114. };
  1115. margin_export_isValid = margin_local_var_isValid;
  1116. margin_export_parser = margin_local_var_parser;
  1117. var marginBottom_export_definition;
  1118. marginBottom_export_definition = {
  1119. set: external_dependency_parsers_0.subImplicitSetter('margin', 'bottom', {
  1120. definition: margin_export_definition,
  1121. isValid: margin_export_isValid,
  1122. parser: margin_export_parser
  1123. }.isValid, {
  1124. definition: margin_export_definition,
  1125. isValid: margin_export_isValid,
  1126. parser: margin_export_parser
  1127. }.parser),
  1128. get: function () {
  1129. return this.getPropertyValue('margin-bottom');
  1130. },
  1131. enumerable: true,
  1132. configurable: true
  1133. };
  1134. var marginLeft_export_definition;
  1135. marginLeft_export_definition = {
  1136. set: external_dependency_parsers_0.subImplicitSetter('margin', 'left', {
  1137. definition: margin_export_definition,
  1138. isValid: margin_export_isValid,
  1139. parser: margin_export_parser
  1140. }.isValid, {
  1141. definition: margin_export_definition,
  1142. isValid: margin_export_isValid,
  1143. parser: margin_export_parser
  1144. }.parser),
  1145. get: function () {
  1146. return this.getPropertyValue('margin-left');
  1147. },
  1148. enumerable: true,
  1149. configurable: true
  1150. };
  1151. var marginRight_export_definition;
  1152. marginRight_export_definition = {
  1153. set: external_dependency_parsers_0.subImplicitSetter('margin', 'right', {
  1154. definition: margin_export_definition,
  1155. isValid: margin_export_isValid,
  1156. parser: margin_export_parser
  1157. }.isValid, {
  1158. definition: margin_export_definition,
  1159. isValid: margin_export_isValid,
  1160. parser: margin_export_parser
  1161. }.parser),
  1162. get: function () {
  1163. return this.getPropertyValue('margin-right');
  1164. },
  1165. enumerable: true,
  1166. configurable: true
  1167. };
  1168. var marginTop_export_definition;
  1169. marginTop_export_definition = {
  1170. set: external_dependency_parsers_0.subImplicitSetter('margin', 'top', {
  1171. definition: margin_export_definition,
  1172. isValid: margin_export_isValid,
  1173. parser: margin_export_parser
  1174. }.isValid, {
  1175. definition: margin_export_definition,
  1176. isValid: margin_export_isValid,
  1177. parser: margin_export_parser
  1178. }.parser),
  1179. get: function () {
  1180. return this.getPropertyValue('margin-top');
  1181. },
  1182. enumerable: true,
  1183. configurable: true
  1184. };
  1185. var opacity_export_definition;
  1186. opacity_export_definition = {
  1187. set: function (v) {
  1188. this._setProperty('opacity', external_dependency_parsers_0.parseNumber(v));
  1189. },
  1190. get: function () {
  1191. return this.getPropertyValue('opacity');
  1192. },
  1193. enumerable: true,
  1194. configurable: true
  1195. };
  1196. var outlineColor_export_definition;
  1197. outlineColor_export_definition = {
  1198. set: function (v) {
  1199. this._setProperty('outline-color', external_dependency_parsers_0.parseColor(v));
  1200. },
  1201. get: function () {
  1202. return this.getPropertyValue('outline-color');
  1203. },
  1204. enumerable: true,
  1205. configurable: true
  1206. };
  1207. var padding_export_definition, padding_export_isValid, padding_export_parser;
  1208. var padding_local_var_TYPES = external_dependency_parsers_0.TYPES;
  1209. var padding_local_var_isValid = function (v) {
  1210. var type = external_dependency_parsers_0.valueType(v);
  1211. return type === padding_local_var_TYPES.LENGTH || type === padding_local_var_TYPES.PERCENT || type === padding_local_var_TYPES.INTEGER && (v === '0' || v === 0);
  1212. };
  1213. var padding_local_var_parser = function (v) {
  1214. return external_dependency_parsers_0.parseMeasurement(v);
  1215. };
  1216. var padding_local_var_mySetter = external_dependency_parsers_0.implicitSetter('padding', '', padding_local_var_isValid, padding_local_var_parser);
  1217. var padding_local_var_myGlobal = external_dependency_parsers_0.implicitSetter('padding', '', function () {
  1218. return true;
  1219. }, function (v) {
  1220. return v;
  1221. });
  1222. padding_export_definition = {
  1223. set: function (v) {
  1224. if (typeof v === 'number') {
  1225. v = String(v);
  1226. }
  1227. if (typeof v !== 'string') {
  1228. return;
  1229. }
  1230. var V = v.toLowerCase();
  1231. switch (V) {
  1232. case 'inherit':
  1233. case 'initial':
  1234. case 'unset':
  1235. case '':
  1236. padding_local_var_myGlobal.call(this, V);
  1237. break;
  1238. default:
  1239. padding_local_var_mySetter.call(this, v);
  1240. break;
  1241. }
  1242. },
  1243. get: function () {
  1244. return this.getPropertyValue('padding');
  1245. },
  1246. enumerable: true,
  1247. configurable: true
  1248. };
  1249. padding_export_isValid = padding_local_var_isValid;
  1250. padding_export_parser = padding_local_var_parser;
  1251. var paddingBottom_export_definition;
  1252. paddingBottom_export_definition = {
  1253. set: external_dependency_parsers_0.subImplicitSetter('padding', 'bottom', {
  1254. definition: padding_export_definition,
  1255. isValid: padding_export_isValid,
  1256. parser: padding_export_parser
  1257. }.isValid, {
  1258. definition: padding_export_definition,
  1259. isValid: padding_export_isValid,
  1260. parser: padding_export_parser
  1261. }.parser),
  1262. get: function () {
  1263. return this.getPropertyValue('padding-bottom');
  1264. },
  1265. enumerable: true,
  1266. configurable: true
  1267. };
  1268. var paddingLeft_export_definition;
  1269. paddingLeft_export_definition = {
  1270. set: external_dependency_parsers_0.subImplicitSetter('padding', 'left', {
  1271. definition: padding_export_definition,
  1272. isValid: padding_export_isValid,
  1273. parser: padding_export_parser
  1274. }.isValid, {
  1275. definition: padding_export_definition,
  1276. isValid: padding_export_isValid,
  1277. parser: padding_export_parser
  1278. }.parser),
  1279. get: function () {
  1280. return this.getPropertyValue('padding-left');
  1281. },
  1282. enumerable: true,
  1283. configurable: true
  1284. };
  1285. var paddingRight_export_definition;
  1286. paddingRight_export_definition = {
  1287. set: external_dependency_parsers_0.subImplicitSetter('padding', 'right', {
  1288. definition: padding_export_definition,
  1289. isValid: padding_export_isValid,
  1290. parser: padding_export_parser
  1291. }.isValid, {
  1292. definition: padding_export_definition,
  1293. isValid: padding_export_isValid,
  1294. parser: padding_export_parser
  1295. }.parser),
  1296. get: function () {
  1297. return this.getPropertyValue('padding-right');
  1298. },
  1299. enumerable: true,
  1300. configurable: true
  1301. };
  1302. var paddingTop_export_definition;
  1303. paddingTop_export_definition = {
  1304. set: external_dependency_parsers_0.subImplicitSetter('padding', 'top', {
  1305. definition: padding_export_definition,
  1306. isValid: padding_export_isValid,
  1307. parser: padding_export_parser
  1308. }.isValid, {
  1309. definition: padding_export_definition,
  1310. isValid: padding_export_isValid,
  1311. parser: padding_export_parser
  1312. }.parser),
  1313. get: function () {
  1314. return this.getPropertyValue('padding-top');
  1315. },
  1316. enumerable: true,
  1317. configurable: true
  1318. };
  1319. var right_export_definition;
  1320. right_export_definition = {
  1321. set: function (v) {
  1322. this._setProperty('right', external_dependency_parsers_0.parseMeasurement(v));
  1323. },
  1324. get: function () {
  1325. return this.getPropertyValue('right');
  1326. },
  1327. enumerable: true,
  1328. configurable: true
  1329. };
  1330. var stopColor_export_definition;
  1331. stopColor_export_definition = {
  1332. set: function (v) {
  1333. this._setProperty('stop-color', external_dependency_parsers_0.parseColor(v));
  1334. },
  1335. get: function () {
  1336. return this.getPropertyValue('stop-color');
  1337. },
  1338. enumerable: true,
  1339. configurable: true
  1340. };
  1341. var textLineThroughColor_export_definition;
  1342. textLineThroughColor_export_definition = {
  1343. set: function (v) {
  1344. this._setProperty('text-line-through-color', external_dependency_parsers_0.parseColor(v));
  1345. },
  1346. get: function () {
  1347. return this.getPropertyValue('text-line-through-color');
  1348. },
  1349. enumerable: true,
  1350. configurable: true
  1351. };
  1352. var textOverlineColor_export_definition;
  1353. textOverlineColor_export_definition = {
  1354. set: function (v) {
  1355. this._setProperty('text-overline-color', external_dependency_parsers_0.parseColor(v));
  1356. },
  1357. get: function () {
  1358. return this.getPropertyValue('text-overline-color');
  1359. },
  1360. enumerable: true,
  1361. configurable: true
  1362. };
  1363. var textUnderlineColor_export_definition;
  1364. textUnderlineColor_export_definition = {
  1365. set: function (v) {
  1366. this._setProperty('text-underline-color', external_dependency_parsers_0.parseColor(v));
  1367. },
  1368. get: function () {
  1369. return this.getPropertyValue('text-underline-color');
  1370. },
  1371. enumerable: true,
  1372. configurable: true
  1373. };
  1374. var top_export_definition;
  1375. top_export_definition = {
  1376. set: function (v) {
  1377. this._setProperty('top', external_dependency_parsers_0.parseMeasurement(v));
  1378. },
  1379. get: function () {
  1380. return this.getPropertyValue('top');
  1381. },
  1382. enumerable: true,
  1383. configurable: true
  1384. };
  1385. var webkitBorderAfterColor_export_definition;
  1386. webkitBorderAfterColor_export_definition = {
  1387. set: function (v) {
  1388. this._setProperty('-webkit-border-after-color', external_dependency_parsers_0.parseColor(v));
  1389. },
  1390. get: function () {
  1391. return this.getPropertyValue('-webkit-border-after-color');
  1392. },
  1393. enumerable: true,
  1394. configurable: true
  1395. };
  1396. var webkitBorderBeforeColor_export_definition;
  1397. webkitBorderBeforeColor_export_definition = {
  1398. set: function (v) {
  1399. this._setProperty('-webkit-border-before-color', external_dependency_parsers_0.parseColor(v));
  1400. },
  1401. get: function () {
  1402. return this.getPropertyValue('-webkit-border-before-color');
  1403. },
  1404. enumerable: true,
  1405. configurable: true
  1406. };
  1407. var webkitBorderEndColor_export_definition;
  1408. webkitBorderEndColor_export_definition = {
  1409. set: function (v) {
  1410. this._setProperty('-webkit-border-end-color', external_dependency_parsers_0.parseColor(v));
  1411. },
  1412. get: function () {
  1413. return this.getPropertyValue('-webkit-border-end-color');
  1414. },
  1415. enumerable: true,
  1416. configurable: true
  1417. };
  1418. var webkitBorderStartColor_export_definition;
  1419. webkitBorderStartColor_export_definition = {
  1420. set: function (v) {
  1421. this._setProperty('-webkit-border-start-color', external_dependency_parsers_0.parseColor(v));
  1422. },
  1423. get: function () {
  1424. return this.getPropertyValue('-webkit-border-start-color');
  1425. },
  1426. enumerable: true,
  1427. configurable: true
  1428. };
  1429. var webkitColumnRuleColor_export_definition;
  1430. webkitColumnRuleColor_export_definition = {
  1431. set: function (v) {
  1432. this._setProperty('-webkit-column-rule-color', external_dependency_parsers_0.parseColor(v));
  1433. },
  1434. get: function () {
  1435. return this.getPropertyValue('-webkit-column-rule-color');
  1436. },
  1437. enumerable: true,
  1438. configurable: true
  1439. };
  1440. var webkitMatchNearestMailBlockquoteColor_export_definition;
  1441. webkitMatchNearestMailBlockquoteColor_export_definition = {
  1442. set: function (v) {
  1443. this._setProperty('-webkit-match-nearest-mail-blockquote-color', external_dependency_parsers_0.parseColor(v));
  1444. },
  1445. get: function () {
  1446. return this.getPropertyValue('-webkit-match-nearest-mail-blockquote-color');
  1447. },
  1448. enumerable: true,
  1449. configurable: true
  1450. };
  1451. var webkitTapHighlightColor_export_definition;
  1452. webkitTapHighlightColor_export_definition = {
  1453. set: function (v) {
  1454. this._setProperty('-webkit-tap-highlight-color', external_dependency_parsers_0.parseColor(v));
  1455. },
  1456. get: function () {
  1457. return this.getPropertyValue('-webkit-tap-highlight-color');
  1458. },
  1459. enumerable: true,
  1460. configurable: true
  1461. };
  1462. var webkitTextEmphasisColor_export_definition;
  1463. webkitTextEmphasisColor_export_definition = {
  1464. set: function (v) {
  1465. this._setProperty('-webkit-text-emphasis-color', external_dependency_parsers_0.parseColor(v));
  1466. },
  1467. get: function () {
  1468. return this.getPropertyValue('-webkit-text-emphasis-color');
  1469. },
  1470. enumerable: true,
  1471. configurable: true
  1472. };
  1473. var webkitTextFillColor_export_definition;
  1474. webkitTextFillColor_export_definition = {
  1475. set: function (v) {
  1476. this._setProperty('-webkit-text-fill-color', external_dependency_parsers_0.parseColor(v));
  1477. },
  1478. get: function () {
  1479. return this.getPropertyValue('-webkit-text-fill-color');
  1480. },
  1481. enumerable: true,
  1482. configurable: true
  1483. };
  1484. var webkitTextStrokeColor_export_definition;
  1485. webkitTextStrokeColor_export_definition = {
  1486. set: function (v) {
  1487. this._setProperty('-webkit-text-stroke-color', external_dependency_parsers_0.parseColor(v));
  1488. },
  1489. get: function () {
  1490. return this.getPropertyValue('-webkit-text-stroke-color');
  1491. },
  1492. enumerable: true,
  1493. configurable: true
  1494. };
  1495. var width_export_definition;
  1496. function width_local_fn_parse(v) {
  1497. if (String(v).toLowerCase() === 'auto') {
  1498. return 'auto';
  1499. }
  1500. if (String(v).toLowerCase() === 'inherit') {
  1501. return 'inherit';
  1502. }
  1503. return external_dependency_parsers_0.parseMeasurement(v);
  1504. }
  1505. width_export_definition = {
  1506. set: function (v) {
  1507. this._setProperty('width', width_local_fn_parse(v));
  1508. },
  1509. get: function () {
  1510. return this.getPropertyValue('width');
  1511. },
  1512. enumerable: true,
  1513. configurable: true
  1514. };
  1515. module.exports = function (prototype) {
  1516. Object.defineProperties(prototype, {
  1517. azimuth: azimuth_export_definition,
  1518. backgroundColor: backgroundColor_export_definition,
  1519. "background-color": backgroundColor_export_definition,
  1520. backgroundImage: backgroundImage_export_definition,
  1521. "background-image": backgroundImage_export_definition,
  1522. backgroundRepeat: backgroundRepeat_export_definition,
  1523. "background-repeat": backgroundRepeat_export_definition,
  1524. backgroundAttachment: backgroundAttachment_export_definition,
  1525. "background-attachment": backgroundAttachment_export_definition,
  1526. backgroundPosition: backgroundPosition_export_definition,
  1527. "background-position": backgroundPosition_export_definition,
  1528. background: background_export_definition,
  1529. borderWidth: borderWidth_export_definition,
  1530. "border-width": borderWidth_export_definition,
  1531. borderStyle: borderStyle_export_definition,
  1532. "border-style": borderStyle_export_definition,
  1533. borderColor: borderColor_export_definition,
  1534. "border-color": borderColor_export_definition,
  1535. border: border_export_definition,
  1536. borderBottomWidth: borderBottomWidth_export_definition,
  1537. "border-bottom-width": borderBottomWidth_export_definition,
  1538. borderBottomStyle: borderBottomStyle_export_definition,
  1539. "border-bottom-style": borderBottomStyle_export_definition,
  1540. borderBottomColor: borderBottomColor_export_definition,
  1541. "border-bottom-color": borderBottomColor_export_definition,
  1542. borderBottom: borderBottom_export_definition,
  1543. "border-bottom": borderBottom_export_definition,
  1544. borderCollapse: borderCollapse_export_definition,
  1545. "border-collapse": borderCollapse_export_definition,
  1546. borderLeftWidth: borderLeftWidth_export_definition,
  1547. "border-left-width": borderLeftWidth_export_definition,
  1548. borderLeftStyle: borderLeftStyle_export_definition,
  1549. "border-left-style": borderLeftStyle_export_definition,
  1550. borderLeftColor: borderLeftColor_export_definition,
  1551. "border-left-color": borderLeftColor_export_definition,
  1552. borderLeft: borderLeft_export_definition,
  1553. "border-left": borderLeft_export_definition,
  1554. borderRightWidth: borderRightWidth_export_definition,
  1555. "border-right-width": borderRightWidth_export_definition,
  1556. borderRightStyle: borderRightStyle_export_definition,
  1557. "border-right-style": borderRightStyle_export_definition,
  1558. borderRightColor: borderRightColor_export_definition,
  1559. "border-right-color": borderRightColor_export_definition,
  1560. borderRight: borderRight_export_definition,
  1561. "border-right": borderRight_export_definition,
  1562. borderSpacing: borderSpacing_export_definition,
  1563. "border-spacing": borderSpacing_export_definition,
  1564. borderTopWidth: borderTopWidth_export_definition,
  1565. "border-top-width": borderTopWidth_export_definition,
  1566. borderTopStyle: borderTopStyle_export_definition,
  1567. "border-top-style": borderTopStyle_export_definition,
  1568. borderTopColor: borderTopColor_export_definition,
  1569. "border-top-color": borderTopColor_export_definition,
  1570. borderTop: borderTop_export_definition,
  1571. "border-top": borderTop_export_definition,
  1572. bottom: bottom_export_definition,
  1573. clear: clear_export_definition,
  1574. clip: clip_export_definition,
  1575. color: color_export_definition,
  1576. cssFloat: cssFloat_export_definition,
  1577. "css-float": cssFloat_export_definition,
  1578. flexGrow: flexGrow_export_definition,
  1579. "flex-grow": flexGrow_export_definition,
  1580. flexShrink: flexShrink_export_definition,
  1581. "flex-shrink": flexShrink_export_definition,
  1582. flexBasis: flexBasis_export_definition,
  1583. "flex-basis": flexBasis_export_definition,
  1584. flex: flex_export_definition,
  1585. float: float_export_definition,
  1586. floodColor: floodColor_export_definition,
  1587. "flood-color": floodColor_export_definition,
  1588. fontFamily: fontFamily_export_definition,
  1589. "font-family": fontFamily_export_definition,
  1590. fontSize: fontSize_export_definition,
  1591. "font-size": fontSize_export_definition,
  1592. fontStyle: fontStyle_export_definition,
  1593. "font-style": fontStyle_export_definition,
  1594. fontVariant: fontVariant_export_definition,
  1595. "font-variant": fontVariant_export_definition,
  1596. fontWeight: fontWeight_export_definition,
  1597. "font-weight": fontWeight_export_definition,
  1598. lineHeight: lineHeight_export_definition,
  1599. "line-height": lineHeight_export_definition,
  1600. font: font_export_definition,
  1601. height: height_export_definition,
  1602. left: left_export_definition,
  1603. lightingColor: lightingColor_export_definition,
  1604. "lighting-color": lightingColor_export_definition,
  1605. margin: margin_export_definition,
  1606. marginBottom: marginBottom_export_definition,
  1607. "margin-bottom": marginBottom_export_definition,
  1608. marginLeft: marginLeft_export_definition,
  1609. "margin-left": marginLeft_export_definition,
  1610. marginRight: marginRight_export_definition,
  1611. "margin-right": marginRight_export_definition,
  1612. marginTop: marginTop_export_definition,
  1613. "margin-top": marginTop_export_definition,
  1614. opacity: opacity_export_definition,
  1615. outlineColor: outlineColor_export_definition,
  1616. "outline-color": outlineColor_export_definition,
  1617. padding: padding_export_definition,
  1618. paddingBottom: paddingBottom_export_definition,
  1619. "padding-bottom": paddingBottom_export_definition,
  1620. paddingLeft: paddingLeft_export_definition,
  1621. "padding-left": paddingLeft_export_definition,
  1622. paddingRight: paddingRight_export_definition,
  1623. "padding-right": paddingRight_export_definition,
  1624. paddingTop: paddingTop_export_definition,
  1625. "padding-top": paddingTop_export_definition,
  1626. right: right_export_definition,
  1627. stopColor: stopColor_export_definition,
  1628. "stop-color": stopColor_export_definition,
  1629. textLineThroughColor: textLineThroughColor_export_definition,
  1630. "text-line-through-color": textLineThroughColor_export_definition,
  1631. textOverlineColor: textOverlineColor_export_definition,
  1632. "text-overline-color": textOverlineColor_export_definition,
  1633. textUnderlineColor: textUnderlineColor_export_definition,
  1634. "text-underline-color": textUnderlineColor_export_definition,
  1635. top: top_export_definition,
  1636. webkitBorderAfterColor: webkitBorderAfterColor_export_definition,
  1637. "webkit-border-after-color": webkitBorderAfterColor_export_definition,
  1638. webkitBorderBeforeColor: webkitBorderBeforeColor_export_definition,
  1639. "webkit-border-before-color": webkitBorderBeforeColor_export_definition,
  1640. webkitBorderEndColor: webkitBorderEndColor_export_definition,
  1641. "webkit-border-end-color": webkitBorderEndColor_export_definition,
  1642. webkitBorderStartColor: webkitBorderStartColor_export_definition,
  1643. "webkit-border-start-color": webkitBorderStartColor_export_definition,
  1644. webkitColumnRuleColor: webkitColumnRuleColor_export_definition,
  1645. "webkit-column-rule-color": webkitColumnRuleColor_export_definition,
  1646. webkitMatchNearestMailBlockquoteColor: webkitMatchNearestMailBlockquoteColor_export_definition,
  1647. "webkit-match-nearest-mail-blockquote-color": webkitMatchNearestMailBlockquoteColor_export_definition,
  1648. webkitTapHighlightColor: webkitTapHighlightColor_export_definition,
  1649. "webkit-tap-highlight-color": webkitTapHighlightColor_export_definition,
  1650. webkitTextEmphasisColor: webkitTextEmphasisColor_export_definition,
  1651. "webkit-text-emphasis-color": webkitTextEmphasisColor_export_definition,
  1652. webkitTextFillColor: webkitTextFillColor_export_definition,
  1653. "webkit-text-fill-color": webkitTextFillColor_export_definition,
  1654. webkitTextStrokeColor: webkitTextStrokeColor_export_definition,
  1655. "webkit-text-stroke-color": webkitTextStrokeColor_export_definition,
  1656. width: width_export_definition
  1657. });
  1658. };