Question

I am using bourbon neat for thee first time. what I am trying to do is to set max-width property of neat in _grid.css Now I am trying to do it in PX say 700px but by default its $max-width: em(1000) !default; I tried giving it in PX but it doesn't work. can someone please tell mee where i am doing it wrong? thanks.

Was it helpful?

Solution

$max-width: em(1000) is using a mixin defined in Bourbon that allows you to set a value in pixels and the mixin will convert it to ems. so the example $max-width: em(1000) is equal to $max-width: 1000px

Just go ahead and change that number to the value you want in pixels and let the mixin do the ems math for you.

Hope that helps

OTHER TIPS

I see. I should've been a little more specific.

I'm referring to a different file. So if you've fully installed bitters, you should have a folder in your stylesheet directory named bitters.

You want to find the file stylesheets/bitters/_bitters.scss

Open that file and it should look like this:

// Neat Settings -- uncomment if using Neat
///////////////////////////////////////////////////////////////////////////////
// @import "neat-helpers"; // or "neat/neat-helpers" when not in Rails
// @import "grid-settings";


// Bitters
///////////////////////////////////////////////////////////////////////////////
@import "variables";
@import "extends/base";
@import "mixins/base";
@import "typography";
@import "forms";
@import "tables";
@import "lists";
@import "flashes";

You see the @import "grid-settings"; is currently commented out. You'll want to uncomment that.

Then, open that exact file: stylesheets/bitters/_grid-settings.scss

And from that file you can now manipulate the $max-width variable.

I hope that helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top