Skip to content

Commit e1e7277

Browse files
authored
copies main.css from main.css project (#2066)
This code updates the package.json, build and tests to pull main.css from the main.css npm package.
1 parent 35c6157 commit e1e7277

File tree

5 files changed

+62
-332
lines changed

5 files changed

+62
-332
lines changed

dist/css/main.css

+59-51
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
/*! HTML5 Boilerplate v6.1.0 | MIT License | https://html5boilerplate.com/ */
22

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

10+
911
/* ==========================================================================
1012
Base styles: opinionated defaults
1113
========================================================================== */
1214

13-
html {
15+
html {
1416
color: #222;
1517
font-size: 1em;
1618
line-height: 1.4;
@@ -93,7 +95,10 @@ textarea {
9395
padding: 0.2em 0;
9496
}
9597

96-
/* ==========================================================================
98+
99+
100+
101+
/* ==========================================================================
97102
Author's custom styles
98103
========================================================================== */
99104

@@ -112,94 +117,94 @@ textarea {
112117

113118

114119

115-
116-
/* ==========================================================================
120+
/* ==========================================================================
117121
Helper classes
118122
========================================================================== */
119123

120124
/*
121125
* Hide visually and from screen readers
122126
*/
123127

124-
.hidden {
125-
display: none !important;
128+
.hidden {
129+
display: none !important;
126130
}
127131

128132
/*
129-
* Hide only visually, but have it available for screen readers:
130-
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
131-
*
132-
* 1. For long content, line feeds are not interpreted as spaces and small width
133-
* causes content to wrap 1 word per line:
134-
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
135-
*/
133+
* Hide only visually, but have it available for screen readers:
134+
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
135+
*
136+
* 1. For long content, line feeds are not interpreted as spaces and small width
137+
* causes content to wrap 1 word per line:
138+
* https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
139+
*/
136140

137141
.visuallyhidden {
138-
border: 0;
139-
clip: rect(0 0 0 0);
140-
height: 1px;
141-
margin: -1px;
142-
overflow: hidden;
143-
padding: 0;
144-
position: absolute;
145-
width: 1px;
146-
white-space: nowrap; /* 1 */
142+
border: 0;
143+
clip: rect(0 0 0 0);
144+
height: 1px;
145+
margin: -1px;
146+
overflow: hidden;
147+
padding: 0;
148+
position: absolute;
149+
width: 1px;
150+
white-space: nowrap; /* 1 */
147151
}
148152

149153
/*
150-
* Extends the .visuallyhidden class to allow the element
151-
* to be focusable when navigated to via the keyboard:
152-
* https://www.drupal.org/node/897638
153-
*/
154+
* Extends the .visuallyhidden class to allow the element
155+
* to be focusable when navigated to via the keyboard:
156+
* https://www.drupal.org/node/897638
157+
*/
154158

155159
.visuallyhidden.focusable:active,
156160
.visuallyhidden.focusable:focus {
157-
clip: auto;
158-
height: auto;
159-
margin: 0;
160-
overflow: visible;
161-
position: static;
162-
width: auto;
163-
white-space: inherit;
161+
clip: auto;
162+
height: auto;
163+
margin: 0;
164+
overflow: visible;
165+
position: static;
166+
width: auto;
167+
white-space: inherit;
164168
}
165169

166170
/*
167-
* Hide visually and from screen readers, but maintain layout
168-
*/
171+
* Hide visually and from screen readers, but maintain layout
172+
*/
169173

170174
.invisible {
171-
visibility: hidden;
175+
visibility: hidden;
172176
}
173177

174178
/*
175-
* Clearfix: contain floats
176-
*
177-
* For modern browsers
178-
* 1. The space content is one way to avoid an Opera bug when the
179-
* `contenteditable` attribute is included anywhere else in the document.
180-
* Otherwise it causes space to appear at the top and bottom of elements
181-
* that receive the `clearfix` class.
182-
* 2. The use of `table` rather than `block` is only necessary if using
183-
* `:before` to contain the top-margins of child elements.
184-
*/
179+
* Clearfix: contain floats
180+
*
181+
* For modern browsers
182+
* 1. The space content is one way to avoid an Opera bug when the
183+
* `contenteditable` attribute is included anywhere else in the document.
184+
* Otherwise it causes space to appear at the top and bottom of elements
185+
* that receive the `clearfix` class.
186+
* 2. The use of `table` rather than `block` is only necessary if using
187+
* `:before` to contain the top-margins of child elements.
188+
*/
185189

186190
.clearfix:before,
187191
.clearfix:after {
188-
content: " "; /* 1 */
189-
display: table; /* 2 */
192+
content: " "; /* 1 */
193+
display: table; /* 2 */
190194
}
191195

192196
.clearfix:after {
193-
clear: both;
197+
clear: both;
194198
}
195199

200+
196201
/* ==========================================================================
197202
EXAMPLE Media Queries for Responsive Design.
198203
These examples override the primary ('mobile first') styles.
199204
Modify as content requires.
200205
========================================================================== */
201206

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

@@ -210,13 +215,14 @@ textarea {
210215
/* Style adjustments for high resolution devices */
211216
}
212217

218+
213219
/* ==========================================================================
214220
Print styles.
215221
Inlined to avoid the additional HTTP request:
216222
https://www.phpied.com/delay-loading-your-print-css/
217223
========================================================================== */
218224

219-
@media print {
225+
@media print {
220226
*,
221227
*:before,
222228
*:after {
@@ -285,3 +291,5 @@ textarea {
285291
page-break-after: avoid;
286292
}
287293
}
294+
295+

gulpfile.babel.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,9 @@ gulp.task('copy:license', () =>
118118
);
119119

120120
gulp.task('copy:main.css', () => {
121-
122121
const banner = `/*! HTML5 Boilerplate v${pkg.version} | ${pkg.license} License | ${pkg.homepage} */\n\n`;
123122

124-
gulp.src(`${dirs.src}/css/main.css`)
123+
gulp.src(`node_modules/main.css/dist/main.css`)
125124
.pipe(plugins().header(banner))
126125
.pipe(plugins().autoprefixer({
127126
browsers: ['last 2 versions', 'ie >= 9', '> 1%'],

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"gulp-rename": "^1.4.0",
2121
"gulp-replace": "^1.0.0",
2222
"jquery": "3.3.1",
23+
"main.css": "1.0.0",
2324
"mocha": "^5.2.0",
2425
"modernizr": "3.6.0",
2526
"normalize.css": "8.0.0",

0 commit comments

Comments
 (0)