├── .gitignore ├── css ├── css-clears.min.css ├── css-clears.css ├── clears.css └── clears.min.css ├── LICENSE.txt ├── package.json ├── src └── css-clears.css └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # List of files for git to ignore 2 | 3 | .DS_Store 4 | .AppleDouble 5 | .LSOverride 6 | 7 | # Icon must end with two \r 8 | Icon 9 | 10 | 11 | # Thumbnails 12 | ._* 13 | 14 | # Files that might appear on external disk 15 | .Spotlight-V100 16 | .Trashes 17 | 18 | # Directories potentially created on remote AFP share 19 | .AppleDB 20 | .AppleDesktop 21 | Network Trash Folder 22 | Temporary Items 23 | .apdisk 24 | 25 | # Vim 26 | Session.vim 27 | 28 | # Node 29 | node_modules/* 30 | -------------------------------------------------------------------------------- /css/css-clears.min.css: -------------------------------------------------------------------------------- 1 | .cn{clear:none}.cl{clear:left}.cr{clear:right}.cb{clear:both}.cf:after,.cf:before{content:" ";display:table}.cf:after{clear:both}.cf{*zoom:1}@media screen and (min-width:48em){.cn-ns{clear:none}.cl-ns{clear:left}.cr-ns{clear:right}.cb-ns{clear:both}.cf-ns:after,.cf-ns:before{content:" ";display:table}.cf-ns:after{clear:both}.cf-ns{zoom:1}}@media screen and (min-width:48em) and (max-width:64em){.cn-m{clear:none}.cl-m{clear:left}.cr-m{clear:right}.cb-m{clear:both}.cf-m:after,.cf-m:before{content:" ";display:table}.cf-m:after{clear:both}.cf-m{zoom:1}}@media screen and (min-width:64em){.cn-l{clear:none}.cl-l{clear:left}.cr-l{clear:right}.cb-l{clear:both}.cf-l:after,.cf-l:before{content:" ";display:table}.cf-l:after{clear:both}.cf-l{zoom:1}} 2 | 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | ISC License (ISC) 2 | Copyright (c) 2018, Adam Morse 3 | 4 | Permission to use, copy, modify, and/or distribute this software for any 5 | purpose with or without fee is hereby granted, provided that the above 6 | copyright notice and this permission notice appear in all copies. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 9 | REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 10 | FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 11 | INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 12 | LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 13 | OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 14 | PERFORMANCE OF THIS SOFTWARE. 15 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "css-clears", 3 | "style": "clears.css", 4 | "version": "1.0.8", 5 | "homepage": "http://github.com/mrmrs/css-clears", 6 | "description": "Css module of single purpose classes for clears", 7 | "keywords": [ 8 | "css", 9 | "oocss", 10 | "clears" 11 | ], 12 | "css-clears": { 13 | "type": "git", 14 | "url": "http://github.com/mrmrs/css-clears.git" 15 | }, 16 | "bugs": { 17 | "url": "https://github.com/mrmrs/css-clears/issues", 18 | "email": "hi@mrmrs.cc" 19 | }, 20 | "author": { 21 | "name": "Adam Morse", 22 | "email": "hi@mrmrs.cc", 23 | "url": "http://mrmrs.cc" 24 | }, 25 | "contributors": [ 26 | { 27 | "name": "Adam Morse", 28 | "email": "hi@mrmrs.cc" 29 | } 30 | ], 31 | "license": "MIT", 32 | "devDependencies": { 33 | "tachyons-cli": "^1.3.0" 34 | }, 35 | "scripts": { 36 | "start": "tachyons src/css-clears.css > css/css-clears.css && tachyons src/css-clears.css --minify > css/css-clears.min.css && tachyons src/css-clears.css --generate-docs --package=../../package.json > readme.md" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /css/css-clears.css: -------------------------------------------------------------------------------- 1 | /* 2 | CLEARS 3 | */ 4 | .cn { clear: none; } 5 | .cl { clear: left; } 6 | .cr { clear: right; } 7 | .cb { clear: both; } 8 | /* Nicolas Gallaghers Clearfix solution 9 | Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ 10 | .cf:before, .cf:after { content: " "; display: table; } 11 | .cf:after { clear: both; } 12 | .cf { *zoom: 1; } 13 | @media screen and (min-width: 48em) { 14 | .cn-ns { clear: none; } 15 | .cl-ns { clear: left; } 16 | .cr-ns { clear: right; } 17 | .cb-ns { clear: both; } 18 | .cf-ns:before, .cf-ns:after { content: " "; display: table; } 19 | .cf-ns:after { clear: both; } 20 | .cf-ns { zoom: 1; } 21 | } 22 | @media screen and (min-width:48em) and (max-width: 64em) { 23 | .cn-m { clear: none; } 24 | .cl-m { clear: left; } 25 | .cr-m { clear: right; } 26 | .cb-m { clear: both; } 27 | .cf-m:before, .cf-m:after { content: " "; display: table; } 28 | .cf-m:after { clear: both; } 29 | .cf-m { zoom: 1; } 30 | } 31 | @media screen and (min-width: 64em) { 32 | .cn-l { clear: none; } 33 | .cl-l { clear: left; } 34 | .cr-l { clear: right; } 35 | .cb-l { clear: both; } 36 | .cf-l:before, .cf-l:after { content: " "; display: table; } 37 | .cf-l:after { clear: both; } 38 | .cf-l { zoom: 1; } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /css/clears.css: -------------------------------------------------------------------------------- 1 | /* 2 | CLEARS 3 | */ 4 | 5 | .cn { clear: none; } 6 | .cl { clear: left; } 7 | .cr { clear: right; } 8 | .cb { clear: both; } 9 | 10 | /* Nicolas Gallaghers Clearfix solution 11 | Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ 12 | 13 | .cf:before, 14 | .cf:after { content: " "; display: table; } 15 | .cf:after { clear: both; } 16 | .cf { *zoom: 1; } 17 | 18 | @media screen and (min-width: 48em) { 19 | .cn-ns { clear: none; } 20 | .cl-ns { clear: left; } 21 | .cr-ns { clear: right; } 22 | .cb-ns { clear: both; } 23 | .cf-ns:before, 24 | .cf-ns:after { content: " "; display: table; } 25 | .cf-ns:after { clear: both; } 26 | .cf-ns { *zoom: 1; } 27 | } 28 | 29 | @media screen and (min-width:48em) and (max-width: 64em) { 30 | .cn-m { clear: none; } 31 | .cl-m { clear: left; } 32 | .cr-m { clear: right; } 33 | .cb-m { clear: both; } 34 | .cf-m:before, 35 | .cf-m:after { content: " "; display: table; } 36 | .cf-m:after { clear: both; } 37 | .cf-m { *zoom: 1; } 38 | } 39 | 40 | @media screen and (min-width: 64em) { 41 | .cn-l { clear: none; } 42 | .cl-l { clear: left; } 43 | .cr-l { clear: right; } 44 | .cb-l { clear: both; } 45 | .cf-l:before, 46 | .cf-l:after { content: " "; display: table; } 47 | .cf-l:after { clear: both; } 48 | .cf-l { *zoom: 1; } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /css/clears.min.css: -------------------------------------------------------------------------------- 1 | /* 2 | CLEARS 3 | */ 4 | 5 | .cn { clear: none; } 6 | .cl { clear: left; } 7 | .cr { clear: right; } 8 | .cb { clear: both; } 9 | 10 | /* Nicolas Gallaghers Clearfix solution 11 | Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ 12 | 13 | .cf:before, 14 | .cf:after { content: " "; display: table; } 15 | .cf:after { clear: both; } 16 | .cf { *zoom: 1; } 17 | 18 | @media screen and (min-width: 48em) { 19 | .cn-ns { clear: none; } 20 | .cl-ns { clear: left; } 21 | .cr-ns { clear: right; } 22 | .cb-ns { clear: both; } 23 | .cf-ns:before, 24 | .cf-ns:after { content: " "; display: table; } 25 | .cf-ns:after { clear: both; } 26 | .cf-ns { *zoom: 1; } 27 | } 28 | 29 | @media screen and (min-width:48em) and (max-width: 64em) { 30 | .cn-m { clear: none; } 31 | .cl-m { clear: left; } 32 | .cr-m { clear: right; } 33 | .cb-m { clear: both; } 34 | .cf-m:before, 35 | .cf-m:after { content: " "; display: table; } 36 | .cf-m:after { clear: both; } 37 | .cf-m { *zoom: 1; } 38 | } 39 | 40 | @media screen and (min-width: 64em) { 41 | .cn-l { clear: none; } 42 | .cl-l { clear: left; } 43 | .cr-l { clear: right; } 44 | .cb-l { clear: both; } 45 | .cf-l:before, 46 | .cf-l:after { content: " "; display: table; } 47 | .cf-l:after { clear: both; } 48 | .cf-l { *zoom: 1; } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /src/css-clears.css: -------------------------------------------------------------------------------- 1 | /* 2 | CLEARS 3 | */ 4 | 5 | .cn { clear: none; } 6 | .cl { clear: left; } 7 | .cr { clear: right; } 8 | .cb { clear: both; } 9 | 10 | /* Nicolas Gallaghers Clearfix solution 11 | Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ 12 | 13 | .cf:before, 14 | .cf:after { content: " "; display: table; } 15 | .cf:after { clear: both; } 16 | .cf { *zoom: 1; } 17 | 18 | @media screen and (min-width: 48em) { 19 | .cn-ns { clear: none; } 20 | .cl-ns { clear: left; } 21 | .cr-ns { clear: right; } 22 | .cb-ns { clear: both; } 23 | .cf-ns:before, 24 | .cf-ns:after { content: " "; display: table; } 25 | .cf-ns:after { clear: both; } 26 | .cf-ns { *zoom: 1; } 27 | } 28 | 29 | @media screen and (min-width:48em) and (max-width: 64em) { 30 | .cn-m { clear: none; } 31 | .cl-m { clear: left; } 32 | .cr-m { clear: right; } 33 | .cb-m { clear: both; } 34 | .cf-m:before, 35 | .cf-m:after { content: " "; display: table; } 36 | .cf-m:after { clear: both; } 37 | .cf-m { *zoom: 1; } 38 | } 39 | 40 | @media screen and (min-width: 64em) { 41 | .cn-l { clear: none; } 42 | .cl-l { clear: left; } 43 | .cr-l { clear: right; } 44 | .cb-l { clear: both; } 45 | .cf-l:before, 46 | .cf-l:after { content: " "; display: table; } 47 | .cf-l:after { clear: both; } 48 | .cf-l { *zoom: 1; } 49 | } 50 | 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # css-clears 1.0.6 2 | 3 | Css module of single purpose classes for clears 4 | 5 | #### Stats 6 | 7 | 343 | 32 | 32 8 | ---|---|--- 9 | bytes | selectors | declarations 10 | 11 | ## Installation 12 | 13 | #### With [npm](https://npmjs.com) 14 | 15 | ``` 16 | npm install --save-dev css-clears 17 | ``` 18 | 19 | Learn more about using css installed with npm: 20 | * https://webpack.github.io/docs/stylesheets.html 21 | * https://github.com/defunctzombie/npm-css 22 | 23 | #### With Git 24 | 25 | http: 26 | ``` 27 | git clone https://github.com/tachyons-css/css-clears 28 | ``` 29 | 30 | ssh: 31 | ``` 32 | git clone git@github.com:tachyons-css/css-clears.git 33 | ``` 34 | 35 | ## Usage 36 | 37 | #### Using with [Postcss](https://github.com/postcss/postcss) 38 | 39 | Import the css module 40 | 41 | ```css 42 | @import "css-clears"; 43 | ``` 44 | 45 | Then process the css using the [`tachyons-cli`](https://github.com/tachyons-css/tachyons-cli) 46 | 47 | ```sh 48 | $ npm i -g tachyons-cli 49 | $ tachyons path/to/css-file.css > dist/t.css 50 | ``` 51 | 52 | #### Using the css 53 | 54 | ##### CDN 55 | The easiest and most simple way to use the css is to use the cdn hosted version. Include it in the head of your html with: 56 | 57 | ``` 58 | 59 | ``` 60 | 61 | ##### Locally 62 | The built css is located in the `css` directory. It contains an unminified and minified version. 63 | You can either cut and paste that css or link to it directly in your html. 64 | 65 | ```html 66 | 67 | ``` 68 | 69 | #### Development 70 | 71 | The source css files can be found in the `src` directory. 72 | Running `$ npm start` will process the source css and place the built css in the `css` directory. 73 | 74 | ## The css 75 | 76 | ```css 77 | /* 78 | CLEARS 79 | */ 80 | .cn { clear: none; } 81 | .cl { clear: left; } 82 | .cr { clear: right; } 83 | .cb { clear: both; } 84 | /* Nicolas Gallaghers Clearfix solution 85 | Ref: http://nicolasgallagher.com/micro-clearfix-hack/ */ 86 | .cf:before, .cf:after { content: " "; display: table; } 87 | .cf:after { clear: both; } 88 | .cf { *zoom: 1; } 89 | @media screen and (min-width: 48em) { 90 | .cn-ns { clear: none; } 91 | .cl-ns { clear: left; } 92 | .cr-ns { clear: right; } 93 | .cb-ns { clear: both; } 94 | .cf-ns:before, .cf-ns:after { content: " "; display: table; } 95 | .cf-ns:after { clear: both; } 96 | .cf-ns { zoom: 1; } 97 | } 98 | @media screen and (min-width:48em) and (max-width: 64em) { 99 | .cn-m { clear: none; } 100 | .cl-m { clear: left; } 101 | .cr-m { clear: right; } 102 | .cb-m { clear: both; } 103 | .cf-m:before, .cf-m:after { content: " "; display: table; } 104 | .cf-m:after { clear: both; } 105 | .cf-m { zoom: 1; } 106 | } 107 | @media screen and (min-width: 64em) { 108 | .cn-l { clear: none; } 109 | .cl-l { clear: left; } 110 | .cr-l { clear: right; } 111 | .cb-l { clear: both; } 112 | .cf-l:before, .cf-l:after { content: " "; display: table; } 113 | .cf-l:after { clear: both; } 114 | .cf-l { zoom: 1; } 115 | } 116 | ``` 117 | 118 | ## Contributing 119 | 120 | 1. Fork it 121 | 2. Create your feature branch (`git checkout -b my-new-feature`) 122 | 3. Commit your changes (`git commit -am 'Add some feature'`) 123 | 4. Push to the branch (`git push origin my-new-feature`) 124 | 5. Create new Pull Request 125 | 126 | ## Authors 127 | 128 | * [mrmrs](http://mrmrs.io) 129 | * [johno](http://johnotander.com) 130 | 131 | ## License 132 | 133 | ISC 134 | 135 | --------------------------------------------------------------------------------