Skip to content

Commit

Permalink
Adds main.css 2.1.0 (#2234)
Browse files Browse the repository at this point in the history
* Adds main.css 2.1.0

* Update gulpfile.babel.js
  • Loading branch information
roblarsen authored May 5, 2020
1 parent 1d2b155 commit 7e102a6
Show file tree
Hide file tree
Showing 4 changed files with 2,179 additions and 2,158 deletions.
108 changes: 53 additions & 55 deletions dist/css/main.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*! HTML5 Boilerplate v7.3.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/* main.css 2.1.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,
Expand Down Expand Up @@ -83,17 +83,6 @@ textarea {
resize: vertical;
}

/* ==========================================================================
Browser Upgrade Prompt
========================================================================== */

.browserupgrade {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}

/* ==========================================================================
Author's custom styles
========================================================================== */
Expand All @@ -106,18 +95,19 @@ textarea {
* Hide visually and from screen readers
*/

.hidden {
.hidden,
[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
*/

.sr-only {
border: 0;
Expand All @@ -133,10 +123,10 @@ textarea {
}

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

.sr-only.focusable:active,
.sr-only.focusable:focus {
Expand All @@ -150,34 +140,32 @@ textarea {
}

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

.invisible {
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:before,
.clearfix:after {
* 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 */
}

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

Expand Down Expand Up @@ -206,57 +194,67 @@ textarea {

@media print {
*,
*:before,
*:after {
background: transparent !important;
*::before,
*::after {
background: #fff !important;
color: #000 !important;
/* Black prints faster */
box-shadow: none !important;
text-shadow: none !important;
}

a,
a:visited {
text-decoration: underline;
}
a[href]:after {

a[href]::after {
content: " (" attr(href) ")";
}
abbr[title]:after {

abbr[title]::after {
content: " (" attr(title) ")";
}

/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]:after,
a[href^="javascript:"]:after {
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/
a[href^="#"]::after,
a[href^="javascript:"]::after {
content: "";
}

pre {
white-space: pre-wrap !important;
}

pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}

/*
* Printing Tables:
* https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
*/
* Printing Tables:
* https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
*/
thead {
display: table-header-group;
}

tr,
img {
page-break-inside: avoid;
}

p,
h2,
h3 {
orphans: 3;
widows: 3;
}

h2,
h3 {
page-break-after: avoid;
Expand Down
6 changes: 5 additions & 1 deletion gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ gulp.task('copy:normalize', () =>
);

gulp.task('modernizr', (done) => {
modernizr.build(modernizrConfig, (code) => {
// TODO: rework this flow instead of just reacting to the fact that the jQuery step is gone
if (!fs.existsSync(`${dirs.dist}/js/vendor/`)){
fs.mkdirSync(`${dirs.dist}/js/vendor/`);
}

modernizr.build(modernizrConfig, (code) => {
fs.writeFile(`${dirs.dist}/js/vendor/modernizr-${pkg.devDependencies.modernizr}.min.js`, code, done);
});
});
Expand Down
Loading

0 comments on commit 7e102a6

Please sign in to comment.