Open jwigal opened 3 years ago
2 Warnings | |
---|---|
:warning: | There’re library changes, but not tests. That’s OK as long as you’re refactoring existing code. |
:warning: | Unless you’re refactoring existing code, please update CHANGELOG.md. |
Here's an example of a CHANGELOG.md entry:
* [#103](https://github.com/ruby-grape/grape-swagger-rails/pull/103): Customizing the css - [@jwigal](https://github.com/jwigal).
Generated by :no_entry_sign: danger
I have some questions.
Why would you rather do this than include the additional stylesheet in your app/assets/stylesheets/application.css
?
Assuming we still want this feature, I think we should make it more generic and allow overriding all CSS, i.e. default it to the built-in CSS. I propose that we name this stylesheet_paths
and make it an Array
.
GrapeSwaggerRails.options.stylesheet_paths << 'some.css' # [ 'grape_swagger_rails/application.css', 'some.css' ]
Then
<% GrapeSwaggerRails.options.stylesheet_paths.each do |stylesheet_path| %>
<%= stylesheet_link_tag stylesheet_path %>
<% end %>
To be merged this needs tests, too, please.
If you really want to be ambitious, users should also be able to configure script_paths
, i.e. all the JS.
Provide an easy way to add your own CSS file on top of the delivered CSS.