reacttips-dev / stylex

Write CSS-in-JS with atomic support. Like Facebook's Stylex!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

New ideas, improve project

adamward459 opened this issue · comments

  • Media query
backgroundContainerDialog: {
    "@media (max-width: 899px)": {
      // TODO: check here, miss "a@media"
      height: "calc(50vh)",
    },
  },

Consider changing it to something like this

backgroundContainerDialog: {
    [stylex.breakpoints.up('md')]: {
      // TODO: check here, miss "a@media"
      height: "calc(50vh)",
    },
  },
  • Make command in Package.json commands more consise
 "scripts": {
    "run": "webpack --progress --watch", --> "start:watch": "webpack --progress --watch"
    "start:server": "node server.js"
  }
  • Also, please consider using husky before commiting, there are so many liting errors
    Screen Shot 2021-01-20 at 11 38 19
    Screen Shot 2021-01-20 at 11 39 28

@phamthanhtrungg

about your Media query idea, it's look like material-ui, isn't it?. We're considering it as an option, but not replacement for native query string. So we can use:

native query string;

backgroundContainerDialog: {
    "@media ....": {
      height: "calc(50vh)",
    },
  },

or:

backgroundContainerDialog: {
    [stylex.breakpoints.up('md')]: {
      height: "calc(50vh)",
    },
  },

@ladifire Yes, it will be very helful if we have some extra stuff like material-ui: breakpoints,props, ...