4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/.gitconfig:
--------------------------------------------------------------------------------
1 | [user]
2 | email =
3 | name =
4 |
5 | # Adapted from https://blog.gitbutler.com/how-git-core-devs-configure-git/
6 |
7 | [column]
8 | ui = auto
9 | [branch]
10 | sort = -committerdate
11 | [tag]
12 | sort = version:refname
13 | [init]
14 | defaultBranch = main
15 | [diff]
16 | algorithm = histogram
17 | colorMoved = plain
18 | mnemonicPrefix = true
19 | renames = true
20 | [push]
21 | default = simple
22 | autoSetupRemote = true
23 | followTags = true
24 | [fetch]
25 | prune = true
26 | pruneTags = true
27 | all = true
28 |
29 | # why the hell not?
30 |
31 | [help]
32 | autocorrect = prompt
33 | [commit]
34 | verbose = true
35 | [rerere]
36 | enabled = true
37 | autoupdate = true
38 | [core]
39 | excludesfile = ~/.gitignore
40 | fileMode = false
41 | #[rebase]
42 | # autoSquash = true
43 | # autoStash = true
44 | # updateRefs = true
45 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | Better defaults
2 | =================
3 |
4 | The story is always the same:
5 | * Someone creates software that works without too much attention to the details (because at the beginning perfect is the enemy of the good)
6 | * People use it, get used to it
7 | * If a default behavior is not the best default, the software creator is posed with a dilemma
8 | * Break the current default behavior and suffer from [frustrated users](https://xkcd.com/1172/)
9 | * Keep the current behavior and propose an optional better one.
10 |
11 | The repo is a list of code and configuration files that try to promote better defaults by listing and documenting them.
12 |
13 | # CSS
14 |
15 | Preferably used inlined before any other CSS file/<style>.
16 |
17 |
18 | # Word of caution
19 |
20 | This repo is primarily for David Bruant's use. Issues and pull requests are more than welcome, but will be closed if he doesn't find any interest.
21 |
22 | This work is open source under a very liberal licence. If you disagree with anything, please fork this repo away. Thanks!
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 David Bruant
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/defaults.css:
--------------------------------------------------------------------------------
1 | /*
2 | http://www.paulirish.com/2012/box-sizing-border-box-ftw/
3 | */
4 | *, *:before, *:after {
5 | box-sizing: border-box;
6 | /* if you really care about older browsers, add prefixed versions at your own risks */
7 | }
8 |
9 | /*
10 | Repeating the background mostly makes sense in the . Otherwise, people usually want the image and preferably its center (not the top-right corner)
11 | */
12 | *:not(body) {
13 | background-repeat: no-repeat;
14 | background-position: center center;
15 | background-size: cover;
16 | }
17 |
18 | /*
19 | Makes the hidden attribute works even when an element is styled display: flex
20 | http://lists.w3.org/Archives/Public/public-whatwg-archive/2014May/0001.html
21 | */
22 | [hidden] {
23 | display: none !important;
24 | }
25 |
26 |
27 | html, body {
28 | padding: 0;
29 | margin: 0;
30 | }
31 |
32 | /*
33 | In applications, there can be lists but HTML lists have bullet points and a bunch of useless styling attributes
34 | */
35 | ul, ol, menu {
36 | margin: 0;
37 | padding: 0;
38 |
39 | }
40 |
41 | ul, menu {
42 | list-style: none;
43 | }
44 |
45 | li {
46 | margin: 0;
47 | padding: 0;
48 | }
49 |
50 | button{
51 | cursor: pointer;
52 | }
53 |
54 | /* default iframe borders are just ugly */
55 | iframe{
56 | border: 0;
57 | }
58 |
59 |
60 | * {
61 | border-collapse: collapse;
62 | }
63 |
--------------------------------------------------------------------------------