This repository has been archived by the owner on Jul 14, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- More on the syntax here http://bit.ly/1qk2tVR - Closes #196
- Loading branch information
Reda Lemeden
committed
Jul 18, 2014
1 parent
ced0c2e
commit 8e8b695
Showing
6 changed files
with
28 additions
and
8 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@if $border-box-sizing == true { | ||
html { // http://bit.ly/1qk2tVR | ||
@include box-sizing(border-box); | ||
} | ||
|
||
* { | ||
&, &:before, &:after { | ||
@include box-sizing(inherit); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
describe "By default" do | ||
before(:all) do | ||
ParserSupport.parse_file("default") | ||
end | ||
|
||
it "sets sizing on the html element to 'border-box'" do | ||
expect('html').to have_rule('box-sizing: border-box') | ||
end | ||
|
||
it "sets sizing on the global selector to 'inherit'" do | ||
expect('*:after').to have_rule('box-sizing: inherit') | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
$border-box-sizing: false; | ||
|
||
@import 'bourbon/bourbon'; | ||
@import 'app/assets/stylesheets/neat'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import 'setup'; |
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to @include box-sizing(border-box); on *, *:before, *:after to overwrite this, because I use this in my project:
content {
max-width: 1020px;
margin: 0 auto;
padding: 0 3.125%;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
Every % calculated div inside of my #content section collapsed.
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Freekbron Please use the setting provided to turn this behavior off http://thoughtbot.github.io/neat-docs/latest/#border-box-sizing
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kaishin Thanks, much cleaner this way!
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't do anything for me. Any thoughts?
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Freekbron You'll want to do it the other way around (
$border-box-sizing: false; @import "neat";
) since it's already adding the code before you set it tofalse
8e8b695
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@joshuaogle Sweet!