Consider the following markup:
<form class="root" state:theme=dark state:compact>
<div class="input-area">
<label for="username" class="label">Username:</label>
<input id="username" class="input" type="text">
</div>
from lib.settings import defaultFontInfoAttributes | |
defaultFontInfoAttributes["descender"] = -200 | |
defaultFontInfoAttributes["ascender"] = 800 |
{ | |
"phone" : "all and (max-width: 603px)", | |
"desktop": "all and (min-width: 1025px)", | |
"tablet" : "all and (min-width: 604px) and (max-width: 1024px)" | |
} |
<!doctype html> | |
<meta charset="utf-8"> | |
<title>Example</title> | |
<style> | |
div { | |
width: 100px; | |
height: 100px; | |
background: black; | |
animation-duration: .5s; |
# coding: utf-8 | |
import os | |
import vanilla | |
import mojo.canvas | |
from mojo.UI import PutFile | |
from random import random | |
from mojo.drawingTools import * | |
import drawBot | |
from AppKit import NSTimer |
from AppKit import * | |
from lib.tools.misc import randomColor | |
# get the application icon image | |
icon = NSApp().applicationIconImage() | |
# get the size | |
w, h = icon.size() | |
# make a rect with the size of the image | |
imageRect = NSMakeRect(0, 0, w, h) | |
# create a new image with the same size |
$ compass compile --environment production && compass compile
Afterwards you will have both the minified and non-minified versions in your output folder. Note that compass clean
will not clean up your minified files.
mymodule { | |
@at-root { | |
.#{&}-header { ... } | |
.#{&}-footer { ... } | |
.#{&}-body { | |
a { ... } | |
span { ... } | |
p { ... } | |
} | |
} |
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
You can test with the iOS Simulator that comes with Xcode. Navigate to the Xcode app in the Finder, right click and select "Show Package Contents":
Then navigate to Contents > Applications, and open the shortcut to "iPhone Simulator" (it may be called "iOS Simulator" depending on which version of Xcode you're running):