Categories
Snippets

Compile SASS to style.css

Compile SASS to style.css (considering you already have installed compass I think)

sass --watch style.scss:../style.css
Categories
Snippets

Disabling a Link With CSS

.unlink {
pointer-events: none;
cursor: default;
}

Categories
Snippets

Turn Images to Grayscale with CSS

img {
-webkit-filter: grayscale(100%);
filter: grayscale(100%);
filter: gray;
filter: url(“data:image/svg+xml;utf8,<svg version=‘1.1’ xmlns=’http://www.w3.org/2000/svg’ height=’0’><filter id=’greyscale’><feColorMatrix type=’matrix’ values=’0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0’ /></filter></svg>#greyscale”);
}

Categories
Snippets

Fixed Positioning for some/old ANDROID Devices

-webkit-backface-visibility: hidden;

Categories
Snippets

Placeholder Mixin for CHILD Elements in SASS

@mixin placeholder {
  &::-webkit-input-placeholder {@content}
  &:-moz-placeholder {@content}
  &::-moz-placeholder {@content}
  &:-ms-input-placeholder {@content}
}

Use it like

@include placeholder { color: white }

Categories
Snippets

Hiding Empty Elements with CSS

.slide_content:empty { display: none; }
Categories
Snippets

Background Image Overflowing its Own Div

#box { background: url(zzz.jpeg); padding-left: 10px; margin-left: -10px; }

Categories
Snippets

Remove iOS text resizing

p { -webkit-text-size-adjust: none; }

Categories
Snippets

Removing iOS styling of buttons

.button { -webkit-appearance: none; }

Categories
Snippets

Absolute horizontal and vertical centering

.Absolute-Center {
margin: auto;
position: absolute;
top: 0; left: 0; bottom: 0; right: 0;}

Absolute horizontal and vertical centering

Design a site like this with WordPress.com
Get started