Created
June 1, 2012 14:04
-
-
Save geoffreycrofte/2852388 to your computer and use it in GitHub Desktop.
Only first letter in uppercase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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