question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[jss-expand] Make it produce arrays based syntax

See original GitHub issue

Me and @AleshaOleg are working on last issues with the new css-vendor and we need to vendor prefix compound values e.g. #300. We would need to parse string values otherwise to add prefixes, so now it is easier to deoptimize a bit jss-expand to the jss core array based syntax in order to get the benefits in jss-vendor prefixer.

Example:

transition: ['transform', '1s', 'cubic-bezier(0.23, 1, 0.32, 1)']

should result in

transition: [['transform', '1s', 'cubic-bezier(0.23, 1, 0.32, 1)']]

in order to let vendor prefixer to produce

transition: [['-webkit-transform', '1s', 'cubic-bezier(0.23, 1, 0.32, 1)']]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
AleshaOlegcommented, Nov 7, 2017

@typical000 Sure, I will update this on next week. Then we can release a new version of css-vendor.

1reaction
typical000commented, Nov 7, 2017

Created pullrequest - https://github.com/cssinjs/jss-expand/pull/25, added new test that we forgotten before. But prefixing values still not work. Looks like to this - https://github.com/cssinjs/css-vendor/blob/master/src/supported-value.js#L38 need make updates in css-vendor repo

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spread syntax (...) - JavaScript - MDN Web Docs - Mozilla
The spread (...) syntax allows an iterable, such as an array or string, to be expanded in places where zero or more arguments...
Read more >
6 Use Case of Spread with Array in JavaScript - Samantha Ming
The spread syntax takes your array and expands it into elements. ... In JavaScript, arrays are reference types, so you can't just create...
Read more >
JavaScript - Expanding iterable elements with Spread Syntax
ES9 (ECMAScript 2018) introduced spread syntax which can be used to expand an iterable (array or string) into individual function parameters ...
Read more >
4 Ways to Populate an Array in JavaScript - Medium
The array spread syntax allows you to expand an array or string and create a new array from the expanded elements. By using...
Read more >
Creating array with spread operator - javascript - Stack Overflow
Using the spread syntax will create an array will index properties as shown in the following code example: const arr = [...new Array(5)]; ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found