Skip to content
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

Clean up docs Sass code. #27443

Merged
merged 4 commits into from
Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion site/docs/4.1/assets/scss/_algolia.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
min-width: 0 !important;
max-width: none !important;
padding: .75rem 0 !important;
background-color: #fff;
background-color: $white;
background-clip: padding-box;
border: 1px solid rgba(0, 0, 0, .1);
box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175);
Expand Down
102 changes: 40 additions & 62 deletions site/docs/4.1/assets/scss/_brand.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// stylelint-disable no-duplicate-selectors

//
// Brand guidelines
//
Expand All @@ -10,62 +8,44 @@
width: 100%;
margin-bottom: 1rem;
overflow: hidden;
color: #563d7c;
color: $bd-purple;
background-color: #f9f9f9;
border-radius: .25rem;

.inverse {
color: $white;
background-color: $bd-purple;
}
}

// Individual items
.bd-brand-item {
padding: 4rem 0;
text-align: center;
}
.bd-brand-item + .bd-brand-item {
border-top: 1px solid #fff;
}
.bd-brand-logos .inverse {
color: #fff;
background-color: #563d7c;
}

// Heading content within
.bd-brand-item h1,
.bd-brand-item h3 {
margin-top: 0;
margin-bottom: 0;
}
.bd-brand-item .bd-booticon {
margin-right: auto;
margin-left: auto;
}
+ .bd-brand-item {
border-top: 1px solid $white;
}

// Make the icons stand out on what is/isn't okay
// .bd-brand-item .glyphicon {
// width: 30px;
// height: 30px;
// margin: 10px auto -10px;
// line-height: 30px;
// color: #fff;
// border-radius: 50%;
// }
// .bd-brand-item .glyphicon-ok {
// background-color: #5cb85c;
// }
// .bd-brand-item .glyphicon-remove {
// background-color: #d9534f;
// }
// Heading content within
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are no headings in .bd-brand-item, this can be removed.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but note that I didn't remove all unused CSS. Just whatever I found while digging at it.

h1,
h3 {
margin-top: 0;
margin-bottom: 0;
}

@media (min-width: 768px) {
.bd-brand-item {
@include media-breakpoint-up(md) {
display: table-cell;
width: 1%;
}
.bd-brand-item + .bd-brand-item {
border-top: 0;
border-left: 1px solid #fff;
}
.bd-brand-item h1 {
font-size: 4rem;

+ .bd-brand-item {
border-top: 0;
border-left: 1px solid $white;
}

h1 {
font-size: 4rem;
}
}
}

Expand All @@ -77,24 +57,8 @@
.color-swatches {
margin: 0 -5px;
overflow: hidden; // clearfix
}

.color-swatch {
float: left;
width: 4rem;
height: 4rem;
margin-right: .25rem;
margin-left: .25rem;
border-radius: .25rem;

@media (min-width: 768px) {
width: 6rem;
height: 6rem;
}
}

// Docs colors
.color-swatches {
// Docs colors
.bd-purple {
background-color: $bd-purple;
}
Expand All @@ -108,3 +72,17 @@
background-color: #f9f9f9;
}
}

.color-swatch {
float: left;
width: 4rem;
height: 4rem;
margin-right: .25rem;
margin-left: .25rem;
border-radius: .25rem;

@include media-breakpoint-up(md) {
width: 6rem;
height: 6rem;
}
}
2 changes: 1 addition & 1 deletion site/docs/4.1/assets/scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

&:hover,
&:active {
color: #fff;
color: $white;
background-color: $bd-purple-bright;
border-color: $bd-purple-bright;
}
Expand Down
26 changes: 13 additions & 13 deletions site/docs/4.1/assets/scss/_callouts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
border: 1px solid #eee;
border-left-width: .25rem;
border-radius: .25rem;
}

.bd-callout h4 {
margin-top: 0;
margin-bottom: .25rem;
}
h4 {
margin-top: 0;
margin-bottom: .25rem;
}

.bd-callout p:last-child {
margin-bottom: 0;
}
p:last-child {
margin-bottom: 0;
}

.bd-callout code {
border-radius: .25rem;
}
code {
border-radius: .25rem;
}

.bd-callout + .bd-callout {
margin-top: -.25rem;
+ .bd-callout {
margin-top: -.25rem;
}
}

// Variations
Expand Down
12 changes: 5 additions & 7 deletions site/docs/4.1/assets/scss/_clipboard-js.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
+ .highlight {
margin-top: 0;
}

@include media-breakpoint-up(md) {
display: block;
}
}

.btn-clipboard {
Expand All @@ -27,13 +31,7 @@
border-radius: .25rem;

&:hover {
color: #fff;
color: $white;
background-color: #027de7;
}
}

@media (min-width: 768px) {
.bd-clipboard {
display: block;
}
}
24 changes: 0 additions & 24 deletions site/docs/4.1/assets/scss/_examples.scss

This file was deleted.

2 changes: 1 addition & 1 deletion site/docs/4.1/assets/scss/_nav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

&.active,
&:hover {
color: #fff;
color: $white;
background-color: transparent;
}

Expand Down
1 change: 0 additions & 1 deletion site/docs/4.1/assets/scss/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
@import "component-examples";
@import "buttons";
@import "callouts";
@import "examples";
@import "browser-bugs";
@import "brand";
@import "colors";
Expand Down