Embed SVG documents in your Rails views and style them with CSS
13-Feb-2020 1777
Styling a SVG document with CSS for use on the web is most reliably achieved by adding classes to the document and embedding it inline in the HTML.This gem adds Rails helper methods (inline_svg_tag and inline_svg_pack_tag) that read an SVG document (via Sprockets or Webpacker, so works with the Rails Asset Pipeline), applies a CSS class attribute to the root of the document and then embeds it into a view.
Embed SVG documents in your Rails views and style them with CSS #ruby #rubydeveloper #rubyonrails #Embed #documents #Rails #views #style #css https://rubyonrails.ba/link/embed-svg-documents-in-your-rails-views-and-style-them-with-css