Commit 687d4a3e authored by Mark Otto's avatar Mark Otto
Browse files

Move grid/container styles to grid.less; update docs; add offsetting back

parent 255cb877
main cleanup-floating-forms cssvar-function dependabot/npm_and_yarn/stylelint-and-stylelint-config-twbs-bootstrap-15.3.0 extend-snippets feat/data-target floating-always-visible floating-labels-icons fod-main-banner form-controls-with-icons gh-pages gh-pages-530-alpha2 github/fork/719media/patch-13 github/fork/719media/patch-14 github/fork/719media/patch-9 github/fork/ChellyAhmed/fix-typo-reboot.md github/fork/ChellyAhmed/offcanvas-scroll-back github/fork/CtrlAltLilith/main github/fork/Elysiome/offcanvas-optional-window-resizing github/fork/JanSargsyan/main github/fork/LunicLynx/support-different-line-height-for-buttons github/fork/Psixodelik/main github/fork/Ronid1/ronid1/offcanvas_static_backdrop github/fork/RyanBerliner/tooltip-accessibility github/fork/SantiagoPVazquez/Feature-default-border-bottom-to-dropdown-item github/fork/Sir-Genius/utils github/fork/Sumit-Singh-8/main github/fork/Viktor-VERA2020/offcanvas-slide github/fork/Zivangu9/input-group-for-form-control-plaintext github/fork/alpadev/alpadev/call-dispose-on-component-reinstantiation github/fork/astagi/fix/tree-shake-modules github/fork/compnerd/dark-accordion-icon github/fork/derSascha/dropdown-dont-close-on-input-click github/fork/dev-ph1l/main github/fork/donquixote/issue-33861-utl-mixin github/fork/florianlacreuse/mixin-make-row-gutter-y github/fork/gregorw/main github/fork/iteggmbh/transitionend-dispose-race github/fork/jdelStrother/patch-1 github/fork/jonnysp/form-floating github/fork/jonnysp/independent-offcanvas github/fork/jonnysp/theme-dark-on-card-and-modal-fix github/fork/josefdlange/floating-label-placeholder-opacity github/fork/julien-deramond/enhance-change-version.js github/fork/julien-deramond/main-jd-fix-offset-content github/fork/julien-deramond/main-jd-issue-with-utitlies github/fork/julien-deramond/main-xmr-pa11y-ci-jd-add-hideElements github/fork/kyletsang/fix-tooltip-padding github/fork/lacutah/CheckboxCenteringDocumentation github/fork/lekoala/patch-3 github/fork/louismaximepiton/main-kld-lmp-collapse-proposal github/fork/louismaximepiton/main-lmp-card-inner-border-radius-fix github/fork/louismaximepiton/main-lmp-carousel-multiple-images github/fork/louismaximepiton/main-lmp-css-var-init github/fork/louismaximepiton/main-lmp-disabled-floating-label-fix github/fork/louismaximepiton/main-lmp-input-range-fix github/fork/louismaximepiton/main-lmp-shift-color github/fork/louismaximepiton/main-lmp-table-active-tr-fix github/fork/maciek-szn/switch github/fork/michael-roth/feature/19964-multiple-tab-targets github/fork/mistic100/dom-utils github/fork/nkdas91/accordion github/fork/nstungcom/fix-missing-modal-open-class github/fork/oraliahdz/animation-utilities github/fork/pine3ree/patch-7 github/fork/pouwerkerk/unindent-scss-docs-shortcode github/fork/smares/smares-no-scolling-on-modal-close github/fork/tgm-git/patch-1 gs-forms gs-toasts-with-animated-progress-bar gs/add-history-helper gs/change-version-dir-on-docs gs/data-must-set-onlu-one-instance gs/docs/fix-drop-down-error gs/event-handler-2 gs/make-docs-js-build gs/make-simple-attribute-toggler gs/popover-fix-doc gs/provide-steConfig-method gs/scrollspy-smoothscroll-option-use-browser-history gs/streamline-jqueryInterface gs/support-drop-down-in-navbar gs/test-js-generic-trigger gs/try-web-components gs/tweak-collapse-js-selector gs/use-event-handler-in-cocmponent gs/use-rollup-replace-for-version jo-docs-thanks-page jo-ssr-friendly logical-props-spacing-utils main-fod-disabled-form-check-label main-fod-nested-accordion main-fod-simpler-table-structure main-fod-table-separator main-fod-utilities-contrast main-jd-abbr-title main-jd-add-chips main-jd-add-doc-for-sass-custom-colors main-jd-add-enable-host-to-handle-web-components main-jd-browserstack-fine-tune main-jd-browserstack-updates main-jd-docs-consistent-usage-of-css-sections-step-2 main-jd-fix-docs-headers-in-white main-jd-fix-highlight-docs-border-radius main-jd-fix-placeholder-color-background-params-for-img-markup main-jd-glossary-experiment main-jd-postcss-drop-empty-css-vars main-jd-proto-doc-astro main-jd-skip-navigation-component main-jd-stackblitz-for-examples main-jd-upgrade-browserlistrc main-jd-use-host main-lmp-dark-theme-customization main-lmp-handle-scroll-target main-lmp-tab-fix main-mc-opensearch main-xmr-bundlewatch-action main-xmr-eslint-plugin-compat main-xmr-hugo-docs-vendor main-xmr-hugo-rm-ver main-xmr-linkinator-prod main-xmr-min-mangle main-xmr-pa11y-ci more-darkmode-examples nested-dropdowns patrickhlauke-issue37428 patrickhlauke-use-of-color-tweaks pr/34102 pr/37590 previous-next-docs-links sticky-thead utilities-functions-mixin v3-dev v4-dev v4-dev-dropdown-hide-method v530-dev v6-postcss-custom-media v6-spinner-dots v6/gs/use-floating-ui-in-place-of-popper xmr/dev xmr/docs-png xmr/docs-svgs xmr/hugo-reorg-files xmr/js-2 xmr/markdownlint xmr/prepare-530-alpha2 xmr/xo v5.3.0-alpha1 v5.2.3 v5.2.2 v5.2.1 v5.2.0 v5.2.0-beta1 v5.1.3 v5.1.2 v5.1.1 v5.1.0 v5.0.2 v5.0.1 v5.0.0 v5.0.0-beta3 v5.0.0-beta2 v5.0.0-beta1 v5.0.0-alpha3 v5.0.0-alpha2 v5.0.0-alpha1 v4.6.2 v4.6.1 v4.6.0 v4.5.3 v4.5.2 v4.5.1 v4.5.0 v4.4.1 v4.4.0 v4.3.1 v4.3.0 v4.2.1 v4.2.0 v4.1.3 v4.1.2 v4.1.1 v4.1.0 v4.0.0 v4.0.0-beta.3 v4.0.0-beta.2 v4.0.0-beta v4.0.0-alpha.6 v4.0.0-alpha.5 v4.0.0-alpha.4 v4.0.0-alpha.3 v4.0.0-alpha.2 v4.0.0-alpha v3.4.1 v3.4.0 v3.3.7 v3.3.6 v3.3.5 v3.3.4 v3.3.2 v3.3.1 v3.3.0 v3.2.0 v3.1.1 v3.1.0 v3.0.3 v3.0.2 v3.0.1 v3.0.0 v3.0.0-rc.2 v3.0.0-rc1
19 merge requests!7033Fix backdrop undefined bug in modal,!8635ignore Gruntfile.js in jekyll,!8339Fix broken links to navbar component in docs examples,!7329Fix for issue #7328,!7219Fix for mini typo mistake in css.html,!7674Clear float on all when navbar is collapsed - v3,!7344Fixed .spanX selector (*= instead of ^=),!7346Fix compilation error,!7775added some tests for tooltip title setter,!8157Close Me: Docs "Customize and Download" button fix,!7509Proposed fix for allowing Collapse events ('show'/'hide') to be cancelled,!7964commit fixes #7792,!8656Added rel="stylesheet" to CDN-Examples,!8527Inner properties move 1,!8245Interactive color picker - Closed: request against wrong branch,!7865Patch 2,!7651Drop the sizzle dependency to allow smaller builds targeting mobile devices,!6853typeahead: do not store item data in an attribute,!6666Patch 1
Showing with 163 additions and 121 deletions
+163 -121
......@@ -204,16 +204,14 @@ table {
html {
font-size: 62.5%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@media screen and (max-device-width: 480px) {
html {
-webkit-text-size-adjust: none;
-ms-text-size-adjust: none;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
}
......@@ -726,6 +724,94 @@ pre code {
box-sizing: border-box;
}
@media screen and (min-width: 768px) {
[class^="span"] {
float: left;
}
.span1 {
width: 8.3333333%;
}
.span2 {
width: 16.6666667%;
}
.span3 {
width: 25%;
}
.span4 {
width: 33.3333333%;
}
.span5 {
width: 41.666666667%;
}
.span6 {
width: 50%;
}
.span7 {
width: 58.333333333%;
}
.span8 {
width: 66.666666667%;
}
.span9 {
width: 75%;
}
.span10 {
width: 83.333333333%;
}
.span11 {
width: 91.666666667%;
}
.offset1 {
margin-left: 8.3333333%;
}
.offset2 {
margin-left: 16.6666667%;
}
.offset3 {
margin-left: 25%;
}
.offset4 {
margin-left: 33.3333333%;
}
.offset5 {
margin-left: 41.666666667%;
}
.offset6 {
margin-left: 50%;
}
.offset7 {
margin-left: 58.333333333%;
}
.offset8 {
margin-left: 66.666666667%;
}
.offset9 {
margin-left: 75%;
}
.offset10 {
margin-left: 83.333333333%;
}
.offset11 {
margin-left: 91.666666667%;
}
}
@media screen and (min-width: 992px) {
.container {
max-width: 940px;
}
}
@media screen and (min-width: 1200px) {
.container {
max-width: 1170px;
}
[class^="span"] {
padding-right: 15px;
padding-left: 15px;
}
}
[class*="span"].pull-right {
float: right;
}
......@@ -4544,69 +4630,6 @@ a.badge:hover {
position: fixed;
}
@media screen and (min-width: 768px) {
[class^="span"] {
float: left;
}
.span1 {
width: 8.3333333%;
}
.span2 {
width: 16.6666667%;
}
.span3 {
width: 25%;
}
.span4 {
width: 33.3333333%;
}
.span5 {
width: 41.666666667%;
}
.span6 {
width: 50%;
}
.span7 {
width: 58.333333333%;
}
.span8 {
width: 66.666666667%;
}
.span9 {
width: 75%;
}
.span10 {
width: 83.333333333%;
}
.span11 {
width: 91.666666667%;
}
}
@media screen and (min-width: 992px) {
{
/* body {
font-size: 1.6rem;
font-size: 16px;
}
*/
}
.container {
max-width: 940px;
}
}
@media screen and (min-width: 1200px) {
.container {
max-width: 1170px;
}
[class^="span"] {
padding-right: 15px;
padding-left: 15px;
}
}
/*
// Responsive
// -------------------------------------------------------------
......
......@@ -139,6 +139,9 @@ section > ul li {
/* Special grid styles
-------------------------------------------------- */
.show-grid {
margin-bottom: 15px;
}
.show-grid [class^="span"] {
padding-top: 10px;
padding-bottom: 10px;
......
......@@ -83,7 +83,7 @@
<div class="row">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#global"><i class="glyphicon-chevron-right"></i> Global styles</a></li>
<li><a href="#global"><i class="glyphicon-chevron-right"></i> Global settings</a></li>
<li><a href="#typography"><i class="glyphicon-chevron-right"></i> Typography</a></li>
<li><a href="#code"><i class="glyphicon-chevron-right"></i> Code</a></li>
<li><a href="#gridSystem"><i class="glyphicon-chevron-right"></i> Grid system</a></li>
......@@ -105,6 +105,7 @@
<div class="page-header">
<h1>Global settings</h1>
</div>
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
<h3>Requires HTML5 doctype</h3>
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
......@@ -115,6 +116,12 @@
&lt;/html&gt;
</pre>
<h3>Mobile first</h3>
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
<p>To enable proper mobile styles, <strong>add the viewport meta tag</strong> to your <code>&lt;head&gt;</code>:</p>
<pre class="prettyprint linenums">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</pre>
<p>This meta tag improves rendering of sites on mobile devices and ensures proper touch-based zooming.</p>
<h3>Typography and links</h3>
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
<ul>
......@@ -554,7 +561,7 @@
<h2>Nesting columns</h2>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to 12.</p>
<div class="row show-grid">
<div class="span9">
Level 1: 9 columns
......
......@@ -15,7 +15,7 @@
<div class="row">
<div class="span3 bs-docs-sidebar">
<ul class="nav nav-list bs-docs-sidenav">
<li><a href="#global"><i class="glyphicon-chevron-right"></i> Global styles</a></li>
<li><a href="#global"><i class="glyphicon-chevron-right"></i> Global settings</a></li>
<li><a href="#typography"><i class="glyphicon-chevron-right"></i> Typography</a></li>
<li><a href="#code"><i class="glyphicon-chevron-right"></i> Code</a></li>
<li><a href="#gridSystem"><i class="glyphicon-chevron-right"></i> Grid system</a></li>
......@@ -37,6 +37,7 @@
<div class="page-header">
<h1>Global settings</h1>
</div>
<p class="lead">Get the lowdown on the key pieces of Bootstrap's infrastructure, including our approach to better, faster, stronger web development.</p>
<h3>Requires HTML5 doctype</h3>
<p>Bootstrap makes use of certain HTML elements and CSS properties that require the use of the HTML5 doctype. Include it at the beginning of all your projects.</p>
......@@ -47,6 +48,12 @@
&lt;/html&gt;
</pre>
<h3>Mobile first</h3>
<p>With Bootstrap 2, we added optional mobile friendly styles for key aspects of the framework. With Bootstrap 3, we've rewritten the project to be mobile friendly from the start. Instead of adding on optional mobile styles, they're baked right into the core. In fact, <strong>Bootstrap is mobile first</strong>. Mobile first styles can be found throughout the entire library instead of in separate files.</p>
<p>To enable proper mobile styles, <strong>add the viewport meta tag</strong> to your <code>&lt;head&gt;</code>:</p>
<pre class="prettyprint linenums">&lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;</pre>
<p>This meta tag improves rendering of sites on mobile devices and ensures proper touch-based zooming.</p>
<h3>Typography and links</h3>
<p>Bootstrap sets basic global display, typography, and link styles. Specifically, we:</p>
<ul>
......@@ -494,7 +501,7 @@
<h2>Nesting columns</h2>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to the number of columns of its parent.</p>
<p>To nest your content with the default grid, add a new <code>.row</code> and set of <code>.span*</code> columns within an existing <code>.span*</code> column. Nested rows should include a set of columns that add up to 12.</p>
<div class="row show-grid">
<div class="span9">
Level 1: 9 columns
......
......@@ -59,52 +59,6 @@
@import "utilities.less"; // Has to be last to override when necessary
// Responsive: Tablets and up
@media screen and (min-width: 768px) {
[class^="span"] {
float: left;
}
.span1 { width: 8.3333333%; }
.span2 { width: 16.6666667%; }
.span3 { width: 25%; }
.span4 { width: 33.3333333%; }
.span5 { width: 41.666666667%; }
.span6 { width: 50%; }
.span7 { width: 58.333333333%; }
.span8 { width: 66.666666667%; }
.span9 { width: 75%; }
.span10 { width: 83.333333333%; }
.span11 { width: 91.666666667%; }
}
// Responsive: Desktops and up
@media screen and (min-width: 992px) {
/* body {
font-size: 1.6rem;
font-size: 16px;
}
*/
.container {
max-width: 940px;
}
}
// Responsive: Large desktops and up
@media screen and (min-width: 1200px) {
.container {
max-width: 1170px;
}
[class^="span"] {
padding-left: 15px;
padding-right: 15px;
}
}
/*
// Responsive
......
......@@ -24,6 +24,56 @@
box-sizing: border-box;
}
// Responsive: Tablets and up
@media screen and (min-width: 768px) {
[class^="span"] {
float: left;
}
.span1 { width: 8.3333333%; }
.span2 { width: 16.6666667%; }
.span3 { width: 25%; }
.span4 { width: 33.3333333%; }
.span5 { width: 41.666666667%; }
.span6 { width: 50%; }
.span7 { width: 58.333333333%; }
.span8 { width: 66.666666667%; }
.span9 { width: 75%; }
.span10 { width: 83.333333333%; }
.span11 { width: 91.666666667%; }
.offset1 { margin-left: 8.3333333%; }
.offset2 { margin-left: 16.6666667%; }
.offset3 { margin-left: 25%; }
.offset4 { margin-left: 33.3333333%; }
.offset5 { margin-left: 41.666666667%; }
.offset6 { margin-left: 50%; }
.offset7 { margin-left: 58.333333333%; }
.offset8 { margin-left: 66.666666667%; }
.offset9 { margin-left: 75%; }
.offset10 { margin-left: 83.333333333%; }
.offset11 { margin-left: 91.666666667%; }
}
// Responsive: Desktops and up
@media screen and (min-width: 992px) {
.container {
max-width: 940px;
}
}
// Responsive: Large desktops and up
@media screen and (min-width: 1200px) {
.container {
max-width: 1170px;
}
[class^="span"] {
padding-left: 15px;
padding-right: 15px;
}
}
// Fixed (940px)
// #grid > .core(@grid-column-width, @grid-gutter-width, @grid-row-width);
......
......@@ -11,15 +11,13 @@ html {
// Touch the Mobile Magic™
-webkit-overflow-scrolling: touch;
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
// Disable iOS/WinMobile font size changes
@media screen and (max-device-width: 480px) {
html {
-ms-text-size-adjust: none;
-webkit-text-size-adjust: none;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment