{"id":13376286,"url":"https://github.com/0no-co/tiny-css-prefixer","last_synced_at":"2025-03-13T02:30:42.843Z","repository":{"id":66123909,"uuid":"234145250","full_name":"0no-co/tiny-css-prefixer","owner":"0no-co","description":"CSS prefixing helpers in less than 1KB 🌈","archived":false,"fork":false,"pushed_at":"2020-07-19T07:21:57.000Z","size":98,"stargazers_count":67,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T07:22:39.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/0no-co.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-15T18:26:02.000Z","updated_at":"2022-12-08T11:01:43.000Z","dependencies_parsed_at":"2023-03-30T09:05:07.760Z","dependency_job_id":null,"html_url":"https://github.com/0no-co/tiny-css-prefixer","commit_stats":null,"previous_names":["kitten/tiny-css-prefixer"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0no-co%2Ftiny-css-prefixer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0no-co%2Ftiny-css-prefixer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0no-co%2Ftiny-css-prefixer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0no-co%2Ftiny-css-prefixer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0no-co","download_url":"https://codeload.github.com/0no-co/tiny-css-prefixer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243327735,"owners_count":20273738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-07-30T05:02:38.997Z","updated_at":"2025-03-13T02:30:42.552Z","avatar_url":"https://github.com/0no-co.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# `tiny-css-prefixer`\n\n**Bare essentials CSS prefixing helpers in less than 1KB 🌈**\n\n[![version](https://img.shields.io/npm/v/tiny-css-prefixer)](https://www.npmjs.com/package/tiny-css-prefixer)\n[![gzip size](https://img.badgesize.io/https://unpkg.com/tiny-css-prefixer@latest/dist/tiny-css-prefixer.es.js?compression=gzip)](https://unpkg.com/tiny-css-prefixer)\n\nCurrently supports prefixing properties for most browsers as it makes sense.\n[See `SUPPORT.md` for more information on which prefixes and transformations have been omitted.](./SUPPORT.md)\n\nThe API is fairly straightforward and only consists of two functions, `prefixProperty` and `prefixValue`.\n\n```js\nprefixProperty('margin'); // 0b000\nprefixProperty('appearance'); // 0b110\n\nprefixValue('color', 'palevioletred'); // 'palevioletred'\nprefixValue('position', 'sticky'); // '-webkit-sticky, sticky'\n```\n\n`prefixProperty` returns a bitmap depending on which prefix should be\napplied:\n\n- `0b001` stands for `-ms-`\n- `0b010` stands for `-moz-`\n- `0b100` stands for `-webkit`\n\nThese are combined using a binary OR, so an example usage of the\n`prefixProperty` helper may look like the following:\n\n```js\nconst prefix = (prop, value) =\u003e {\n  const flag = prefixProperty(prop);\n  let css = `${prop}: ${value};\\n`;\n  if (flag \u0026 0b001) css += `-ms-${css}`;\n  if (flag \u0026 0b010) css += `-moz-${css}`;\n  if (flag \u0026 0b100) css += `-webkit-${css}`;\n  return css;\n};\n```\n\nAdditionally `prefixValue` can accept full declarations to avoid\nhaving to apply it before concatenation, which can be useful in case\nyou're trying to minimise string operations:\n\n```js\nconst declaration = 'position: sticky';\nprefixValue(declaration, declaration); // 'position: -webkit-sticky, sticky'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0no-co%2Ftiny-css-prefixer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0no-co%2Ftiny-css-prefixer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0no-co%2Ftiny-css-prefixer/lists"}