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

Allow random expressions as long as they result in a className that begins with css #213

Merged
merged 9 commits into from Aug 2, 2017

Conversation

tkh44
Copy link
Member

@tkh44 tkh44 commented Jul 31, 2017

random interpolations

closes #217
closes #179

src/index.js Outdated
@@ -244,6 +244,8 @@ function deconstruct (style) {
} else if (key.indexOf('@supports') === 0) {
supports = supports || {}
supports[key] = deconstruct(style[key])
} else if (key.indexOf('css-') === 0) {
plain = { ...plain, ...style[key]}
Copy link
Member Author

Choose a reason for hiding this comment

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

silly way to get babels object assign

Copy link
Member

Choose a reason for hiding this comment

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

We have an assign util

src/parser.js Outdated
}

// postcss -> js obj
function objectifyPostcssRules (node) {
Copy link
Member Author

Choose a reason for hiding this comment

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

This function needs to be removed.

src/parser.js Outdated
unknownWord (tokens) {
if (tokens[0][0] === 'word') {
if (/xxx(\d+)xxx/gm.exec(tokens[0][1])) {
this.decl(tokens)
Copy link
Member Author

Choose a reason for hiding this comment

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

giphy 6

@codecov-io
Copy link

codecov-io commented Jul 31, 2017

Codecov Report

Merging #213 into master will increase coverage by 0.04%.
The diff coverage is 94.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #213      +/-   ##
==========================================
+ Coverage   90.33%   90.38%   +0.04%     
==========================================
  Files          22       22              
  Lines         952      967      +15     
  Branches      255      260       +5     
==========================================
+ Hits          860      874      +14     
- Misses         74       75       +1     
  Partials       18       18
Impacted Files Coverage Δ
src/index.js 94.41% <100%> (+0.16%) ⬆️
src/parser.js 94.59% <90%> (-1.84%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8137d13...39d921b. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #213 into master will decrease coverage by 0.42%.
The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #213      +/-   ##
=========================================
- Coverage   90.12%   89.7%   -0.43%     
=========================================
  Files          22      22              
  Lines         952    1000      +48     
  Branches      255     272      +17     
=========================================
+ Hits          858     897      +39     
- Misses         76      83       +7     
- Partials       18      20       +2
Impacted Files Coverage Δ
src/glamor/CSSPropertyOperations/index.js 66.12% <ø> (ø) ⬆️
src/index.js 93.92% <100%> (+0.14%) ⬆️
src/parser.js 85.91% <80%> (-10.52%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0c1427...6619142. Read the comment docs.

@tkh44 tkh44 changed the title This allows for random expressions as long as they result in a className that begins with css Allow random expressions as long as they result in a className that begins with css Jul 31, 2017
@tkh44 tkh44 merged commit 5e2b637 into master Aug 2, 2017
@tkh44 tkh44 deleted the random-expressions branch August 2, 2017 05:13
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.

Missing style definitions when using polished like mixin functions Better Composition
3 participants