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

Approach

Learn about the guiding principles, strategies, and techniques used to build and maintain Bootstrap so you can more easily customize and extend it yourself.

On this page

While the getting started pages provide an introductory tour of the project and what it offers, this document focuses on why we do the things we do in Bootstrap. It explains our philosophy to building on the web so that others can learn from us, contribute with us, and help us improve.

See something that doesn’t sound right, or perhaps could be done better? Open an issue—we’d love to discuss it with you.

Summary

We’ll dive into each of these more throughout, but at a high level, here’s what guides our approach.

  • Components should be responsive and mobile-first
  • Components should be built with a base class and extended via modifier classes
  • Component states should obey a common z-index scale
  • Whenever possible, prefer a HTML and CSS implementation over JavaScript
  • Whenever possible, use utilities over custom styles
  • Whenever possible, avoid enforcing strict HTML requirements (children selectors)

Responsive

Bootstrap’s responsive styles are built to be responsive, an approach that’s often referred to as mobile-first. We use this term in our docs and largely agree with it, but at times it can be too broad. While not every component must be entirely responsive in Bootstrap, this responsive approach is about reducing CSS overrides by pushing you to add styles as the viewport becomes larger.

Across Bootstrap, you’ll see this most clearly in our media queries. In most cases, we use min-width queries that begin to apply at a specific breakpoint and carry up through the higher breakpoints. For example, a .d-none applies from min-width: 0 to infinity. On the other hand, a .d-md-none applies from the medium breakpoint and up.

At times we’ll use max-width when a component’s inherent complexity requires it. At times, these overrides are functionally and mentally clearer to implement and support than rewriting core functionality from our components. We strive to limit this approach, but will use it from time to time.

Classes

Aside from our Reboot, a cross-browser normalization stylesheet, all our styles aim to use classes as selectors. This means steering clear of type selectors (e.g., input[type="text"]) and extraneous parent classes (e.g., .parent .child) that make styles too specific to easily override.

As such, components should be built with a base class that houses common, not-to-be overridden property-value pairs. For example, .btn and .btn-primary. We use .btn for all the common styles like display, padding, and border-width. We then use modifiers like .btn-primary to add the color, background-color, border-color, etc.

Modifier classes should only be used when there are multiple properties or values to be changed across multiple variants. Modifiers are not always necessary, so be sure you’re actually saving lines of code and preventing unnecessary overrides when creating them. Good examples of modifiers are our theme color classes and size variants.

z-index scales

There are two z-index scales in Bootstrap—elements within a component and overlay components.

Component elements

  • Some components in Bootstrap are built with overlapping elements to prevent double borders without modifying the border property. For example, button groups, input groups, and pagination.
  • These components share a standard z-index scale of 0 through 3.
  • 0 is default (initial), 1 is :hover, 2 is :active/.active, and 3 is :focus.
  • This approach matches our expectations of highest user priority. If an element is focused, it’s in view and at the user’s attention. Active elements are second highest because they indicate state. Hover is third highest because it indicates user intent, but nearly anything can be hovered.

Overlay components

Bootstrap includes several components that function as an overlay of some kind. This includes, in order of highest z-index, dropdowns, fixed and sticky navbars, modals, tooltips, and popovers. These components have their own z-index scale that begins at 1000. This starting number was chosen arbitrarily and serves as a small buffer between our styles and your project’s custom styles.

Each overlay component increases its z-index value slightly in such a way that common UI principles allow user focused or hovered elements to remain in view at all times. For example, a modal is document blocking (e.g., you cannot take any other action save for the modal’s action), so we put that above our navbars.

Learn more about this in our z-index layout page.

HTML and CSS over JS

Whenever possible, we prefer to write HTML and CSS over JavaScript. In general, HTML and CSS are more prolific and accessible to more people of all different experience levels. HTML and CSS are also faster in your browser than JavaScript, and your browser generally provides a great deal of functionality for you.

This principle is our first-class JavaScript API using data attributes. You don’t need to write nearly any JavaScript to use our JavaScript plugins; instead, write HTML. Read more about this in our JavaScript overview page.

Lastly, our styles build on the fundamental behaviors of common web elements. Whenever possible, we prefer to use what the browser provides. For example, you can put a .btn class on nearly any element, but most elements don’t provide any semantic value or browser functionality. So instead, we use <button>s and <a>s.

The same goes for more complex components. While we could write our own form validation plugin to add classes to a parent element based on an input’s state, thereby allowing us to style the text say red, we prefer using the :valid/:invalid pseudo-elements every browser provides us.

Utilities

Utility classes—formerly helpers in Bootstrap 3—are a powerful ally in combatting CSS bloat and poor page performance. A utility class is typically a single, immutable property-value pairing expressed as a class (e.g., .d-block represents display: block;). Their primary appeal is speed of use while writing HTML and limiting the amount of custom CSS you have to write.

Specifically regarding custom CSS, utilities can help combat increasing file size by reducing your most commonly repeated property-value pairs into single classes. This can have a dramatic effect at scale in your projects.

Flexible HTML

While not always possible, we strive to avoid being overly dogmatic in our HTML requirements for components. Thus, we focus on single classes in our CSS selectors and try to avoid immediate children selectors (>). This gives you more flexibility in your implementation and helps keep our CSS simpler and less specific.

Code conventions

Code Guide (from Bootstrap co-creator, @mdo) documents how we write our HTML and CSS across Bootstrap. It specifices guidelines for general formatting, common sense defaults, property and attribute orders, and more.

We use Stylelint to enforce these standards and more in our Sass/CSS. Our custom Stylelint config is open source and available for others to use and extend.

We use vnu-jar to enforce standard and semantic HTML, as well as detecting common errors.

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

      9000px;">

          国产精品女同互慰在线看 | 国产午夜精品美女毛片视频| 欧美高清hd18日本| 色综合久久久网| 成人美女视频在线看| 国产精品99久| 国产v综合v亚洲欧| av不卡在线播放| 国产毛片精品视频| 国产精品自在在线| 成人中文字幕电影| 成人精品一区二区三区四区| 福利电影一区二区三区| 国产伦理精品不卡| 国产一区二区按摩在线观看| 国产伦精一区二区三区| 成人视屏免费看| 99久久精品免费| 欧美在线一区二区| 69精品人人人人| 日韩视频一区在线观看| 久久蜜臀中文字幕| 国产精品视频看| 亚洲精品videosex极品| 亚洲欧美日韩在线| 亚洲老妇xxxxxx| 亚洲高清免费视频| 日本视频在线一区| 国产自产视频一区二区三区| 白白色 亚洲乱淫| 一本久道中文字幕精品亚洲嫩| 91视频在线看| 4438亚洲最大| 国产三级精品在线| 亚洲精品欧美综合四区| 另类成人小视频在线| 久久成人久久鬼色| 91天堂素人约啪| 欧美一级在线免费| 国产女人水真多18毛片18精品视频| 国产精品视频yy9299一区| 一区二区三区电影在线播| 日韩va欧美va亚洲va久久| 国产一区二区三区精品视频| 欧美系列在线观看| 国产精品网友自拍| 美女视频黄久久| 91视频国产观看| 日韩欧美国产精品| 亚洲欧美偷拍另类a∨色屁股| 日韩电影在线免费看| 国产不卡在线视频| 欧美精品在线一区二区| 国产精品乱人伦中文| 午夜伦理一区二区| 97久久精品人人澡人人爽| 日韩欧美在线影院| 亚洲精品中文在线观看| 国产在线播放一区三区四| 91片在线免费观看| 久久久久久久性| 日韩精品一二三区| 91在线视频播放地址| 中文在线一区二区| 九九视频精品免费| 欧美日韩精品一区二区在线播放| 中文字幕精品一区二区精品绿巨人 | 久久久99精品免费观看不卡| 中文字幕一区二区三区在线不卡| 日本特黄久久久高潮| 欧洲精品一区二区三区在线观看| 中文字幕电影一区| 韩国精品主播一区二区在线观看 | 欧美午夜宅男影院| 亚洲欧美日韩久久| 成人丝袜高跟foot| 中文av字幕一区| 国产在线一区二区综合免费视频| 欧美日韩一区二区电影| 亚洲一区二区四区蜜桃| 在线观看免费视频综合| 亚洲欧美日韩国产中文在线| 91免费看片在线观看| 国产精品二三区| 不卡欧美aaaaa| 自拍偷拍欧美精品| 91麻豆免费看| 亚洲成av人**亚洲成av**| 精品视频在线免费观看| 调教+趴+乳夹+国产+精品| 欧美一区国产二区| 久久丁香综合五月国产三级网站| 精品成人私密视频| jlzzjlzz欧美大全| 亚洲精品国产精品乱码不99| 欧美性色综合网| 麻豆成人免费电影| 国产调教视频一区| 91小视频免费看| 日韩黄色免费电影| 2020国产精品自拍| youjizz国产精品| 亚洲国产精品久久久男人的天堂| 欧美精品丝袜中出| 国产一区二区免费视频| 中文字幕一区免费在线观看| 欧美日韩在线播| 国产乱码精品一区二区三| 国产精品久久久久永久免费观看 | 色综合色狠狠综合色| 天堂久久久久va久久久久| 欧美精品一区二区三区蜜桃视频 | 国内精品久久久久影院薰衣草 | 日韩午夜小视频| 色又黄又爽网站www久久| 免费高清视频精品| 亚洲欧洲韩国日本视频| 91精品国产综合久久精品麻豆| 国产激情精品久久久第一区二区| 性欧美疯狂xxxxbbbb| 久久精品亚洲麻豆av一区二区| 91麻豆高清视频| 韩国女主播成人在线观看| 亚洲色图在线看| 久久―日本道色综合久久| 99re成人精品视频| 精品一二三四区| 丝袜亚洲另类欧美综合| 亚洲美腿欧美偷拍| 精品对白一区国产伦| 91黄色免费版| 丰满白嫩尤物一区二区| 蜜臀va亚洲va欧美va天堂 | 成人av网站大全| 国产一区欧美一区| 日本视频在线一区| 午夜精品影院在线观看| 国产精品久久久久精k8| 久久久精品国产免费观看同学| 欧美精选在线播放| 欧美怡红院视频| 欧美综合在线视频| 91在线视频18| 91免费看`日韩一区二区| 成人深夜福利app| 成人免费av资源| 成人av资源在线| 成人性生交大片免费看中文| 国产一区美女在线| 国产精品123区| 国产福利91精品| 国产精品1024久久| 国产成人免费在线视频| 国模一区二区三区白浆| 韩国v欧美v亚洲v日本v| 国产在线不卡视频| 国产成人超碰人人澡人人澡| 国产精品996| av中文字幕亚洲| 在线一区二区视频| 欧美日韩午夜影院| 欧美精品日韩一区| 日韩欧美色电影| 国产视频一区二区在线| 欧美极品xxx| 最新国产精品久久精品| 一区二区理论电影在线观看| 亚洲国产一区二区三区青草影视| 亚洲成人动漫一区| 老司机午夜精品| 国产99久久久国产精品免费看| 国产成人在线观看免费网站| 丁香婷婷综合网| 91偷拍与自偷拍精品| 在线电影欧美成精品| 久久尤物电影视频在线观看| 亚洲欧美在线另类| 亚洲国产精品久久久男人的天堂| 美国十次了思思久久精品导航| 美国三级日本三级久久99| 成人免费观看男女羞羞视频| 99久久99精品久久久久久| 欧美美女一区二区| 91精品欧美一区二区三区综合在| 久久人人97超碰com| 亚洲精品ww久久久久久p站 | 91在线播放网址| 欧美成人aa大片| 亚洲欧美一区二区久久| 九九精品一区二区| 日本韩国一区二区| 久久亚洲精华国产精华液| 一区二区三区精品视频| 精品一区二区日韩| 在线观看视频91| 久久九九久久九九| 午夜精品福利久久久| 99久久久无码国产精品| 欧美精品一区二区蜜臀亚洲| 亚洲1区2区3区4区|