{"id":18774272,"url":"https://github.com/leny/koutla-swiss","last_synced_at":"2025-07-22T08:31:22.613Z","repository":{"id":48290636,"uuid":"117150759","full_name":"leny/koutla-swiss","owner":"leny","description":"🎨 CSS-in-JS toolkit, inspired by Kouto-Swiss","archived":false,"fork":false,"pushed_at":"2021-08-03T04:21:50.000Z","size":2229,"stargazers_count":2,"open_issues_count":13,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T22:01:49.729Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://leny.github.io/koutla-swiss","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/leny.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":"2018-01-11T20:38:07.000Z","updated_at":"2023-03-08T05:08:35.000Z","dependencies_parsed_at":"2022-07-22T22:32:15.835Z","dependency_job_id":null,"html_url":"https://github.com/leny/koutla-swiss","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/leny/koutla-swiss","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fkoutla-swiss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fkoutla-swiss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fkoutla-swiss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fkoutla-swiss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leny","download_url":"https://codeload.github.com/leny/koutla-swiss/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leny%2Fkoutla-swiss/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266456245,"owners_count":23931383,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2024-11-07T19:37:52.634Z","updated_at":"2025-07-22T08:31:22.591Z","avatar_url":"https://github.com/leny.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# koutla swiss\n\n[![NPM version](https://badge.fury.io/js/koutla-swiss.svg)](http://badge.fury.io/js/koutla-swiss) [![Build Status](http://img.shields.io/travis/leny/koutla-swiss.svg)](https://travis-ci.org/leny/koutla-swiss) ![Dependency Status](https://david-dm.org/leny/koutla-swiss.svg) ![Downloads counter](http://img.shields.io/npm/dm/koutla-swiss.svg)\n\n\u003e 🎨 CSS-in-JS toolkit, inspired by Kouto-Swiss\n\n* * *\n\n**koutla swiss** is a rewrite of [**kouto swiss**](http://kouto-swiss.io) (a CSS framework for Stylus) in pure javascript, to be used within _css-in-js_ tools like [**glamor**](https://github.com/threepointone/glamor) or [**emotion**](https://emotion.sh)\n\n* * *\n\n## Installation\n\n```bash\n$ npm install --save koutla-swiss\n```\n\n\u003e ☝️ **NOTE:** koutla-swiss exports `cjs` _and_ `esm` modules.\n\n## Usage\n\n**koutla-swiss** is a serie of useful, functional utilities to make _CSS-in-JS_ (with librairies like [glamor](https://github.com/threepointone/glamor)).\n\nAll the documented functions are accessibles from the root of the lib, like `import {px, padding} from \"koutla-swiss\";`.\n\nDocumentation is generated with [ESDoc](https://doc.esdoc.org) and hosted in [koutla-swiss.js.org](https://koutla-swiss.js.org).\n\n### Example\n\n```javascript\nimport React from \"react\";\nimport {css} from \"@emotion/core\";\nimport {rem, margin, flexrow, borderBottom, size, important, mq} from \"koutla-swiss\";\nimport {FontAwesomeIcon} from \"@fortawesome/react-fontawesome\";\n\nimport {BORDER_COLOR, MQ_TABLET, MQ_SMALL_DESKTOP} from \"../../core/constants\";\n\nconst styles = {\n    container: css({\n        ...margin(0, \"auto\", rem(3.6)),\n        ...mq(MQ_TABLET, {\n            marginBottom: rem(19.2),\n        }),\n        ...mq(MQ_SMALL_DESKTOP, {\n            breakInside: \"avoid\",\n            marginBottom: rem(9.6),\n        }),\n    }),\n    title: css({\n        ...flexrow(\"space-between\", \"center\"),\n        ...margin(0, \"auto\", rem(3.2)),\n        paddingBottom: rem(0.25),\n        ...borderBottom(rem(0.1), \"solid\", BORDER_COLOR),\n        fontSize: rem(2.4),\n        textAlign: \"right\",\n    }),\n    titleContent: {flex: 1},\n    hideTitle: css({display: \"none\"}),\n    icon: css({\n        ...important(size(rem(2.4))),\n    }),\n};\n\nexport default ({className, title, hideTitle = false, children, icon}) =\u003e {\n    let $icon;\n\n    icon \u0026\u0026 ($icon = \u003cFontAwesomeIcon icon={icon} css={styles.icon} /\u003e);\n\n    return (\n        \u003csection css={styles.container} className={className}\u003e\n            \u003ch2 css={[styles.title, hideTitle \u0026\u0026 styles.hideTitle]}\u003e\n                {$icon}\n                \u003cspan css={styles.titleContent}\u003e{title}\u003c/span\u003e\n            \u003c/h2\u003e\n            {children}\n        \u003c/section\u003e\n    );\n};\n```\n\n\u003e 👉 **NOTE:** this sample component is taken from [my resume](https://github.com/leny/kourikoulom), which relies on koutla-swiss.\n\n* * *\n\n## License\n\nCopyright (c) 2018 [leny.me](http://leny.me)\nLicensed under the MIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Fkoutla-swiss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleny%2Fkoutla-swiss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleny%2Fkoutla-swiss/lists"}