Skip to content

Commit f5293df

Browse files
authored
v2.4.0
* **VERSION:** v2.4.0 * **ACCESSIBILITY:** do not reset `outline` property * **DOCS:** update year in license * **DOCS:** minor updates to readme * **DEV:** remove script to upload to personal CDN * **DEP:** install Less as a dev dependency
1 parent f7223f1 commit f5293df

File tree

7 files changed

+440
-437
lines changed

7 files changed

+440
-437
lines changed

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016 Daniel W. Hieber
3+
Copyright (c) 2018 Daniel W. Hieber
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,47 @@
1-
# flexbox-reset
2-
A CSS reset that defaults to the CSS3 flexbox model for elements whenever possible. Exceptions are made for various inline elements, form elements, etc. Based in part on the Meyer reset.
1+
# [flexbox-reset][1]
32

4-
[![npm](https://img.shields.io/npm/v/npm.svg?maxAge=2592000)](https://www.npmjs.com/package/flexbox-reset)
5-
[![npm](https://img.shields.io/npm/dt/flexbox-reset.svg?maxAge=2592000)](https://www.npmjs.com/package/flexbox-reset)
6-
[![GitHub issues](https://img.shields.io/github/issues/dwhieb/flexbox-reset.svg?maxAge=2592000)](https://github.com/dwhieb/flexbox-reset/issues)
7-
[![license](https://img.shields.io/github/license/dwhieb/flexbox-reset.svg?maxAge=2592000)](https://github.com/dwhieb/flexbox-reset)
3+
A CSS reset that defaults to the flexbox model for elements whenever appropriate. Exceptions are made for various inline elements, form elements, etc. Based in part on the Meyer reset.
84

9-
[![GitHub forks](https://img.shields.io/github/forks/dwhieb/flexbox-reset.svg?style=social&label=Fork&maxAge=2592000)](https://github.com/dwhieb/flexbox-reset)
10-
[![GitHub stars](https://img.shields.io/github/stars/dwhieb/flexbox-reset.svg?style=social&label=Star&maxAge=2592000)](https://github.com/dwhieb/flexbox-reset)
11-
[![GitHub watchers](https://img.shields.io/github/watchers/dwhieb/flexbox-reset.svg?style=social&label=Watch&maxAge=2592000)](https://github.com/dwhieb/flexbox-reset)
12-
[![GitHub followers](https://img.shields.io/github/followers/dwhieb.svg?style=social&label=Follow&maxAge=2592000)](https://github.com/dwhieb/flexbox-reset)
5+
[![npm](https://img.shields.io/npm/v/npm.svg?maxAge=2592000)][2]
6+
[![npm](https://img.shields.io/npm/dt/flexbox-reset.svg?maxAge=2592000)][2]
7+
[![GitHub issues](https://img.shields.io/github/issues/dwhieb/flexbox-reset.svg?maxAge=2592000)][3]
8+
[![license](https://img.shields.io/github/license/dwhieb/flexbox-reset.svg?maxAge=2592000)][4]
9+
10+
[![GitHub stars](https://img.shields.io/github/stars/dwhieb/flexbox-reset.svg?style=social&label=Star&maxAge=2592000)][1]
11+
[![GitHub forks](https://img.shields.io/github/forks/dwhieb/flexbox-reset.svg?style=social&label=Fork&maxAge=2592000)][1]
1312

1413
## Install
1514

1615
Install using npm:
16+
1717
```
18-
npm install --save flexbox-reset
18+
npm i flexbox-reset
1919
```
2020

21-
Or simply [download from GitHub](https://raw.githubusercontent.com/dwhieb/flexbox-reset/master/flexbox-reset.less).
21+
[Or download from the GitHub release page][5].
2222

2323
## Usage
24+
2425
HTML:
2526

2627
```html
2728
<link rel=stylesheet href=node_modules/flexbox-reset/flexbox-reset.css type=text/css>
2829
```
2930

3031
CSS:
32+
3133
```css
3234
@import 'node_modules/flexbox-reset/flexbox-reset.css';
3335
```
3436

3537
LESS:
36-
```less
38+
39+
```css
3740
@import 'node_modules/flexbox-reset/flexbox-reset.less';
3841
```
3942

4043
## Philosophy
44+
4145
When the web began, webpages were primarily modeled on traditional print paper documents, and so CSS styles were designed to imitate the classic paper book/document, and were largely text-focused. Webpages were designed to be read from top to bottom like a paper page, with headers, sidebars, and fixed page widths.
4246

4347
Today, webpages are no longer modeled on text documents. They are much less linear, and focus more strongly on multimedia elements, which may be positioned anywhere on the page. While many webpages still include sections of running text, these sections now usually make up just one part of a page.
@@ -47,3 +51,9 @@ So why are we still using styles designed for print layouts when our webpages no
4751
This flexbox reset is based on the observation that modern webpages are multimedia, visual interactive layouts, where running sections of text are just one type of content among many. Since the flexbox model better captures the design of modern webpages, this reset applies the flexbox model by default, and makes exceptions for inline elements, form elements, and others.
4852

4953
By switching the default styling approach from block or inline to flexbox, running text becomes the special case rather than the norm. Users should apply traditional block and inline styles to sections of their page which contain running text.
54+
55+
[1]: https://github.com/dwhieb/flexbox-reset
56+
[2]: https://www.npmjs.com/package/flexbox-reset
57+
[3]: https://github.com/dwhieb/flexbox-reset/issues
58+
[4]: https://github.com/dwhieb/flexbox-reset/blob/master/LICENSE.md
59+
[5]: https://github.com/dwhieb/flexbox-reset/releases

build/upload.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

flexbox-reset.css

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* reset.less */
2+
/* The CSS reset, from the flexbox-reset package: https://www.npmjs.com/package/flexbox-reset */
13
html,
24
body,
35
div,
@@ -92,7 +94,6 @@ video {
9294
flex-direction: column;
9395
font: inherit;
9496
margin: 0;
95-
outline: 0;
9697
padding: 0;
9798
text-decoration: none;
9899
vertical-align: baseline;
@@ -157,7 +158,8 @@ a:link,
157158
a:visited,
158159
a:hover,
159160
a:active {
160-
background: transparent;
161+
background-color: transparent;
162+
background-image: none;
161163
color: inherit;
162164
text-decoration: none;
163165
}
@@ -175,10 +177,10 @@ blockquote,
175177
q {
176178
quotes: none;
177179
}
178-
blockquote:before,
179-
q:before,
180-
blockquote:after,
181-
q:after {
180+
blockquote::before,
181+
q::before,
182+
blockquote::after,
183+
q::after {
182184
content: '';
183185
content: none;
184186
}

flexbox-reset.less

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/* reset.less */
2+
3+
/* The CSS reset, from the flexbox-reset package: https://www.npmjs.com/package/flexbox-reset */
4+
15
// general elements
26
html, body, div, span, applet, object, iframe,
37
// heading elements
@@ -20,7 +24,6 @@ article, aside, audio, canvas, details, embed, figure, figcaption, footer, heade
2024
flex-direction: column;
2125
font: inherit;
2226
margin: 0;
23-
outline: 0;
2427
padding: 0;
2528
text-decoration: none;
2629
vertical-align: baseline;
@@ -42,27 +45,28 @@ blockquote, button, caption, dd, dt, figcaption, h1, h2, h3, h4, h5, h6, input,
4245

4346
// remove link styling
4447
a, a:link, a:visited, a:hover, a:active {
45-
background: transparent;
46-
color: inherit;
47-
text-decoration: none;
48+
background-color: transparent;
49+
background-image: none;
50+
color: inherit;
51+
text-decoration: none;
4852
}
4953

5054
// set defaults for body
5155
body {
52-
color: black;
53-
font-size: 100%;
56+
color: black;
57+
font-size: 100%;
5458
font-stretch: normal;
55-
font-style: normal;
59+
font-style: normal;
5660
font-variant: normal;
57-
font-weight: normal;
58-
line-height: 1;
59-
min-height: 100vh;
61+
font-weight: normal;
62+
line-height: 1;
63+
min-height: 100vh;
6064
}
6165

6266
// remove styling from quotes
6367
blockquote, q {
6468
quotes: none;
65-
&:before, &:after {
69+
&::before, &::after {
6670
content: '';
6771
content: none;
6872
}
@@ -88,7 +92,7 @@ ol, ul {
8892
// set default table styling
8993
table {
9094
border-spacing: 0;
91-
display: table;
95+
display: table;
9296
}
9397

9498
tbody {

0 commit comments

Comments
 (0)