精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

Sass

利用我們的源Sass文件使用變量、映射、mixin和函數(shù)來幫助您更快地構(gòu)建和定制您的項目。

利用我們的源Sass文件來使用變量、映射、mixin等等。

文件結(jié)構(gòu)

盡可能避免修改Bootstrap的核心文件。對于Sass,這意味著創(chuàng)建自己的樣式表來導入引導,以便修改和擴展它。假設(shè)你’如果你使用npm這樣的包管理器,你’我的文件結(jié)構(gòu)如下:

your-project/
├── scss
│   └── custom.scss
└── node_modules/
└── bootstrap
  ├── js
  └── scss

如果您已經(jīng)下載了我們的源文件,并且沒有使用包管理器,那么您需要手動設(shè)置類似于該結(jié)構(gòu)的內(nèi)容,將Bootstrap程序的源文件與您自己的源文件分開。

your-project/
├── scss
│   └── custom.scss
└── bootstrap/
├── js
└── scss

導入

在你的custom.scss,你將導入Bootstrap源Sass文件。你有兩個選擇:包括所有的Bootstrap,或選擇你需要的部分。我們鼓勵后者,盡管要知道我們的組件之間存在一些需求和依賴性。您還需要為我們的插件包含一些JavaScript。

// Custom.scss
// Option A: Include all of Bootstrap

// Include any default variable overrides here (though functions won't be available)

@import "../node_modules/bootstrap/scss/bootstrap";

// Then add additional custom code here
// Custom.scss
// Option B: Include parts of Bootstrap

// 1. Include functions first (so you can manipulate colors, SVGs, calc, etc)
@import "../node_modules/bootstrap/scss/functions";

// 2. Include any default variable overrides here

// 3. Include remainder of required Bootstrap stylesheets
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/mixins";

// 4. Include any optional Bootstrap components as you like
@import "../node_modules/bootstrap/scss/root";
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
@import "../node_modules/bootstrap/scss/images";
@import "../node_modules/bootstrap/scss/containers";
@import "../node_modules/bootstrap/scss/grid";

// 5. Add additional custom code here

在設(shè)置到位后,您可以開始修改您的Sass變量和映射custom.scss. 您還可以根據(jù)需要在//Optional節(jié)下開始添加引導的部分。我們建議使用我們的完整導入bootstrap.scss文件作為起點。

變量默認值

Bootstrap的每個Sass變數(shù)都包含!default標志,讓您可以在自己的Sass中覆蓋變數(shù)的預設(shè)值,而無需更動Bootstrap的原始代碼。復制需要的變量并粘貼,修改其數(shù)值,并刪除!default標志。若已經(jīng)分配好了變數(shù),則他將不會被Bootstrap的預設(shè)值再度分配。

您可以在scss/_variables.scss中找到Bootstrap變量的完整列表。有些變量設(shè)置為null,除非在配置中被覆蓋,否則這些變量不會輸出其屬性。

同一Sass文件中的變數(shù)可以在預設(shè)變數(shù)之前或之后覆蓋。但是,當覆蓋橫跨Sass文件時,您必須在導入Bootstrap的Sass文件之前進行覆蓋。

以下是一個透過npm導入和編譯Bootstrap時,更改<body>中的background-colorcolorr:

// Required
@import "../node_modules/bootstrap/scss/functions";

// Default variable overrides
$body-bg: #000;
$body-color: #111;

// Required
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/mixins";

// Bootstrap and its default variables

// Optional Bootstrap components here
@import "../node_modules/bootstrap/scss/root";
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
// etc

Repeat as necessary for any variable in Bootstrap, including the global options below.

Get started with Bootstrap via npm with our starter project! Head to the twbs/bootstrap-npm-starter template repository to see how to build and customize Bootstrap in your own npm project. Includes Sass compiler, Autoprefixer, Stylelint, PurgeCSS, and Bootstrap Icons.

映射和循環(huán)

Bootstrap includes a handful of Sass maps, key value pairs that make it easier to generate families of related CSS. We use Sass maps for our colors, grid breakpoints, and more. Just like Sass variables, all Sass maps include the !default flag and can be overridden and extended.

Some of our Sass maps are merged into empty ones by default. This is done to allow easy expansion of a given Sass map, but comes at the cost of making removing items from a map slightly more difficult.

修改地圖

All variables in the $theme-colors map are defined as standalone variables. To modify an existing color in our $theme-colors map, add the following to your custom Sass file:

$primary: #0074d9;
$danger: #ff4136;

Later on, theses variables are set in Bootstrap’s $theme-colors map:

$theme-colors: (
"primary": $primary,
"danger": $danger
);

添加到地圖

Add new colors to $theme-colors, or any other map, by creating a new Sass map with your custom values and merging it with the original map. In this case, we’ll create a new $custom-colors map and merge it with $theme-colors.

// Create your own map
$custom-colors: (
"custom-color": #900
);

// Merge the maps
$theme-colors: map-merge($theme-colors, $custom-colors);

從地圖中刪除

To remove colors from $theme-colors, or any other map, use map-remove. Be aware you must insert it between our requirements and options:

// Required
@import "../node_modules/bootstrap/scss/functions";
@import "../node_modules/bootstrap/scss/variables";
@import "../node_modules/bootstrap/scss/mixins";

$theme-colors: map-remove($theme-colors, "info", "light", "dark");

// Optional
@import "../node_modules/bootstrap/scss/root";
@import "../node_modules/bootstrap/scss/reboot";
@import "../node_modules/bootstrap/scss/type";
// etc

所需密鑰

Bootstrap assumes the presence of some specific keys within Sass maps as we used and extend these ourselves. As you customize the included maps, you may encounter errors where a specific Sass map’s key is being used.

For example, we use the primary, success, and danger keys from $theme-colors for links, buttons, and form states. Replacing the values of these keys should present no issues, but removing them may cause Sass compilation issues. In these instances, you’ll need to modify the Sass code that makes use of those values.

功能

顏色

Next to the Sass maps we have, theme colors can also be used as standalone variables, like $primary.

.custom-element {
color: $gray-100;
background-color: $dark;
}

You can lighten or darken colors with Bootstrap’s tint-color() and shade-color() functions. These functions will mix colors with black or white, unlike Sass' native lighten() and darken() functions which will change the lightness by a fixed amount, which often doesn’t lead to the desired effect.

// Tint a color: mix a color with white
@function tint-color($color, $weight) {
@return mix(white, $color, $weight);
}

// Shade a color: mix a color with black
@function shade-color($color, $weight) {
@return mix(black, $color, $weight);
}

// Shade the color if the weight is positive, else tint it
@function shift-color($color, $weight) {
@return if($weight > 0, shade-color($color, $weight), tint-color($color, -$weight));
}

In practice, you’d call the function and pass in the color and weight parameters.

.custom-element {
color: tint-color($primary, 10%);
}

.custom-element-2 {
color: shade-color($danger, 30%);
}

顏色對比度

In order to meet WCAG 2.0 accessibility standards for color contrast, authors must provide a contrast ratio of at least 4.5:1, with very few exceptions.

An additional function we include in Bootstrap is the color contrast function, color-contrast. It utilizes the WCAG 2.0 algorithm for calculating contrast thresholds based on relative luminance in a sRGB colorspace to automatically return a light (#fff), dark (#212529) or black (#000) contrast color based on the specified base color. This function is especially useful for mixins or loops where you’re generating multiple classes.

For example, to generate color swatches from our $theme-colors map:

@each $color, $value in $theme-colors {
.swatch-#{$color} {
color: color-contrast($value);
}
}

It can also be used for one-off contrast needs:

.custom-element {
color: color-contrast(#000); // returns `color: #fff`
}

You can also specify a base color with our color map functions:

.custom-element {
color: color-contrast($dark); // returns `color: #fff`
}

轉(zhuǎn)義SVG

We use the escape-svg function to escape the <, > and # characters for SVG background images. When using the escape-svg function, data URIs must be quoted.

加減函數(shù)

我們使用addsubtract函數(shù)包裝CSS calc函數(shù)。這些函數(shù)的主要目的是避免將“無單位”0值傳遞到計算表達式時出錯。像calc(10px - 0)這樣的表達式在所有瀏覽器中都會返回一個錯誤,盡管在數(shù)學上是正確的。

計算有效的示例:

$border-radius: .25rem;
$border-width: 1px;

.element {
// Output calc(.25rem - 1px) is valid
  border-radius: calc($border-radius - $border-width);
}

.element {
// Output the same calc(.25rem - 1px) as above
  border-radius: subtract($border-radius, $border-width);
}

計算無效的示例:

$border-radius: .25rem;
$border-width: 0;

.element {
// Output calc(.25rem - 0) is invalid
  border-radius: calc($border-radius - $border-width);
}

.element {
// Output .25rem
  border-radius: subtract($border-radius, $border-width);
}
返回頂部
精品久久久久久亚洲精品_成人午夜网站_www日本高清_亚洲精品久久久久午夜福

      9000px;">

          亚洲视频 欧洲视频| 日本一区二区动态图| av高清久久久| 国产毛片精品国产一区二区三区| 亚洲自拍偷拍九九九| 国产精品家庭影院| 欧美激情一区二区三区在线| 久久久精品一品道一区| 日韩一区二区在线观看视频| 精品视频资源站| 欧美日韩国产首页在线观看| 欧美在线免费播放| 欧美日韩精品一区二区三区蜜桃| 99国产欧美另类久久久精品| 色噜噜狠狠色综合中国| 91久久精品一区二区| 91麻豆高清视频| 欧美在线制服丝袜| 欧美日韩在线直播| 欧美日韩视频一区二区| 欧美一区永久视频免费观看| 欧美成人午夜电影| 日本一区二区免费在线| 亚洲男同1069视频| 性久久久久久久| 久久国产日韩欧美精品| 国产福利精品一区| 欧美图区在线视频| 91精品国产aⅴ一区二区| 日韩写真欧美这视频| 国产三级精品三级| 亚洲精品久久嫩草网站秘色| 日本欧美久久久久免费播放网| 免费看精品久久片| 北条麻妃一区二区三区| 精品视频999| 国产清纯白嫩初高生在线观看91| 中文字幕佐山爱一区二区免费| 亚洲风情在线资源站| 国产麻豆精品theporn| 99久久99久久精品免费观看| 欧美高清视频不卡网| 亚洲国产精品t66y| 亚洲成人av免费| 国产一区二区三区高清播放| 91香蕉视频污在线| 欧美va日韩va| 久久精品一区二区三区不卡| 一区二区三区不卡在线观看| 久久国产欧美日韩精品| 日本久久一区二区| 久久久激情视频| 午夜精品影院在线观看| 国产乱码精品一区二区三区忘忧草 | 美女mm1313爽爽久久久蜜臀| 成人永久看片免费视频天堂| 91精品国产综合久久精品| 国产精品少妇自拍| 激情久久久久久久久久久久久久久久| 色综合天天视频在线观看| 久久综合久久鬼色| 亚洲成人资源网| 91在线视频播放| 久久天堂av综合合色蜜桃网| 午夜伊人狠狠久久| 日本高清视频一区二区| 日本一区二区三区电影| 久久成人久久爱| 91麻豆精品国产91久久久更新时间| 亚洲色欲色欲www在线观看| 国产成人午夜99999| 日韩一区二区在线看| 秋霞电影一区二区| 欧美在线短视频| 亚洲精品菠萝久久久久久久| 粉嫩aⅴ一区二区三区四区五区| 日韩精品专区在线| 麻豆精品一区二区av白丝在线| 欧美无乱码久久久免费午夜一区 | 欧美日韩一卡二卡三卡| 自拍偷拍欧美激情| 91天堂素人约啪| 亚洲欧美在线观看| 94-欧美-setu| 亚洲一区二区在线观看视频| 欧美在线你懂的| 亚洲福利视频导航| 91精品国产免费久久综合| 久久精品免费看| 久久你懂得1024| 成人一区在线观看| 一区在线播放视频| 在线视频你懂得一区| 亚洲国产日日夜夜| 7777精品伊人久久久大香线蕉| 亚洲成人午夜电影| 欧美精品久久天天躁| 日本不卡一二三区黄网| 久久精品夜色噜噜亚洲a∨| 成a人片国产精品| 亚洲一区二区欧美| 欧美精品在线观看播放| 亚洲一区二区三区四区在线| 91浏览器在线视频| 亚洲午夜久久久久久久久电影网 | 欧美精品日韩精品| 国产一区二区三区四区五区美女| 国产视频一区二区三区在线观看| 96av麻豆蜜桃一区二区| 亚洲午夜av在线| www欧美成人18+| 99久久伊人网影院| 奇米色一区二区三区四区| 国产精品国产三级国产a| 在线国产亚洲欧美| 国产一区不卡精品| 亚洲精品视频在线观看免费| 欧美午夜一区二区| 成人av先锋影音| 婷婷成人激情在线网| 国产农村妇女精品| 欧美视频日韩视频在线观看| 国产成人精品影视| 亚洲第一电影网| 欧美国产亚洲另类动漫| 91精品在线观看入口| 99精品欧美一区二区三区综合在线| 日日夜夜免费精品视频| 欧美激情一区二区三区| 日韩欧美中文一区| 欧美午夜在线一二页| 岛国精品在线播放| 日韩av电影免费观看高清完整版| 中文字幕第一区第二区| 日韩精品中文字幕一区二区三区| 色吊一区二区三区| 国产成人亚洲精品狼色在线| 老司机午夜精品| 午夜精品福利在线| 亚洲女人小视频在线观看| 欧美激情一区不卡| 久久蜜桃av一区精品变态类天堂| 欧美日韩高清一区二区| 色哟哟国产精品免费观看| 国产福利一区在线| 国产成人aaaa| 国产真实乱对白精彩久久| 奇米四色…亚洲| 日韩成人精品视频| 日本欧美一区二区| 免费久久99精品国产| 日韩av电影免费观看高清完整版| 亚洲国产精品久久久久婷婷884 | 国产精品久久久久aaaa| 欧美国产97人人爽人人喊| 欧美精品一区二区蜜臀亚洲| 6080午夜不卡| 日韩精品一区二区三区四区| 欧美日本一区二区三区四区| 欧美日韩www| 精品久久国产老人久久综合| 欧美一级艳片视频免费观看| 日韩一区二区三区免费看| 欧美一级二级三级乱码| 日韩女优av电影在线观看| 日韩美女视频在线| 久久中文娱乐网| 国产欧美日韩一区二区三区在线观看| www亚洲一区| 国产精品精品国产色婷婷| 国产精品成人免费精品自在线观看 | 精品污污网站免费看| 欧美日韩国产乱码电影| 91精品婷婷国产综合久久竹菊| 日韩精品在线看片z| 精品国产乱码91久久久久久网站| 精品国产青草久久久久福利| 久久综合九色综合久久久精品综合| 欧美mv日韩mv亚洲| 中文字幕在线不卡一区| 亚洲一区二区三区四区不卡| 日av在线不卡| 国产一区二区三区观看| 91老师国产黑色丝袜在线| 7777精品伊人久久久大香线蕉完整版| 欧美一区二区三区白人| 国产精品女同互慰在线看| 午夜精品福利久久久| 国产精品一区三区| 在线亚洲欧美专区二区| 2020日本不卡一区二区视频| 欧美激情自拍偷拍| 亚洲成人综合网站| 成熟亚洲日本毛茸茸凸凹| 欧美高清性hdvideosex| 久久精品男人的天堂| 亚洲国产aⅴ成人精品无吗| 国产成人亚洲精品青草天美| 欧美日韩精品免费| 日韩毛片一二三区|