Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcarbaugh/garberize
CSS + HTML = HTML with inlined CSS
https://github.com/jcarbaugh/garberize
Last synced: 22 days ago
JSON representation
CSS + HTML = HTML with inlined CSS
- Host: GitHub
- URL: https://github.com/jcarbaugh/garberize
- Owner: jcarbaugh
- License: bsd-3-clause
- Created: 2012-04-12T02:59:31.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-04-12T03:05:07.000Z (over 12 years ago)
- Last Synced: 2024-12-01T09:12:46.742Z (25 days ago)
- Language: Python
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# garberize
When a CSS file and an HTML (or markdown) file fall in love and get married, they make an HTML file with inlined CSS.
*This is a prototype; very much an experiment.* I don't know what the final form of this will take, but it appears that it will be useful for some projects.
## Run it
$ garberize -c thestyle.css content.md > inlined.html
## Excuse it
Some thing garberize will not do:
* care about selector precedence, top to bottom is how we roll
* fancy stuff## Example
content.md:
# An important headline
We've got a smattering of stuff.
## The first thing
### Has a subheading**Lorem ipsum dolor sit amet, consectetur adipisicing elit,** sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.style.css:
h1, h2, h3, h4, h5 { font-family: sans-serif; }
h2 { color: #D64; }
h3 { color: #F96; }
p { line-height: 140%; }begat inlined.html:
This Week in Sunlight
We've got a smattering of mentions.
Transparency Connect
Putting you in touch with Congress
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.