{"action":"created","issue":{"url":"https://api.github.com/repos/typestyle/typestyle/issues/53","repository_url":"https://api.github.com/repos/typestyle/typestyle","labels_url":"https://api.github.com/repos/typestyle/typestyle/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/typestyle/typestyle/issues/53/comments","events_url":"https://api.github.com/repos/typestyle/typestyle/issues/53/events","html_url":"https://github.com/typestyle/typestyle/issues/53","id":193803254,"number":53,"title":"Parameterised CSX flex function?","user":{"login":"jamiewinder","id":4442179,"avatar_url":"https://avatars.githubusercontent.com/u/4442179?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiewinder","html_url":"https://github.com/jamiewinder","followers_url":"https://api.github.com/users/jamiewinder/followers","following_url":"https://api.github.com/users/jamiewinder/following{/other_user}","gists_url":"https://api.github.com/users/jamiewinder/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiewinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiewinder/subscriptions","organizations_url":"https://api.github.com/users/jamiewinder/orgs","repos_url":"https://api.github.com/users/jamiewinder/repos","events_url":"https://api.github.com/users/jamiewinder/events{/privacy}","received_events_url":"https://api.github.com/users/jamiewinder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-06T15:34:04Z","updated_at":"2016-12-07T06:02:46Z","closed_at":null,"body":"There is a CSX `flex` value already unfortunately, but a function might be more useful? e.g.:\r\n```typescript\r\nfunction flex(grow: number, shrink: number, basis: string) {\r\n    let value = `${grow} ${shrink} ${basis}`;\r\n    return {\r\n        '-ms-flex': value,\r\n        '-webkit-flex': value,\r\n        'flex': value\r\n    };\r\n}\r\n```\r\nLike this, but **not this**! It would be more better and more flexible (pun intended) if the function was overloaded to match the rules matching the [CSS shorthand](https://developer.mozilla.org/en/docs/Web/CSS/flex). I can make a PR implementing this if there is interest."},"comment":{"url":"https://api.github.com/repos/typestyle/typestyle/issues/comments/265363637","html_url":"https://github.com/typestyle/typestyle/issues/53#issuecomment-265363637","issue_url":"https://api.github.com/repos/typestyle/typestyle/issues/53","id":265363637,"user":{"login":"basarat","id":874898,"avatar_url":"https://avatars.githubusercontent.com/u/874898?v=3","gravatar_id":"","url":"https://api.github.com/users/basarat","html_url":"https://github.com/basarat","followers_url":"https://api.github.com/users/basarat/followers","following_url":"https://api.github.com/users/basarat/following{/other_user}","gists_url":"https://api.github.com/users/basarat/gists{/gist_id}","starred_url":"https://api.github.com/users/basarat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basarat/subscriptions","organizations_url":"https://api.github.com/users/basarat/orgs","repos_url":"https://api.github.com/users/basarat/repos","events_url":"https://api.github.com/users/basarat/events{/privacy}","received_events_url":"https://api.github.com/users/basarat/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T06:02:46Z","updated_at":"2016-12-07T06:02:46Z","body":"the file `flex` is what I've used for about a year. Was based on the *original* flexbox layout in polymer (the latest seems to have deviated significantly https://elements.polymer-project.org/guides/flex-layout).\r\n\r\nDidn't want to teach people all the toggles of flexbox (and have to re-teach / understand them for code reviews). Wanted to keep it simpler. Would love to see a use case for something that cannot be achieved with the current variables (mixins) :rose:"}}
{"actor":{"display_login":"basarat"}}