{"id":20988554,"url":"https://github.com/darrenjacoby/postcss-root-parse-var","last_synced_at":"2025-05-14T18:31:23.790Z","repository":{"id":57328478,"uuid":"258200475","full_name":"darrenjacoby/postcss-root-parse-var","owner":"darrenjacoby","description":"Parse a custom property from `:root` or another selector to a static value","archived":false,"fork":false,"pushed_at":"2020-04-23T13:43:30.000Z","size":5,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-11-27T01:47:56.646Z","etag":null,"topics":["css","postcss","postcss-plugin","postcss-root-parse-var"],"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/darrenjacoby.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":null}},"created_at":"2020-04-23T12:51:07.000Z","updated_at":"2021-02-06T18:28:27.000Z","dependencies_parsed_at":"2022-09-26T22:22:08.973Z","dependency_job_id":null,"html_url":"https://github.com/darrenjacoby/postcss-root-parse-var","commit_stats":null,"previous_names":["soberwp/postcss-root-parse-var"],"tags_count":1,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenjacoby%2Fpostcss-root-parse-var","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenjacoby%2Fpostcss-root-parse-var/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenjacoby%2Fpostcss-root-parse-var/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darrenjacoby%2Fpostcss-root-parse-var/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darrenjacoby","download_url":"https://codeload.github.com/darrenjacoby/postcss-root-parse-var/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225304486,"owners_count":17453171,"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":["css","postcss","postcss-plugin","postcss-root-parse-var"],"created_at":"2024-11-19T06:21:56.488Z","updated_at":"2024-11-19T06:21:57.177Z","avatar_url":"https://github.com/darrenjacoby.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postcss-root-parse-var\n\nSimple PostCSS plugin to add support for **`parse-var()`**, allowing a CSS variable to be parsed from `:root` or a selector of your choice.\n\nUseful if a subsequent PostCSS plugin requires a static value to work on. This is not intended as a fallback for `var()`.\n\n### Installation\n\n```shell\nyarn add postcss-root-parse-var --dev\n```\n\nRequire `postcssRootParseVar` at the top of Webpack or Mix:\n```js\nconst postcssRootParseVar = require('postcss-root-parse-var');\n```\n\n#### Using Webpack\n\n```js\npostcss([postcssRootParseVar]);\n```\n\n#### Using Mix Sass (Sage 10)\n\n```js\nmix\n    .sass('resources/assets/styles/editor.scss', 'styles')\n    .options({\n        postCss: [postcssRootParseVar]\n    });\n```\n\n### Config\n\nSome config can be passed into `postcssRootParseVar()` in Webpack or Mix. \n\n```js\npostcssRange({\n    root: ':root',\n    prefix: 'parse-var',\n})\n```\n\n### Usage\n\n```scss\n:root {\n    --screen-md: 48rem;\n    --screen-lg: 75rem,\n}\n\n.parse-var {\n    font-size: range(2rem, 6rem, parse-var(--screen-md), parse-var(--screen-lg));\n}\n\n```\n\nThis will parse the root custom properties resulting in a static value for `--screen-md` and `--screen-lg`.\n\n```scss\n.parse-var {\n    font-size: range(2rem, 6rem, 48rem, 75rem);\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrenjacoby%2Fpostcss-root-parse-var","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarrenjacoby%2Fpostcss-root-parse-var","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarrenjacoby%2Fpostcss-root-parse-var/lists"}