Skip to content

gpanneti/css2inlinestyle

Repository files navigation

css2inlinestyle README

css2inlinestyle is a simple extension to convert CSS code to React inline style.

Features

  • Convert css to inline style.
  • Remove prefixes
  • If find duplicate rules, check their values. If the values are similar, just keep one of them. If their values are differents, keep the duplicate values and display a warning message.

Convert CSS to inline style

  1. Select your CSS code
  2. Execute the command "Convert CSS to inline style"
  3. Enjoy !

Convert inline style to CSS

  1. Select your inline style code
  2. Execute the command "Convert inline style to CSS"
  3. Enjoy !

Tip: To bind a keyboard shortcut to the command, open the keybinding preferences and look for "css2inlinestyle" and "inlinestyle2css"

Example

Select the code you want to convert

Select the code you want to convert

Execute the command "Convert CSS to inline style"

Execute the command "Convert CSS to inline style"

Enjoy

Enjoy

Source code

You will find the code on my github repository. Do not hesitate to contribute !

Release Notes

1.2.1

Add gif in readme to be more explicit.

1.2.0

Can now convert inline style to CSS code.

1.1.5

Fix a bug: prefixes were not removed if the rule was not on the first line of the selection

1.1.1 --> 1.1.4

Enhance README.md

1.0.0

Initial release of css2inlinestyle

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published