Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support of :before, :after and direct child > selectors #101

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9cd3029
bower
Jan 27, 2016
e452e60
Begin maintaining
Feb 6, 2016
d8875d0
Very basic linting
Feb 6, 2016
6f9e9cd
Remove superfluous newlines
Feb 6, 2016
8fe989d
Tweak top comments
Feb 6, 2016
c3364ac
:ship: 1.0.4
Feb 6, 2016
ffaaa42
Rebrand as selectivizr 2
Feb 6, 2016
a81028b
:ship: 1.0.5
Feb 6, 2016
1609af6
Make README better
Feb 6, 2016
c57a348
Add to npm
Feb 6, 2016
e02f36b
:ship: 1.0.6
Feb 6, 2016
328f2cc
Fix IE font problem
Feb 10, 2016
2d275fe
:ship: 1.0.7
Feb 10, 2016
30f06e6
Fixed main property in bower.json
dixhuit Feb 10, 2016
db185a4
Merge pull request #3 from danbohea/master
corysimmons Feb 10, 2016
0cf25ea
Remove superfluous version maintenance stuff
Feb 10, 2016
b92183b
:ship: 1.0.8
Feb 10, 2016
1579995
Update README.md
corysimmons Feb 13, 2016
2161299
Update README.md
coliff May 9, 2016
408efeb
update links to HTTPS and fix some typos
coliff May 9, 2016
1630a1a
editorconfig file added
coliff May 9, 2016
515ac4e
Merge pull request #11 from coliff/patch-4
corysimmons Jun 2, 2016
c447acc
Merge pull request #9 from coliff/patch-1
corysimmons Jun 2, 2016
a7e8d69
Merge pull request #10 from coliff/patch-3
corysimmons Jun 2, 2016
29df345
Fix bug in IE8 when loading empty stylesheets
KeesCBakker Jun 27, 2016
4b6f59d
Merge pull request #13 from KeesCBakker/master
corysimmons Jun 27, 2016
751c664
1.0.9
Jun 27, 2016
3364be7
fixes from jesstelford
Jul 30, 2016
6d26945
Merge pull request #14 from ganlanyuan/fix-import-url
corysimmons Oct 10, 2016
572842c
Delete config.codekit
corysimmons Oct 10, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
29 changes: 0 additions & 29 deletions README.markdown

This file was deleted.

81 changes: 81 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<h1 align="center">Selectivizr 2</h1>
<p align="center">
:sparkles: Now with maintenance! :sparkles:
</p>

### What happened to the old project?
[Keith Clark](https://github.com/keithclark) was eaten alive by sabre-tooth rattlesnakes or something. Who knows?

Good on him for originally inventing this though. :beers:

### Why support old IE?
Why completely turn your back on it? I'm not saying give it special attention (unless you're making a website for [the most populated country in the world](https://www.techinasia.com/windows-xp-now-dead-but-200-million-machines-in-china-still-using-it)), but why not toss some polyfills in conditional comments and at least give the poor bastards who are stuck on IE6-IE8 *something* to look at.

It requires almost 0 effort on your part and can make your website viewable to a lot of people.

### What is Selectivizr?
Selectivizr is a [polyfill](https://en.wikipedia.org/wiki/Polyfill) that makes IE6-8 work with most [CSS3 selectors](https://www.w3.org/TR/selectors/#selectors) (like `:nth-child`).

### Installation
- `bower install --save selectivizr2`

### Usage
To use the library, you'll need to include the [latest jQuery 1.x.x](https://jquery.com/download/).

Then add the following conditional comment **after** your stylesheets and jQuery:

```html
<!--[if lt IE 9]>
<script src="selectivizr2.js"></script>
<![endif]-->
```

### Example

```html
<!doctype html>
<html>
<head>
<title>Selectivizr Test</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div>Hello World</div>

<script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
<!--[if lt IE 9]>
<script src="selectivizr2.js"></script>
<![endif]-->
</body>
</html>
```

```css
div:nth-of-type(1) {
background: blue;
}
```

That's it. That's how polyfills typically work. Load the .js and [bam](https://www.youtube.com/watch?v=8dxpMxULHnA)!

The only people downloading this file will be people below IE9. This means we're not punishing people using modern browsers.

### How can I test my site in IE7-IE8?
- Use a Virtual Machine
- Learn how to install and setup VMs with [VirtualBox](https://www.virtualbox.org/). It's cross-platform and there are probably lots of [YouTube videos](https://www.youtube.com/results?search_query=virtualbox) on it so grab a :coffee: and enjoy.
- Microsoft offers [Windows images](https://dev.windows.com/en-us/microsoft-edge/tools/vms) specifically so you can try out old browsers.
- [IEVMS](https://github.com/xdissent/ievms) is the incredibly easy way to get/maintain these VMs.
- [BrowserStack](http://browserstack.com) is expensive and **slow**, but if you can't figure out the other techniques you can use it. I highly suggest you figure out how to use VMs though. It's a skill worth learning.

> I'm not even sure how to test in IE6 anymore, but... seriously?

### Why shouldn't I use X?
- `bower install selectivizr` installs Selectivizr 1.0.2. 1.0.2 sucks and doesn't work with a bunch of other tools like the wonderful [calc-polyfill](https://github.com/closingtag/calc-polyfill).
- https://github.com/keithclark/selectivizr is unmaintained.
- https://github.com/Mediamoose/selectivizr has issues closed and is broken on Bower.
- https://github.com/shinnn/lt-ie-9 is unmaintained and does more than just Selectivizr anyway.
- `bower install selectivizr-latest` was what this project was until I decided to actually maintain it.

### Caveats
TBH, I'm not an amazing JS developer yet, so I really have no idea wtf is going on. I'm happy to merge stuff as long as it seems legit but I'm probably not going to spend a ton of time working on this codebase.
23 changes: 23 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "selectivizr2",
"main": "selectivizr2.js",
"homepage": "https://github.com/corysimmons/selectivizr2",
"authors": [
"Keith Clark",
"Cory Simmons"
],
"description": "A maintained version of Selectivizr.",
"keywords": [
"selectivizr",
"ie8",
"selectors"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
128 changes: 0 additions & 128 deletions changelog.txt

This file was deleted.

22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "selectivizr2",
"description": "Selectivizr maintained.",
"version": "1.0.9",
"main": "selectivizr2.js",
"repository": {
"type": "git",
"url": "git+https://github.com/corysimmons/selectivizr2.git"
},
"keywords": [
"selectivizr",
"css3",
"selectors",
"ie8"
],
"author": "Cory Simmons",
"license": "MIT",
"bugs": {
"url": "https://github.com/corysimmons/selectivizr2/issues"
},
"homepage": "http://selectivizr.com"
}
Loading