There is a GPL web app. I want to make style modifications to it by injecting CSS code. The injected code aims to change some styles, but not all. For example, it will completely change the style of buttons, or the style of sidebar menu.

The injected code does not make use of any of the GPLed CSS code. Can this be considered a derivative work or is it the case of treating code as data?

Note that the injected style will contain CSS ids and class names that may be specific to the GPLed app, so I guess it makes use of the original app html structure, but not css.

  • This is a purely theoretical question. My real use case is slightly different - I host the remote GPL web app in a WebView of a proprietary application and I want a clean way to customize the looks of the GPL web app in the WebView without open sourcing my properietary code that is above the WebView. I have considered a solution to release the CSS modification under GPL and have my app download them at runtime and inject to the WebView (other question), but I'm not sure if that's ok legally, so I'm asking a more general question if CSS is derivative or just data.
  • I think this is an interesting question, but you're making a false dichotomy here - "derivative work" and "data" are not mutually exclusive, data can still copyrighted and therefore have derivative works made from it. Jul 29, 2021 at 11:34
  • I updated the title. What I mean by data here is whether the code is directly interacting or is it more like code as data. I.e. in a compiler, the source code that gets compiled and the output binary do not interact directly with compiler code, it's just data. Should the injected CSS code be treated as something that is tightly interconnected with the GPL app, or is it just some data that is being injected, that could be injected into any other app, any other website... Jul 29, 2021 at 13:51
  • Another way to look at is, is to consider how it looks like if I used JavaScript to add inline styles to some HTML elements in the WebView. This is clearly not a derivative work, because the injected JavaScript code does not interact with JavaScript code in the WebView, it only uses the APIs that the browser engine provides to make data changes to the html document, so the html document is just "data". Would injecting a CSS stylesheet differ much from injecting inline styles, the browser already kinda does the same under the hood when it calculates styles. Jul 30, 2021 at 6:42


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.