source: frontend/node_modules/tailwindcss/lib/util/validateFormalSyntax.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 998 bytes
Line 
1"use strict";
2Object.defineProperty(exports, "__esModule", {
3 value: true
4});
5Object.defineProperty(exports, "backgroundSize", {
6 enumerable: true,
7 get: function() {
8 return backgroundSize;
9 }
10});
11const _dataTypes = require("./dataTypes");
12const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
13function backgroundSize(value) {
14 let keywordValues = [
15 "cover",
16 "contain"
17 ];
18 // the <length-percentage> type will probably be a css function
19 // so we have to use `splitAtTopLevelOnly`
20 return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
21 let sizes = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(part, "_").filter(Boolean);
22 if (sizes.length === 1 && keywordValues.includes(sizes[0])) return true;
23 if (sizes.length !== 1 && sizes.length !== 2) return false;
24 return sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || size === "auto");
25 });
26}
Note: See TracBrowser for help on using the repository browser.