Skip to content

Commit

Permalink
copies main.css from main.css project (#2066)
Browse files Browse the repository at this point in the history
This code updates the package.json, build and tests to pull main.css from the main.css npm package.
  • Loading branch information
roblarsen authored Oct 9, 2018
1 parent 35c6157 commit e1e7277
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 332 deletions.
110 changes: 59 additions & 51 deletions dist/css/main.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
/*! HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 1.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
* What follows is the result of much research on cross-browser styling.
* Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
* Kroc Camen, and the H5BP dev community and team.
*/


/* ==========================================================================
Base styles: opinionated defaults
========================================================================== */

html {
html {
color: #222;
font-size: 1em;
line-height: 1.4;
Expand Down Expand Up @@ -93,7 +95,10 @@ textarea {
padding: 0.2em 0;
}

/* ==========================================================================



/* ==========================================================================
Author's custom styles
========================================================================== */

Expand All @@ -112,94 +117,94 @@ textarea {




/* ==========================================================================
/* ==========================================================================
Helper classes
========================================================================== */

/*
* Hide visually and from screen readers
*/

.hidden {
display: none !important;
.hidden {
display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
* causes content to wrap 1 word per line:
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
* causes content to wrap 1 word per line:
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.visuallyhidden {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap; /* 1 */
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap; /* 1 */
}

/*
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/
* Extends the .visuallyhidden class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
white-space: inherit;
clip: auto;
height: auto;
margin: 0;
overflow: visible;
position: static;
width: auto;
white-space: inherit;
}

/*
* Hide visually and from screen readers, but maintain layout
*/
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
visibility: hidden;
visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* `contenteditable` attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
content: " "; /* 1 */
display: table; /* 2 */
content: " "; /* 1 */
display: table; /* 2 */
}

.clearfix:after {
clear: both;
clear: both;
}


/* ==========================================================================
EXAMPLE Media Queries for Responsive Design.
These examples override the primary ('mobile first') styles.
Modify as content requires.
========================================================================== */

@media only screen and (min-width: 35em) {
@media only screen and (min-width: 35em) {
/* Style adjustments for viewports that meet the condition */
}

Expand All @@ -210,13 +215,14 @@ textarea {
/* Style adjustments for high resolution devices */
}


/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
https://www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
@media print {
*,
*:before,
*:after {
Expand Down Expand Up @@ -285,3 +291,5 @@ textarea {
page-break-after: avoid;
}
}


3 changes: 1 addition & 2 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ gulp.task('copy:license', () =>
);

gulp.task('copy:main.css', () => {

const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;

gulp.src(`${dirs.src}/css/main.css`)
gulp.src(`node_modules/main.css/dist/main.css`)
.pipe(plugins().header(banner))
.pipe(plugins().autoprefixer({
browsers: ['last 2 versions', 'ie >= 9', '> 1%'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"jquery": "3.3.1",
"main.css": "1.0.0",
"mocha": "^5.2.0",
"modernizr": "3.6.0",
"normalize.css": "8.0.0",
Expand Down
Loading

0 comments on commit e1e7277

Please sign in to comment.