精品久久久久久亚洲精品_成人午夜网站_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;">

          欧美中文字幕一区二区三区 | 中文字幕久久午夜不卡| 中文字幕亚洲成人| 亚洲色图视频网| 国产米奇在线777精品观看| 欧美一级欧美三级| 一区二区三区**美女毛片| 蜜桃av噜噜一区二区三区小说| 国产精品资源在线看| 日韩欧美一区在线观看| 亚洲制服丝袜一区| 成人av资源网站| 中文字幕在线不卡一区 | 国产精品1024| 国产精品黄色在线观看| 色哟哟国产精品免费观看| 久久精品视频在线看| 久久av老司机精品网站导航| 日韩视频在线你懂得| 亚洲一级电影视频| 6080亚洲精品一区二区| 久久亚洲春色中文字幕久久久| 激情综合色播激情啊| 欧美国产精品一区二区| 91久久精品日日躁夜夜躁欧美| 婷婷六月综合网| 久久久亚洲高清| 男男gaygay亚洲| 欧美三级电影精品| 青青草国产精品亚洲专区无| 欧美日韩一区二区三区在线看 | 国产精品久久久久三级| 色婷婷久久久久swag精品| 天堂av在线一区| 日本一区二区三级电影在线观看| 成人国产精品免费| 亚洲免费三区一区二区| 日韩一区二区三区视频在线观看| 国产剧情一区二区| 一个色妞综合视频在线观看| 日韩一区二区免费在线电影| 国产aⅴ综合色| 亚洲地区一二三色| 日韩欧美色综合网站| 91视频www| 韩国女主播一区二区三区| 亚洲精品ww久久久久久p站| 精品嫩草影院久久| 欧美精品v国产精品v日韩精品| 国产精品99久久不卡二区| 亚洲h在线观看| 国产精品久久久久9999吃药| 日韩一区二区三区视频| 波多野结衣一区二区三区| 美女视频黄久久| 亚洲特黄一级片| 国产精品毛片a∨一区二区三区| 色噜噜久久综合| 99久久精品国产精品久久| 国产精品一区二区x88av| 美女爽到高潮91| 手机精品视频在线观看| 精品久久一二三区| 91精品久久久久久久91蜜桃| 国产成人在线视频播放| 奇米影视7777精品一区二区| 久久久精品一品道一区| 日韩精品一级二级| 91视频在线看| 色婷婷久久综合| 在线中文字幕一区| 一本一本大道香蕉久在线精品 | 精品人伦一区二区色婷婷| 欧美亚洲图片小说| 91福利视频在线| 久久国产精品第一页| 日韩中文字幕91| 蜜臀av国产精品久久久久 | 亚洲人成在线播放网站岛国| 国产精品美女久久久久aⅴ| 国产亚洲精品中文字幕| 欧美激情一区在线观看| 国产视频在线观看一区二区三区 | 日韩国产高清影视| 久久国产精品99精品国产| 久88久久88久久久| 国内精品在线播放| 高清成人免费视频| 成人a区在线观看| 91成人国产精品| 日韩亚洲欧美中文三级| 2020国产精品| 亚洲日本在线天堂| 日韩和欧美一区二区| 国精产品一区一区三区mba视频| 国产精品69久久久久水密桃 | 成人欧美一区二区三区视频网页| 久久久久亚洲蜜桃| 精品免费日韩av| 精品久久久影院| 日韩欧美一区在线| 欧美一级在线视频| 精品999在线播放| 精品国产网站在线观看| 欧美成人video| 久久综合国产精品| 久久青草欧美一区二区三区| 日韩精品一区在线| 国产精品丝袜在线| 亚洲蜜臀av乱码久久精品| 亚洲一区视频在线| 麻豆久久久久久| 国产成人免费视频网站| 91色视频在线| 久久综合丝袜日本网| 亚洲少妇中出一区| 麻豆91在线观看| 欧美网站大全在线观看| 国产日韩欧美不卡在线| 亚洲午夜视频在线观看| 粉嫩嫩av羞羞动漫久久久| 欧美日韩不卡一区| 国产精品不卡一区| 国产精品一二三四五| 678五月天丁香亚洲综合网| 亚洲视频在线一区观看| 韩国一区二区在线观看| 欧美高清视频www夜色资源网| 国产精品免费观看视频| 国产麻豆精品久久一二三| 欧美另类一区二区三区| 一区二区三区在线免费播放| 不卡一区二区中文字幕| 久久网站最新地址| 美美哒免费高清在线观看视频一区二区 | 日韩成人免费电影| 不卡一区二区在线| 欧亚洲嫩模精品一区三区| 精品久久久久香蕉网| 亚洲一区二区美女| 色噜噜狠狠色综合中国| 亚洲色图在线视频| 99re亚洲国产精品| 亚洲欧洲一区二区在线播放| www.色精品| 国产精品盗摄一区二区三区| 日韩1区2区日韩1区2区| 色网站国产精品| 国产日韩亚洲欧美综合| 天堂久久一区二区三区| 国产传媒欧美日韩成人| 欧美欧美欧美欧美| 亚洲久草在线视频| 91丝袜美女网| 久久女同性恋中文字幕| 日本aⅴ亚洲精品中文乱码| 欧美综合天天夜夜久久| 亚洲男帅同性gay1069| 国产在线视视频有精品| 91精品国产综合久久婷婷香蕉 | 欧美图片一区二区三区| 亚洲综合激情网| 欧美三区在线观看| 日韩国产精品久久| 久久亚洲捆绑美女| 成人91在线观看| 亚洲午夜一区二区| 欧美草草影院在线视频| 国产呦萝稀缺另类资源| 中文字幕成人av| 欧美三区在线观看| 国产一区二三区好的| 中文字幕亚洲欧美在线不卡| 欧美人狂配大交3d怪物一区| 国产又粗又猛又爽又黄91精品| 国产欧美日韩精品在线| 色综合久久中文综合久久牛| 亚洲h在线观看| 国产网站一区二区三区| 欧洲一区二区三区免费视频| 蜜桃久久久久久| ...中文天堂在线一区| 欧美成人女星排行榜| av不卡免费电影| 麻豆成人免费电影| 一区二区三区美女| 久久综合五月天婷婷伊人| 91久久精品一区二区二区| 国产专区综合网| 亚洲黄色av一区| 日韩欧美一区二区三区在线| 欧美日韩精品一区二区三区四区| www.亚洲色图| 成人亚洲精品久久久久软件| 国产呦精品一区二区三区网站 | 免费在线观看视频一区| 视频一区中文字幕国产| 日欧美一区二区| 免费精品99久久国产综合精品| 午夜a成v人精品|