Created
November 30, 2011 21:49
-
-
Save bububa/1411096 to your computer and use it in GitHub Desktop.
CSS paragraph
This file contains hidden or 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
p + p { | |
text-indent: 1.5em /* I like to keep the indentation length equal to the line height. */ | |
} | |
h1 + p:first-letter { | |
font-size: 2em; | |
line-height: 0; /* The line-height must be adjusted to compensate for the increased font size, otherwise the leading for the overall line is disrupted. I find that any values below 0.4 work. */ | |
} | |
p { | |
font-size:; /* Silence is golden; implicity 1em. */ | |
line-height: 1.5; | |
} | |
@font-face { | |
font-family: 'MyWebfont'; /* Change this to whatever you like. */ | |
src: url('mywebfont-regular.ttf') format('truetype'); /* The "regular" font resource. */ | |
font-style: normal; /* Associates values of "normal" with this resource. */ | |
font-weight: normal; /* As above for weight. */ | |
} | |
@font-face { | |
font-family: 'MyWebfont'; /* Importantly, the same as in the above block; the family name. */ | |
src: url('mywebfont-italic.ttf') format('truetype'); | |
font-style: italic; /* Associates values of "italic" with this resource. */ | |
font-weight: normal; /* ... It's not a bold-italic font style. */ | |
} | |
body { | |
font-family:'MyWebfont', georgia, serif; /* Provides a system font fallback. */ | |
} | |
em { | |
font-style: italic; /* If @font-face is supported, the italic Web font is used. If not, the italic Georgia style is lifted from the user's computer. Either way, a faux style is not allowed to creep in. */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment