Skip to content

Commit 03083ae

Browse files
committed
Fleshing out the source files and setting up the general infrastructure
1 parent c379bb8 commit 03083ae

24 files changed

Lines changed: 2831 additions & 145 deletions

.editorconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[*]
2-
indent_style = space
2+
charset = utf-8
33
end_of_line = lf
4+
indent_style = space
45
indent_size = 2
5-
charset = utf-8
6+
max_line_length = 80
67
trim_trailing_whitespace = true
78

89
[*.md]

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
node_modules
1+
# Folders and files
2+
node_modules/
3+
dist/
4+
npm-debug.log
5+
yarn-error.log
6+
7+
# Dot files
28
.cache
3-
dist
49
.DS_Store
510
.vscode

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changes to backpack.css 🎒
2+
3+
## 1.0.0 (?? ??, 2018)

LICENSE

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

3-
Copyright (c) 2018-present, cssbackpack
3+
Copyright © Chris Pearce
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# backpack 🎒
1+
# backpack.css 🎒
22

3-
A lightweight and somewhat opinionated CSS foundation that is best suited for applications.
3+
A lightweight and somewhat opinionated CSS foundation that is best suited to applications.
44

55
⚠️ Under development, version 1.0.0 coming soon.

index.css

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

package.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
{
2-
"name": "cssbackpack",
2+
"name": "backpack.css",
3+
"main": "backpack.css",
34
"version": "0.0.0",
4-
"description": "A lightweight and somewhat opinionated CSS foundation that is best suited for applications.",
5-
"repository": "[email protected]:chris-pearce/backpack.git",
5+
"description":
6+
"A lightweight and somewhat opinionated CSS foundation that is best suited to applications 🎒.",
7+
"scripts": {
8+
"bundle":
9+
"postcss src/index.css -u postcss-import --no-map -o dist/backpack.css",
10+
"build": "npm run bundle",
11+
"prebuild": "rimraf dist/"
12+
},
13+
"repository": "[email protected]:chris-pearce/backpack.css.git",
614
"author": "Chris Pearce <[email protected]>",
715
"license": "MIT",
816
"dependencies": {
9-
"normalize.css": "^7.0.0"
17+
"normalize.css": "^8.0.0"
18+
},
19+
"devDependencies": {
20+
"postcss-cli": "^5.0.0",
21+
"postcss-import": "^11.1.0",
22+
"rimraf": "^2.6.2"
1023
}
1124
}

src/content-sectioning.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Content sectioning
3+
* ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
4+
*/
5+
6+
/**
7+
* We scope our heading styles to classes instead of the `<hx>` element selector
8+
* so our styles are not tied to their semantics, i.e., if you want a `<h4>` to
9+
* look like a `<h2>` you can easily do this. All of the heading elements are
10+
* reset to have the same styles as the base copy.
11+
* See: https://medium.com/fed-or-dead/handling-headings-in-a-ui-component-library-2587de93c890
12+
*/
13+
14+
h1,
15+
h2,
16+
h3,
17+
h4,
18+
h5,
19+
h6 {
20+
font-size: inherit;
21+
font-weight: normal;
22+
line-height: inherit;
23+
}

src/forms.css

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
/**
2+
* Forms
3+
* ⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺⎺
4+
*/
5+
6+
/*
7+
* Override normalize.css's opinionated styles, `line-height` is set to
8+
* 'normal' as that's what most user-agents use.
9+
* See: https://github.com/necolas/normalize.css/issues/694.
10+
*/
11+
12+
button,
13+
input,
14+
optgroup,
15+
select,
16+
textarea {
17+
line-height: normal;
18+
}
19+
20+
/*
21+
* 1. Remove noticeable visual user-agent styles so we have a clean slate.
22+
* 2. Remove rounded corners that iOS applies to all `<input>` buttons.
23+
*/
24+
25+
[type="submit"],
26+
[type="button"],
27+
[type="reset"],
28+
button {
29+
background: transparent; /* 1 */
30+
border: 0; /* 1 */
31+
border-radius: 0; /* 2 */
32+
margin: 0; /* 1 */
33+
padding: 0; /* 1 */
34+
}
35+
36+
/*
37+
* 1. Remove top inner shadow that iOS applies to all textual inputs.
38+
* ✌︎ Credit
39+
* https://davidwalsh.name/input-shadows-ipad
40+
* 2. Remove padding (mostly 1px) that most user-agents apply to all textual
41+
inputs.
42+
*/
43+
44+
[type="date"],
45+
[type="datetime-local"],
46+
[type="email"],
47+
[type="month"],
48+
[type="number"],
49+
[type="password"],
50+
[type="search"],
51+
[type="tel"],
52+
[type="text"],
53+
[type="time"],
54+
[type="url"],
55+
[type="week"] {
56+
background-clip: padding-box; /* 1 */
57+
padding: 0; /* 2 */
58+
}
59+
60+
/*
61+
* Disable horizontal resizing.
62+
*/
63+
64+
textarea {
65+
resize: vertical;
66+
}
67+
68+
/**
69+
* Override a `<fieldset>`s default `min-width: min-content;` with the more
70+
* standard `min-width: 0;` so it renders as a block element would.
71+
*
72+
* ✌︎ Credit
73+
* https://thatemil.com/blog/2015/01/03/reset-your-fieldset.
74+
*/
75+
76+
fieldset {
77+
min-width: 0;
78+
}
79+
80+
body:not(:-moz-handler-blocked) fieldset {
81+
display: table-cell;
82+
}
83+
84+
/**
85+
* Remove the clear field button (an "X" icon) and the reveal password button
86+
* (an "eye" icon) that is generated by IE 10+ for textual inputs.
87+
* See: http://stackoverflow.com/a/21869433/1116204.
88+
*/
89+
90+
::-ms-clear,
91+
::-ms-reveal {
92+
display: none;
93+
}
94+
95+
/**
96+
* Un-style the caret for `<select>` lists in IE 10+.
97+
*/
98+
99+
::-ms-expand {
100+
background-color: transparent;
101+
border: 0;
102+
}
103+
104+
/**
105+
* Fixes a bug in Safari Mobile 7.0+ where click events aren't fired on
106+
* elements that aren't typically interactive.
107+
* See: https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile.
108+
*/
109+
110+
[role="button"] {
111+
cursor: pointer;
112+
}

0 commit comments

Comments
 (0)