chenglou / RCSS

Turn your JavaScript objects into CSS classes.
287 stars 21 forks source link

Mapping generated CSS classes to JavaScript files #26

Open charliermarsh opened 10 years ago

charliermarsh commented 10 years ago

With traditional stylesheets, in Chrome I can select an element, look at its styles, and see where they came from (i.e., which file). It'd be great if there were a similar process for RCSS (i.e., a way to figure out which JavaScript file generated a certain RCSS class). I can think of two ways of doing this:

  1. The generated CSS class name somehow encapsulates the JavaScript file from which it was generated. For example, if it was generated in tooltip.jsx, then the classname might be c0-tooltip.
  2. The generated