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

Sass

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

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

文件結構

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

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

如果您已經下載了我們的源文件,并且沒有使用包管理器,那么您需要手動設置類似于該結構的內容,將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

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

變量默認值

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

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

同一Sass文件中的變數可以在預設變數之前或之后覆蓋。但是,當覆蓋橫跨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.

映射和循環

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`
}

轉義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.

加減函數

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

計算有效的示例:

$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;">

          97精品久久久久中文字幕 | 热久久免费视频| 91在线观看免费视频| 中文字幕在线观看一区二区| 色妹子一区二区| 天堂av在线一区| 久久久久久久一区| 在线观看免费视频综合| 热久久免费视频| 亚洲欧美日韩国产手机在线| 欧美裸体bbwbbwbbw| 国产成人av电影在线播放| 亚洲愉拍自拍另类高清精品| 精品国产乱码久久久久久久 | 婷婷国产在线综合| 国产清纯白嫩初高生在线观看91 | 日本韩国欧美三级| 国产精品一区二区在线观看不卡| 亚洲一区二区视频在线| 久久久久成人黄色影片| 69久久夜色精品国产69蝌蚪网 | 国产馆精品极品| 日韩经典一区二区| 亚洲男人天堂一区| 久久久久88色偷偷免费| 欧美日韩午夜影院| 色8久久精品久久久久久蜜| 国产精品一区久久久久| 天天操天天色综合| 亚洲午夜久久久久久久久电影院 | 国产福利电影一区二区三区| 亚洲一区在线观看免费观看电影高清| 久久久99精品免费观看不卡| 欧美久久久一区| 91国偷自产一区二区开放时间 | 久久久久久一级片| 91精品视频网| 91精品国产美女浴室洗澡无遮挡| 日本乱码高清不卡字幕| 成人免费的视频| 国产一区二区三区观看| 男男视频亚洲欧美| 日韩国产欧美在线播放| 亚洲午夜一区二区三区| 亚洲综合自拍偷拍| 一区二区三区资源| 亚洲人成网站影音先锋播放| 国产精品久久久久久久久果冻传媒| 精品国产凹凸成av人导航| 欧美一级精品大片| 欧美mv和日韩mv的网站| 欧美不卡一二三| 精品国产1区2区3区| 久久婷婷综合激情| 久久精品人人做人人爽人人| 久久精品视频在线免费观看 | 日本一区二区三区视频视频| 久久久一区二区| 国产夜色精品一区二区av| 欧美激情一区二区在线| 国产精品人成在线观看免费| 亚洲欧洲国产日韩| 亚洲不卡av一区二区三区| 免费在线一区观看| 懂色av一区二区三区免费观看| 不卡一区二区在线| 欧美视频日韩视频在线观看| 91精品免费观看| 久久久久久久久伊人| 亚洲少妇最新在线视频| 亚洲一二三四在线| 韩国av一区二区三区四区| 国产成人小视频| 欧美性淫爽ww久久久久无| 欧美久久婷婷综合色| 久久久久久久av麻豆果冻| 1024成人网色www| 五月天网站亚洲| 国产成人av一区二区三区在线观看| av在线不卡免费看| 在线成人免费观看| 久久婷婷综合激情| 亚洲综合一二三区| 国产精品自拍在线| 日本伦理一区二区| 久久久一区二区三区| 一区二区三区中文字幕| 久久99热这里只有精品| 成人黄色大片在线观看| 在线播放欧美女士性生活| 久久蜜桃av一区精品变态类天堂 | 麻豆精品国产91久久久久久| 成人性生交大片免费| 欧美色男人天堂| 国产精品久久久久久久午夜片| 日韩中文字幕区一区有砖一区| 国产乱理伦片在线观看夜一区| 欧美日韩一区成人| 亚洲免费色视频| 国产一区二区精品久久99| 欧美色爱综合网| 国产精品福利在线播放| 国内精品久久久久影院薰衣草| 欧美丰满少妇xxxbbb| 亚洲男帅同性gay1069| 国产v综合v亚洲欧| 久久综合狠狠综合久久激情| 首页综合国产亚洲丝袜| 欧美色男人天堂| 洋洋av久久久久久久一区| 成人黄色在线看| 国产精品网站一区| 国产黄色成人av| 国产欧美精品国产国产专区 | 国产乱码精品一区二区三区av| 91精品国产欧美日韩| 夜夜嗨av一区二区三区中文字幕| 大白屁股一区二区视频| 久久精品水蜜桃av综合天堂| 激情国产一区二区| 久久久一区二区| 国产ts人妖一区二区| 国产色产综合产在线视频| 激情综合亚洲精品| 国产欧美日韩三区| 不卡av免费在线观看| 亚洲欧美日韩国产综合在线| 91在线免费看| 亚洲电影一区二区三区| 欧美日韩国产美女| 久久精品国产久精国产爱| 亚洲精品一线二线三线| 国产99久久久国产精品| 国产精品久久久久影院亚瑟 | 久久久久综合网| 国产成人免费高清| 亚洲欧洲美洲综合色网| 欧美日韩成人高清| 久久精品噜噜噜成人88aⅴ| 欧美成人性福生活免费看| 国产九九视频一区二区三区| 国产日产欧美一区| 91福利视频网站| 美国十次了思思久久精品导航| 精品蜜桃在线看| 成人av免费在线| 亚洲图片欧美视频| 日韩欧美国产精品一区| 成人开心网精品视频| 亚洲成a人v欧美综合天堂| 欧美精品一区二区久久久| 9l国产精品久久久久麻豆| 丝袜诱惑制服诱惑色一区在线观看 | 久久综合狠狠综合久久综合88 | 亚洲一区二区三区精品在线| 91精品国产色综合久久久蜜香臀| 激情综合一区二区三区| √…a在线天堂一区| 欧美精品九九99久久| 国产成人福利片| 日本视频一区二区| 中文字幕一区二区三区av| 91精品国产丝袜白色高跟鞋| 成人v精品蜜桃久久一区| 奇米777欧美一区二区| 综合久久一区二区三区| 欧美精品一区二区久久久 | 欧美色中文字幕| 国产一区二区三区电影在线观看| 亚洲精选免费视频| 日本一区二区成人| 91精品蜜臀在线一区尤物| 99久久久久免费精品国产| 久久丁香综合五月国产三级网站| 夜夜夜精品看看| 亚洲欧美在线视频观看| 久久先锋影音av鲁色资源| 欧美精选在线播放| 欧美午夜精品一区二区蜜桃| 成人天堂资源www在线| 国内不卡的二区三区中文字幕 | 91在线视频18| 国产成人福利片| 国产在线麻豆精品观看| 蜜臀av一级做a爰片久久| 亚洲国产日韩精品| 伊人开心综合网| 日韩毛片一二三区| 国产精品久久免费看| 国产日韩一级二级三级| 久久久久99精品一区| 精品久久久久av影院| 欧美不卡一区二区三区| 日韩久久免费av| 欧美电视剧免费观看| 日韩三级在线免费观看| 日韩一区二区在线观看| 日韩精品一区二区三区在线播放| 欧美日韩国产成人在线免费| 欧美日韩五月天|