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

      国产亚洲免费的视频看| 久久一二三国产| 亚洲高清成人| 国产精品大片wwwwww| 亚洲综合三区| 国外成人性视频| 欧美日韩亚洲另类| 欧美精品久久99| 欧美不卡激情三级在线观看| 香蕉久久久久久久av网站| 99pao成人国产永久免费视频| 伊人久久大香线蕉综合热线| 国产精品视频导航| 国产精品超碰97尤物18| 欧美久久久久久蜜桃| 老司机午夜免费精品视频| 欧美一区二区三区在线播放| 一区二区三区四区五区精品视频| 亚洲人成在线播放网站岛国| 在线精品亚洲一区二区| 国产视频亚洲精品| 国产日韩欧美成人| 国产精品理论片在线观看| 欧美日韩在线高清| 欧美午夜电影完整版| 欧美日韩中文字幕在线视频| 欧美日本中文字幕| 欧美视频日韩视频在线观看| 欧美日韩免费观看一区三区| 欧美视频手机在线| 国产精品久久一区主播| 国产欧美一区二区三区久久| 国产视频亚洲精品| 黄色综合网站| 亚洲精品国精品久久99热一| 亚洲破处大片| 中文一区在线| 午夜免费日韩视频| 久久人人精品| 欧美1区视频| 欧美日韩亚洲高清| 国产欧美高清| 亚洲国产色一区| 亚洲视频 欧洲视频| 欧美一区三区三区高中清蜜桃| 久久xxxx精品视频| 欧美成va人片在线观看| 欧美日韩国产综合视频在线观看中文| 欧美激情一区二区在线| 欧美日韩一区三区| 国产日韩专区在线| 尤物精品国产第一福利三区| 亚洲人成绝费网站色www| 一区二区国产精品| 久久精品成人一区二区三区| 欧美不卡一区| 国产精品久久久久一区| 狠狠久久婷婷| 亚洲图片欧美日产| 蜜臀久久99精品久久久画质超高清| 欧美精品成人一区二区在线观看| 国产精品视频一二| 亚洲日韩视频| 久久精品一二三| 欧美日韩美女在线| 亚洲电影下载| 午夜久久久久久| 欧美日韩综合另类| 亚洲国内精品| 久久久青草青青国产亚洲免观| 欧美日韩精品综合在线| 尤物视频一区二区| 午夜精品亚洲| 欧美日韩三级视频| 亚洲国产精品一区二区尤物区| 亚洲欧美国产日韩天堂区| 蜜臀久久久99精品久久久久久 | 女人天堂亚洲aⅴ在线观看| 欧美午夜不卡在线观看免费| 亚洲国产欧美另类丝袜| 午夜精品久久久久久久久久久| 欧美极品影院| 亚洲国产精品视频| 久久精品中文| 国产一区二区三区久久| 亚洲午夜久久久| 欧美日韩免费在线观看| 亚洲国产婷婷| 久久香蕉国产线看观看av| 国产欧美精品va在线观看| 在线天堂一区av电影| 欧美日韩国产一区二区| 亚洲美女免费精品视频在线观看| 久久性色av| 亚洲狠狠丁香婷婷综合久久久| 久久全球大尺度高清视频| 狠狠入ady亚洲精品| 狼狼综合久久久久综合网| 好看不卡的中文字幕| 久久成人国产| 亚洲高清视频中文字幕| 欧美成人日本| 中国亚洲黄色| 国产日韩欧美一二三区| 欧美专区亚洲专区| 亚洲福利久久| 欧美日韩国产综合视频在线观看 | 欧美—级在线免费片| 亚洲精品一区久久久久久| 欧美日韩妖精视频| 亚洲一区二区三区高清| 国产精品分类| 亚洲欧美日韩一区在线| 国产精品久久久久久久午夜| 亚洲欧美日韩国产精品 | 欧美一级片在线播放| 国产日本亚洲高清| 蜜桃av噜噜一区| 99在线|亚洲一区二区| 国产精品久久久久久久久搜平片| 欧美一区二区在线看| 在线免费高清一区二区三区| 欧美承认网站| 亚洲欧美日韩精品久久亚洲区| 国产一区二区三区av电影| 久久综合色8888| 亚洲图片欧美午夜| 国产在线欧美| 欧美日韩高清在线观看| 欧美综合国产| 亚洲作爱视频| 国产深夜精品福利| 欧美日韩国产va另类| 欧美伊久线香蕉线新在线| 亚洲激情中文1区| 国产美女精品人人做人人爽| 噜噜爱69成人精品| 亚洲制服丝袜在线| 亚洲精品永久免费| 国产日韩欧美在线| 欧美性大战久久久久| 鲁大师成人一区二区三区| 亚洲一级二级在线| 亚洲欧洲在线观看| 国产欧美综合在线| 欧美理论在线播放| 久久综合狠狠| 亚洲一区二区在线看| 亚洲高清在线| 黄色在线一区| 国产亚洲一区二区在线观看 | 亚洲网站在线观看| 亚洲精品日韩久久| 亚洲国产精品久久久久秋霞不卡 | 韩日视频一区| 国产精品久久久久91| 欧美日韩综合另类| 欧美日韩伊人| 欧美日韩人人澡狠狠躁视频| 美女爽到呻吟久久久久| 久久精品夜色噜噜亚洲a∨| 午夜精品区一区二区三| 亚洲私人影院| 亚洲精品一区二区三区在线观看 | 久久这里只精品最新地址| 欧美主播一区二区三区| 午夜精品久久久久久久99樱桃 | 亚洲欧美精品在线观看| 亚洲一区欧美二区| 亚洲午夜视频在线| 欧美一级黄色网| 午夜精品福利一区二区三区av| 亚洲欧美网站| 欧美一区二区三区啪啪| 久久动漫亚洲| 久久字幕精品一区| 美女图片一区二区| 欧美精品一区二区三区在线播放| 欧美不卡三区| 欧美日韩福利| 国产精品五月天| 黄色成人片子| 亚洲欧洲另类国产综合| 日韩小视频在线观看专区| 中文一区二区| 欧美一区二区视频观看视频| 久久精品国产一区二区三区免费看| 久久国产视频网站| 男男成人高潮片免费网站| 欧美日本一道本在线视频| 国产精品videosex极品| 狠狠色综合网| 日韩亚洲不卡在线| 99视频国产精品免费观看| 亚洲综合精品| 蜜臀av国产精品久久久久| 欧美日韩三级一区二区| 国产日产欧美一区| 亚洲三级电影在线观看 | 国产视频一区三区|