-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile examples CSS with Sass using BS variables and mixins #18709
Changes from 10 commits
d3fb5ae
8099eb7
8b18fd4
e30e062
c8309dc
80b073f
7c3c941
dc3b450
6829c57
36a35f7
d2eab9c
dd79e40
d406638
8958835
f93b60e
b6ea74d
1f55496
d9e1330
15c595e
ba092a8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
// Load Bootstrap variables and mixins | ||
@import "../../../../../scss/variables"; | ||
@import "../../../../../scss/mixins"; | ||
|
||
body { | ||
min-height: 75rem; /* Can be removed; just added for demo purposes */ | ||
} | ||
|
||
.navbar { | ||
margin-bottom: 0; | ||
} | ||
|
||
.navbar-collapse .container-fluid { | ||
padding: 2rem 2.5rem; | ||
border-bottom: 1px solid #55595c; | ||
} | ||
|
||
.navbar-collapse h4 { | ||
color: #818a91; | ||
} | ||
|
||
.navbar-collapse .text-muted { | ||
color: #818a91; | ||
} | ||
|
||
.about { | ||
float: left; | ||
max-width: 30rem; | ||
margin-right: 3rem; | ||
} | ||
|
||
.social a { | ||
font-weight: 500; | ||
color: #eceeef; | ||
} | ||
.social a:hover { | ||
color: #fff; | ||
} | ||
|
||
.jumbotron { | ||
padding-top: 6rem; | ||
padding-bottom: 6rem; | ||
margin-bottom: 0; | ||
background-color: #fff; | ||
} | ||
|
||
.jumbotron p:last-child { | ||
margin-bottom: 0; | ||
} | ||
|
||
.jumbotron-heading { | ||
font-weight: 300; | ||
} | ||
|
||
.jumbotron .container { | ||
max-width: 40rem; | ||
} | ||
|
||
.album { | ||
min-height: 50rem; /* Can be removed; just added for demo purposes */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
padding-top: 3rem; | ||
padding-bottom: 3rem; | ||
background-color: #f7f7f7; | ||
} | ||
|
||
.card { | ||
float: left; | ||
width: 33.333%; | ||
padding: .75rem; | ||
margin-bottom: 2rem; | ||
border: 0; | ||
} | ||
|
||
.card > img { | ||
margin-bottom: .75rem; | ||
} | ||
|
||
.card-text { | ||
font-size: 85%; | ||
} | ||
|
||
footer { | ||
padding-top: 3rem; | ||
padding-bottom: 3rem; | ||
|
||
p { | ||
margin-bottom: .25rem; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
// Load Bootstrap variables and mixins | ||
@import "../../../../../scss/variables"; | ||
@import "../../../../../scss/mixins"; | ||
|
||
/* | ||
* Base structure | ||
*/ | ||
|
||
/* Move down content because we have a fixed navbar that is 50px tall */ | ||
body { | ||
padding-top: 50px; | ||
} | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
* Global add-ons | ||
*/ | ||
|
||
.sub-header { | ||
padding-bottom: 10px; | ||
border-bottom: 1px solid #eee; | ||
} | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
* Top navigation | ||
* Hide default border to remove 1px line. | ||
*/ | ||
.navbar-fixed-top { | ||
border: 0; | ||
} | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
* Sidebar | ||
*/ | ||
|
||
/* Hide for mobile, show later */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
.sidebar { | ||
display: none; | ||
} | ||
|
||
@include media-breakpoint-up(sm) { | ||
|
||
.sidebar { | ||
display: block; | ||
@if $enable-flex { /* fix for https://github.com/twbs/bootstrap/pull/17756 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
max-width: calc(100% * (3/12)); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line contains trailing whitespace |
||
} | ||
@if $enable-flex { /* fix for https://github.com/twbs/bootstrap/pull/17756 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
.main { | ||
max-width: calc(100% * (9/12)); | ||
} | ||
} | ||
|
||
.nav-sidebar { | ||
position: fixed; | ||
top: 51px; | ||
bottom: 0; | ||
left: 0; | ||
z-index: 1000; | ||
@if $enable-flex { | ||
width: calc(100% * (3/12)); /* see http://stackoverflow.com/questions/34344623/fixed-position-element-inheriting-width-of-flex-item */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
} @else { | ||
width: inherit; | ||
} | ||
overflow-x: hidden; | ||
overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
background-color: #f5f5f5; | ||
border-right: 1px solid #eee; | ||
} | ||
} | ||
@if $enable-flex { /* fixes for https://github.com/twbs/bootstrap/pull/17756 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
@include media-breakpoint-up(sm) { | ||
.sidebar { | ||
max-width: calc(100% * (2/12)); | ||
} | ||
.main { | ||
max-width: calc(100% * (10/12)); | ||
} | ||
.nav-sidebar { | ||
width: calc(100% * (2/12)); /* see http://stackoverflow.com/questions/34344623/fixed-position-element-inheriting-width-of-flex-item */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
} | ||
} | ||
} | ||
|
||
/* Main navigation */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
|
||
.navbar .nav { | ||
padding-left: 20px; | ||
} | ||
|
||
/* Sidebar navigation */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
.nav-sidebar .nav { | ||
padding-right: 20px; | ||
padding-left: 20px; | ||
margin-bottom: 20px; | ||
} | ||
|
||
.nav-pills .nav-link { | ||
margin-right: -20px; | ||
margin-left: -20px; | ||
border-radius: 0; | ||
} | ||
|
||
.nav-pills { | ||
.nav-link { | ||
@inlude hover-focus { | ||
background-color: #eee; | ||
} | ||
} | ||
|
||
.nav-link.active { | ||
@include plain-hover-focus{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Opening curly brace |
||
color: #fff; | ||
background-color: #428bca; | ||
} | ||
} | ||
|
||
} | ||
|
||
.nav-stacked .nav-item + .nav-item { | ||
margin: 0; | ||
} | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
* Main content | ||
*/ | ||
|
||
.main { | ||
padding: 20px; | ||
} | ||
@include media-breakpoint-up(sm) { | ||
.main { | ||
padding-right: 40px; | ||
padding-left: 40px; | ||
} | ||
} | ||
.main .page-header { | ||
margin-top: 0; | ||
} | ||
|
||
/* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
* Placeholder dashboard ideas | ||
*/ | ||
.placeholders { | ||
margin-bottom: 30px; | ||
text-align: center; | ||
} | ||
.placeholders h4 { | ||
margin-bottom: 0; | ||
} | ||
.placeholder { | ||
margin-bottom: 20px; | ||
} | ||
.placeholder img { | ||
display: inline-block; | ||
border-radius: 50%; | ||
} | ||
|
||
@if $enable-flex { | ||
/* fixes for https://github.com/twbs/bootstrap/pull/17756 */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use |
||
@include media-breakpoint-down(sm) { | ||
.col-sm-9 { | ||
max-width: 100%; | ||
} | ||
} | ||
@include media-breakpoint-up(sm) { | ||
.col-sm-3.placeholder { | ||
max-width: 25%; | ||
} | ||
} | ||
.col-xs-6.placeholder { | ||
max-width: 50%; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
//
comments everywhere