{"_id":"@acepad/css","name":"@acepad/css","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@acepad/css","scripts":{"test":"run test/test-css.js"},"main":"css.js","version":"1.0.0","type":"module","dependencies":{"@acepad/here":"^1.0.0"},"gitHead":"7bb2af3db5cc8b87fa1f0815dc438f6ac107c2b0","_id":"@acepad/css@1.0.0","description":"NOTE: This package is supporsed to work in [acepad](https://github.com/hoge1e3/acepad-dev), not a regular node envronment.","_nodeVersion":"22.17.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-L7zrT+ALVsu8zVn5wruINOuYzvrKq+M+zzydqUSgT3fUxKw4OJ0uG/lXeodnZPPkoqt68C0TpIc10BJB0dB4Gg==","shasum":"07d8fb9631640f4b7146fc66bb1679a852ee06dd","tarball":"https://registry.npmjs.org/@acepad/css/-/css-1.0.0.tgz","fileCount":5,"unpackedSize":2369,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD5kUqFqjon0uP43dONlsl2YGpvAeJBOyfM/i87+5+dbwIhAIbcuweaHLr1sV3kOsjq0CqDQCNGZJ+xZK7YrQGpv5f0"}]},"_npmUser":{"name":"acepad","email":"pnode.acepad@gmail.com"},"directories":{},"maintainers":[{"name":"acepad","email":"pnode.acepad@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/css_1.0.0_1769236873682_0.5226579621871454"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-24T06:41:13.526Z","1.0.0":"2026-01-24T06:41:13.817Z","modified":"2026-01-24T06:41:14.084Z"},"maintainers":[{"name":"acepad","email":"pnode.acepad@gmail.com"}],"description":"NOTE: This package is supporsed to work in [acepad](https://github.com/hoge1e3/acepad-dev), not a regular node envronment.","readme":"NOTE: This package is supporsed to work in [acepad](https://github.com/hoge1e3/acepad-dev), not a regular node envronment.\n\n# @acepad/css\n\nLoad css file in [acepad](https://github.com/hoge1e3/acepad-dev).\n\n# functions\n\n- `css`(`base`:string, `path`:string) (default export)\n   - Load css from specified file `path`.\n   - if `path` is absolute, `base` can be omitted.\n   - Specify `import.meta.url` as `base` and `path` as the relative path to the CSS file from the program calling this function.\n   - After loading the CSS file, if the file is changed, the style will be changes when `css()` for the CSS file is called again.\n\n# Example\n\ntest.js\n~~~js\nimport css from \"@acepad/css\";\nimport * as assert from \"assert\";\nimport {show} from \"@acepad/widget\";\nexport async function main(){\n    const w=show();\n    w.element.classList.add(\"test\");\n    w.element.innerHTML=\"TEST\";\n    css(import.meta.url, \"./test.css\");    \n}    \n~~~\n\ntest.css (It should be same directory of test.js)\n~~~css\n.test{\n    color: red;\n}\n~~~\n\nHow to run:\n- Launch [acepad](https://github.com/hoge1e3/acepad-dev/blob/main/README.md).\n- Open `node_modules/@acepad/css/test/test-css.js`\n- Press F5\n- Rewrite `test.css` and run `test-css.js` again, the style will be changed.","readmeFilename":"README.md","_rev":"1-01ef369e26437a23218ff2f3cf3e6871"}