Created
October 4, 2008 06:46
-
-
Save avit/14729 to your computer and use it in GitHub Desktop.
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
/* rules generated by blueprint typography mixin: */ | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
color: #333333; | |
font-size: 75%; | |
background: #f9f9ee; | |
height: 100%; } | |
body h1 { | |
font-weight: normal; | |
color: #222222; | |
font-size: 3em; | |
line-height: 1; | |
margin-bottom: 0.5em; } | |
body h1 img { | |
margin: 0; } | |
body h2 { | |
font-weight: normal; | |
color: #222222; | |
font-size: 2em; | |
margin-bottom: 0.75em; } | |
/* | |
* overriding the above rules requires needless scoping | |
* since everything is under "body" | |
* | |
* this will not work, the above rules are too specific: | |
*/ | |
h1 { font-weight: bold } |
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
// currently: | |
@import blueprint/screen.sass | |
body | |
+blueprint-typography | |
// suggestion 1, using proposed sass top-level mixins: | |
@import blueprint/screen.sass | |
+blueprint-typography | |
// suggestion 2, refactoring blueprint files: | |
@import blueprint/screen.sass | |
@import blueprint/base/typography.sass | |
// (screen.sass could include these base files by default) |
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
// proposed for suggestion 2: no mixin for baseline rules | |
body | |
+normal-text | |
:font-size 75% | |
h1 | |
+header-text | |
:font-size 3em | |
:line-height 1 | |
:margin-bottom 0.5em | |
img | |
:margin 0 | |
h2 | |
+header-text | |
:font-size 2em | |
:margin-bottom 0.75em | |
h3 | |
+header-text | |
:font-size 1.5em | |
:line-height 1 | |
:margin-bottom 1em |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment