Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
85db846b
Commit
85db846b
authored
Jan 15, 2013
by
Mark Otto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mobile-first navs, navbar, grids, and type
parent
094767fb
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1623 additions
and
48 deletions
+1623
-48
docs/assets/css/bootstrap.css
docs/assets/css/bootstrap.css
+1393
-1
docs/assets/css/docs.css
docs/assets/css/docs.css
+36
-29
less/bootstrap.less
less/bootstrap.less
+12
-2
less/code.less
less/code.less
+3
-3
less/component-animations.less
less/component-animations.less
+11
-1
less/grid.less
less/grid.less
+16
-1
less/mixins.less
less/mixins.less
+1
-1
less/navbar.less
less/navbar.less
+88
-1
less/navs.less
less/navs.less
+37
-5
less/scaffolding.less
less/scaffolding.less
+21
-0
less/type.less
less/type.less
+4
-3
less/variables.less
less/variables.less
+1
-1
No files found.
docs/assets/css/bootstrap.css
View file @
85db846b
This diff is collapsed.
Click to expand it.
docs/assets/css/docs.css
View file @
85db846b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
/* Page =================================================== */
/* Page =================================================== */
/*
html {
html {
background-color: #fff;
background-color: #fff;
font-size: 62.5%;
font-size: 62.5%;
...
@@ -38,9 +39,10 @@ p {
...
@@ -38,9 +39,10 @@ p {
img {
img {
max-width: 100%;
max-width: 100%;
}
}
*/
/* Typography =================================================== */
/* Typography =================================================== */
/*
h1,
h1,
h2,
h2,
h3,
h3,
...
@@ -92,7 +94,7 @@ small {
...
@@ -92,7 +94,7 @@ small {
}
}
ul,
ul,
ol {
ol {
margin
:
0
0
.5
em
;
margin: 0 0
1
em;
padding: 0 0 0 28px;
padding: 0 0 0 28px;
}
}
li ul,
li ul,
...
@@ -124,10 +126,10 @@ a {
...
@@ -124,10 +126,10 @@ a {
a:hover {
a:hover {
text-decoration: underline;
text-decoration: underline;
}
}
*/
/*.collapse {
.collapse
{
position: relative;
position: relative;
height: 0;
height: 0;
overflow: hidden;
overflow: hidden;
...
@@ -135,13 +137,13 @@ a:hover {
...
@@ -135,13 +137,13 @@ a:hover {
.collapse.in {
.collapse.in {
height: auto;
height: auto;
}
}
*/
/*.nav {
.nav
{
margin-bottom: 0;
margin-bottom: 0;
padding-left
:
0
;
/* override default ul/ol */
padding-left: 0;
overflow
:
hidden
;
/* clearfix */
overflow: hidden;
}
}
.nav > li {
.nav > li {
display: block;
display: block;
...
@@ -154,11 +156,11 @@ a:hover {
...
@@ -154,11 +156,11 @@ a:hover {
.nav > li > a:hover {
.nav > li > a:hover {
text-decoration: none;
text-decoration: none;
background-color: #f5f5f5;
background-color: #f5f5f5;
}
}
*/
.nav-list
>
li
>
a
{
/*
.nav-list > li > a {
margin-bottom
:
-1px
;
/
* tuck up the following item to make 1px border */
margin-bottom: -1px; /
/ tuck up the following item to make 1px border
border: 1px solid #ddd;
border: 1px solid #ddd;
}
}
.nav-list > li:first-child > a {
.nav-list > li:first-child > a {
...
@@ -166,7 +168,7 @@ a:hover {
...
@@ -166,7 +168,7 @@ a:hover {
border-top-right-radius: 5px;
border-top-right-radius: 5px;
}
}
.nav-list > li:last-child > a {
.nav-list > li:last-child > a {
margin-bottom
:
0
;
/* undo the tuck */
margin-bottom: 0;
undo the tuck
border-bottom-left-radius: 5px;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-right-radius: 5px;
}
}
...
@@ -175,17 +177,17 @@ a:hover {
...
@@ -175,17 +177,17 @@ a:hover {
color: #fff;
color: #fff;
background-color: #428bca;
background-color: #428bca;
border-color: #428bca;
border-color: #428bca;
z-index
:
2
;
/
* Bring active item forward so border sits on top of next element */
z-index: 2; /
/ Bring active item forward so border sits on top of next element
}
}
*/
.navbar
{
/*
.navbar {
padding: 15px;
padding: 15px;
background-color: #eee;
background-color: #eee;
overflow
:
hidden
;
/* clearfix */
overflow: hidden;
}
}
.navbar .brand {
.navbar .brand {
...
@@ -199,10 +201,10 @@ a:hover {
...
@@ -199,10 +201,10 @@ a:hover {
.navbar .brand:hover {
.navbar .brand:hover {
text-decoration: none;
text-decoration: none;
background-color: #ddd;
background-color: #ddd;
}
}
*/
.navbar
.nav
{
/*
.navbar .nav {
margin-top
:
15px
;
/* space out from .navbar .brand and .btn-navbar */
margin-top: 15px;
}
}
.navbar .nav > li > a {
.navbar .nav > li > a {
line-height: 20px;
line-height: 20px;
...
@@ -213,8 +215,8 @@ a:hover {
...
@@ -213,8 +215,8 @@ a:hover {
.navbar .nav > .active > a {
.navbar .nav > .active > a {
background-color: #ddd;
background-color: #ddd;
}
}
*/
.btn-navbar
{
/*
.btn-navbar {
float: right;
float: right;
padding: 10px 12px;
padding: 10px 12px;
background-color: #ddd;
background-color: #ddd;
...
@@ -230,10 +232,10 @@ a:hover {
...
@@ -230,10 +232,10 @@ a:hover {
}
}
.btn-navbar .icon-bar + .icon-bar {
.btn-navbar .icon-bar + .icon-bar {
margin-top: 3px;
margin-top: 3px;
}
}
*/
.navbar-inverse
{
/*
.navbar-inverse {
background-color: #222;
background-color: #222;
}
}
.navbar-inverse .brand {
.navbar-inverse .brand {
...
@@ -253,33 +255,33 @@ a:hover {
...
@@ -253,33 +255,33 @@ a:hover {
}
}
.navbar-inverse .btn-navbar {
.navbar-inverse .btn-navbar {
background-color: #444;
background-color: #444;
}
}
*/
.row
{
/*
.row {
margin-left: -10px;
margin-left: -10px;
margin-right: -10px;
margin-right: -10px;
overflow
:
hidden
;
/* clearfix */
overflow: hidden;
}
}
[class^="span"] {
[class^="span"] {
padding-left: 10px;
padding-left: 10px;
padding-right: 10px;
padding-right: 10px;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
}
*/
/* Disable iOS/WinMobile font size changes */
/* Disable iOS/WinMobile font size changes */
@media
screen
and
(
max-device-width
:
480px
)
{
/*
@media screen and (max-device-width: 480px) {
html {
html {
-ms-text-size-adjust: none;
-ms-text-size-adjust: none;
-webkit-text-size-adjust: none;
-webkit-text-size-adjust: none;
}
}
}
}
*/
@media
screen
and
(
min-width
:
480px
)
{
@media
screen
and
(
min-width
:
480px
)
{
...
@@ -399,6 +401,11 @@ body > .container {
...
@@ -399,6 +401,11 @@ body > .container {
padding
:
14px
;
padding
:
14px
;
margin-bottom
:
-1px
;
margin-bottom
:
-1px
;
}
}
.bs-docs-example
p
:last-child
,
.bs-docs-example
ul
:last-child
,
.bs-docs-example
ol
:last-child
{
margin-bottom
:
0
;
}
.bs-docs-example
+
.prettyprint
{
.bs-docs-example
+
.prettyprint
{
margin-top
:
0
;
margin-top
:
0
;
}
}
...
...
less/bootstrap.less
View file @
85db846b
...
@@ -15,12 +15,22 @@
...
@@ -15,12 +15,22 @@
// Reset
// Reset
@import "normalize.less";
@import "normalize.less";
// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
// Components: common
@import "component-animations.less";
/*
// Components: Nav
@import "navs.less";
@import "navbar.less";
/*
// Grid system and page structure
// Grid system and page structure
@import "scaffolding.less";
@import "grid.less";
@import "grid.less";
// Base CSS
// Base CSS
...
...
less/code.less
View file @
85db846b
...
@@ -16,9 +16,9 @@ pre {
...
@@ -16,9 +16,9 @@ pre {
// Inline code
// Inline code
code {
code {
padding: 2px 4px;
padding: 2px 4px;
color: #d14
;
font-size: 90%
;
background-color: #f7f7f9
;
color: #c7254e
;
b
order: 1px solid #e1e1e8
;
b
ackground-color: #f9f2f4
;
white-space: nowrap;
white-space: nowrap;
}
}
...
...
less/component-animations.less
View file @
85db846b
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
}
}
}
}
.collapse {
/*
.collapse {
position: relative;
position: relative;
height: 0;
height: 0;
overflow: hidden;
overflow: hidden;
...
@@ -19,4 +19,14 @@
...
@@ -19,4 +19,14 @@
&.in {
&.in {
height: auto;
height: auto;
}
}
}*/
.collapse {
position: relative;
height: 0;
overflow: hidden;
.transition(height .35s ease);
}
.collapse.in {
height: auto;
}
}
less/grid.less
View file @
85db846b
...
@@ -9,8 +9,23 @@
...
@@ -9,8 +9,23 @@
max-width: 940px;
max-width: 940px;
}
}
// Mobile-first defaults
.row {
margin-left: -10px;
margin-right: -10px;
.clear_float();
}
[class^="span"] {
padding-left: 10px;
padding-right: 10px;
// Proper box-model (padding doesn't add to width)
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
// Fixed (940px)
// Fixed (940px)
#grid > .core(@grid-column-width, @grid-gutter-width, @grid-row-width);
//
#grid > .core(@grid-column-width, @grid-gutter-width, @grid-row-width);
// Reset utility classes due to specificity
// Reset utility classes due to specificity
[class*="span"].pull-right {
[class*="span"].pull-right {
...
...
less/mixins.less
View file @
85db846b
...
@@ -425,7 +425,7 @@
...
@@ -425,7 +425,7 @@
.container-fixed() {
.container-fixed() {
margin-right: auto;
margin-right: auto;
margin-left: auto;
margin-left: auto;
.clear
fix
();
.clear
_float
();
}
}
// Make a Grid
// Make a Grid
...
...
less/navbar.less
View file @
85db846b
//
//
// Navbars
(Redux)
// Navbars
// --------------------------------------------------
// --------------------------------------------------
// Wrapper and base class
.navbar {
padding: 15px;
background-color: #eee;
.clear_float();
}
// Brand/project name
.navbar .brand {
display: inline-block;
padding: 7px 15px;
font-size: 18px;
font-weight: bold;
line-height: 1;
&:hover {
text-decoration: none;
background-color: #ddd;
}
}
// Responsive navbar button
.btn-navbar {
float: right;
padding: 10px 12px;
background-color: #ddd;
border: 0;
border-radius: 4px;
// Bars
.icon-bar {
display: block;
width: 20px;
height: 2px;
background-color: #fff;
border-radius: 1px;
}
.icon-bar + .icon-bar {
margin-top: 3px;
}
}
// Nav links
.navbar {
.nav {
margin-top: 15px; // space out from .navbar .brand and .btn-navbar
}
.nav > li > a {
line-height: 20px;
}
.nav > li > a:hover {
background-color: #ddd;
}
.nav > .active > a {
background-color: #ddd;
}
}
// Inverse navbar
.navbar-inverse {
background-color: #222;
.brand {
color: #fff;
&:hover {
background-color: #333;
}
}
.nav > li > a {
color: #fff;
}
.nav > li > a:hover {
background-color: #333;
}
.nav > .active > a {
background-color: #333;
}
.btn-navbar {
background-color: #444;
}
}
/*
// COMMON STYLES
// COMMON STYLES
// -------------
// -------------
...
@@ -446,3 +531,5 @@
...
@@ -446,3 +531,5 @@
}
}
}
}
*/
less/navs.less
View file @
85db846b
...
@@ -8,22 +8,52 @@
...
@@ -8,22 +8,52 @@
.nav {
.nav {
margin-left: 0;
margin-left: 0;
margin-bottom: @line-height-base;
margin-bottom: 0;
padding-left: 0; // Override default ul/ol
list-style: none;
list-style: none;
.clear
fix
();
.clear
_float
();
}
}
.nav > li {
.nav > li {
float: left
;
display: block
;
}
}
.nav > li > a {
.nav > li > a {
position: relative;
display: block;
display: block;
padding:
8px 12
px;
padding:
10px 15
px;
}
}
.nav > li > a:hover {
.nav > li > a:hover {
text-decoration: none;
text-decoration: none;
background-color: @grayLighter;
background-color: @grayLighter;
}
}
// Lists
// -------------------------
.nav-list > li > a {
margin-bottom: -1px; // pull up the following link for a 1px border between
border: 1px solid #e5e5e5;
}
.nav-list > li:first-child > a {
border-top-left-radius: @border-radius-base;
border-top-right-radius: @border-radius-base;
}
.nav-list > li:last-child > a {
border-radius: 0 0 6px 6px;
border-bottom-left-radius: @border-radius-base;
border-bottom-right-radius: @border-radius-base;
}
.nav-list > .active > a,
.nav-list > .active > a:hover {
z-index: 2; // Bring active item forward so border sits on top of next element
color: #fff;
background-color: @link-color;
border-color: @link-color;
}
/*
// Prevent IE8 from misplacing imgs
// Prevent IE8 from misplacing imgs
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
// See https://github.com/h5bp/html5-boilerplate/issues/984#issuecomment-3985989
.nav > li > a > img {
.nav > li > a > img {
...
@@ -55,9 +85,10 @@
...
@@ -55,9 +85,10 @@
.nav .divider {
.nav .divider {
.nav-divider();
.nav-divider();
}
}
*/
/*
// Tabs
// Tabs
// -------------------------
// -------------------------
...
@@ -269,3 +300,4 @@
...
@@ -269,3 +300,4 @@
background-color: transparent;
background-color: transparent;
cursor: default;
cursor: default;
}
}
*/
less/scaffolding.less
View file @
85db846b
...
@@ -6,9 +6,30 @@
...
@@ -6,9 +6,30 @@
// Body reset
// Body reset
// -------------------------
// -------------------------
html {
font-size: 62.5%;
// 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;
}
}
body {
body {
margin: 0;
margin: 0;
color: @text-color;
color: @text-color;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-size: 1.4rem;
line-height: 1.5;
background-color: @body-background;
background-color: @body-background;
}
}
...
...
less/type.less
View file @
85db846b
...
@@ -93,9 +93,10 @@ h4 small { font-size: @font-size-base; }
...
@@ -93,9 +93,10 @@ h4 small { font-size: @font-size-base; }
// --------------------------------------------------
// --------------------------------------------------
// Unordered and Ordered lists
// Unordered and Ordered lists
ul, ol {
ul,
ol {
padding: 0;
padding: 0;
margin: 0 0
@line-height-base / 2
25px;
margin: 0 0
(@line-height-base / 2)
25px;
}
}
ul ul,
ul ul,
ul ol,
ul ol,
...
@@ -138,7 +139,7 @@ dd {
...
@@ -138,7 +139,7 @@ dd {
}
}
// Horizontal layout (like forms)
// Horizontal layout (like forms)
.dl-horizontal {
.dl-horizontal {
.clear
fix
(); // Ensure dl clears floats if empty dd elements present
.clear
_float
(); // Ensure dl clears floats if empty dd elements present
dt {
dt {
float: left;
float: left;
width: @component-offset-horizontal - 20;
width: @component-offset-horizontal - 20;
...
...
less/variables.less
View file @
85db846b
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
@line-height-base: 20px;
@line-height-base: 20px;
@headings-font-family: inherit; // empty to use BS default, @font-family-base
@headings-font-family: inherit; // empty to use BS default, @font-family-base
@headings-font-weight:
bold; // instead of browser default, bold
@headings-font-weight:
500;
// Component sizing
// Component sizing
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment