Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Rename direction and display mixins
Browse files Browse the repository at this point in the history
- Prevents a conflict with Bourbon's `display()` mixin. Closes #231, #228.
  • Loading branch information
Reda Lemeden committed Oct 3, 2014
1 parent 2875ee2 commit 7a66600
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app/assets/stylesheets/_neat.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
@import "grid/media";
@import "grid/to-deprecate";
@import "grid/visual-grid";
@import "grid/display";
@import "grid/direction";
@import "grid/display-context";
@import "grid/direction-context";
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* ...
* }
*/
@mixin direction($direction: left-to-right) {
@mixin direction-context($direction: left-to-right) {
$scope-direction: $layout-direction;

@if to-lower-case($direction) == "left-to-right" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* ...
* }
*/
@mixin display($display: block) {
@mixin display-context($display: block) {
$scope-display: $container-display-table;
$container-display-table: $display == table !global;

Expand Down
4 changes: 2 additions & 2 deletions spec/neat/direction_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'spec_helper'

describe "@include direction() {...}" do
describe "@include direction-context() {...}" do
before(:all) do
ParserSupport.parse_file("direction")
ParserSupport.parse_file("direction-context")
end

context "with no argument" do
Expand Down
4 changes: 2 additions & 2 deletions spec/neat/display_spec.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'spec_helper'

describe "@include display() {...}" do
describe "@include display-context() {...}" do
before(:all) do
ParserSupport.parse_file("display")
ParserSupport.parse_file("display-context")
end

context "with argument (table)" do
Expand Down
4 changes: 2 additions & 2 deletions test/direction.scss → test/direction-context.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
@import 'setup';

@include direction() {
@include direction-context() {
.default-block {
@include span-columns(6);
}
}

@include direction(right-to-left) {
@include direction-context(right-to-left) {
.right-to-left-block {
@include span-columns(6);
}
Expand Down
6 changes: 3 additions & 3 deletions test/display.scss → test/display-context.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@import 'setup';

@include display(table) {
@include display-context(table) {
.display-table-block {
@include span-columns(6);
}
}

@include display(table) {
@include display(block) {
@include display-context(table) {
@include display-context(block) {
.display-nested-block {
@include span-columns(6);
}
Expand Down

0 comments on commit 7a66600

Please sign in to comment.