#Rails
####Generate a controller and action
rails generate controller <controller name> <action>
####Change layout for entire Controller
class ProductsController < ApplicationController
layout "inventory"
// Style file-upload for webkit-based browsers | |
@media screen and (-webkit-min-device-pixel-ratio:0) { | |
input[type="file"] { | |
background: #fff; | |
border: 1px solid $tan; | |
@include border-radius(0 2px 2px 0); | |
@include box-sizing(border-box); | |
color: #666; | |
font-size: 14px; | |
height: 32px; |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE syntax SYSTEM "syntax.dtd"> | |
<syntax> | |
<head> | |
<name>Sass</name> | |
<!-- The definitions title --> | |
<charsintokens>_0987654321abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-@$</charsintokens> | |
<charsincompletion>_0987654321abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-@$</charsincompletion> | |
</head> |
//************************************************************************// | |
// Progress Bar on saucy.accounts-edit | |
//************************************************************************// | |
div.limit.meter { | |
float: left; | |
margin: 10px 40px 20px 0; | |
text-align: center; | |
width: 240px; | |
span.numbers { |
<!-- HTML --> | |
<div class="modal-dialog-background"> | |
<div class="modal-dialog"> | |
<h1>Submit</h1> | |
<div class="inner-wrapper"> | |
<p>Press submit to record your answers.</p> | |
</div> | |
<div class="buttons"> | |
<button type="button" class="cancel">Cancel</button> | |
<button type="button" class="submit">Submit</button> |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
{block:Description}<meta name="description" content="{MetaDescription}">{/block:Description} | |
<link rel="alternate" type="application/rss+xml" title="RSS" href="{RSS}"> | |
</head> | |
<body> |
/* CSS Photo Album */ | |
/* Rebound of this shot by @daryl: http://drbl.in/fwwM */ | |
* { | |
margin: 0; | |
padding: 0; | |
position: relative; | |
box-sizing: border-box; | |
} |
Sass Mixin for typekit variation-specific font-family names | |
Typekit IE6-8 Support (http://help.typekit.com/customer/portal/articles/6855-Using-multiple-weights-and-styles) | |
$lucida-grande: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif; | |
$georgia: Georgia, Cambria, "Times New Roman", Times, serif; | |
// Must include fallbacks for EACH typekit font — set them each as variables | |
//************************************************************************// | |
$typekit-fonts: "source-sans-pro", "ff-tisa-web-pro"; // index [1, 2] |
#Rails
####Generate a controller and action
rails generate controller <controller name> <action>
####Change layout for entire Controller
class ProductsController < ApplicationController
layout "inventory"
@mixin my-linear-gradient($color1, $color2) { | |
filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#{$color1}', endColorstr='#{$color1}'); | |
@include linear-gradient($color1, $color2); // Bourbon.io linear-gradient | |
} | |
// Usage | |
@include my-linear-gradient(red, orange); |
// Fadein | |
//************************************************************************// | |
%animation-fadein { | |
@include animation(fadein 0.1s); | |
} | |
@mixin fadein { | |
0% { | |
opacity: 0; | |
} | |
100% { |