推奨の_custom-variables.scss
メソッドで基本的なカスタマイズを適用し、ブートストラップ3をフレームワークとして使用しているWebアプリケーションを継承しました。公式のSASSポートは、依存関係として追加され、@import "bootstrap";
を使用してと_custom-mixins.scss
の後にapp.scss
ファイルに含まれています。ブートストラップ3からブレークポイントを削除する
流体の幅のアプリケーションは小さな画面では表示されないため(データ量が膨大なため)、CSSから-xs-
と-sm-
のブレークポイントを無効にするか削除します。レイアウトは-lg-
と-md-
ブレークポイントに最適化され、最も狭いブレークポイントは-md-
です。
// Small screen/tablet
$container-tablet: (720px + $grid-gutter-width) !default;
//** For `$screen-sm-min` and up.
$container-sm: $container-tablet !default;
// Medium screen/desktop
$container-desktop: (940px + $grid-gutter-width) !default;
//** For `$screen-md-min` and up.
$container-md: $container-desktop !default;
に:私はまた、全体のレイアウトを包む親<div>
にmin-width: $container-md;
設定
// Small screen/tablet
$container-tablet: (940px + $grid-gutter-width) !default;
//** For `$screen-sm-min` and up.
$container-sm: $container-tablet !default;
// Medium screen/desktop
$container-desktop: (940px + $grid-gutter-width) !default;
//** For `$screen-md-min` and up.
$container-md: $container-desktop !default;
は_custom-variables.scss
で、Iから$container-tablet
幅を変更しました。
これは、HTML要素に不要なブレークポイントのクラスを含める限り機能します。
<div class="col-xs-3 col-sm-3 col-md-3">
より小さなブレークポイントクラスを省略がwidth
性を除去し、100%の幅に<div>
デフォルトブラウザは992pxの下収縮(min-width
:例えば以下は、25%の列の幅を維持しますブレークポイントの-md-
の値)。
私の質問:
- は、なぜ私は私のコンテナに追加小さいブレークポイントクラスを指定する必要がありますか? (私のブートストラップスキルは錆びています!)
- 2つの小さなブレークポイントを削除/無効にする良い方法はありますか?