Permalink
Cannot retrieve contributors at this time
Fetching contributors…

<!doctype html> | |
<!--[if lt IE 9]> <html class="no-js oldie" lang="en"> <![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Current Color in CSS | Divya Manian</title> | |
<meta name="author" content="Divya Manian"> | |
<meta name="description" content="In the interest of documenting useless trivia about CSS3, here is something that I re-discovered thanks to nlogax: currentcolor (example). Borders …"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="canonical" href="http://nimbupani.github.com/current-color-in-css.html"> | |
<link href="/stylesheets/screen.css" rel="stylesheet"> | |
<link href="http://feeds.feedburner.com/nimbupani" rel="alternate" title="Subscribe" type="application/atom+xml"> | |
<link href="http://feeds.feedburner.com/nimbu" rel="alternate" title="Subscribe to Web Development updates" type="application/atom+xml"> | |
</head> | |
<body > | |
<div class="container"> | |
<div class="content"> | |
<header role="banner"> <h1><a href="/">Divya Manian</a></h1> | |
<h2><a class="twitter" href="https://twitter.com/divya">twitter</a> <a class="rss" href="http://feeds.feedburner.com/nimbupani">RSS Feed</a> <a class="youtube" href="http://youtube.com/nimbupani">Youtube Channel</a> <a class="github" href="https://github.com/nimbupani">Github</a></h2> | |
</header> | |
<nav class="sitenav"><a href="/">Home</a> | |
<a href="/archives">Archives</a> | |
<a href="/about.html">About</a> | |
</nav> | |
<article> | |
<nav class="article"> | |
<a class="previous" href="/book-reviews-for-december-2010.html" title="Book Reviews for December 2010">❬</a> | |
<a class="next" href="/web-opener-at-opera.html" title="Web Opener at Opera">❭</a> | |
</nav> | |
<header> | |
<time datetime="2011-01-27T00:00:00+05:30" pubdate><span class='month'>Jan</span> <span class='day'>27</span> <span class='year'>2011</span></time> | |
<h1 class="entry-title"><a href="/current-color-in-css.html">Current Color in CSS</a></h1> | |
</header> | |
<div class="entry-content"><p>In the interest of documenting useless trivia about CSS3, here is something that I re-discovered thanks to <a href="http://twitter.com/ultror">nlogax</a>: <code>currentcolor</code> (<a href="http://jsfiddle.net/2ysAr/show/">example</a>).</p> | |
<p>Borders always render with the current color when a border color is not specified, but, till recently, there was no equivalent term for that use – now we do: <code>currentcolor</code>.</p> | |
<p>In CSS3, you can use this value to <a href="http://www.w3.org/TR/css3-color/#currentcolor">indicate you want to use the value of color for other properties</a> that accept a color value: borders, box shadows, outlines, or backgrounds.</p> | |
<p></p> | |
<p>This value was <a href="http://www.opera.com/docs/specs/presto23/#css">first supported by Opera in 2009</a>, since then, Firefox 3.5+, Chrome 1+, and Safari 4+. IE 9 yet does not support this though.</p> | |
<p>Now to find some practical use for this!</p> | |
</div> | |
<footer> | |
<p class="meta">This post was posted by | |
<a href="/about.html">Divya Manian</a> | |
on | |
<time datetime="2011-01-27T00:00:00+05:30" pubdate><span class='month'>Jan</span> <span class='day'>27</span> <span class='year'>2011</span></time> in | |
<span class="categories"> | |
<a class='category' href='/categories/web-development/'>Web Development</a> | |
</span> | |
. If you would like to update this post, <a href="https://github.com/nimbupani/nimbupani.github.com/blob/source/source/_posts/2011-01-27-current-color-in-css.md">please send a pull request</a>. | |
</p> | |
</footer> | |
</article> | |
<section> | |
<h1>Comments</h1> | |
<div id="disqus_thread" aria-live="polite"><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> | |
</div> | |
</section> | |
</div> | |
</div> | |
<aside id="articles"> | |
<p><img class="avatar" src="http://a2.twimg.com/profile_images/1696865113/me_normal" height=48> <a href="http://twitter.com/divya">Divya Manian</a> lives in SF. <a href="/about.html">More about me ❭</a></p> | |
<h2>Posts on Web Development</h2> | |
<ul><li><a href="/diversity-in-conferences.html">Diversity in Conferences</a></li><li><a href="/using-decimal-percentage-values-in-responsive-design.html">Using decimal percentage values in responsive design</a></li><li><a href="/using-background-clip-for-text-with-css-fallback.html">Using background clip for text with CSS fallback</a></li><li><a href="/markup-free-icon-fonts-with-unicode-range.html">Markup-free icon fonts using unicode-range</a></li><li><a href="/jscamp-css-next.html">JSCamp: CSS Next</a></li><li><a href="/some-updates.html">Some Updates</a></li><li><a href="/css-object-model.html">CSS Object Model</a></li><li><a href="/fake-bolding-of-web-fonts.html">Fake Bolding of Web Fonts</a></li><li><a href="/html5please-api.html">Html5please API</a></li><li><a href="/html5please.html">html5please</a></li><li><a href="/mustache.html">mustache, hogan, handlebars</a></li><li><a href="/redesign-notes.html">Redesign Notes</a></li><li><a href="/summary-of-various-exciting-css-drafts-and-proposals.html">Summary of various exciting CSS drafts and proposals</a></li><li><a href="/this-revolution-needs-new-revolutionaries.html">This revolution needs new revolutionaries</a></li><li><a href="/some-css-transition-hacks.html">Some CSS Transition hacks</a></li><li><a href="/safe-css-defaults.html">Safe CSS Defaults</a></li><li><a href="/unplugged-2011.html">Unplugged 2011</a></li><li><a href="/bokeh-with-css3-gradients.html">Bokeh with CSS3 Gradients</a></li><li><a href="/making-pure-css3-demos-better.html">Making "Pure CSS3" demos better</a></li><li><a href="/web-opener-at-opera.html">Web Opener at Opera</a></li><li><a class="btn" href="/categories/web-development/">More</a></li></ul> | |
</aside> | |
<footer role="contentinfo"><p> | |
Copy to your heart’s content 2013 - Divya Manian - | |
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span> | |
</p> | |
</footer> | |
<script type="text/javascript"> | |
var disqus_shortname = 'nimbublog'; | |
var disqus_developer = 1; | |
var disqus_url = 'http://nimbupani.com/current-color-in-css.html'; | |
var disqus_identifier = 'http://nimbupani.com/current-color-in-css.html'; | |
(function () { | |
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; | |
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; | |
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); | |
}()); | |
</script> | |
<script src="/javascripts/octopress.js"></script> | |
<script> | |
var _gaq=[['_setAccount','UA-97188-1'],['_trackPageview']]; | |
(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; | |
g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g,s)}(document,'script')); | |
</script> | |
</body> | |
</html> |