Skip to content

Instantly share code, notes, and snippets.

@marek-saji
Created January 21, 2013 17:08
Show Gist options
  • Save marek-saji/4587513 to your computer and use it in GitHub Desktop.
Save marek-saji/4587513 to your computer and use it in GitHub Desktop.
Using :not as @supports.
/**
* Using :not as @supports.
*/
article
{
background-color: #7e7;
font-family: Droid Sans, Helvetica, Arial, sans;
}
article ul
{
border: black solid thin;
margin: 1em 1.5em;
list-style: none;
}
/* middle elements */
article ul:not(:first-child):not(:last-child)
{
border-width: 0 thin;
margin-top: 0;
margin-bottom: 0;
}
/* first element */
article ul:first-child:not(:last-child)
{
border-width: thin thin 0 thin;
margin-bottom: 0;
}
/* last element */
article ul:not(:first-child):last-child
{
border-width: 0 thin thin thin;
margin-top: 0;
}
<article>
<ul>
<li>A
<li>B
</ul>
<ul>
<li>A
<li>B
</ul>
<ul>
<li>A
<li>B
</ul>
</article>
<article>
<ul>
<li>A
<li>B
</ul>
<ul>
<li>A
<li>B
</ul>
</article>
<article>
<ul>
<li>A
<li>B
</ul>
</article>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment