Permalink
Browse files

Allow users to opt out of the markup-fix for whitespace. Thanks to

  • Loading branch information...
csswizardry committed Mar 18, 2013
1 parent 8d85429 commit 86fcbd463461140254efc16cae6068ef488d3e8a
Showing with 31 additions and 0 deletions.
  1. +1 −0 CHANGELOG.md
  2. +30 −0 csswizardry-grids.scss
View
@@ -14,3 +14,4 @@
* **1.8** Add grid centring class
* **1.8.1** Ensure `.grid--center` adopts `.grid` base styling.
* **1.8.2** Ensure `.grid__item`s in `.grid--center` have normal text-alignment restored
+* **1.9** Allow users to use a non-markup fix for `inline-block` whitespace removal
View
@@ -100,6 +100,21 @@ $push: false!default;
$pull: false!default;
+/**
+ * Using `inline-block` means that the grid items need their whitespace removing
+ * in order for them to work correctly. Set the following to true if you are
+ * going to achieve this by manually removing/commenting out any whitespace in
+ * your HTML yourself.
+ *
+ * Setting this to false invokes a hack which cannot always be guaranteed,
+ * please see the following for more detail:
+ *
+ * github.com/csswizardry/csswizardry-grids/commit/744d4b23c9d2b77d605b5991e54a397df72e0688
+ * github.com/csswizardry/inuit.css/issues/170#issuecomment-14859371
+ */
+$use-markup-fix: true!default;
+
+
/**
* Define your breakpoints. The first value is the prefix that shall be used for
* your classes (e.g. `.palm-one-half`), the second value is the media query
@@ -200,6 +215,17 @@ $class-type: unquote(".");
margin:0; /* [2] */
padding:0; /* [2] */
margin-left:-$gutter; /* [3] */
+ @if $use-markup-fix != true{
+ letter-spacing:-0.31em;
+ }
+}
+
+@if $use-markup-fix != true{
+ /* Opera hack */
+ .opera:-o-prefocus,
+ .grid{
+ word-spacing:-0.43em;
+ }
}
@@ -220,6 +246,10 @@ $class-type: unquote(".");
-webkit-box-sizing:border-box; /* [5] */
-moz-box-sizing:border-box; /* [5] */
box-sizing:border-box; /* [5] */
+ @if $use-markup-fix != true{
+ letter-spacing: normal;
+ word-spacing: normal;
+ }
}

2 comments on commit 86fcbd4

@shanefoster

This comment has been minimized.

Show comment Hide comment
@shanefoster

shanefoster Apr 16, 2013

Is this update also incorporated inuit's grids? I don't see it, so I assume not. If not I suppose I should just copy this over? Thanks for putting together such an amazing framework!

Is this update also incorporated inuit's grids? I don't see it, so I assume not. If not I suppose I should just copy this over? Thanks for putting together such an amazing framework!

@johjacb

This comment has been minimized.

Show comment Hide comment
@johjacb

johjacb May 3, 2013

+1 for putting this into inuit's grid system

+1 for putting this into inuit's grid system

Please sign in to comment.