milk1000cc / docomo_css
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Branch:
master
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Thu Jun 11 00:20:06 -0700 2009 | |
| |
MIT-LICENSE | Wed Jul 09 20:28:05 -0700 2008 | |
| |
README.rdoc | Thu Jun 11 00:20:06 -0700 2009 | |
| |
Rakefile | Thu Jun 11 00:20:06 -0700 2009 | |
| |
VERSION | Wed Jun 10 23:27:53 -0700 2009 | |
| |
docomo_css.gemspec | Thu Jun 11 00:31:41 -0700 2009 | |
| |
init.rb | Wed Jun 10 23:46:52 -0700 2009 | |
| |
install.rb | Wed Jul 09 20:28:05 -0700 2008 | |
| |
lib/ | Thu Jun 11 00:24:37 -0700 2009 | |
| |
rails/ | Wed Jun 10 23:46:52 -0700 2009 | |
| |
test/ | Thu Jun 11 00:07:19 -0700 2009 | |
| |
uninstall.rb | Wed Jul 09 20:28:05 -0700 2008 |
README.rdoc
DocomoCss
docomo_css is a CSS in-liner.
Most handsets for the Japanese cell-phone carrier DoCoMo cannot use external style sheets, such as
<link rel="stylesheet" /> style css, only can use in-line CSS.
Instead, every element must use its own style attribute, for example
<div style="font-size:x-small">
docomo_css works around this by inlining all CSS automatically for you.
Install
sudo gem install milk1000cc-docomo_css --source=http://gems.github.com
Usage
# app/controllers/articles_controller.rb
class ArticlesController < ApplicationController
docomo_filter # please add this
...
end
# app/views/articles/index.html.erb
<html>
<head>
<%= stylesheet_link_tag 'foo', :media => 'handheld, tty' %>
</head>
<body>
<div class="title">bar</div>
</body>
</html>
# public/stylesheets/foo.css
.title {
color: red;
}
# result
<html>
<head>
<%= stylesheet_link_tag 'foo', :media => 'handheld, tty' %>
</head>
<body>
<div class="title" style="color:red">bar</div>
</body>
</html>
Author
Copyright © 2008 milk1000cc, released under the MIT license
milk1000cc <info@milk1000.cc>
Gem and refactorings by Paul McMahon <paul@mobalean.com>
