{"id":21954183,"url":"https://github.com/cssobj/cssobj-plugin-flexbox","last_synced_at":"2026-05-11T07:32:54.686Z","repository":{"id":58219596,"uuid":"71156645","full_name":"cssobj/cssobj-plugin-flexbox","owner":"cssobj","description":"cssobj plugin for generate right flexbox CSS, input one line, give you right flexbox!","archived":false,"fork":false,"pushed_at":"2016-12-14T08:03:03.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-11T03:26:49.041Z","etag":null,"topics":[],"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/cssobj.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":"2016-10-17T16:06:47.000Z","updated_at":"2016-12-14T08:03:04.000Z","dependencies_parsed_at":"2022-08-31T03:01:16.767Z","dependency_job_id":null,"html_url":"https://github.com/cssobj/cssobj-plugin-flexbox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/cssobj/cssobj-plugin-flexbox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssobj%2Fcssobj-plugin-flexbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssobj%2Fcssobj-plugin-flexbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssobj%2Fcssobj-plugin-flexbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssobj%2Fcssobj-plugin-flexbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cssobj","download_url":"https://codeload.github.com/cssobj/cssobj-plugin-flexbox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cssobj%2Fcssobj-plugin-flexbox/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266807194,"owners_count":23987426,"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-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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-29T07:17:01.443Z","updated_at":"2026-05-11T07:32:49.644Z","avatar_url":"https://github.com/cssobj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cssobj-plugin-flexbox\n\n[![Join the chat at https://gitter.im/css-in-js/cssobj](https://badges.gitter.im/css-in-js/cssobj.svg)](https://gitter.im/css-in-js/cssobj)  [![CircleCI](https://circleci.com/gh/cssobj/cssobj-plugin-flexbox.svg?style=svg)](https://circleci.com/gh/cssobj/cssobj-plugin-flexbox)  [![codecov](https://codecov.io/gh/cssobj/cssobj-plugin-flexbox/branch/master/graph/badge.svg)](https://codecov.io/gh/cssobj/cssobj-plugin-flexbox)\n\n[cssobj](https://github.com/cssobj/cssobj) plugin for generate right flexbox CSS, auto vendor prefixer for flexbox in browser, input one line, give you right flexbox!\n\nThe lib using [autoprefixer](https://github.com/postcss/autoprefixer) as support tool, generate both [flexbox 2009 spec](https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/) and [flexbox 2012 spec](http://www.w3.org/TR/css3-flexbox) result.\n\nCurrently hook below css props:\n\n- **display**\n- **flex-direction**\n- **justify-content**\n- **align-items**\n- **order**\n- **flex-grow**\n- **flex-shrink**\n- **flex-basis**\n- **flex**\n- **align-self**\n\nFor the transformed CSS, please look up the [test](https://github.com/cssobj/cssobj-plugin-flexbox/blob/master/test/test.js) result.\n\n## Install\n\n- npm\n\n``` bash\nnpm install cssobj-plugin-flexbox\n```\n\n- bower\n\n``` bash\nbower install cssobj-plugin-flexbox\n```\n\n## Usage\n\n``` javascript\nvar flexbox = require('cssobj-plugin-flexbox')\n\nvar cssobj(\n  {\n    div: {\n      display: 'flex',\n      alignItems: 'flex-end',\n      border: none;\n    }\n  },\n  {\n    plugins: [flexbox()]\n  }\n)\n```\n\nresult css:\n\n``` css\ndiv {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -ms-flexbox;\n  display: flex;\n  -ms-flex-align: end;\n  -webkit-box-align: end;\n  -moz-box-align: end;\n  align-items: flex-end;\n  border: none;\n}\n```\n\n## Option\n\n### option.define [object]\n\nRedefine any css property, as value function that return an object, to replace the original property.\n\n**Example:**\n\n``` javascript\nvar cssobj(\n  {\n    div: {\n      display: 'flex',\n      alignItems: 'end',\n      border: none;\n    }\n  },\n  {\n    plugins: [flexbox({\n      // below redefine alignItems, and add new border replacement.\n      define:{\n        alignItems: function(value){ return {align: 'flex-'+value} },\n        border: function(value){ return {color:value} }\n      }\n    })]\n  }\n)\n\n```\n\nresult css:\n\n```css\ndiv {\n  display: -webkit-box;\n  display: -webkit-flex;\n  display: -moz-box;\n  display: -ms-flexbox;\n  display: flex;\n  align: flex-end;\n  color: none;\n}\n```\n\nAlso, please take a look at [cssobj-plugin-replace](https://github.com/cssobj/cssobj-plugin-replace)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssobj%2Fcssobj-plugin-flexbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcssobj%2Fcssobj-plugin-flexbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcssobj%2Fcssobj-plugin-flexbox/lists"}