{"id":16630097,"url":"https://github.com/codecalm/scss-mixins","last_synced_at":"2025-10-28T18:40:19.962Z","repository":{"id":29054719,"uuid":"32582451","full_name":"codecalm/scss-mixins","owner":"codecalm","description":"Useful SCSS mixins","archived":false,"fork":false,"pushed_at":"2016-05-18T11:49:50.000Z","size":29,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-18T06:09:04.380Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/codecalm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-20T12:27:41.000Z","updated_at":"2019-08-12T19:31:35.000Z","dependencies_parsed_at":"2022-07-21T03:18:55.531Z","dependency_job_id":null,"html_url":"https://github.com/codecalm/scss-mixins","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecalm%2Fscss-mixins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecalm%2Fscss-mixins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecalm%2Fscss-mixins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codecalm%2Fscss-mixins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codecalm","download_url":"https://codeload.github.com/codecalm/scss-mixins/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243090806,"owners_count":20234889,"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-12T04:45:00.945Z","updated_at":"2025-10-28T18:40:19.881Z","avatar_url":"https://github.com/codecalm.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Useful SCSS mixins\n\n#### `font-size($font-size[, $line-height: false])`\n\nUsage:\n\n```scss\nh1 {\n   @include font-size(60px, 68px);\n   font-weight: 300;\n}\n```\n\nResult:\n\n```css\nh1 {\n   font-size: 3.75em; /* 60px */\n   line-height: 1.13333em; /* 68px */\n   font-weight: 300;\n}\n```\n\n#### `rtl`\n\nUsage:\n\n```scss\np {\n   float: left;\n\n   @include rtl {\n      float: right;\n   }\n\n   @include rtl {\n      a {\n         color: #cc0000;\n      }\n   }\n}\n\n@include rtl {\n   background: #cc0000;\n}\n```\n\nResult:\n\n```css\np {\n   float: left;\n}\n  \nhtml[dir=\"rtl\"] p {\n   float: right;\n}\n\nhtml[dir=\"rtl\"] p a {\n   color: #cc0000;\n}\n\nhtml[dir=\"rtl\"] {\n   background: #cc0000;\n}\n```\n\n#### `feature($name)`\n\nUsage:\n\n```scss\n.wrap {\n   width: 100%;\n\n   @include feature('page-boxed') {\n      width: 990px;\n   }\n}\n\n@include feature('page-boxed') {\n   background: #fafafa;\n}\n```\n\nResult:\n\n```css\n.wrap {\n   width: 100%; \n}\n\nbody.page-boxed .wrap {\n   width: 990px; \n}\n\nbody.page-boxed {\n   background: #fafafa;\n}\n```\n\n#### `clearfix([$extend: true])`\n\nUsage:\n\n```scss\n.grid {\n   @include clearfix;\n}\n\nfooter {\n   @include clearfix;\n}\n\n.gallery {\n   @include clearfix(false);\n}\n```\n\nResult:\n\n```css\n.grid::after,\nfooter::after {\n   clear: both;\n   content: \"\";\n   display: table;\n}\n\n.gallery::after {\n   clear: both;\n   content: \"\";\n   display: table;\n}\n```\n\n### `media-query($from[, $and: false])`\n\nUsage:\n\n```scss\n.container {\n   width: 100%;\n\n   @include mq(tablet) {\n      width: 740px;\n   }\n\n   @include mq(desktop, print) {\n      width: 980px;\n   }\n\n   @include mq(wide) {\n      width: 1300px;\n   }\n}\n```\n\nResult:\n\n```css\n.container {\n   width: 100%;\n}\n\n@media (min-width: 37em) {\n   .container {\n      width: 740px;\n   }\n}\n\n@media (min-width: 49em) and print {\n   .container {\n      width: 980px;\n   }\n}\n\n@media (min-width: 65em) {\n   .container {\n      width: 1300px;\n   }\n}\n```\n\n### `ellipsis([$width: 100%])`\n\nUsage:\n\n```scss\nstrong.w150 {\n   color: #cc0000;\n\n   @include ellipsis(150px);\n}\n```\n\nResult:\n\n```css\nstrong.w150 {\n   color: #cc0000;\n   display: inline-block;\n   max-width: 150px;\n   overflow: hidden;\n   text-overflow: ellipsis;\n   white-space: nowrap;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecalm%2Fscss-mixins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodecalm%2Fscss-mixins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodecalm%2Fscss-mixins/lists"}