Commit Graph

13 Commits (952bc0cc039c034c5fe651864db528dcd9800e9e)

Author SHA1 Message Date
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Onur Temizkan f6d8be881c fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147) (#5240)
* fix(css-in-js) Keep newlines in CSS-in-JS Templates (Fixes: #5147)

* Add more tests

* Do not add semicolon when CSS prop is a template variable

* Fix deletion of original semicolon

* Prettify long line
2018-11-01 21:58:16 +02:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Lucas Duailibe a9be90c5d4 Format CSS prop for emotion 2017-12-02 22:50:07 -03:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
Lucas Duailibe 759953ef6d
Template literals: Don't break on identifiers but break if comments (#3299) 2017-11-21 15:51:15 -02:00
Lucas Duailibe 38b15f7899 Improve template literal expresions line breaks (#3124) 2017-10-31 14:31:27 -06:00
Simone Picciani 85e0bffa7d Removed injectGlobal and keyframes (#2342) 2017-06-28 16:03:33 -07:00
Simone Picciani 067a0137bd Add support for css, keyframes and injectGlobal keywords (#2337)
* styled components now support css keyword

* added support also for keyframes

* added comment to reflect the new keywords

* modified comment

* ignore css and keyframes when testing ast manipulations

* added also injectGlobal
2017-06-28 14:31:27 -07:00
Christopher Chedeau 38d4661ba9 Forward originalText in multiparser (#2260)
If we don't, all the places where we read from the original text (mostly comments) are reading into random places.

Fixes #2258
2017-06-24 17:54:09 -07:00
Christopher Chedeau 08060e7c94 Use fill for CSS values (#2224)
This looks less weird to have them flow as they fit than breaking on every single line.

Fixes #2213
2017-06-21 15:13:51 -07:00
Rodrigo Pombo 8dd0cb2a05 Format CSS in template literals with expressions (#2102)
* Add support for styled-jsx with expressions

* Lint

* Fix require for Node 4

* Re-create template-literal document when replacing placeholders

* Add support for styled-components with expressions

* Fix merge

* Move css library detection to functions
2017-06-13 09:45:16 -07:00
Rodrigo Pombo d4774edd03 Parse CSS in template literals (styled-jsx) (#1984)
* Add basic styled-jsx parsing

* Use eval("require")

* Remove template literal raw and cooked values when it contains CSS

* Set postcss parser to options and group subtree parts

* Gracefully give up TemplateLiteral formatting when it fails
2017-06-06 08:28:13 -07:00