0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-20 17:54:23 +01:00

Merge pull request #18752 from twbs/v4-docs-scsslint

v4: Docs Sass linting
This commit is contained in:
Mark Otto 2016-01-03 19:14:46 -08:00
commit a439bc16c6
12 changed files with 80 additions and 91 deletions

View File

@ -213,7 +213,12 @@ module.exports = function (grunt) {
config: 'scss/.scss-lint.yml', config: 'scss/.scss-lint.yml',
reporterOutput: null reporterOutput: null
}, },
src: ['scss/*.scss', '!scss/_normalize.scss'] core: {
src: ['scss/*.scss', '!scss/_normalize.scss']
},
docs: {
src: ['docs/assets/scss/*.scss', '!scss/_normalize.scss', '!docs/assets/scss/docs.scss']
}
}, },
postcss: { postcss: {
@ -462,7 +467,7 @@ module.exports = function (grunt) {
// JS distribution task. // JS distribution task.
grunt.registerTask('dist-js', ['babel:dev', 'concat', 'lineremover', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']); grunt.registerTask('dist-js', ['babel:dev', 'concat', 'lineremover', 'babel:dist', 'stamp', 'uglify:core', 'commonjs']);
grunt.registerTask('test-scss', ['scsslint']); grunt.registerTask('test-scss', ['scsslint:core']);
// CSS distribution task. // CSS distribution task.
// Supported Compilers: sass (Ruby) and libsass. // Supported Compilers: sass (Ruby) and libsass.
@ -491,7 +496,7 @@ module.exports = function (grunt) {
}); });
// Docs task. // Docs task.
grunt.registerTask('docs-css', ['postcss:docs', 'postcss:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']); grunt.registerTask('docs-css', ['scsslint:docs', 'postcss:docs', 'postcss:examples', 'csscomb:docs', 'csscomb:examples', 'cssmin:docs']);
grunt.registerTask('docs-js', ['uglify:docsJs']); grunt.registerTask('docs-js', ['uglify:docsJs']);
grunt.registerTask('lint-docs-js', ['jscs:assets']); grunt.registerTask('lint-docs-js', ['jscs:assets']);
grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']); grunt.registerTask('docs', ['docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs']);

View File

@ -8,8 +8,8 @@
padding: 1.25rem !important; padding: 1.25rem !important;
margin: 2rem ($grid-gutter-width * -1) -2rem !important; margin: 2rem ($grid-gutter-width * -1) -2rem !important;
overflow: hidden; // clearfix overflow: hidden; // clearfix
font-size: .8rem !important;
font-family: inherit !important; font-family: inherit !important;
font-size: .8rem !important;
line-height: 1rem !important; line-height: 1rem !important;
color: $bd-purple-light !important; color: $bd-purple-light !important;
text-align: left; text-align: left;
@ -49,10 +49,6 @@
} }
} }
.carbonad #azcarbon > img {
display: none; // hide what I assume are tracking images
}
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
.carbonad { .carbonad {
width: 330px !important; width: 330px !important;

View File

@ -10,9 +10,7 @@
*:hover > .anchorjs-link { *:hover > .anchorjs-link {
opacity: .75; opacity: .75;
-webkit-transition: color .16s linear; transition: color .16s linear;
-o-transition: color .16s linear;
transition: color .16s linear;
} }
*:hover > .anchorjs-link:hover, *:hover > .anchorjs-link:hover,

View File

@ -11,7 +11,7 @@
&:focus, &:focus,
&:active { &:active {
color: #fff; color: #fff;
background-color:$bd-purple-bright; background-color: $bd-purple-bright;
border-color: $bd-purple-bright; border-color: $bd-purple-bright;
} }
} }

View File

@ -23,8 +23,8 @@
.bd-example-container { .bd-example-container {
min-width: 16rem; min-width: 16rem;
max-width: 25rem; max-width: 25rem;
margin-left: auto;
margin-right: auto; margin-right: auto;
margin-left: auto;
} }
.bd-example-container-header { .bd-example-container-header {
@ -67,10 +67,10 @@
@include clearfix(); @include clearfix();
@include media-breakpoint-up(sm) { @include media-breakpoint-up(sm) {
margin-left: 0; padding: 1.5rem;
margin-right: 0; margin-right: 0;
margin-bottom: 0; margin-bottom: 0;
padding: 1.5rem; margin-left: 0;
border-width: .2rem; border-width: .2rem;
} }
@ -177,7 +177,7 @@
} }
// Navbars // Navbars
.bd-example { .bd-example {
.navbar-fixed-top { .navbar-fixed-top {
position: static; position: static;
margin: -1rem -1rem 1rem; margin: -1rem -1rem 1rem;
@ -334,15 +334,3 @@
font-size: inherit; font-size: inherit;
color: $gray-dark; // Effectively the base text color color: $gray-dark; // Effectively the base text color
} }
// Pseudo focus
//
// Custom `:focus` state for showing how it looks in the docs.
#focusedInput {
border-color: $input-border-focus;
outline: 0;
outline: thin dotted \9; // IE9
box-shadow: 0 0 .5rem $input-box-shadow-focus;
}

View File

@ -1,3 +1,5 @@
// scss-lint:disable IdSelector
// //
// Automatically style Markdown-based tables like a Bootstrap `.table`. // Automatically style Markdown-based tables like a Bootstrap `.table`.
// //
@ -7,8 +9,8 @@
display: block; display: block;
width: 100%; width: 100%;
max-width: 100%; max-width: 100%;
overflow-y: auto;
margin-bottom: $spacer; margin-bottom: $spacer;
overflow-y: auto;
// Cells // Cells
> thead, > thead,

View File

@ -6,8 +6,8 @@
padding: 4rem 0; padding: 4rem 0;
margin-top: 4rem; margin-top: 4rem;
font-size: 85%; font-size: 85%;
background-color: #f7f7f7;
text-align: center; text-align: center;
background-color: #f7f7f7;
a { a {
font-weight: 500; font-weight: 500;

View File

@ -3,9 +3,7 @@
padding: 3rem ($grid-gutter-width / 2) 2rem; padding: 3rem ($grid-gutter-width / 2) 2rem;
color: $bd-purple-light; color: $bd-purple-light;
text-align: center; text-align: center;
background-image: -webkit-linear-gradient(135deg, darken($bd-purple, 20%), $bd-purple, lighten(saturate($bd-purple, 5%), 15%)); background-image: linear-gradient(135deg, darken($bd-purple, 20%), $bd-purple, lighten(saturate($bd-purple, 5%), 15%));
background-image: linear-gradient(135deg, darken($bd-purple, 20%), $bd-purple, lighten(saturate($bd-purple, 5%), 15%));
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str(darken($bd-purple, 20%))}', endColorstr='#{ie-hex-str(lighten(saturate($bd-purple, 5%), 15%))}', gradientType='1'); /* For IE9 */
.bd-booticon { .bd-booticon {
margin: 0 auto 2rem; margin: 0 auto 2rem;
@ -19,9 +17,9 @@
} }
.lead { .lead {
margin-left: auto;
margin-right: auto; margin-right: auto;
margin-bottom: 2rem; margin-bottom: 2rem;
margin-left: auto;
font-size: 1.25rem; font-size: 1.25rem;
color: #fff; color: #fff;
} }

View File

@ -36,8 +36,8 @@
} }
.dropdown-item { .dropdown-item {
padding-left: .75rem;
padding-right: .75rem; padding-right: .75rem;
padding-left: .75rem;
&:first-child { margin-top: .25rem; } &:first-child { margin-top: .25rem; }
&:last-child { margin-bottom: .25rem; } &:last-child { margin-bottom: .25rem; }

View File

@ -1,3 +1,5 @@
// scss-lint:disable IdSelector
#skippy { #skippy {
display: block; display: block;
padding: 1em; padding: 1em;

View File

@ -1,63 +1,63 @@
.hll { background-color: #ffffcc } .hll { background-color: #ffc; }
.c { color: #999; } .c { color: #999; }
.err { color: #AA0000; background-color: #FFAAAA } .err { color: #a00; background-color: #faa; }
.k { color: #006699; } .k { color: #069; }
.o { color: #555555 } .o { color: #555; }
.cm { color: #999; } .cm { color: #999; }
.cp { color: #009999 } .cp { color: #099; }
.c1 { color: #999; } .c1 { color: #999; }
.cs { color: #999; } .cs { color: #999; }
.gd { background-color: #FFCCCC; border: 1px solid #CC0000 } .gd { background-color: #fcc; border: 1px solid #c00; }
.ge { font-style: italic } .ge { font-style: italic; }
.gr { color: #FF0000 } .gr { color: #f00; }
.gh { color: #003300; } .gh { color: #030; }
.gi { background-color: #CCFFCC; border: 1px solid #00CC00 } .gi { background-color: #cfc; border: 1px solid #0c0; }
.go { color: #AAAAAA } .go { color: #aaa; }
.gp { color: #000099; } .gp { color: #009; }
.gu { color: #003300; } .gu { color: #030; }
.gt { color: #99CC66 } .gt { color: #9c6; }
.kc { color: #006699; } .kc { color: #069; }
.kd { color: #006699; } .kd { color: #069; }
.kn { color: #006699; } .kn { color: #069; }
.kp { color: #006699 } .kp { color: #069; }
.kr { color: #006699; } .kr { color: #069; }
.kt { color: #007788; } .kt { color: #078; }
.m { color: #FF6600 } .m { color: #f60; }
.s { color: #d44950 } .s { color: #d44950; }
.na { color: #4f9fcf } .na { color: #4f9fcf; }
.nb { color: #336666 } .nb { color: #366; }
.nc { color: #00AA88; } .nc { color: #0a8; }
.no { color: #336600 } .no { color: #360; }
.nd { color: #9999FF } .nd { color: #99f; }
.ni { color: #999999; } .ni { color: #999; }
.ne { color: #CC0000; } .ne { color: #c00; }
.nf { color: #CC00FF } .nf { color: #c0f; }
.nl { color: #9999FF } .nl { color: #99f; }
.nn { color: #00CCFF; } .nn { color: #0cf; }
.nt { color: #2f6f9f; } .nt { color: #2f6f9f; }
.nv { color: #003333 } .nv { color: #033; }
.ow { color: #000000; } .ow { color: #000; }
.w { color: #bbbbbb } .w { color: #bbb; }
.mf { color: #FF6600 } .mf { color: #f60; }
.mh { color: #FF6600 } .mh { color: #f60; }
.mi { color: #FF6600 } .mi { color: #f60; }
.mo { color: #FF6600 } .mo { color: #f60; }
.sb { color: #CC3300 } .sb { color: #c30; }
.sc { color: #CC3300 } .sc { color: #c30; }
.sd { color: #CC3300; font-style: italic } .sd { font-style: italic; color: #c30; }
.s2 { color: #CC3300 } .s2 { color: #c30; }
.se { color: #CC3300; } .se { color: #c30; }
.sh { color: #CC3300 } .sh { color: #c30; }
.si { color: #AA0000 } .si { color: #a00; }
.sx { color: #CC3300 } .sx { color: #c30; }
.sr { color: #33AAAA } .sr { color: #3aa; }
.s1 { color: #CC3300 } .s1 { color: #c30; }
.ss { color: #FFCC33 } .ss { color: #fc3; }
.bp { color: #336666 } .bp { color: #366; }
.vc { color: #003333 } .vc { color: #033; }
.vg { color: #003333 } .vg { color: #033; }
.vi { color: #003333 } .vi { color: #033; }
.il { color: #FF6600 } .il { color: #f60; }
.css .o, .css .o,
.css .o + .nt, .css .o + .nt,

View File

@ -12,11 +12,11 @@
} }
.github-btn { .github-btn {
border: none;
float: right; float: right;
width: 180px; width: 180px;
height: 1.25rem; height: 1.25rem;
margin-top: .25rem; margin-top: .25rem;
border: 0;
} }
img { img {