Sha256: 35e5c5dea3d5cbb29bb576100fe11bf5785b20183e3f76fe9b3b716e9d253149
Contents?: true
Size: 470 Bytes
Versions: 4
Compression:
Stored size: 470 Bytes
Contents
require File.join(File.dirname(__FILE__), '..', '..', 'lib', 'rack-plastic') # This middleware demonstrates how to add inline CSS styles to the web page. # module Rack class Stylizer < Plastic def change_nokogiri_doc(doc) doc.at_css("body")["style"] = "font-family: Georgia, serif; font-style: italic;" doc.at_css("div#container")["style"] = "margin-left:auto;margin-right:auto;width:500px;position:relative" doc end end end
Version data entries
4 entries across 4 versions & 1 rubygems