Skip to content

Instantly share code, notes, and snippets.

@geoffreycrofte
Created June 1, 2012 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoffreycrofte/2852388 to your computer and use it in GitHub Desktop.
Save geoffreycrofte/2852388 to your computer and use it in GitHub Desktop.
Only first letter in uppercase
/*
* Only first letter in uppercase
*/
/* all in lowercase */
.transform li {
text-transform: lowercase;
}
/* first-letter in uppercase */
.transform li:first-letter {
text-transform: uppercase;
}
/* not important */
body {
font-family: helvetica, arial, sans-serif;
color: #555;
}
h1 { font-size: 1.2em; }
div {
display: inline-block;
width: 300px;
}
<div>
<h1>Without <code>text-transform</code></h1>
<ul>
<li>Plop</li>
<li>FOO</li>
<li>bar</li>
</ul>
</div>
<div>
<h1>With <code>text-transform</code></h1>
<ul class="transform">
<li>Plop</li>
<li>FOO</li>
<li>bar</li>
</ul>
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment