Useful command using ol' plain terminal
Position the cursor in your terminal
alt + [cursor]
pbcopy & pbpaste
$ echo 'Hello World' | pbcopy
.clamp { | |
overflow: hidden; | |
} | |
.clamp.is-active { | |
position: relative; | |
height: 7em; | |
} | |
.clamp.is-active:after { | |
content: ""; | |
text-align: right; |
Useful command using ol' plain terminal
Position the cursor in your terminal
alt + [cursor]
pbcopy & pbpaste
$ echo 'Hello World' | pbcopy
We all know when project/s gets really big, CSS problems will pop out and will take a lot of your time troubleshooting rather than finishing your tasks. Here are some problems:
#override-sale .checkout-dog .full-width .button-primary
is real. Specificity makes the style hard to refactor and introduce unnecessary performance overhead for applying stylesThis is a simple guidelines that I'm implementing when doing CSS. Adapted from the work being done in the SUIT CSS framework and @fat's guideline. Which is to say, it relies on structured class names and meaningful hyphens (i.e., not using hyphens merely to separate words). This is to help developers to quickly understand the code even at glance.
source 'https://rubygems.org' | |
gem 'bundler', '>= 1.8.4' | |
gem 'hpricot' | |
gem 'premailer-rails' | |
# Add devise (Dependent on bycrypt for has_secure_password) | |
gem 'devise' | |
# Lest worry on browser support and just write styles | |
gem "autoprefixer-rails" | |
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' |
Simple answer/s to every question you search |
// Third-party libraries | |
@import "foundation-sites/vendor/normalize"; | |
// Sass utilities | |
@import "foundation-sites/util/util"; | |
// Global variables and styles -- Add a global file `app/assets/stylesheets` | |
@import "global"; | |
// Components | |
@import "foundation-sites/grid/grid"; |
// Third-party libraries | |
@import "foundation-sites/vendor/normalize"; | |
// Sass utilities | |
@import "foundation-sites/util/util"; | |
// Global variables and styles -- Add a global file `app/assets/stylesheets` | |
@import "global"; | |
// Components | |
@import "foundation-sites/grid/grid"; |
$columns-phone: 4; | |
$columns-tablet: 8; | |
$columns-desktop: 12; | |
$columns-default: 4; | |
$gutter-phone: 16px; | |
$gutter-tablet: 16px; | |
$gutter-desktop: 16px; |
def user_params | |
other_phones = params.require(:user).fetch(:other_phones, nil).try(:permit!) | |
params[:user].delete(:other_phones) | |
params.require(:user). | |
permit(:email, :password, :password_confirmation, ...). | |
merge(other_phones: other_phones) | |
end |
.textfield { | |
@include font-sans-N3; | |
box-sizing: border-box; | |
margin-bottom: $form-space; | |
min-height: 44px; | |
padding: 11px 10px 11px 13px; | |
font-size: $base-font-size; | |
background-color: $color-white; | |
border: 1px solid $color-gray; | |
border-radius: $base-border-radius; |