Skip to content

Instantly share code, notes, and snippets.

@bfred-it bfred-it/CSS clip.md
Last active Aug 29, 2015

Embed
What would you like to do?
Sublime Text 2/3 snippet for the CSS "clip" property, for easier input
<!-- Source: https://gist.github.com/bfred-it/912ef40bd992ac9a4ea7 -->
<!-- Updated 2014-06-05 -->
<!-- MIT license -->
<snippet>
<content><![CDATA[
clip: rect(
${1:top }px, /*top*/
${6:${4:width}+${2:left }}px, /*width+left*/
${5:${3:height}+${1}}px, /*height+top*/
${2}px /*left*/
);
]]></content>
<tabTrigger>clip</tabTrigger>
<scope>meta.property-list.scss, meta.property-list.css</scope>
</snippet>
<!--
This snippet will help you define the `clip` values in order:
- top
- left
- height
- width
If you're using SASS (or maybe LESS) that's it. Otherwise you will have to do some easy math in place:
- height+top
- width+left
Learn more about the `clip` property: http://tympanus.net/codrops/2013/01/16/understanding-the-css-clip-property/
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.