I'm trying to get Blueprint (SCSS-Syntax) working with my Rails (3.1) project. To keep it simple at first I set up a plain HTML file (outside my rails project) with some basic blueprint syntax, after installing compass and creating the basic scss files with:
compass install blueprint .
It produces a sass directory with a screen.scss that contains:
@import blueprint
among other stuff, but the stylesheets/screen.css doesn't contain span-x instructions, as I was expecting after watching Compass: A Real Stylesheet Framework by Chris Eppstein (http://vimeo.com/4335944) and most importantly my HTML is looking dull as ever.
<html>
<head>
<link href="stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css" />
<link href="stylesheets/print.css" media="print" rel="stylesheet" type="text/css" />
<!--[if lt IE 8]>
<link href="/stylesheets/ie.css" media="screen, projection" rel="stylesheet" type="text/css" />
<![endif]-->
</head>
<body>
<div class="container">
<div class="span-24">
<center>
<h1 class="alt box">asdfhlakshf sdfgs dgf sdf sdfg fsd g</h1>
</center>
</div>
<div class="pre">
asdfhlakshf
</div>
<div class="span-4 success colborder">
WOW
</div>
</div>
</body>
</html>
My screen.css looks like this (small excerpt):
/* line 44, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_form.scss */
form.bp input.text, form.bp input.title, form.bp input[type=email], form.bp input[type=text], form.bp input[type=password] {
width: 300px;
}
/* line 46, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_form.scss */
form.bp textarea {
width: 390px;
height: 250px;
}
/* line 39, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss */
form.bp .box {
padding: 1.5em;
margin-bottom: 1.5em;
background: #e5ecf9;
}
/* line 42, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss */
form.bp .border {
padding-right: 4px;
margin-right: 5px;
border-right: 1px solid #dddddd;
}
/* line 45, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss */
form.bp .colborder {
padding-right: 24px;
margin-right: 25px;
border-right: 1px solid #dddddd;
}
/* line 47, ../../../../../Library/Ruby/Gems/1.8/gems/compass-0.11.5/frameworks/blueprint/stylesheets/blueprint/_scaffolding.scss */
form.bp hr {
background: #dddddd;
color: #dddddd;
clear: both;
float: none;
width: 100%;
height: 0.1em;
margin: 0 0 1.45em;
border: none;
}
Calling
compass compile
Just tells me everything stays unchanged. But it does something once I add
@import "blueprint/grid"
for example. Still no pretty html though.
The second I copy a precompiled screen.css (downloaded from the blueprint website) to the stylesheets folder everything works like a charm. It's the same inside of my rails project. I can use the precompiled css there without problems.
I guess I'm missing something basic here I need to do for the compass compiling magic to work, but I can't figure out what it is.
Thanks in advance for any ideas!
Versions
- compass 0.11.5 (Antares)
- ruby 1.8.7 (outside of the rails project)
- ruby 1.9.2 (with the rails project)
- using rvm 1.6.21
Installed haml 3.1.2 and sass 3.1.4. Though I think that this should not be relevant since I used html and scss, right?
Maybe I should have included more of my screen.scss:
// This import applies a global reset to any page that imports this stylesheet.
@import "blueprint/reset";
// To configure blueprint, edit the partials/base.sass file.
@import "partials/base";
@import "blueprint/grid";
// Import all the default blueprint modules so that we can access their mixins.
@import "blueprint";
// Import the non-default scaffolding module.
@import "blueprint/scaffolding";
// To generate css equivalent to the blueprint css but with your
// configuration applied, uncomment:
// @include blueprint
// If you are doing a lot of stylesheet concatenation, it is suggested
// that you scope your blueprint styles, so that you can better control
// what pages use blueprint when stylesheets are concatenated together.
body.bp {
@include blueprint-typography(true);
@include blueprint-utilities;
@include blueprint-debug;
@include blueprint-interaction;
// Remove the scaffolding when you're ready to start doing visual design.
// Or leave it in if you're happy with how blueprint looks out-of-the-box
}
form.bp {
@include blueprint-form;
// You'll probably want to remove the scaffolding once you start styling your site.
@include blueprint-scaffolding; }
// Page layout can be done using mixins applied to your semantic classes and IDs:
body.two-col {
#container {
@include container; }
#header, #footer {
@include column($blueprint-grid-columns); }
#sidebar {
// One third of the grid columns, rounding down. With 24 cols, this is 8.
$sidebar-columns: floor($blueprint-grid-columns / 3);
@include column($sidebar-columns); }
#content {
// Two thirds of the grid columns, rounding up.
// With 24 cols, this is 16.
$content-columns: ceil(2 * $blueprint-grid-columns / 3);
// true means it's the last column in the row
@include column($content-columns, true); } }
I also tried changing my ruby version and renaming the sass folder to scss. I'm running out of ideas here...