Skip to content

Commit

Permalink
Fix #29: Prevent grid framework conflicts with original bootstrap.
Browse files Browse the repository at this point in the history
  • Loading branch information
morteza committed Aug 28, 2014
1 parent 9be0d88 commit c24014c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion bootstrap
Submodule bootstrap updated 57 files
+4 −4 .travis.yml
+52 −44 Gruntfile.js
+19 −19 README.md
+25 −19 dist/css/bootstrap.css
+1 −1 dist/css/bootstrap.css.map
+1 −1 dist/css/bootstrap.min.css
+4 −4 dist/js/bootstrap.js
+1 −1 dist/js/bootstrap.min.js
+2 −2 docs/_data/translations.yml
+3 −7 docs/_includes/customizer-variables.html
+1 −1 docs/_includes/js/alerts.html
+55 −90 docs/_includes/js/buttons.html
+2 −1 docs/_includes/js/carousel.html
+29 −0 docs/_includes/js/tooltips.html
+4 −2 docs/_includes/nav/javascript.html
+1 −1 docs/assets/css/docs.min.css
+11 −3 docs/assets/css/src/docs.css
+2 −2 docs/assets/js/customize.min.js
+2 −2 docs/assets/js/raw-files.min.js
+1 −0 docs/assets/js/src/customizer.js
+25 −19 docs/dist/css/bootstrap.css
+1 −1 docs/dist/css/bootstrap.css.map
+1 −1 docs/dist/css/bootstrap.min.css
+4 −4 docs/dist/js/bootstrap.js
+1 −1 docs/dist/js/bootstrap.min.js
+2 −2 docs/examples/carousel/index.html
+2 −2 docs/examples/dashboard/index.html
+2 −2 docs/examples/jumbotron/index.html
+2 −2 docs/examples/navbar-fixed-top/index.html
+2 −2 docs/examples/navbar-static-top/index.html
+2 −2 docs/examples/navbar/index.html
+2 −2 docs/examples/non-responsive/index.html
+2 −2 docs/examples/offcanvas/index.html
+2 −2 docs/examples/starter-template/index.html
+2 −2 docs/examples/sticky-footer-navbar/index.html
+6 −6 docs/examples/theme/index.html
+1 −1 js/alert.js
+1 −1 js/collapse.js
+1 −1 js/popover.js
+4 −4 js/tests/unit/alert.js
+32 −0 js/tests/unit/collapse.js
+2 −2 js/tests/unit/scrollspy.js
+7 −7 js/tests/vendor/qunit.css
+1,134 −927 js/tests/vendor/qunit.js
+1 −1 js/tooltip.js
+2 −4 less/dropdowns.less
+2 −1 less/jumbotron.less
+1 −1 less/list-group.less
+1 −1 less/mixins/labels.less
+0 −1 less/pager.less
+2 −1 less/panels.less
+5 −4 less/popovers.less
+12 −14 less/print.less
+3 −7 less/variables.less
+8 −8 package.json
+72 −96 test-infra/npm-shrinkwrap.json
+10 −1 test-infra/uncached-npm-install.sh
4 changes: 2 additions & 2 deletions dist/css/bootstrap-rtl.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-rtl.css.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/css/bootstrap-rtl.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions less/grid-rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
//
// Common styles for small and large grid columns

.make-grid-columns();
.make-rtl-grid-columns();


// Extra small grid
//
// Columns, offsets, pushes, and pulls for extra small devices like
// smartphones.

.make-grid(xs);
.make-rtl-grid(xs);


// Small grid
Expand All @@ -23,7 +23,7 @@
// to tablets.

@media (min-width: @screen-sm-min) {
.make-grid(sm);
.make-rtl-grid(sm);
}


Expand All @@ -32,7 +32,7 @@
// Columns, offsets, pushes, and pulls for the desktop device range.

@media (min-width: @screen-md-min) {
.make-grid(md);
.make-rtl-grid(md);
}


Expand All @@ -41,5 +41,5 @@
// Columns, offsets, pushes, and pulls for the large desktop device range.

@media (min-width: @screen-lg-min) {
.make-grid(lg);
.make-rtl-grid(lg);
}
34 changes: 17 additions & 17 deletions less/mixins/grid-framework-rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Used only by Bootstrap to generate the correct number of grid classes given
// any value of `@grid-columns`.

.make-grid-columns() {
.make-rtl-grid-columns() {
// Common styles for all sizes of grid columns, widths 1-12
.col(@index) when (@index = 1) { // initial
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}";
Expand All @@ -26,7 +26,7 @@
.col(1); // kickstart it
}

.float-grid-columns(@class) {
.float-rtl-grid-columns(@class) {
.col(@index) when (@index = 1) { // initial
@item: ~".col-@{class}-@{index}";
.col((@index + 1), @item);
Expand All @@ -43,54 +43,54 @@
.col(1); // kickstart it
}

.calc-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = width) and (@index > 0) {
.col-@{class}-@{index} {
width: percentage((@index / @grid-columns));
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = push) and (@index > 0) {
.col-@{class}-push-@{index} {
right: percentage((@index / @grid-columns));
left: 0;
}
}
.calc-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = push) and (@index = 0) {
.col-@{class}-push-0 {
right: auto;
left: 0;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = pull) and (@index > 0) {
.col-@{class}-pull-@{index} {
left: percentage((@index / @grid-columns));
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = pull) and (@index = 0) {
.col-@{class}-pull-0 {
left: auto;
right: auto;
}
}
.calc-grid-column(@index, @class, @type) when (@type = offset) {
.calc-rtl-grid-column(@index, @class, @type) when (@type = offset) {
.col-@{class}-offset-@{index} {
margin-right: percentage((@index / @grid-columns));
margin-left: 0;
}
}

// Basic looping in LESS
.loop-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-grid-column(@index, @class, @type);
.loop-rtl-grid-columns(@index, @class, @type) when (@index >= 0) {
.calc-rtl-grid-column(@index, @class, @type);
// next iteration
.loop-grid-columns((@index - 1), @class, @type);
.loop-rtl-grid-columns((@index - 1), @class, @type);
}

// Create grid for specific class
.make-grid(@class) {
.float-grid-columns(@class);
.loop-grid-columns(@grid-columns, @class, width);
.loop-grid-columns(@grid-columns, @class, pull);
.loop-grid-columns(@grid-columns, @class, push);
.loop-grid-columns(@grid-columns, @class, offset);
.make-rtl-grid(@class) {
.float-rtl-grid-columns(@class);
.loop-rtl-grid-columns(@grid-columns, @class, width);
.loop-rtl-grid-columns(@grid-columns, @class, pull);
.loop-rtl-grid-columns(@grid-columns, @class, push);
.loop-rtl-grid-columns(@grid-columns, @class, offset);
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bootstrap-rtl",
"description": "Right-to-left (RTL) theme for Boostrap 3.2",
"version": "3.2.0-rc4",
"version": "3.2.0-rc5",
"style": "dist/css/bootstrap-rtl.css",
"homepage": "http://github.com/morteza/bootstrap-rtl",
"author": "Morteza Ansarinia <[email protected]> (http://github.com/morteza)",
Expand Down

0 comments on commit c24014c

Please sign in to comment.