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

Fancy - v2.0.0 #20

Merged
merged 5 commits into from
Jul 3, 2018
Merged

Fancy - v2.0.0 #20

merged 5 commits into from
Jul 3, 2018

Conversation

ItsJonQ
Copy link
Contributor

@ItsJonQ ItsJonQ commented Jul 3, 2018

Fancy - v2.0.0

screen recording 2018-07-03 at 01 49 pm

Let's get Emotional πŸ‘©β€πŸŽ€

Under the hood, v2.0.0 is now running an enhanced "fork" of Emotion. Previously, Fancy's internals was a custom from-scratch implementation that worked very similarly as Styled Components/Emotions and CSS Modules.

Fancy was originally created to be a super tiny CSS-Modules client-side compiler. This worked wonderfully! After implementation, we realized that Fancy needed to support:

  • Scoping
  • Theming
  • iFrame support (out-of-the-box)

Fancy v1.x did support these features, but they weren't reliable. This is because the core CSS processing functionally for something like CSS Modules is very different compared to something like Styled Components (with theming).

Rather than reverse engineer things to make it fit, it was decided that v2.x would use Emotion.

Enhance! 🀳

As of today, Emotion supports none of the (above) requirements we need. It also does not provide any way of implementing these features without touching core code.

v2.0.0's implementation of Emotion involves copying over only the necessary files and modifying only the necessary lines to add these features. This allows for us to more easily sync up with the Emotion library, if we ever need to.

Changes 😱

Check out Emotion's documentation to see how the styled function can be used.

Previously CSS Modules-like implementations of Fancy is no longer supported in v2.0.0.

ItsJonQ added 2 commits July 2, 2018 18:33
Under the hood, v2.0.0 is now running an enhanced "fork" of [Emotion](https://github.com/emotion-js/emotion).
Previously, Fancy's internals was a custom from-scratch implementation that
worked very similarly as Styled Components/Emotions and CSS Modules.

Fancy was originally created to be a super tiny CSS-Modules client-side
compiler. This worked wonderfully! After implementation, we realized that Fancy
_needed_ to support:

- Scoping
- Theming
- iFrame support (out-of-the-box)

Fancy v1.x did support these features, but they weren't reliable. This is
because the core CSS processing functionally for something like CSS Modules
is very different compared to something like Styled Components (with theming).

Rather than reverse engineer things to make it fit, it was decided that v2.x
would use Emotion.
@ItsJonQ ItsJonQ added the enhancement New feature or request label Jul 3, 2018
@ItsJonQ ItsJonQ self-assigned this Jul 3, 2018
@coveralls
Copy link

coveralls commented Jul 3, 2018

Pull Request Test Coverage Report for Build 131

  • 69 of 69 (100.0%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 117: 0.0%
Covered Lines: 69
Relevant Lines: 69

πŸ’› - Coveralls

@ItsJonQ ItsJonQ merged commit cd5f6b2 into master Jul 3, 2018
@ItsJonQ ItsJonQ deleted the 2.0.0 branch July 26, 2018 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants