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

      久久免费视频观看| 亚洲欧美怡红院| 国产一区在线免费观看| 欧美激情aⅴ一区二区三区| 亚洲一区二区三区色| 影音先锋亚洲视频| 国产欧美日韩一区二区三区| 蜜桃久久av一区| 午夜宅男欧美| 亚洲视频自拍偷拍| 亚洲电影激情视频网站| 国产日产亚洲精品| 国产精品v日韩精品| 欧美人与禽性xxxxx杂性| 麻豆91精品| 久久一区亚洲| 久久久久久久精| 欧美在线视屏| 久久精品久久综合| 欧美一区永久视频免费观看| 亚洲一区视频| 亚洲午夜一级| 亚洲一区二区三区乱码aⅴ| 一区二区三区精品在线 | 国户精品久久久久久久久久久不卡| 欧美精品一区二区三区蜜桃| 久久中文字幕导航| 久久久久久久网站| 久久裸体视频| 欧美大学生性色视频| 欧美电影在线观看| 欧美日韩国产大片| 欧美日韩精品一二三区| 欧美日韩一级大片网址| 欧美手机在线| 国产精品美女在线| 国产一区二区三区四区在线观看 | 亚洲一区网站| 亚洲欧美一区二区视频| 久久9热精品视频| 久久人人爽人人爽爽久久| 美女视频网站黄色亚洲| 欧美精品自拍偷拍动漫精品| 欧美日韩在线播放| 国产酒店精品激情| 在线电影国产精品| 日韩一区二区电影网| 亚洲欧美日韩精品| 久久久国产视频91| 欧美理论片在线观看| 国产精品美女久久久久久免费| 国产欧美一区视频| 亚洲国产免费看| 亚洲在线免费| 美女脱光内衣内裤视频久久影院 | 亚洲欧美三级伦理| 久久久99精品免费观看不卡| 欧美成人一区二区三区| 国产精品美腿一区在线看| 精久久久久久| 中国成人黄色视屏| 久久精品欧美日韩| 国产精品福利在线观看| 亚洲国产精品国自产拍av秋霞| 亚洲一区二区av电影| 老牛影视一区二区三区| 国产精品入口尤物| 亚洲精品视频在线观看免费| 午夜久久99| 欧美日韩福利| 1024欧美极品| 久久激情视频| 国产精品视频免费观看| 一本色道久久综合亚洲二区三区 | 亚洲第一二三四五区| 午夜伦理片一区| 欧美性jizz18性欧美| 亚洲高清不卡在线观看| 欧美一区二区三区四区在线| 欧美日韩一区视频| 亚洲美女黄色| 欧美国产精品va在线观看| 国产亚洲网站| 午夜久久资源| 国产美女搞久久| 亚洲直播在线一区| 国产精品久久久久久久久免费樱桃 | 久久精品一区二区| 国产精品区二区三区日本 | 99riav1国产精品视频| 美女尤物久久精品| 在线精品国产欧美| 美女视频黄免费的久久| 亚洲第一精品夜夜躁人人爽| 久久久人成影片一区二区三区 | 国产在线乱码一区二区三区| 羞羞视频在线观看欧美| 国产欧美精品一区二区色综合 | 久久久一区二区| 狠狠干综合网| 免费在线欧美视频| 日韩小视频在线观看专区| 欧美精品一区二区三区在线播放| 亚洲久久在线| 国产精品啊啊啊| 欧美一区二区三区四区在线观看 | 国产婷婷97碰碰久久人人蜜臀| 午夜精品亚洲| 国产一区在线视频| 美国十次成人| av成人免费在线观看| 国产精品第十页| 欧美一级欧美一级在线播放| 国产一区二区三区高清在线观看 | 亚洲福利专区| 欧美日韩一区在线| 性欧美大战久久久久久久久| 国模精品一区二区三区色天香| 另类人畜视频在线| 99精品国产福利在线观看免费| 国产精品久久久久久久久久妞妞 | 精品成人免费| 欧美日精品一区视频| 午夜激情综合网| 亚洲高清在线观看| 国产精品久久久免费| 久久在线免费| 亚洲专区在线| 亚洲区国产区| 国产亚洲日本欧美韩国| 欧美精品www| 久久久777| 亚洲在线观看视频网站| 亚洲经典自拍| 国产视频综合在线| 欧美日韩一级视频| 久久永久免费| 亚洲欧美色一区| 99re热精品| 伊人久久亚洲影院| 国产美女精品在线| 欧美日韩一区在线观看视频| 老司机午夜精品| 欧美在线日韩| 亚洲自拍偷拍色片视频| 亚洲另类在线一区| 影音先锋国产精品| 国产欧美一区二区精品婷婷| 欧美日韩色综合| 欧美精品九九99久久| 免费成人激情视频| 久久久久国产一区二区三区四区 | 国产日韩精品一区二区| 欧美日韩免费| 欧美日韩麻豆| 欧美日韩福利视频| 欧美日韩岛国| 欧美区一区二| 欧美日韩成人一区二区三区| 久久躁日日躁aaaaxxxx| 欧美专区日韩视频| 久久国产精品99国产精| 欧美一区二区黄| 欧美伊人久久久久久久久影院| 亚洲欧美日韩国产综合在线 | 国产精一区二区三区| 国产精品盗摄一区二区三区| 欧美三级视频在线| 欧美日韩午夜激情| 欧美午夜电影完整版| 国产精品久久久久久超碰| 国产精品99免费看 | 先锋影音网一区二区| 亚洲欧美日韩天堂一区二区| 亚洲主播在线| 欧美一区观看| 久久影院午夜片一区| 欧美大片免费观看| 欧美久久久久久久久久| 欧美体内she精视频在线观看| 欧美性色视频在线| 国产欧美日韩另类一区| 国语自产精品视频在线看8查询8 | 欧美插天视频在线播放| 欧美人成在线视频| 国产精品视频在线观看| 国产一区二区三区久久| 亚洲国产欧美一区二区三区丁香婷| 亚洲国产精品成人综合色在线婷婷| 亚洲免费av电影| 亚洲综合久久久久| 久色婷婷小香蕉久久| 欧美美女bbbb| 国产一区观看| 99精品热6080yy久久| 香蕉亚洲视频| 欧美不卡高清| 国产精品一区二区欧美| 影音先锋亚洲电影| 亚洲免费在线视频|