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

Utility API

The utility API is a Sass-based tool to generate utility classes.

Bootstrap utilities are generated with our utility API and can be used to modify or extend our default set of utility classes via Sass. Our utility API is based on a series of Sass maps and functions for generating families of classes with various options. If you’re unfamiliar with Sass maps, read up on the official Sass docs to get started.

The $utilities map contains all our utilities and is later merged with your custom $utilities map, if present. The utility map contains a keyed list of utility groups which accept the following options:

Option Type Description
property Required Name of the property, this can be a string or an array of strings (e.g., horizontal paddings or margins).
values Required List of values, or a map if you don’t want the class name to be the same as the value. If null is used as map key, it isn’t compiled.
class Optional Variable for the class name if you don’t want it to be the same as the property. In case you don’t provide the class key and property key is an array of strings, the class name will be the first element of the property array.
state Optional List of pseudo-class variants like :hover or :focus to generate for the utility. No default value.
responsive Optional Boolean indicating if responsive classes need to be generated. false by default.
rfs Optional Boolean to enable fluid rescaling. Have a look at the RFS page to find out how this works. false by default.
print Optional Boolean indicating if print classes need to be generated. false by default.
rtl Optional Boolean indicating if utility should be kept in RTL. true by default.

API explained

All utility variables are added to the $utilities variable within our _utilities.scss stylesheet. Each group of utilities looks something like this:

$utilities: (
  "opacity": (
    property: opacity,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
 );

Which outputs the following:

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: .25; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }
.opacity-100 { opacity: 1; }

Custom class prefix

Use the class option to change the class prefix used in the compiled CSS:

$utilities: (
  "opacity": (
    property: opacity,
    class: o,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
 );

Output:

.o-0 { opacity: 0; }
.o-25 { opacity: .25; }
.o-50 { opacity: .5; }
.o-75 { opacity: .75; }
.o-100 { opacity: 1; }

States

Use the state option to generate pseudo-class variations. Example pseudo-classes are :hover and :focus. When a list of states are provided, classnames are created for that pseudo-class. For example, to change opacity on hover, add state: hover and you’ll get .opacity-hover:hover in your compiled CSS.

Need multiple pseudo-classes? Use a space-separated list of states: state: hover focus.

$utilities: (
  "opacity": (
    property: opacity,
    class: opacity,
    state: hover,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
);

Output:

.opacity-0-hover:hover { opacity: 0; }
.opacity-25-hover:hover { opacity: .25; }
.opacity-50-hover:hover { opacity: .5; }
.opacity-75-hover:hover { opacity: .75; }
.opacity-100-hover:hover { opacity: 1; }

Responsive utilities

Add the responsive boolean to generate responsive utilities (e.g., .opacity-md-25) across all breakpoints.

$utilities: (
  "opacity": (
    property: opacity,
    responsive: true,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
 );

Output:

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: .25; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }
.opacity-100 { opacity: 1; }

@media (min-width: 576px) {
  .opacity-sm-0 { opacity: 0; }
  .opacity-sm-25 { opacity: .25; }
  .opacity-sm-50 { opacity: .5; }
  .opacity-sm-75 { opacity: .75; }
  .opacity-sm-100 { opacity: 1; }
}

@media (min-width: 768px) {
  .opacity-md-0 { opacity: 0; }
  .opacity-md-25 { opacity: .25; }
  .opacity-md-50 { opacity: .5; }
  .opacity-md-75 { opacity: .75; }
  .opacity-md-100 { opacity: 1; }
}

@media (min-width: 992px) {
  .opacity-lg-0 { opacity: 0; }
  .opacity-lg-25 { opacity: .25; }
  .opacity-lg-50 { opacity: .5; }
  .opacity-lg-75 { opacity: .75; }
  .opacity-lg-100 { opacity: 1; }
}

@media (min-width: 1200px) {
  .opacity-xl-0 { opacity: 0; }
  .opacity-xl-25 { opacity: .25; }
  .opacity-xl-50 { opacity: .5; }
  .opacity-xl-75 { opacity: .75; }
  .opacity-xl-100 { opacity: 1; }
}

@media (min-width: 1400px) {
  .opacity-xxl-0 { opacity: 0; }
  .opacity-xxl-25 { opacity: .25; }
  .opacity-xxl-50 { opacity: .5; }
  .opacity-xxl-75 { opacity: .75; }
  .opacity-xxl-100 { opacity: 1; }
}

Changing utilities

Override existing utilities by using the same key. For example, if you want additional responsive overflow utility classes, you can do this:

$utilities: (
  "overflow": (
    responsive: true,
    property: overflow,
    values: visible hidden scroll auto,
  ),
);

Enabling the print option will also generate utility classes for print, which are only applied within the @media print { ... } media query.

$utilities: (
  "opacity": (
    property: opacity,
    print: true,
    values: (
      0: 0,
      25: .25,
      50: .5,
      75: .75,
      100: 1,
    )
  )
 );

Output:

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: .25; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }
.opacity-100 { opacity: 1; }

@media print {
  .opacity-print-0 { opacity: 0; }
  .opacity-print-25 { opacity: .25; }
  .opacity-print-50 { opacity: .5; }
  .opacity-print-75 { opacity: .75; }
  .opacity-print-100 { opacity: 1; }
}

Using the API

Now that you’re familiar with how the utilities API works, learn how to add your own custom classes and modify our default utilities.

Add utilities

New utilities can be added to the default $utilities map with a map-merge. Make sure our required Sass files and _utilities.scss are imported first, then use the map-merge to add your additional utilities. For example, here’s how to add a responsive cursor utility with three values.

@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities";

$utilities: map-merge(
  $utilities,
  (
    "cursor": (
      property: cursor,
      class: cursor,
      responsive: true,
      values: auto pointer grab,
    )
  )
);

Modify utilities

Modify existing utilities in the default $utilities map with map-get and map-merge functions. In the example below, we’re adding an additional value to the width utilities. Start with an initial map-merge and then specify which utility you want to modify. From there, fetch the nested "width" map with map-get to access and modify the utility’s options and values.

@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities";

$utilities: map-merge(
  $utilities,
  (
    "width": map-merge(
      map-get($utilities, "width"),
      (
        values: map-merge(
          map-get(map-get($utilities, "width"), "values"),
          (10: 10%),
        ),
      ),
    ),
  )
);

Rename utilities

Missing v4 utilities, or used to another naming convention? The utilities API can be used to override the resulting class of a given utility—for example, to rename .ms-* utilities to oldish .ml-*:

@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities";

$utilities: map-merge(
  $utilities, (
    "margin-start": map-merge(
      map-get($utilities, "margin-start"),
      ( class: ml ),
    ),
  )
);

Remove utilities

Remove any of the default utilities by setting the group key to null. For example, to remove all our width utilities, create a $utilities map-merge and add "width": null within.

@import "bootstrap/scss/functions";
@import "bootstrap/scss/variables";
@import "bootstrap/scss/utilities";

$utilities: map-merge(
  $utilities,
  (
    "width": null
  )
);

Remove utility in RTL

Some edge cases make RTL styling difficult, such as line breaks in Arabic. Thus utilities can be dropped from RTL output by setting the rtl option to false:

$utilities: (
  "word-wrap": (
    property: word-wrap word-break,
    class: text,
    values: (break: break-word),
    rtl: false
  ),
);

Output:

/* rtl:begin:remove */
.text-break {
  word-wrap: break-word !important;
  word-break: break-word !important;
}
/* rtl:end:remove */

This doesn’t output anything in RTL, thanks to the RTLCSS remove control directive.

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

      国产一区二区三区免费在线观看 | 一区二区毛片| 国产精品伦一区| 久久人人爽人人爽爽久久| 99视频精品在线| 亚洲国产精品va在线观看黑人| 国产精品hd| 欧美日本国产一区| 免费不卡在线观看av| 久久不射电影网| 亚洲一区在线视频| 亚洲美洲欧洲综合国产一区| 极品少妇一区二区三区精品视频| 国产精品毛片大码女人| 欧美日韩1234| 欧美日本国产一区| 欧美精品久久久久久久| 免费看成人av| 久久永久免费| 久久综合激情| 久久婷婷人人澡人人喊人人爽| 午夜日韩福利| 亚洲欧美日韩综合| 亚洲免费在线观看视频| 亚洲性视频h| 亚洲专区在线| 亚洲视频在线观看网站| 亚洲视频在线观看视频| 亚洲色在线视频| 亚洲一区二区三区四区五区午夜 | 亚洲一区三区视频在线观看| 99精品视频免费| 一本久久a久久精品亚洲| 中文日韩电影网站| 香蕉av777xxx色综合一区| 香港久久久电影| 玖玖视频精品| 欧美日韩精品二区第二页| 国产精品v欧美精品∨日韩| 国产精品黄视频| 国产日本欧美一区二区三区| 国内成人自拍视频| 亚洲黄一区二区| 中文国产成人精品久久一| 欧美一级久久| 欧美福利视频网站| 国产精品久久午夜夜伦鲁鲁| 国产视频久久久久久久| 亚洲二区视频| 亚洲一区三区电影在线观看| 欧美专区福利在线| 麻豆成人综合网| 欧美私人啪啪vps| 国产一区二区三区四区老人| 亚洲电影免费观看高清完整版在线观看| 亚洲国产小视频在线观看| 一区二区三区黄色| 久久av在线看| 欧美日韩高清不卡| 韩日欧美一区二区| 一本色道久久综合亚洲精品小说| 亚洲欧美日韩一区二区| 欧美顶级艳妇交换群宴| 国产麻豆成人精品| 一本色道久久综合一区| 久久米奇亚洲| 国产精品一级| 亚洲国产老妈| 欧美在线观看视频一区二区三区 | 在线亚洲一区| 理论片一区二区在线| 国产精品久久福利| 亚洲精品在线观看免费| 欧美伊人影院| 国产精品午夜视频| 日韩视频免费观看高清完整版| 欧美在线观看视频一区二区三区| 欧美三级乱人伦电影| 亚洲国产另类 国产精品国产免费| 午夜精品剧场| 国产精品久久久久久久久婷婷| 在线成人激情| 久久国产黑丝| 国产日韩欧美亚洲一区| 宅男噜噜噜66一区二区| 欧美精品少妇一区二区三区| 亚洲国产日韩综合一区| 欧美成人福利视频| 亚洲福利视频一区| 男同欧美伦乱| 亚洲国产精品va在线看黑人| 久久一区二区三区av| 国产综合欧美| 久久久精品五月天| 国产一区二区中文| 久久久久久亚洲精品不卡4k岛国| 国产精品欧美一区喷水| 亚洲免费小视频| 国产精品欧美日韩久久| 亚洲香蕉网站| 国产情侣久久| 久久午夜激情| 亚洲人成艺术| 欧美亚洲成人免费| 亚洲欧美国产另类| 国产三级精品在线不卡| 久久精精品视频| 在线看国产一区| 欧美激情91| 亚洲午夜精品福利| 国产日韩综合一区二区性色av| 久久久久久999| 亚洲国产美女| 欧美三级小说| 久久精品人人做人人综合| 在线成人小视频| 欧美日韩国产美| 午夜精品av| 亚洲国产视频一区| 国产精品免费网站在线观看| 久久国产精品99国产| 亚洲国产精品va在看黑人| 欧美日韩在线直播| 久久av一区| 在线亚洲成人| 精品99一区二区三区| 欧美日韩免费一区二区三区| 亚洲免费在线视频| 亚洲国产精品专区久久| 国产精品一区二区三区乱码| 久久频这里精品99香蕉| 亚洲少妇一区| 91久久久国产精品| 国产午夜精品全部视频播放| 欧美国产精品劲爆| 久久久精品性| 性18欧美另类| 一区二区三区国产精华| 欲色影视综合吧| 国产精品自拍一区| 欧美日韩视频一区二区| 久久中文字幕一区| 欧美一级片久久久久久久| 最新精品在线| 一区在线视频观看| 国产欧美日韩免费| 欧美性天天影院| 欧美精品国产一区| 久久一区二区三区av| 欧美影院视频| 亚洲欧美在线aaa| 一区二区日韩| 夜夜嗨av色综合久久久综合网| 韩国一区二区三区在线观看| 国产精品女同互慰在线看| 欧美激情一区二区三区在线视频 | 亚洲国产免费看| 激情久久久久久| 狠狠色狠狠色综合人人| 国产亚洲一本大道中文在线| 国产精品乱码一区二区三区 | 亚洲美女性视频| 亚洲国产激情| 亚洲国产精品成人综合色在线婷婷| 国产女人精品视频| 国产精品视屏| 国产日韩精品视频一区二区三区| 国产精品乱人伦中文| 国产精品久久999| 国产精品视频999| 国产欧美日韩在线| 国产一区二区三区久久悠悠色av | 一本久久知道综合久久| 亚洲区中文字幕| 亚洲精品资源美女情侣酒店| 亚洲国产专区| 亚洲精品久久嫩草网站秘色| 亚洲国产小视频| 亚洲精品乱码久久久久久蜜桃91 | 欧美色播在线播放| 欧美体内she精视频| 国产精品伦一区| 国产视频欧美| 亚洲第一毛片| 亚洲精品在线视频| 在线综合欧美| 欧美一区亚洲一区| 欧美国产日韩xxxxx| 欧美三级日韩三级国产三级| 国产欧美精品在线| 在线不卡免费欧美| 亚洲无线视频| 久久亚洲影音av资源网| 欧美精品1区| 国产麻豆视频精品| 亚洲欧洲另类国产综合| 亚洲欧美日本在线| 欧美成人精品一区二区| 国产精品超碰97尤物18| 国内精品免费在线观看|