This gem is designed to provide CSS views to Rails, and a process to concatenate and minify these files to one file for production.
Sometimes files attain executable-flags that they do not need, e.g. when your Windows VM copies them over a Samba share onto your machine.
From inside your Rails project directory call regularly:
chmod -x on Ruby, HTML, CSS, image, Rake and similar files.
This script is part of our geordi gem on github.
When you create e.g. a sidebar box that contains headlines and paragraphs, the final paragraph's margin in that box will create an undesired 'bottom padding' inside that box.
Here is a Sass mixin that you can apply to such boxes. It makes the last child's bottom margin disappear:
=hide_last_margin >*:last-child margin-bottom: 0
Use it like this:
.sidebar_box p, table, ul margin-bottom: 1em +hide_last_margin
Does not work in versions of <IE8
Your best bet is to expli...
To parse XML-documents, I recommend the gem nokogiri.
xml = Nokogiri::XML("<list><item>foo</item><item>bar</item></list>")parses an xml string. You can also call
Nokogiri::HTMLto be more liberal about accepting invalid XML.
xml / 'list item'returns all matching nodes;
list itemis used like a CSS selector
xml / './/list/item'also returns all matching nodes, but
.//list/itemis now an XPath selector
Unfortunately, the gem has a few problems:
All these problems are solved for us, in our own lemonade fork. This fork has since been merged to the original gem, maybe we can use t...
Compatibility tables for features in HTML5, CSS3, SVG and other upcoming web technologies
All browsers that support the CSS text-shadow and box-shadow properties also support the new CSS3 RGBa syntax. Which means you can safely combine them today.
Overflow does some cool things you should know about.
A behavior for Internet Explorer allowing it to recognize and render various CSS3 box decoration properties
LiveReload applies CSS/JS changes to Safari or Chrome w/o reloading the page
How do you scale CSS for millions of visitors or thousands of pages? Object Oriented CSS allows you to write fast, maintainable, standards-based front end code. It adds much needed predictability to CSS so that even beginners can participate in writing beautiful websites.
So the next time you find yourself grumbling about declaring the same thing four times, once for each browser, remember that the pain is temporary. It’s a little like a vaccine—the shot hurts now, true, but it’s really not that bad in comparison to the disease it prevents.
Lemonade’s goal as a sprite generator is to be incredible easy to use, so you’ll use ist for every project—just because there’s no overhead. It needs no configuration, no Rake task, no Photoshop, just a little change in your Sass or SCSS files.
Let’s take a gander at four different ways. Each of them handling the illusion in a different way, and each completely appropriate depending on the situation at hand.