Skip to content

Instantly share code, notes, and snippets.

@agibsonsw
Created February 13, 2012 16:49
Show Gist options
  • Save agibsonsw/1818115 to your computer and use it in GitHub Desktop.
Save agibsonsw/1818115 to your computer and use it in GitHub Desktop.
CSS borderColor
<snippet>
<content><![CDATA[border-color: ${1/\\|colour|(az)|(aq)|(be)|(bla)|(br)|(bl)|(ch)|(cy)|(fu)|(go)|(gre)|(gr)|(li)|(mag)|(ma)|(na)|(or)|(ol)|(pl)|(pu)|(pi)|(si)|(te)|(tr)|(vi)|(wh)|(ye)|(re|r)/?1:azure:?2:aqua:?3:beige:?4:black:?5:brown:?6:blue:?7:chocolate:?8:cyan:?9:fuchsia:?10:gold:?11:green:?12:gray:?13:lime:?14:magenta:?15:maroon:?16:navy:?17:orange:?18:olive:?19:plum:?20:purple:?21:pink:?22:silver:?23:teal:?24:transparent:?25:violet:?26:white:?27:yellow:?28:red/g};$0${3:/* ${1:colour } */}
]]></content>
<tabTrigger>borderColor (test)</tabTrigger>
<scope>source.css meta.property-list.css</scope>
<description>ma for maroon, use spaces</description>
</snippet>
@agibsonsw
Copy link
Author

This Sublime Text snippet is kinda cool! For border-color you can type between 1 and 4 colour (names or values) separated by spaces. But if you type br anywhere it becomes brown, and bl becomes blue, etc. Use CAPITALS within #NNNNNN, otherwise 'be' will become beige!

You can then TAB and delete the comment. However, you will still be in a field - so either press TAB again, or Escape to cancel the fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment