[bug] Docs say syntax one way, but output is another way.
See original GitHub issueExpected behavior:
The docs on Alternative syntax for space and comma separated values say that
export default {
button: {
border: ['1px solid red', '1px solid blue'],
},
};
should compile to
.button-0-1-179 {
border: 1px solid red, 1px solid blue;
}
Describe the bug:
But instead it is missing a comma, so the output looks like
.button-0-1-179 {
border: 1px solid red 1px solid blue;
}
so there’s either a bug with the docs, or a bug with the lib. Which one?
Note that the docs for jss-extended Full syntax conflict with the Core JSON syntax doc.
The output for
a: {
border: [
// Numbers can become default unit automatically.
[1, 'solid', 'red'],
[1, 'solid', 'blue']
]
},
looks as expected, with a comma.
Codesandbox link:
Paste
export default {
button: {
border: ['1px solid red', '1px solid blue'],
},
a: {
border: [
// Numbers can become default unit automatically.
[1, 'solid', 'red'],
[1, 'solid', 'blue']
]
},
};
into the repl.
(P.S. It would be neat if the repl updated the URL with a query so we can paste a repl URL and the visitor can see the same code, like the Babel repl).
Versions (please complete the following information):
- see repl
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Troubleshooting | Apps Script - Google Developers
When your script encounters an error, an error message is displayed. The message is accompanied by a line number used for troubleshooting. There ......
Read more >Functions, operators, and conditionals | BigQuery
This topic is a compilation of functions, operators, and conditional expressions. To learn more about how to call functions, function call rules, ...
Read more >Workflow syntax for GitHub Actions
Example: Using a single environment name. Example: Using environment name and URL. Example: Using output as URL. jobs.<job_id>.concurrency.
Read more >Documentation: 15: 43.3. Declarations - PostgreSQL
All variables used in a block must be declared in the declarations section ... The other way is to explicitly declare an alias,...
Read more >NetLogo 6.3.0 User Manual: Programming Guide
In NetLogo, commands and reporters tell agents what to do. ... (Because patch variables are shared by turtles in this way, you can't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Mb though it needs to be fixed in the docs, because for jss-expand it probably does make sense. Its just confusing that we have different output for the same syntax.
Plugins should add syntax, but not change the existing syntax in a confusing way.
Btw. even in the core, the simple [] syntax can be used, because it needs nothing special, it will be just converted to a string by js.