精品久久久久久亚洲精品_成人午夜网站_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日本高清_亚洲精品久久久久午夜福

      亚洲欧美中文日韩在线| 亚洲精品一区二| 欧美中文字幕视频| 激情成人亚洲| 欧美日韩亚洲免费| 午夜日本精品| 亚洲乱码日产精品bd| 欧美三级免费| 欧美激情亚洲精品| 欧美在线综合视频| 99精品国产一区二区青青牛奶| 久久国产精品99国产精| 国产精品毛片高清在线完整版| 先锋影音久久久| 99国产精品99久久久久久粉嫩| 国产精品视频一二三| 欧美激情精品久久久久久大尺度 | 欧美在线free| 亚洲视频一起| 亚洲视频在线一区| 亚洲精品欧美日韩| 国产亚洲网站| 国产日韩欧美高清| 欧美日韩一区二区在线观看| 久久精品卡一| 浪潮色综合久久天堂| 欧美亚洲在线视频| 欧美一区二区三区在线免费观看| 亚洲免费在线精品一区| 香蕉成人久久| 久久激情一区| 欧美另类亚洲| 国产性做久久久久久| 亚洲综合欧美日韩| 99re66热这里只有精品4| 日韩视频在线一区| 中文久久精品| 久久影院亚洲| 欧美日韩国产综合一区二区| 国产精品爱久久久久久久| 国产精品揄拍一区二区| 欧美一级片一区| 久久精品成人欧美大片古装| 另类国产ts人妖高潮视频| 欧美日韩不卡一区| 国产日韩欧美在线一区| 亚洲精品中文字| 欧美一区二区黄| 国产精品成人国产乱一区| 国产日韩一区二区| 国产伦精品一区二区三区免费迷| 欧美日韩在线不卡| 国产亚洲亚洲| 久久国产福利国产秒拍| 国产精品普通话对白| 亚洲精品一区二区三区福利| 欧美一区观看| 国产欧美一区二区精品仙草咪| 最新国产精品拍自在线播放| 美日韩精品视频免费看| 国产亚洲aⅴaaaaaa毛片| 亚洲愉拍自拍另类高清精品| 欧美日韩在线亚洲一区蜜芽| 一区二区三区成人精品| 欧美人与性动交cc0o| 最近看过的日韩成人| 美女日韩欧美| 99国产精品久久久久久久成人热| 欧美国产日韩视频| 一区二区三区国产| 国产欧美日本一区视频| 久久精品国产精品亚洲精品| 亚洲电影在线看| 欧美亚韩一区| 久久久久国产精品厨房| 亚洲国产成人午夜在线一区| 欧美精品久久久久久久久久| 亚洲一区精品视频| 亚洲国产成人精品视频| 国产精品视频男人的天堂| 久久精品色图| 一本色道久久99精品综合| 国产在线欧美| 国产欧美二区| 欧美日韩在线精品| 欧美日韩第一区| 可以看av的网站久久看| 久久经典综合| 欧美在线1区| 欧美一区在线视频| 亚洲综合国产激情另类一区| 亚洲精品日韩激情在线电影| 国产欧美69| 国产美女精品视频| 国产欧美日韩一区二区三区在线观看| 美日韩精品视频| 久久男人资源视频| 久久这里只精品最新地址| 久久久久一本一区二区青青蜜月| 亚洲一级片在线观看| av72成人在线| 一本色道久久综合亚洲二区三区| 亚洲开发第一视频在线播放| 亚洲人成人一区二区三区| 亚洲盗摄视频| 一本一本久久a久久精品牛牛影视| 在线欧美一区| 亚洲小说区图片区| 一二三区精品| 亚洲永久在线观看| 久久综合久久久久88| 欧美激情久久久久| 国产精品久久久久久户外露出 | 国产精品成人午夜| 国产一区二区成人| 一区二区三区四区精品| 国语自产偷拍精品视频偷| 国产精品久久久久毛片软件| 在线成人av| 亚洲欧美不卡| 欧美日韩精品在线视频| 国产一区二区精品| 亚洲一区二区三区激情| 欧美国产一区二区| 亚洲国产精品999| 欧美一区二区视频免费观看| 欧美激情第1页| 在线观看欧美日韩| 久久中文久久字幕| 一区二区视频免费完整版观看| 亚洲在线视频网站| 欧美日韩视频在线第一区| 99精品欧美一区| 国产精品a级| 亚洲免费小视频| 欧美精品日韩三级| 夜夜精品视频一区二区| 欧美成人免费全部| 亚洲精品影院| 欧美色大人视频| 一本色道久久综合亚洲精品不卡| 女生裸体视频一区二区三区| 亚洲国产一区二区三区在线播| 麻豆成人综合网| 亚洲最黄网站| 国产亚洲精品久久久久久| 久久视频在线看| 99国产精品视频免费观看一公开| 欧美视频一区二| 老色鬼精品视频在线观看播放| 亚洲国产精品小视频| 精品福利电影| 亚洲国产精选| 久久久www成人免费精品| 欧美日韩亚洲在线| 久久久久一本一区二区青青蜜月| 日韩视频一区二区在线观看 | 欧美大胆成人| 久久成人综合网| 欧美亚洲视频| 亚洲一区二区三区四区五区午夜| 精品99视频| 国模精品一区二区三区色天香| 欧美精品久久久久久久| 欧美xxxx在线观看| 蜜桃av一区二区在线观看| 欧美一级大片在线观看| 亚洲自拍三区| 亚洲欧美影音先锋| 亚洲午夜女主播在线直播| aa亚洲婷婷| 午夜影院日韩| 免费看黄裸体一级大秀欧美| 久久黄色影院| 欧美成人精品在线播放| 欧美精品九九99久久| 欧美精品1区2区| 国产精品theporn| 国产无遮挡一区二区三区毛片日本| 国产精品久久久久久久一区探花| 国产精品国产馆在线真实露脸| 国产精品都在这里| 一区视频在线播放| 亚洲图中文字幕| 久久九九精品99国产精品| 欧美国产三级| 悠悠资源网亚洲青| 欧美一区二区在线| 一区二区免费看| 亚洲精品免费网站| 欧美一区二区三区啪啪| 你懂的网址国产 欧美| 欧美日韩亚洲一区二| 狠狠色狠狠色综合日日91app| 91久久嫩草影院一区二区| 久久精品理论片| 国产精品久久一卡二卡| 亚洲精品美女91| 欧美 日韩 国产 一区| 国产综合自拍|