{"id":16004268,"url":"https://github.com/kcmr/kusass","last_synced_at":"2026-05-04T05:41:28.853Z","repository":{"id":93041075,"uuid":"54779914","full_name":"kcmr/kusass","owner":"kcmr","description":"Small library of scss mixins and functions","archived":false,"fork":false,"pushed_at":"2016-05-21T19:26:12.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-10T10:19:05.180Z","etag":null,"topics":["bem","mixins","scss","scss-library","unit-conversion"],"latest_commit_sha":null,"homepage":"","language":"CSS","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/kcmr.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-03-26T13:18:31.000Z","updated_at":"2016-03-26T13:42:52.000Z","dependencies_parsed_at":"2023-08-24T11:18:23.481Z","dependency_job_id":null,"html_url":"https://github.com/kcmr/kusass","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fkusass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fkusass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fkusass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kcmr%2Fkusass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kcmr","download_url":"https://codeload.github.com/kcmr/kusass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276098,"owners_count":20912287,"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":["bem","mixins","scss","scss-library","unit-conversion"],"created_at":"2024-10-08T10:42:05.095Z","updated_at":"2026-05-04T05:41:23.814Z","avatar_url":"https://github.com/kcmr.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# { kusass }\n\n**{ kusass }** is a small library of **sass mixins and functions** that I use in small projects to help me deal with BEM and unit conversion.\n\nThe unit conversion functions have been ~~stolen~~ picked from [Bourbon](http://bourbon.io).\n\n## Installation\n\nInstall via Bower:\n\n```bash\nbower install kcmr/kusass\n```\n\nOr [download it](https://github.com/kcmr/kusass/archive/master.zip).\n\n## Usage\n\nImport into your main scss:\n\n```scss\n@import \"kusass/kusass\";\n```\n\nOverride `$em-base` var if you need it. The default `font-size` is 16px.\n\n```scss\n@import \"kusass/kusass\";\n@import \"myvars\";\n```\n\nIn `_myvars.scss`:\n\n```scss\n$em-base: 14px;\n```\n\n## Available mixins\n\n### BEM helpers\n\n#### `elem`\n\n```scss\n@include elem($block, 'classname')\n```\n\nThis is useful when you need to apply styles to a BEM element inside a modifier or state class.\n\n**Example:**\n\n```scss\n.my-block {\n  $block: \u0026;\n  \n  \u0026--modifier {\n    @include elem($block, 'element') {\n      // styles for .my-block--modifier .my-block__element\n    }\n  }\n  \n  \u0026.is-active {\n    @include elem($block, 'element') {\n      // styles for .my-block.is-active .my-block__element\n    }\n  }\n}\n```\n\n#### `mod`\n\n```scss\n@include mod($block, 'classname')\n```\n\nI'm thinking if this mixin has any utility…\n\n## Available functions\n\n### Unit conversion\n\nCheck out the Bourbon docs about [rem](http://bourbon.io/docs/#px-to-rem) and [em](http://bourbon.io/docs/#px-to-em) functions.\n\n#### `rem`\n\nConverts px to rems.\n\nIt asumes that default `font-size` is 16px. You can override the default value in your own vars file by setting the var `$em-base`.\n\n```scss\n.class { font-size: rem(12); }\n// or...\n.class { font-size: rem(12px); }\n```\n\n#### `em`\n\nConverts px to ems.\n\n\n```scss\n.class { font-size: em(12); } \n// or...\n.class { font-size: em(12px); }\n// or...\n.class { font-size: em(12, 18); } // uses the second value as relative unit.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fkusass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkcmr%2Fkusass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkcmr%2Fkusass/lists"}