{"id":24319695,"url":"https://github.com/dasx10/gulp-px2rem-converter","last_synced_at":"2026-04-11T07:32:31.384Z","repository":{"id":40748709,"uuid":"340054306","full_name":"dasx10/gulp-px2rem-converter","owner":"dasx10","description":"Convert all px to rem","archived":false,"fork":false,"pushed_at":"2023-03-05T21:11:14.000Z","size":435,"stargazers_count":3,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-26T16:14:57.041Z","etag":null,"topics":["converter","converts","css","gulp","gulpplugin","less","media","media2em","px","px2rem","rem","scss","to"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/gulp-px2rem-converter","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/dasx10.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-18T13:12:21.000Z","updated_at":"2023-09-07T14:14:00.000Z","dependencies_parsed_at":"2025-03-10T20:42:07.628Z","dependency_job_id":"bb9c4ce7-f220-4470-b71d-741cc1827023","html_url":"https://github.com/dasx10/gulp-px2rem-converter","commit_stats":null,"previous_names":["dasx10/gulp-px-to-rem"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dasx10/gulp-px2rem-converter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasx10%2Fgulp-px2rem-converter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasx10%2Fgulp-px2rem-converter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasx10%2Fgulp-px2rem-converter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasx10%2Fgulp-px2rem-converter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasx10","download_url":"https://codeload.github.com/dasx10/gulp-px2rem-converter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasx10%2Fgulp-px2rem-converter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27760418,"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","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["converter","converts","css","gulp","gulpplugin","less","media","media2em","px","px2rem","rem","scss","to"],"created_at":"2025-01-17T15:36:26.243Z","updated_at":"2025-12-16T06:47:55.738Z","avatar_url":"https://github.com/dasx10.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp converter pixel to rem\n[![Build Status](https://travis-ci.com/dasx10/gulp-px2rem-converter.svg?branch=master)](https://travis-ci.com/dasx10/gulp-px2rem-converter)\n----\nConvert all `px` to `rem`\n## install\n\n```\nnpm i -D gulp-px2rem-converter\n```\n\n## use\n```\nconst gulp = require('gulp');\nconst pxToRem = require('gulp-px2rem-converter')\n\nfunction css(){\n    return gulp.src('./*.css')\n    .pipe(pxToRem())\n    .pipe(gulp.dest('./dist'))\n}\n\nmodule.exports.css = css;\n```\n\nIf you are not using `:root` or `html` or they do not have a `font-size` then you can ignore it. The default value `16px` will be taken or you can specify this value manually\n```\npxToRem(16)\n```\nor\n```\npxToRem('16px')\n```\nor\n```\npxToRem('100%')\n```\n## run\n```\ngulp css\n```\n\n## example\ninput\n```\nhtml{\n    font-size: 62.5%;\n}\ndiv{\n    padding: 160px;\n    border:1px solid red;\n}\n@media (min-width:120px){\n    div{\n        padding: 120px;\n    }\n}\n```\noutput\n```\nhtml{\n    font-size: 62.5%;\n}\ndiv{\n    padding: 16rem;\n    border:0.1rem solid red;\n}\n@media (min-width:12em){\n    div{\n        padding: 12rem;\n    }\n}\n```\n## example use :root\ninput\n```\n\n:root{\n    font-size: 20px;\n}\nhtml{\n    font-size: 20px;\n}\ndiv{\n    padding: 40px;\n}\n@media(min-width:1200px){\n    div{\n        padding: 60px;\n    }\n}\n```\noutput\n```\n:root{\n    font-size: 20px;\n}\nhtml{\n    font-size: 1rem;\n}\ndiv{\n    padding: 2rem;\n}\n@media(min-width:60em){\n    div{\n        padding: 3rem;\n    }\n}\n```\n\n----\n## info\n\nThe plugin works with units such as `%` or `px`. If you are using other devices, do not use this plugin. Unable to compute units that are dynamic by the browser.\n\nAlso converts all `@media` to `em` where `px` was used. Using `em` will resize all dimensions to those specified by the user. `rem` is not used due to bugs in Safari browsers\n\nThe plugin is not case sensitive.\nYou can enter both `px` and `PX` or `Px`\n\nDoesn't work if you use `font-size` in `:root` or `html`\nin `@ media`.\nBy default will take only the first `font-size` in `:root` or `html` if there is no` font-size` value in `:root`\n\n## compatibility\n\ncss less(http://lesscss.org/) scss\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasx10%2Fgulp-px2rem-converter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasx10%2Fgulp-px2rem-converter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasx10%2Fgulp-px2rem-converter/lists"}