{"id":15965208,"url":"https://github.com/borodean/sassy-escape","last_synced_at":"2025-04-05T22:31:30.418Z","repository":{"id":30026371,"uuid":"33575274","full_name":"borodean/sassy-escape","owner":"borodean","description":"Sass wrapper for a JavaScript library for escaping CSS strings and identifiers","archived":false,"fork":false,"pushed_at":"2017-01-31T14:58:22.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-25T21:20:37.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borodean.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-08T00:20:10.000Z","updated_at":"2017-01-31T14:58:24.000Z","dependencies_parsed_at":"2022-08-03T12:45:39.666Z","dependency_job_id":null,"html_url":"https://github.com/borodean/sassy-escape","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fsassy-escape","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fsassy-escape/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fsassy-escape/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borodean%2Fsassy-escape/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borodean","download_url":"https://codeload.github.com/borodean/sassy-escape/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411236,"owners_count":20934650,"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-10-07T17:40:25.320Z","updated_at":"2025-04-05T22:31:30.389Z","avatar_url":"https://github.com/borodean.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sassy Escape [![Build Status](https://travis-ci.org/borodean/sassy-escape.svg?branch=master)](https://travis-ci.org/borodean/sassy-escape)\n============\n\nA Sass wrapper for [cssesc,](http://github.com/mathiasbynens/cssesc) a JavaScript library [for escaping text for use in CSS strings or identifiers.](http://mathiasbynens.be/notes/css-escapes)\n\n`escape($value, $options...)`\n-----------------------------------\n\nThis function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in CSS strings or identifiers.](http://mathiasbynens.be/notes/css-escapes)\n\n```scss\nbody::after {\n  content: escape('Ich ♥ Bücher');\n}\n\n// Becomes this:\nbody::after {\n  content: 'Ich \\2665  B\\FC cher';\n}\n```\n\nBy default, `escape` returns a string that can be used as part of a CSS string. If the target is a CSS identifier rather than a CSS string, use the `$is-identifier: true` setting.\n\n```scss\n.#{ unquote(escape('123a2b', $is-identifier: true)) } {\n  color: red;\n}\n\n// Becomes this:\n.\\31 23ab {\n  color: red;\n}\n```\n\nThe optional keyword arguments accept the exact options which JavaScript version [cssesc uses](http://github.com/mathiasbynens/cssesc#api) only converted to the `dasherized-case`:\n\n```scss\nbody::after {\n  content: escape('123a2b', $escape-everything: true, $quotes: 'single', $wrap: true);\n}\n```\n\nInstallation\n------------\n\n```bash\ngem install sassy-escape\n```\n\nUse with Sass command line\n--------------------------\n\n```bash\nsass -r sassy-escape --watch sass_dir:css_dir\n```\n\nUse with Compass\n----------------\n\nAdd the following to your Compass configuration:\n\n```ruby\nrequire 'sass-escape'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborodean%2Fsassy-escape","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborodean%2Fsassy-escape","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborodean%2Fsassy-escape/lists"}