├── .gitignore
├── LICENSE.txt
├── css
├── image-rendering.css
├── image-rendering.min.css
├── css-image-rendering.min.css
└── css-image-rendering.css
├── src
└── css-image-rendering.css
├── package.json
└── 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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/css/image-rendering.css:
--------------------------------------------------------------------------------
1 | /*
2 | IMAGE RENDERING
3 | */
4 |
5 |
6 | .render-auto { image-rendering: auto; }
7 | .render-auto { image-rendering: crisp-edges; }
8 | .render-auto { image-rendering: pixelated; }
9 |
10 | @media screen and (min-width: 48em) {
11 | .render-auto-ns { image-rendering: auto; }
12 | .render-auto-ns { image-rendering: crisp-edges; }
13 | .render-auto-ns { image-rendering: pixelated; }
14 | }
15 |
16 | @media screen and (min-width:48em) and (max-width: 64em) {
17 | .render-auto-m { image-rendering: auto; }
18 | .render-auto-m { image-rendering: crisp-edges; }
19 | .render-auto-m { image-rendering: pixelated; }
20 | }
21 |
22 | @media screen and (min-width: 64em) {
23 | .render-auto-l { image-rendering: auto; }
24 | .render-auto-l { image-rendering: crisp-edges; }
25 | .render-auto-l { image-rendering: pixelated; }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/css/image-rendering.min.css:
--------------------------------------------------------------------------------
1 | /*
2 | IMAGE RENDERING
3 | */
4 |
5 |
6 | .render-auto { image-rendering: auto; }
7 | .render-auto { image-rendering: crisp-edges; }
8 | .render-auto { image-rendering: pixelated; }
9 |
10 | @media screen and (min-width: 48em) {
11 | .render-auto-ns { image-rendering: auto; }
12 | .render-auto-ns { image-rendering: crisp-edges; }
13 | .render-auto-ns { image-rendering: pixelated; }
14 | }
15 |
16 | @media screen and (min-width:48em) and (max-width: 64em) {
17 | .render-auto-m { image-rendering: auto; }
18 | .render-auto-m { image-rendering: crisp-edges; }
19 | .render-auto-m { image-rendering: pixelated; }
20 | }
21 |
22 | @media screen and (min-width: 64em) {
23 | .render-auto-l { image-rendering: auto; }
24 | .render-auto-l { image-rendering: crisp-edges; }
25 | .render-auto-l { image-rendering: pixelated; }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/src/css-image-rendering.css:
--------------------------------------------------------------------------------
1 | /*
2 | IMAGE RENDERING
3 | */
4 |
5 |
6 | .render-auto { image-rendering: auto; }
7 | .render-auto { image-rendering: crisp-edges; }
8 | .render-auto { image-rendering: pixelated; }
9 |
10 | @media screen and (min-width: 48em) {
11 | .render-auto-ns { image-rendering: auto; }
12 | .render-auto-ns { image-rendering: crisp-edges; }
13 | .render-auto-ns { image-rendering: pixelated; }
14 | }
15 |
16 | @media screen and (min-width:48em) and (max-width: 64em) {
17 | .render-auto-m { image-rendering: auto; }
18 | .render-auto-m { image-rendering: crisp-edges; }
19 | .render-auto-m { image-rendering: pixelated; }
20 | }
21 |
22 | @media screen and (min-width: 64em) {
23 | .render-auto-l { image-rendering: auto; }
24 | .render-auto-l { image-rendering: crisp-edges; }
25 | .render-auto-l { image-rendering: pixelated; }
26 | }
27 |
28 |
--------------------------------------------------------------------------------
/css/css-image-rendering.min.css:
--------------------------------------------------------------------------------
1 | .render-auto{image-rendering:auto;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor;image-rendering:-webkit-optimize-contrast;image-rendering:-moz-crisp-edges;image-rendering:pixelated}@media screen and (min-width:48em){.render-auto-ns{image-rendering:auto;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor;image-rendering:-webkit-optimize-contrast;image-rendering:-moz-crisp-edges;image-rendering:pixelated}}@media screen and (min-width:48em) and (max-width:64em){.render-auto-m{image-rendering:auto;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor;image-rendering:-webkit-optimize-contrast;image-rendering:-moz-crisp-edges;image-rendering:pixelated}}@media screen and (min-width:64em){.render-auto-l{image-rendering:auto;image-rendering:crisp-edges;-ms-interpolation-mode:nearest-neighbor;image-rendering:-webkit-optimize-contrast;image-rendering:-moz-crisp-edges;image-rendering:pixelated}}
2 |
3 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "css-image-rendering",
3 | "style": "image-rendering.css",
4 | "version": "1.0.8",
5 | "homepage": "http://github.com/mrmrs/css-image-rendering",
6 | "description": "Css module of single purpose classes for image rendering",
7 | "keywords": [
8 | "css",
9 | "oocss",
10 | "image-rendering"
11 | ],
12 | "css-image-rendering": {
13 | "type": "git",
14 | "url": "http://github.com/mrmrs/css-image-rendering.git"
15 | },
16 | "bugs": {
17 | "url": "https://github.com/mrmrs/css-image-rendering/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-image-rendering.css > css/css-image-rendering.css && tachyons src/css-image-rendering.css --minify > css/css-image-rendering.min.css && tachyons src/css-image-rendering.css --generate-docs --package=../../package.json > readme.md"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/css/css-image-rendering.css:
--------------------------------------------------------------------------------
1 | /*
2 | IMAGE RENDERING
3 | */
4 | .render-auto { image-rendering: auto; }
5 | .render-auto { image-rendering: crisp-edges; }
6 | .render-auto { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
7 | @media screen and (min-width: 48em) {
8 | .render-auto-ns { image-rendering: auto; }
9 | .render-auto-ns { image-rendering: crisp-edges; }
10 | .render-auto-ns { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
11 | }
12 | @media screen and (min-width:48em) and (max-width: 64em) {
13 | .render-auto-m { image-rendering: auto; }
14 | .render-auto-m { image-rendering: crisp-edges; }
15 | .render-auto-m { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
16 | }
17 | @media screen and (min-width: 64em) {
18 | .render-auto-l { image-rendering: auto; }
19 | .render-auto-l { image-rendering: crisp-edges; }
20 | .render-auto-l { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # css-image-rendering 1.0.6
2 |
3 | Css module of single purpose classes for image rendering
4 |
5 | #### Stats
6 |
7 | 253 | 12 | 24
8 | ---|---|---
9 | bytes | selectors | declarations
10 |
11 | ## Installation
12 |
13 | #### With [npm](https://npmjs.com)
14 |
15 | ```
16 | npm install --save-dev css-image-rendering
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-image-rendering
28 | ```
29 |
30 | ssh:
31 | ```
32 | git clone git@github.com:tachyons-css/css-image-rendering.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-image-rendering";
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 | IMAGE RENDERING
79 | */
80 | .render-auto { image-rendering: auto; }
81 | .render-auto { image-rendering: crisp-edges; }
82 | .render-auto { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
83 | @media screen and (min-width: 48em) {
84 | .render-auto-ns { image-rendering: auto; }
85 | .render-auto-ns { image-rendering: crisp-edges; }
86 | .render-auto-ns { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
87 | }
88 | @media screen and (min-width:48em) and (max-width: 64em) {
89 | .render-auto-m { image-rendering: auto; }
90 | .render-auto-m { image-rendering: crisp-edges; }
91 | .render-auto-m { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
92 | }
93 | @media screen and (min-width: 64em) {
94 | .render-auto-l { image-rendering: auto; }
95 | .render-auto-l { image-rendering: crisp-edges; }
96 | .render-auto-l { -ms-interpolation-mode: nearest-neighbor; image-rendering: -webkit-optimize-contrast; image-rendering: -moz-crisp-edges; image-rendering: pixelated; }
97 | }
98 | ```
99 |
100 | ## Contributing
101 |
102 | 1. Fork it
103 | 2. Create your feature branch (`git checkout -b my-new-feature`)
104 | 3. Commit your changes (`git commit -am 'Add some feature'`)
105 | 4. Push to the branch (`git push origin my-new-feature`)
106 | 5. Create new Pull Request
107 |
108 | ## Authors
109 |
110 | * [mrmrs](http://mrmrs.io)
111 | * [johno](http://johnotander.com)
112 |
113 | ## License
114 |
115 | ISC
116 |
117 |
--------------------------------------------------------------------------------