{"id":19745017,"url":"https://github.com/thoughtbit/postcss-simple-utils","last_synced_at":"2026-05-16T01:34:40.050Z","repository":{"id":57328522,"uuid":"103285061","full_name":"thoughtbit/postcss-simple-utils","owner":"thoughtbit","description":":cyclone: PostCSS插件，基础工具库","archived":false,"fork":false,"pushed_at":"2017-10-05T08:22:17.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-26T18:29:47.962Z","etag":null,"topics":["postcss","postcss-plugins"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thoughtbit.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-12T15:01:25.000Z","updated_at":"2019-08-28T16:51:50.000Z","dependencies_parsed_at":"2022-09-21T01:52:16.591Z","dependency_job_id":null,"html_url":"https://github.com/thoughtbit/postcss-simple-utils","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/thoughtbit/postcss-simple-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbit%2Fpostcss-simple-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbit%2Fpostcss-simple-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbit%2Fpostcss-simple-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbit%2Fpostcss-simple-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thoughtbit","download_url":"https://codeload.github.com/thoughtbit/postcss-simple-utils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thoughtbit%2Fpostcss-simple-utils/sbom","scorecard":{"id":883055,"data":{"date":"2025-08-11","repo":{"name":"github.com/thoughtbit/postcss-simple-utils","commit":"54834a712c618a7ea30fc38ed906c2fe96f37522"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"57 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx","Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-hr2v-3952-633q","Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h","Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-4hpf-3wq7-5rpr","Warn: Project is vulnerable to: GHSA-f522-ffg8-j8r6","Warn: Project is vulnerable to: GHSA-2pr6-76vf-7546","Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-282f-qqgm-c34q","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-566m-qj78-rww5","Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3","Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7","Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-w5p7-h5w8-2hfq"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T08:57:32.230Z","repository_id":57328522,"created_at":"2025-08-24T08:57:32.231Z","updated_at":"2025-08-24T08:57:32.231Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33087028,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postcss","postcss-plugins"],"created_at":"2024-11-12T02:02:11.469Z","updated_at":"2026-05-16T01:34:40.028Z","avatar_url":"https://github.com/thoughtbit.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostCSS Simple Utils\n\n[PostCSS] plugin to help you create functional fragments quickly via at-rules.\n\n## Syntax\n\n### ellipsis\n\n`@util ellipsis([rows]);`\n\n```css\n/* before */\n.ellipsis {\n  @utils-ellipsis;\n}\n.ellipsis2 {\n  @utils-ellipsis(3);\n}\n\n/* after */\n.ellipsis {\n  display: block;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  white-space: nowrap;\n  word-wrap: normal;\n}\n.ellipsis2 {\n  display: -webkit-box;\n  overflow: hidden;\n  text-overflow: ellipsis;\n  -webkit-box-orient: vertical;\n  -webkit-line-clamp: 3;\n}\n```\n\n### clearfix\n\n`@util clearfix;`\n\n```css\n/* before */\n.clearfix {\n  @util clearfix;\n}\n\n/* after */\n.clearfix {\n}\n.clearfix:before, \n.clearfix:after {\n  display: table;\n  content: \"\"\n}\n.clearfix:after {\n  clear: both;\n  visibility: hidden;\n  font-size: 0;\n  height: 0\n}\n\n```\n### clear\n\n`@util clear;`\n\n```css\n/* before */\n.clear {\n  @util clear;\n}\n\n/* after */\n.clear {\n  clear: both;\n  display: block;\n  height: 0;\n  overflow: hidden;\n  visibility: hidden;\n  width: 0;\n}\n\n```\n\n### image replace text\n\n`@util irt;`\n\n```css\n/* before */\n.irt {\n  @utils-irt;\n}\n\n/* after */\n.irt {\n  font: 0/0 none;\n  text-shadow: none;\n  color: transparent;\n}\n```\n\n### user select\n\n`@util user-select([none|text]);`\n\n```css\n/* before */\n.usn {\n  @util user-select(none);\n}\n\n/* after */\n.usn {\n  -moz-user-select: none;\n  -webkit-user-select: none;\n  -ms-user-select: none;\n}\n```\n\n### disabled\n\n`@util disabled([background-color], [border-color], [color]);`\n\n```css\n/* before */\n.disabled {\n  @util disabled(#ccc, #f00, #333);\n}\n\n/* after */\n.disabled {\n  background-color: #ccc;\n  border-color: #f00;\n  color: #333;\n  cursor: default;\n  pointer-events: none;\n}\n```\n\n### center\n\n- `type` 类型  transform[默认值，css3变换] flexbox[flex布局] ie[IE9-]\n- `width` 宽度\n- `height` 高度\n\n`@util center([type=transform|flexbox|ie], [width], [height]);`\n\n```css\n/* before */\n\n/* position + transform */\n.center {\n  @util center;\n}\n\n/* position + margin */\n.center-ie {\n  @util center('ie8', 200, 280);\n}\n\n/* flex */\n.center-flex {\n  @util center('flexbox');\n}\n\n/* after */\n\n/* position + transform */\n.center {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n/* position + margin */\n.center-ie {\n  position: absolute;\n  top: 50%;\n  left: 50%;\n  transform: translate(-50%, -50%);\n}\n\n/* flex */\n.center-flex {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n}\n```\n\n### vertical center\n\n`@util vertical-center;`\n\n```css\n/* before */\n.vam-box {\n  @util vertical-center;\n}\n\n/* after */\n.vam-box {\n}\n.vam-box:after {\n  display: inline-block;\n  content: \"\";\n  height: 100%;\n  vertical-align: middle\n}\n```\n\n### center-block\n\n`@util center-block;`\n\n```css\n/* before */\n.center-block {\n  @util center-block;\n}\n\n/* after */\n.center-block {\n  display: block;\n  margin-left: auto;\n  margin-right: auto;\n}\n```\n\n### hr\n\n`@util hr;`\n\n```css\n/* before */\n.hr {\n  @util hr;\n}\n\n/* after */\n.hr {\n  clear: both;\n  display: block;\n  overflow: hidden;\n  height: 0;\n  font-size: 0;\n  border-bottom: 1px solid #cdcdcd;\n}\n```\n\n### text-hide\n\n`@util text-hide;`\n\n```css\n/* before */\n.text-hide {\n  @util text-hide;\n}\n\n/* after */\n.text-hide {\n  text-indent: 100%;\n  white-space: nowrap;\n  overflow: hidden;\n}\n```\n### select-no-appearance\n\n`@util select-no-appearance;`\n\n```css\n/* before */\n.sna {\n  @util select-no-appearance;\n}\n\n/* after */\n.sna {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n  text-overflow: \"\";\n  text-indent: .01px;\n}\n\n```\n\n### wrap\n\n`@util wrap;`\n\n```css\n/* before */\n.wrap { \n  @util wrap;\n}\n\n/* after */\n.wrap {\n  white-space: normal;\n  word-wrap: break-word;\n  word-break: break-all;\n}\n\n```\n\n### nowrap\n\n`@util nowrap;`\n\n```css\n/* before */\n.nowrap {\n  @util nowrap;\n}\n\n/* after */\n.nowrap {\n  white-space: nowrap;\n  word-wrap: normal;\n}\n```\n\n### triangle\n\n- `type` 类型  equ[全等三角形] iso[等边三角形] sca[不等边三角形]\n- `direction`  方向\n- `color` 颜色\n- `width` 宽度\n- `height` 高度\n\n`@util triangle([type=equ|iso|sca], [direction], [color], [width], [height]);`\n\n```css\n/* before */\n.arrow {\n  @util triangle();\n}\n.arrow-top {\n  @util triangle('iso', 'top', '#f00', 20, 10);\n}\n.arrow-bottom {\n  @util triangle('iso', 'bottom', '#f00', 20, 10);\n}\n.arrow-left {\n  @util triangle('iso', 'left', '#f00', 20, 10);\n}\n.arrow-right {\n  @util triangle('iso', 'right', '#f00', 20, 10);\n}\n.arrow-top-left {\n  @util triangle('iso', 'topLeft', '#f00', 20, 10);\n}\n.arrow-top-right {\n  @util triangle('iso', 'topRight', '#f00', 20, 10);\n}\n.arrow-bottom-left {\n  @util triangle('iso', 'bottomLeft', '#f00', 20, 10);\n}\n.arrow-bottom-right {\n  @util triangle('iso', 'bottomRight', '#f00', 20, 10);\n}\n\n/* after */\n.arrow {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 10px 10px 0 10px;\n  border-color: #000 transparent transparent transparent;\n}\n.arrow-top {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 0 10px 10px 10px;\n  border-color: transparent transparent #f00 transparent;\n}\n.arrow-bottom {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 10px 10px 0 10px;\n  border-color: #f00 transparent transparent transparent;\n}\n.arrow-left {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 5px 20px 5px 0;\n  border-color: transparent #f00 transparent transparent;\n}\n.arrow-right {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 5px 0 5px 20px;\n  border-color: transparent transparent transparent #f00;\n}\n.arrow-top-left {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 10px 20px 0 0;\n  border-color: #f00 transparent transparent transparent;\n}\n.arrow-top-right {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 0 20px 10px 0;\n  border-color: transparent #f00 transparent transparent;\n}\n.arrow-bottom-left {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 10px 0 0 20px;\n  border-color: transparent transparent transparent #f00;\n}\n.arrow-bottom-right {\n  width: 0;\n  height: 0;\n  border-style: solid;\n  border-width: 0 0 10px 20px;\n  border-color: transparent transparent #f00 transparent;\n}\n```\n\n ### rect\n \n `@util rect([width],[height],[background-color]);`\n\n```css\n/* before */\n.rect-a {\n  @util rect(30,50,'#ff0');\n}\n.rect-b {\n  @util rect(30,*,'#ff0');\n}\n.rect-c {\n  @util rect(*,50,'#ff0');\n}\n.rect-d {\n  @util rect(*,*,'#ff0');\n}\n.rect-e {\n  @util rect(30,50,*);\n}\n\n/* after */\n.rect-a {\n  width: 30px;\n  height: 50px;\n  background-color: #ff0;\n}\n.rect-b {\n  width: 30px;\n  background-color: #ff0;\n}\n.rect-c {\n  height: 50px;\n  background-color: #ff0;\n}\n.rect-d {\n  background-color: #ff0;\n}\n.rect-e {\n  width: 30px;\n  height: 50px;\n}\n\n```\n\n### circle\n\n`@util circle([diameter],[radius],[background-color]);`\n\n```css\n/* before */\n.circle-a {\n  @util circle(50, '#ff0');\n}\n.circle-b {\n  @util circle(50, *);\n}\n\n/* after */\n.circle-a {\n  width: 50px;\n  height: 50px;\n  background-color: #ff0;\n  border-radius: 50%;\n}\n.circle-b {\n  width: 50px;\n  height: 50px;\n  border-radius: 50%;\n}\n\n```\n\n## 参考\n- https://github.com/baiyaaaaa/postcss-utils\n- https://github.com/ismamz/postcss-utilities\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbit%2Fpostcss-simple-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthoughtbit%2Fpostcss-simple-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthoughtbit%2Fpostcss-simple-utils/lists"}