Add CSS variables test

This commit is contained in:
Jeremy Thomas 2020-08-23 13:08:53 +02:00
parent 5966d31b5e
commit 64b89dbc63
16 changed files with 1717 additions and 970 deletions

2049
css/bulma.css vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

2
css/bulma.min.css vendored

File diff suppressed because one or more lines are too long

350
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "bulma",
"version": "0.8.2",
"version": "0.9.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -42,6 +42,11 @@
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
},
"absolute": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/absolute/-/absolute-0.0.1.tgz",
"integrity": "sha1-wigi+H4ck59XmIdQTZwQnEFzgp0="
},
"ajv": {
"version": "6.12.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz",
@ -60,11 +65,18 @@
"integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=",
"dev": true
},
"ansi-red": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz",
"integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=",
"requires": {
"ansi-wrap": "0.1.0"
}
},
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
"dev": true
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"ansi-styles": {
"version": "3.2.1",
@ -75,6 +87,11 @@
"color-convert": "^1.9.0"
}
},
"ansi-wrap": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
"integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768="
},
"anymatch": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
@ -105,11 +122,15 @@
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"
}
},
"array-differ": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz",
"integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE="
},
"array-find-index": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
@ -122,6 +143,16 @@
"integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
"dev": true
},
"array-uniq": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY="
},
"arrify": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0="
},
"asn1": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
@ -137,6 +168,11 @@
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
"dev": true
},
"async": {
"version": "1.5.2",
"resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz",
"integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo="
},
"async-foreach": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/async-foreach/-/async-foreach-0.1.3.tgz",
@ -185,8 +221,7 @@
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"bcrypt-pbkdf": {
"version": "1.0.2",
@ -216,7 +251,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -387,12 +421,80 @@
}
}
},
"clone": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
"integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4="
},
"co": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz",
"integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g="
},
"co-from-stream": {
"version": "0.0.0",
"resolved": "https://registry.npmjs.org/co-from-stream/-/co-from-stream-0.0.0.tgz",
"integrity": "sha1-GlzYztdyY5RglPo58kmaYyl7yvk=",
"requires": {
"co-read": "0.0.1"
}
},
"co-fs-extra": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/co-fs-extra/-/co-fs-extra-1.2.1.tgz",
"integrity": "sha1-O2rXfPJhRTD2d7HPYmZPW6dWtyI=",
"requires": {
"co-from-stream": "~0.0.0",
"fs-extra": "~0.26.5",
"thunkify-wrap": "~1.0.4"
},
"dependencies": {
"fs-extra": {
"version": "0.26.7",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz",
"integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^2.1.0",
"klaw": "^1.0.0",
"path-is-absolute": "^1.0.0",
"rimraf": "^2.2.8"
}
},
"jsonfile": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"requires": {
"graceful-fs": "^4.1.6"
}
},
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"requires": {
"glob": "^7.1.3"
}
}
}
},
"co-read": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/co-read/-/co-read-0.0.1.tgz",
"integrity": "sha1-+Bs+uKhmdf7FHj2IOn9WToc8k4k="
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
"dev": true
},
"coffee-script": {
"version": "1.12.7",
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.7.tgz",
"integrity": "sha512-fLeEhqwymYat/MpTPUjSKHVYYl0ec2mOyALEMLmzr5i1isuG+6jfI2j2d5oBO3VIzgUXgBVIcOT9uH1TFxBckw=="
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@ -420,14 +522,12 @@
"commander": {
"version": "2.20.3",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
"dev": true
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"console-control-strings": {
"version": "1.1.0",
@ -556,6 +656,11 @@
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
"dev": true
},
"enable": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/enable/-/enable-1.3.2.tgz",
"integrity": "sha1-nrpoN9FtCYK1n4fYib91REPVKTE="
},
"error-ex": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@ -568,14 +673,12 @@
"escape-string-regexp": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
"dev": true
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"esprima": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
"dev": true
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"extend": {
"version": "3.0.2",
@ -583,6 +686,14 @@
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"dev": true
},
"extend-shallow": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
"requires": {
"is-extendable": "^0.1.0"
}
},
"extsprintf": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
@ -674,8 +785,7 @@
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
"dev": true
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
"version": "2.1.3",
@ -757,7 +867,6 @@
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"dev": true,
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
@ -804,8 +913,19 @@
"graceful-fs": {
"version": "4.2.4",
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==",
"dev": true
"integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
},
"gray-matter": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-2.1.1.tgz",
"integrity": "sha1-MELZrewqHe1qdwep7SOA+KF6Qw4=",
"requires": {
"ansi-red": "^0.1.1",
"coffee-script": "^1.12.4",
"extend-shallow": "^2.0.1",
"js-yaml": "^3.8.1",
"toml": "^2.3.2"
}
},
"har-schema": {
"version": "2.0.0",
@ -827,7 +947,6 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz",
"integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -838,6 +957,11 @@
"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
"dev": true
},
"has-generators": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/has-generators/-/has-generators-1.0.1.tgz",
"integrity": "sha1-pqLlVIYBGUBILhPiyTeRxEms9Ek="
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
@ -914,7 +1038,6 @@
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": {
"once": "^1.3.0",
"wrappy": "1"
@ -923,8 +1046,12 @@
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
"dev": true
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
},
"is": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/is/-/is-3.3.0.tgz",
"integrity": "sha512-nW24QBoPcFGGHJGUwnfpI7Yc5CdqWNdsyHQszVE/z2pKHXzh7FZ5GWhJqSyaQ9wMkQnsTx+kAI8bHlCX4tKdbg=="
},
"is-arrayish": {
"version": "0.2.1",
@ -947,6 +1074,11 @@
"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
"dev": true
},
"is-extendable": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik="
},
"is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
@ -992,8 +1124,7 @@
"is-utf8": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI="
},
"isarray": {
"version": "1.0.0",
@ -1023,7 +1154,6 @@
"version": "3.13.1",
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
@ -1081,6 +1211,14 @@
"verror": "1.10.0"
}
},
"klaw": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
"integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
"requires": {
"graceful-fs": "^4.1.9"
}
},
"load-json-file": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@ -1169,6 +1307,71 @@
"integrity": "sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw==",
"dev": true
},
"metalsmith": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/metalsmith/-/metalsmith-2.3.0.tgz",
"integrity": "sha1-gzr7taKmOF4tmuPZNeOeM+rqUjE=",
"requires": {
"absolute": "0.0.1",
"chalk": "^1.1.3",
"clone": "^1.0.2",
"co-fs-extra": "^1.2.1",
"commander": "^2.6.0",
"gray-matter": "^2.0.0",
"has-generators": "^1.0.1",
"is": "^3.1.0",
"is-utf8": "~0.2.0",
"recursive-readdir": "^2.1.0",
"rimraf": "^2.2.8",
"stat-mode": "^0.2.0",
"thunkify": "^2.1.2",
"unyield": "0.0.1",
"ware": "^1.2.0",
"win-fork": "^1.1.1"
},
"dependencies": {
"ansi-styles": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz",
"integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4="
},
"chalk": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz",
"integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=",
"requires": {
"ansi-styles": "^2.2.1",
"escape-string-regexp": "^1.0.2",
"has-ansi": "^2.0.0",
"strip-ansi": "^3.0.0",
"supports-color": "^2.0.0"
}
},
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"requires": {
"glob": "^7.1.3"
}
},
"supports-color": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz",
"integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc="
}
}
},
"metalsmith-filter": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/metalsmith-filter/-/metalsmith-filter-1.0.2.tgz",
"integrity": "sha1-FfFsrBTewnwHSoWKJbclZRoDA7g=",
"requires": {
"async": "^1.2.0",
"is": "^3.0.1",
"multimatch": "^2.0.0"
}
},
"micromatch": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz",
@ -1198,7 +1401,6 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -1218,6 +1420,27 @@
"minimist": "^1.2.5"
}
},
"multimatch": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/multimatch/-/multimatch-2.1.0.tgz",
"integrity": "sha1-nHkGoi+0wCkZ4vX3UWG0zb1LKis=",
"requires": {
"array-differ": "^1.0.0",
"array-union": "^1.0.1",
"arrify": "^1.0.0",
"minimatch": "^3.0.0"
},
"dependencies": {
"array-union": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
"requires": {
"array-uniq": "^1.0.1"
}
}
}
},
"nan": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
@ -1392,7 +1615,6 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": {
"wrappy": "1"
}
@ -1461,8 +1683,7 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-parse": {
"version": "1.0.6",
@ -1906,6 +2127,14 @@
"picomatch": "^2.2.1"
}
},
"recursive-readdir": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz",
"integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==",
"requires": {
"minimatch": "3.0.4"
}
},
"redent": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz",
@ -2111,8 +2340,7 @@
"sprintf-js": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
"dev": true
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
},
"sshpk": {
"version": "1.16.1",
@ -2131,6 +2359,11 @@
"tweetnacl": "~0.14.0"
}
},
"stat-mode": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/stat-mode/-/stat-mode-0.2.2.tgz",
"integrity": "sha1-5sgLYjEj19gM8TLOU480YokHJQI="
},
"stdout-stream": {
"version": "1.4.1",
"resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz",
@ -2164,7 +2397,6 @@
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"dev": true,
"requires": {
"ansi-regex": "^2.0.0"
}
@ -2207,6 +2439,19 @@
"inherits": "2"
}
},
"thunkify": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz",
"integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0="
},
"thunkify-wrap": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/thunkify-wrap/-/thunkify-wrap-1.0.4.tgz",
"integrity": "sha1-tSvlSN3+/aIOALWMYJZ2K0PdaIA=",
"requires": {
"enable": "1"
}
},
"to-regex-range": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
@ -2216,6 +2461,11 @@
"is-number": "^7.0.0"
}
},
"toml": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/toml/-/toml-2.3.6.tgz",
"integrity": "sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ=="
},
"tough-cookie": {
"version": "2.5.0",
"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
@ -2262,6 +2512,14 @@
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
"dev": true
},
"unyield": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/unyield/-/unyield-0.0.1.tgz",
"integrity": "sha1-FQ5l2kK/d0JEW5WKZOubhdHSsYA=",
"requires": {
"co": "~3.1.0"
}
},
"uri-js": {
"version": "4.2.2",
"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
@ -2304,6 +2562,14 @@
"extsprintf": "^1.2.0"
}
},
"ware": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz",
"integrity": "sha1-0bFPOdLiy0q4xAmPdW/ksWTkc9Q=",
"requires": {
"wrap-fn": "^0.1.0"
}
},
"which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
@ -2328,6 +2594,11 @@
"string-width": "^1.0.2 || 2"
}
},
"win-fork": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/win-fork/-/win-fork-1.1.1.tgz",
"integrity": "sha1-j1jgZW/KAK3IyGoriePNLWotXl4="
},
"wrap-ansi": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
@ -2373,11 +2644,18 @@
}
}
},
"wrap-fn": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/wrap-fn/-/wrap-fn-0.1.5.tgz",
"integrity": "sha1-8htuQQFv9KfjFyDbxjoJAWvfmEU=",
"requires": {
"co": "3.1.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
"dev": true
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
},
"y18n": {
"version": "4.0.0",

View File

@ -52,5 +52,9 @@
"bulma.sass",
"LICENSE",
"README.md"
]
],
"dependencies": {
"metalsmith": "^2.3.0",
"metalsmith-filter": "^1.0.2"
}
}

View File

@ -29,7 +29,7 @@ $breadcrumb-item-separator-color: var(--border-hover, #{$border-hover}) !default
justify-content: center
padding: var(--breadcrumb-item-padding-vertical) var(--breadcrumb-item-padding-horizontal)
&:hover
color: var(--breadcrumb-item-hover-color)
--breadcrumb-item-color: var(--breadcrumb-item-hover-color)
li
align-items: center
display: flex
@ -37,7 +37,7 @@ $breadcrumb-item-separator-color: var(--border-hover, #{$border-hover}) !default
+ltr-property("padding", 0, false)
&.is-active
a
color: var(--breadcrumb-item-active-color)
--breadcrumb-item-color: var(--breadcrumb-item-active-color)
cursor: default
pointer-events: none
& + li::before

View File

@ -16,7 +16,8 @@ $card-content-background-color: transparent !default
$card-content-padding: 1.5rem !default
$card-footer-background-color: transparent !default
$card-footer-border-top: 1px solid $border-light !default
$card-footer-border-top-color: var(--border-light, #{$border-light}) !default
$card-footer-border-top: 1px solid $card-footer-border-top-color !default
$card-footer-padding: 0.75rem !default
$card-media-margin: var(--block-spacing, #{$block-spacing}) !default
@ -38,6 +39,7 @@ $card-media-margin: var(--block-spacing, #{$block-spacing}) !default
--card-footer-border-top: #{$card-footer-border-top}
--card-footer-padding: #{$card-footer-padding}
--card-media-margin: #{$card-media-margin}
background-color: var(--card-background-color)
box-shadow: var(--card-shadow)
color: var(--card-color)
@ -92,7 +94,7 @@ $card-media-margin: var(--block-spacing, #{$block-spacing}) !default
justify-content: center
padding: var(--card-footer-padding)
&:not(:last-child)
+ltr-property("border", $card-footer-border-top)
+ltr-property("border", var(--card-footer-border-top))
// Combinations

View File

@ -84,7 +84,7 @@ button.dropdown-item
text-align: inherit
white-space: nowrap
width: 100%
&:hover
&:hover:not(.is-active)
background-color: var(--dropdown-item-hover-background-color)
color: var(--dropdown-item-hover-color)
&.is-active

View File

@ -2,11 +2,12 @@ $level-item-spacing: calc(var(--block-spacing, #{$block-spacing}) / 2) !default
.level
--level-item-spacing: #{$level-item-spacing}
@extend %block
align-items: center
justify-content: space-between
code
border-radius: $radius
border-radius: var(--radius, #{$radius})
img
display: inline-block
vertical-align: top

View File

@ -30,7 +30,8 @@ $media-spacing-large: 1.5rem
// Sizes
&.is-large
& + .media
--media-spacing: var(--media-spacing-large)
margin-top: var(--media-spacing-large)
padding-top: var(--media-spacing-large)
.media-left,
.media-right

View File

@ -19,7 +19,7 @@ $menu-label-letter-spacing: 0.1em !default
$menu-label-spacing: 1em !default
.menu
--menu-font-size: #{$content-font-size}
--menu-font-size: #{$menu-font-size}
--menu-list-line-height: #{$menu-list-line-height}
--menu-item-radius: #{$menu-item-radius}
--menu-item-color: #{$menu-item-color}

View File

@ -112,3 +112,10 @@
--link-focus-border: #{$link-focus-border}
--link-active: #{$link-active}
--link-active-border: #{$link-active-border}
--family-primary: #{$family-primary}
--family-secondary: #{$family-secondary}
--family-code: #{$family-code}
--size-small: #{$size-small}
--size-normal: #{$size-normal}
--size-medium: #{$size-medium}
--size-large: #{$size-large}

1
test/.gitignore vendored
View File

@ -1 +1,2 @@
/build
/css

13
test/cssvars.js Normal file
View File

@ -0,0 +1,13 @@
const Metalsmith = require('metalsmith');
const filter = require('metalsmith-filter');
const regex_sass = '**/*.sass';
const other_plugin = require('./plugins/check-css-variables-exist');
Metalsmith(__dirname)
.source('../sass')
.use(filter(regex_sass))
.use(other_plugin())
.build(function(err) {
if (err) throw err;
});

View File

@ -0,0 +1,188 @@
module.exports = plugin;
const utils = require('./utils');
const fs = require('fs');
const regexAssign = /--[a-z-]*:/g;
const regexUsage = /var\(--[a-z-]*\)/g;
const LOG_EVERYTHING = false;
const DEFAULT_ASSIGNMENTS = [
'--black',
'--black-70',
'--black-bis',
'--black-ter',
'--grey-darker',
'--grey-dark',
'--grey',
'--grey-light',
'--grey-lighter',
'--grey-lightest',
'--white-ter',
'--white-bis',
'--white',
'--orange',
'--yellow',
'--green',
'--turquoise',
'--cyan',
'--blue',
'--purple',
'--red',
'--family-sans-serif',
'--family-monospace',
'--render-mode',
'--size-1',
'--size-2',
'--size-3',
'--size-4',
'--size-5',
'--size-6',
'--size-7',
'--weight-light',
'--weight-normal',
'--weight-medium',
'--weight-semibold',
'--weight-bold',
'--block-spacing',
'--easing',
'--radius-small',
'--radius',
'--radius-large',
'--radius-rounded',
'--speed',
'--primary',
'--info',
'--success',
'--warning',
'--danger',
'--light',
'--dark',
'--orange-invert',
'--yellow-invert',
'--green-invert',
'--turquoise-invert',
'--cyan-invert',
'--blue-invert',
'--purple-invert',
'--red-invert',
'--primary-invert',
'--primary-light',
'--primary-dark',
'--info-invert',
'--info-light',
'--info-dark',
'--success-invert',
'--success-light',
'--success-dark',
'--warning-invert',
'--warning-light',
'--warning-dark',
'--danger-invert',
'--danger-light',
'--danger-dark',
'--light-invert',
'--light-light',
'--light-dark',
'--dark-invert',
'--dark-light',
'--dark-dark',
'--scheme-main',
'--scheme-main-bis',
'--scheme-main-ter',
'--scheme-invert',
'--scheme-invert-rgb',
'--scheme-invert-bis',
'--scheme-invert-ter',
'--background',
'--border',
'--border-rgb',
'--border-hover',
'--border-light',
'--border-light-hover',
'--text',
'--text-invert',
'--text-light',
'--text-strong',
'--code',
'--code-background',
'--pre',
'--pre-background',
'--link',
'--link-invert',
'--link-light',
'--link-dark',
'--link-visited',
'--link-hover',
'--link-hover-border',
'--link-focus',
'--link-focus-border',
'--link-active',
'--link-active-border',
'--family-primary',
'--family-secondary',
'--family-code',
'--size-small',
'--size-normal',
'--size-medium',
'--size-large',
];
function logThis(message) {
if (LOG_EVERYTHING) {
console.log(message);
}
}
function plugin() {
return (files, metalsmith, done) => {
setImmediate(done);
let hasErrors = false;
Object.keys(files).forEach(filePath => {
const {fileName, lines} = utils.getLines(files, filePath);
const file = files[filePath];
const contents = file.contents.toString();
let assignments = contents.match(regexAssign);
if (!assignments) {
logThis(`${filePath} has no CSS var assignments`);
return;
}
assignments = assignments.map(assignment => assignment.replace(':', ''));
assignments = [...assignments, ...DEFAULT_ASSIGNMENTS];
const usages = contents.match(regexUsage);
if (!usages) {
logThis(`${filePath} has no CSS var usages`);
return;
}
let errorCount = 0;
usages.forEach(usage => {
// var(--foobar) ==> --foobar
let varName = usage.replace('var(', '');
varName = varName.replace(')', '');
if (!assignments.includes(varName)) {
console.log(`${usage} is not assigned`);
errorCount++;
}
});
if (errorCount) {
console.log(`There are some errors in ${filePath}`);
} else {
logThis(`${filePath} is all good!`);
}
});
if (hasErrors) {
console.log(`There are some errors`);
} else {
console.log(`All used CSS variables are assigned correctly!`);
}
};
}

49
test/plugins/utils.js Normal file
View File

@ -0,0 +1,49 @@
const fs = require('fs');
const path = require('path');
let utils = {
parseLine: (line) => {
if (line.startsWith('$') && line.endsWith('!default')) {
const colon_index = line.indexOf(':');
const variable_name = line.substring(0, colon_index).trim();
const default_index = line.indexOf('!default');
const variable_value = line.substring(colon_index + 1, default_index).trim();
return variable = {
name: variable_name,
value: variable_value,
type: utils.getVariableType(variable_name, variable_value),
};
}
return false;
},
getLines: (files, file_path) => {
const file = files[file_path];
const slash_index = file_path.lastIndexOf('/');
const dot_index = file_path.lastIndexOf('.');
const file_name = file_path.substring(slash_index + 1, dot_index);
return {
file_name,
lines: file.contents.toString().split(/(?:\r\n|\r|\n)/g),
}
},
ensureDirectoryExistence: (file_path) => {
var dirname = path.dirname(file_path);
if (fs.existsSync(dirname)) {
return true;
}
utils.ensureDirectoryExistence(dirname);
fs.mkdirSync(dirname);
}
}
utils.files = {};
module.exports = utils;