Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.8KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # PostCSS CSS-in-JS Syntax
  2. [![NPM version](https://img.shields.io/npm/v/@stylelint/postcss-css-in-js.svg)](https://www.npmjs.org/package/@stylelint/postcss-css-in-js) [![Build Status](https://github.com/stylelint/postcss-css-in-js/workflows/CI/badge.svg)](https://github.com/stylelint/postcss-css-in-js/actions)
  3. <img align="right" width="95" height="95"
  4. title="Philosopher’s stone, logo of PostCSS"
  5. src="https://api.postcss.org/logo.svg">
  6. [PostCSS](https://github.com/postcss/postcss) syntax for parsing [CSS in JS](https://github.com/MicheleBertoli/css-in-js) literals:
  7. - [aphrodite](https://github.com/Khan/aphrodite)
  8. - [astroturf](https://github.com/4Catalyzer/astroturf)
  9. - [csjs](https://github.com/rtsao/csjs)
  10. - [css-light](https://github.com/streamich/css-light)
  11. - [cssobj](https://github.com/cssobj/cssobj)
  12. - [electron-css](https://github.com/azukaar/electron-css)
  13. - [emotion](https://github.com/emotion-js/emotion)
  14. - [freestyler](https://github.com/streamich/freestyler)
  15. - [glamor](https://github.com/threepointone/glamor)
  16. - [glamorous](https://github.com/paypal/glamorous)
  17. - [j2c](https://github.com/j2css/j2c)
  18. - [linaria](https://github.com/callstack/linaria)
  19. - [lit-css](https://github.com/bashmish/lit-css)
  20. - [react-native](https://github.com/necolas/react-native-web)
  21. - [react-style](https://github.com/js-next/react-style)
  22. - [reactcss](https://github.com/casesandberg/reactcss)
  23. - [styled-components](https://github.com/styled-components/styled-components)
  24. - [styletron-react](https://github.com/rtsao/styletron)
  25. - [styling](https://github.com/andreypopp/styling)
  26. - [typestyle](https://github.com/typestyle/typestyle)
  27. ## Getting Started
  28. First thing's first, install the module:
  29. ```
  30. npm install postcss-syntax @stylelint/postcss-css-in-js --save-dev
  31. ```
  32. ## Use Cases
  33. ```js
  34. const postcss = require("postcss");
  35. const stylelint = require("stylelint");
  36. const syntax = require("postcss-syntax");
  37. postcss([stylelint({ fix: true })])
  38. .process(source, { syntax: syntax })
  39. .then(function (result) {
  40. // An alias for the result.css property. Use it with syntaxes that generate non-CSS output.
  41. result.content;
  42. });
  43. ```
  44. input:
  45. ```javascript
  46. import glm from "glamorous";
  47. const Component1 = glm.a({
  48. flexDirectionn: "row",
  49. display: "inline-block",
  50. color: "#fff"
  51. });
  52. ```
  53. output:
  54. ```javascript
  55. import glm from "glamorous";
  56. const Component1 = glm.a({
  57. color: "#fff",
  58. display: "inline-block",
  59. flexDirectionn: "row"
  60. });
  61. ```
  62. ## Advanced Use Cases
  63. Add support for more `css-in-js` package:
  64. ```js
  65. const syntax = require("postcss-syntax")({
  66. "i-css": (index, namespace) => namespace[index + 1] === "addStyles",
  67. "styled-components": true
  68. });
  69. ```
  70. See: [postcss-syntax](https://github.com/gucong3000/postcss-syntax)
  71. ## Style Transformations
  72. The main use case of this plugin is to apply PostCSS transformations to CSS code in template literals & styles as object literals.