mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-09 14:48:02 -05:00
Merge branch 'master' into v7.0
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -2,23 +2,6 @@
|
||||
# in this file, please see the Travis CI documentation:
|
||||
# https://docs.travis-ci.com
|
||||
|
||||
after_success:
|
||||
- |
|
||||
|
||||
# Automatically update the content from the `dist/` directory
|
||||
|
||||
$(npm bin)/travis-after-all \
|
||||
&& $(npm bin)/set-up-ssh -k "$encrypted_7289798db853_key" \
|
||||
-iv "$encrypted_7289798db853_iv" \
|
||||
--path-encrypted-key ".travis/github_deploy_key.enc" \
|
||||
&& $(npm bin)/commit-changes --branch "master" \
|
||||
--commands "npm run build" \
|
||||
--commit-message "Update content from the \`dist\` directory [skip ci]"
|
||||
|
||||
env:
|
||||
global:
|
||||
- secure: "uZ0R71TG9AR+kbfM9rwa8PPNr3f9E0C4OuA0s6g0Gq15bBcpVxPvus0/eJdW+O2NSzZE1GbzS//hBiP+chK/8X4DyNIRutlGk5RYdnTTFEaZo9jp0BvlvprUYlGgpprR/531zQ9ahkc0STwVvzurGzlcF4NNMiISAJJ1IdQZABc="
|
||||
|
||||
git:
|
||||
depth: 10
|
||||
|
||||
|
||||
110
dist/css/main.css
vendored
110
dist/css/main.css
vendored
@@ -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;
|
||||
@@ -93,7 +95,10 @@ textarea {
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Author's custom styles
|
||||
========================================================================== */
|
||||
|
||||
@@ -112,8 +117,7 @@ textarea {
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
@@ -121,85 +125,86 @@ textarea {
|
||||
* 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 */
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
@@ -285,3 +291,5 @@ textarea {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
16
dist/site.webmanifest
vendored
16
dist/site.webmanifest
vendored
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"icons": [{
|
||||
"src": "icon.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}],
|
||||
"start_url": "/"
|
||||
"short_name": "",
|
||||
"name": "",
|
||||
"icons": [{
|
||||
"src": "icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}],
|
||||
"start_url": "/?utm_source=homescreen",
|
||||
"background_color": "#fafafa",
|
||||
"theme_color": "#fafafa"
|
||||
}
|
||||
|
||||
@@ -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%'],
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@alrra/travis-scripts": "^3.0.1",
|
||||
"apache-server-configs": "^3.0.0",
|
||||
"archiver": "^3.0.0",
|
||||
"babel-core": "^6.26.3",
|
||||
@@ -20,13 +19,13 @@
|
||||
"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",
|
||||
"run-sequence": "^2.2.1",
|
||||
"ssri": "^6.0.1",
|
||||
"strip-json-comments": "^2.0.1",
|
||||
"travis-after-all": "^1.4.5"
|
||||
"strip-json-comments": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6",
|
||||
|
||||
278
src/css/main.css
278
src/css/main.css
@@ -1,278 +0,0 @@
|
||||
/*
|
||||
* 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 {
|
||||
color: #222;
|
||||
font-size: 1em;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove text-shadow in selection highlight:
|
||||
* https://twitter.com/miketaylr/status/12228805301
|
||||
*
|
||||
* Vendor-prefixed and regular ::selection selectors cannot be combined:
|
||||
* https://stackoverflow.com/a/16982510/7133471
|
||||
*
|
||||
* Customize the background color to match your design.
|
||||
*/
|
||||
|
||||
::selection {
|
||||
background: #b3d4fc;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* A better looking default horizontal rule
|
||||
*/
|
||||
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
border-top: 1px solid #ccc;
|
||||
margin: 1em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove the gap between audio, canvas, iframes,
|
||||
* images, videos and the bottom of their containers:
|
||||
* https://github.com/h5bp/html5-boilerplate/issues/440
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
iframe,
|
||||
img,
|
||||
svg,
|
||||
video {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
/*
|
||||
* Remove default fieldset styles.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Allow only vertical resizing of textareas.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Browser Upgrade Prompt
|
||||
========================================================================== */
|
||||
|
||||
.browserupgrade {
|
||||
margin: 0.2em 0;
|
||||
background: #ccc;
|
||||
color: #000;
|
||||
padding: 0.2em 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Author's custom styles
|
||||
========================================================================== */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Helper classes
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Hide visually and from screen readers
|
||||
*/
|
||||
|
||||
.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
|
||||
*/
|
||||
|
||||
.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 */
|
||||
}
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 {
|
||||
content: " "; /* 1 */
|
||||
display: table; /* 2 */
|
||||
}
|
||||
|
||||
.clearfix:after {
|
||||
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) {
|
||||
/* Style adjustments for viewports that meet the condition */
|
||||
}
|
||||
|
||||
@media print,
|
||||
(min-resolution: 1.25dppx),
|
||||
(min-resolution: 120dpi) {
|
||||
/* 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 {
|
||||
*,
|
||||
*:before,
|
||||
*:after {
|
||||
background: transparent !important;
|
||||
color: #000 !important; /* Black prints faster */
|
||||
box-shadow: none !important;
|
||||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
a[href]:after {
|
||||
content: " (" attr(href) ")";
|
||||
}
|
||||
|
||||
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 {
|
||||
content: "";
|
||||
}
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap !important;
|
||||
}
|
||||
pre,
|
||||
blockquote {
|
||||
border: 1px solid #999;
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
/*
|
||||
* Printing Tables:
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
116
src/doc/css.md
116
src/doc/css.md
@@ -39,7 +39,7 @@ page](https://necolas.github.com/normalize.css/), as well as this
|
||||
[blog post](http://nicolasgallagher.com/about-normalize-css/).
|
||||
|
||||
|
||||
## Useful defaults
|
||||
## main.css
|
||||
|
||||
Several base styles are included that build upon `Normalize.css`. These
|
||||
styles:
|
||||
@@ -49,116 +49,6 @@ styles:
|
||||
* tweak the default alignment of some elements (e.g.: `img`, `video`,
|
||||
`fieldset`, `textarea`)
|
||||
* style the prompt that is displayed to users using an outdated browser
|
||||
* and more...
|
||||
|
||||
You are free and even encouraged to modify or add to these base styles as your
|
||||
project requires.
|
||||
|
||||
|
||||
## Common helpers
|
||||
|
||||
Along with the base styles, we also provide some commonly used helper classes.
|
||||
|
||||
#### `.hidden`
|
||||
|
||||
The `hidden` class can be added to any element that you want to hide visually
|
||||
and from screen readers. It could be an element that will be populated and
|
||||
displayed later, or an element you will hide with JavaScript.
|
||||
|
||||
#### `.visuallyhidden`
|
||||
|
||||
The `visuallyhidden` class can be added to any element that you want to hide
|
||||
visually, while still have its content accessible to screen readers.
|
||||
|
||||
See also:
|
||||
|
||||
* [CSS in Action: Invisible Content Just for Screen Reader
|
||||
Users](https://webaim.org/techniques/css/invisiblecontent/)
|
||||
* [Hiding content for
|
||||
accessibility](https://snook.ca/archives/html_and_css/hiding-content-for-accessibility)
|
||||
* [HTML5 Boilerplate - Issue #194](https://github.com/h5bp/html5-boilerplate/issues/194).
|
||||
|
||||
__N.B.__ [The visuallyhidden class can be an accessibility issue for users using high contrast modes.](https://www.paciellogroup.com/blog/2012/08/notes-on-accessible-css-image-sprites/)
|
||||
|
||||
>Use JavaScript to detect when images are disabled and remove the CSS visually hidden display state of the text alternative.
|
||||
Use JavaScript to detect when Windows high contrast mode is enabled and remove the CSS visually hidden display state of the text alternative.
|
||||
|
||||
#### `.invisible`
|
||||
|
||||
The `invisible` class can be added to any element that you want to hide
|
||||
visually and from screen readers, but without affecting the layout.
|
||||
|
||||
As opposed to the `hidden` class that effectively removes the element from the
|
||||
layout, the `invisible` class will simply make the element invisible while
|
||||
keeping it in the flow and not affecting the positioning of the surrounding
|
||||
content.
|
||||
|
||||
__N.B.__ Try to stay away from, and don't use the classes specified above for
|
||||
[keyword stuffing](https://en.wikipedia.org/wiki/Keyword_stuffing) as you will
|
||||
harm your site's ranking!
|
||||
|
||||
#### `.clearfix`
|
||||
|
||||
The `clearfix` class can be added to any element to ensure that it always fully
|
||||
contains its floated children.
|
||||
|
||||
Over the years there have been many variants of the clearfix hack, but currently,
|
||||
we use the [micro clearfix](http://nicolasgallagher.com/micro-clearfix-hack/).
|
||||
|
||||
|
||||
## Media Queries
|
||||
|
||||
HTML5 Boilerplate makes it easy for you to get started with a
|
||||
[_mobile first_](https://www.lukew.com/presos/preso.asp?26) and [_responsive web
|
||||
design_](https://alistapart.com/article/responsive-web-design) approach to
|
||||
development. But it's worth remembering that there are [no silver
|
||||
bullets](https://cloudfour.com/thinks/css-media-query-for-mobile-is-fools-gold/).
|
||||
|
||||
We include placeholder media queries to help you build up your mobile styles for
|
||||
wider viewports and high-resolution displays. It's recommended that you adapt
|
||||
these media queries based on the content of your site rather than mirroring the
|
||||
fixed dimensions of specific devices.
|
||||
|
||||
If you do not want to take the _mobile first_ approach, you can simply edit or
|
||||
remove these placeholder media queries. One possibility would be to work from
|
||||
wide viewports down, and use `max-width` media queries instead (e.g.:
|
||||
`@media only screen and (max-width: 480px)`).
|
||||
|
||||
|
||||
## Print styles
|
||||
|
||||
Lastly, we provide some useful print styles that will optimize the printing
|
||||
process, as well as make the printed pages easier to read.
|
||||
|
||||
At printing time, these styles will:
|
||||
|
||||
* strip all background colors, change the font color to black, and remove the
|
||||
`text-shadow` — done in order to help save printer ink and speed up the
|
||||
printing process
|
||||
* underline and expand links to include the URL — done in order to allow users
|
||||
to know where to refer to<br>
|
||||
(exceptions to this are: the links that are
|
||||
[fragment identifiers](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href),
|
||||
or use the
|
||||
[`javascript:` pseudo protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void#JavaScript_URIs))
|
||||
* expand abbreviations to include the full description — done in order to allow
|
||||
users to know what the abbreviations stands for
|
||||
* provide instructions on how browsers should break the content into pages and
|
||||
on [orphans/widows](https://en.wikipedia.org/wiki/Widows_and_orphans), namely,
|
||||
we instruct
|
||||
[supporting browsers](https://en.wikipedia.org/wiki/Comparison_of_layout_engines_%28Cascading_Style_Sheets%29#Grammar_and_rules)
|
||||
that they should:
|
||||
|
||||
* ensure the table header (`<thead>`) is [printed on each page spanned by the
|
||||
table](http://css-discuss.incutio.com/wiki/Printing_Tables)
|
||||
* prevent block quotations, preformatted text, images and table rows from
|
||||
being split onto two different pages
|
||||
* ensure that headings never appear on a different page than the text they
|
||||
are associated with
|
||||
* ensure that
|
||||
[orphans and widows](https://en.wikipedia.org/wiki/Widows_and_orphans) do
|
||||
[not appear on printed pages](https://css-tricks.com/almanac/properties/o/orphans/)
|
||||
|
||||
The print styles are included along with the other `css` to [avoid the
|
||||
additional HTTP request](http://www.phpied.com/delay-loading-your-print-css/).
|
||||
Also, they should always be included last, so that the other styles can be
|
||||
overwritten.
|
||||
These styles are included in [main.css](https://github.com/h5bp/html5-boilerplate/blob/master/dist/css/main.css). See the [main.css](https://github.com/h5bp/main.css) project [documentation](https://github.com/h5bp/main.css/blob/master/README.md#features) for a full discussion of these styles.
|
||||
|
||||
@@ -7,7 +7,7 @@ By default, HTML5 Boilerplate provides two `html` pages:
|
||||
|
||||
* [`index.html`](#indexhtml) - a default HTML skeleton that should form the
|
||||
basis of all pages on your website
|
||||
* [`404.html`](#404html) - a placeholder 404 error page
|
||||
* `404.html` - a placeholder 404 error page
|
||||
|
||||
|
||||
## `index.html`
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
{
|
||||
"icons": [{
|
||||
"src": "icon.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
}],
|
||||
"start_url": "/"
|
||||
"short_name": "",
|
||||
"name": "",
|
||||
"icons": [{
|
||||
"src": "icon.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
}],
|
||||
"start_url": "/?utm_source=homescreen",
|
||||
"background_color": "#fafafa",
|
||||
"theme_color": "#fafafa"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* jshint mocha: true */
|
||||
|
||||
import assert from 'assert';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
@@ -74,7 +72,7 @@ function runTests() {
|
||||
});
|
||||
|
||||
it('"main.css" should contain a custom banner', function (done) {
|
||||
const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n/*\n`;
|
||||
const string = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n`;
|
||||
checkString(path.resolve(dir, 'css/main.css'), string, done);
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/* jshint mocha: true */
|
||||
|
||||
import assert from 'assert';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
Reference in New Issue
Block a user