Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Te Fiti #154

Merged
merged 68 commits into from
Jul 25, 2017
Merged

Te Fiti #154

merged 68 commits into from
Jul 25, 2017

Conversation

tkh44
Copy link
Member

@tkh44 tkh44 commented Jul 16, 2017

What:

  • Fork glamor core code and use it to support objects
  • Turn string styles into objects during compilation
  • Inline mode is default
  • Extract mode removed
  • New extractStatic option - Inline mode but if the block has 0 interpolations it is extracted into a file. If users choose, they can write all static styles and use inline styles for dynamic values. Any static style blocks are replaced with a string class name by the emotion plugin.
const a = css`color:blue`;

is replaced with a string like

const a = 'css-12345'

Why:
Composition is awesome and predictable.

image

TODO:

  • code review I need as many people looking at this as possible.
  • remove the facebook code in the /glamor folder and use some smaller code for that (maybe from cxs or postcss-js)
  • remove code for features that aren't used
  • remove the code here and update the examples & tests
  • replace [].forEach|map|reduce with their equivilents from ./utils for consistancy
  • match the glamor code code style to our code style (stuff needs to be renamed and moved)
  • prefixer should not use the older spec for flexbox
  • prefixer should not use array values display: flex is converted to display: -webkit-box,-moz-box,-ms-flexbox,-webkit-flex,flex
  • update documentation about how it works internally
  • udpate injectGlobal docs
  • update composition docs

If you want to help please feel free to make a PR against this branch glamor-extended

Kye Hohenberger and others added 30 commits July 12, 2017 11:19
…-extended

# Conflicts:
#	package.json
#	test/__snapshots__/css.test.js.snap
#	test/__snapshots__/react.test.js.snap
…-extended

# Conflicts:
#	package.json
#	test/__snapshots__/css.test.js.snap
#	test/__snapshots__/react.test.js.snap
…to glamor-extended

# Conflicts:
#	src/babel.js
#	src/inline.js
#	src/parser.js
src/index.js Outdated
mq,
supp,
src: _src[key]
})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove this? I added tests for this and we add the webkit and ms prefixes in the babel plugin (not the moz one since the usage of firefox versions that require the prefix is under 1%) for tagged template literals but not for objects, we could probably do it for objects if we wanted to.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes remove this whole thing

name,
checkRenderMessage(owner)
)
: void 0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to keep all these warnings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants