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

Adding support for css hacks #16

Merged
merged 2 commits into from Aug 3, 2013
Merged

Conversation

amadeus
Copy link
Contributor

@amadeus amadeus commented Jul 31, 2013

This commit may be somewhat controversial but I find it very useful in my day to day.

It essentially styles known css hacks like (* and _) as if they were vendor prefixes (linked to the
Comment group).

@amadeus
Copy link
Contributor Author

amadeus commented Aug 1, 2013

So yeah, here's the thing. Yes they are old fixes, and yes, in time they will probably be gone, however, I do often use other people's CSS files, or sometimes I work on projects that require me support older versions of IE, so it's nice to at least have these hacks 'fit in' with the overall theme.

@JulesWang
Copy link
Owner

Ok, pls add more comments to tell us these css hacks is only for IE7 or below, so that when older versions of IE are totally obsoleted, someone could know that it is safe to remove them from the syntax file.

@amadeus
Copy link
Contributor Author

amadeus commented Aug 1, 2013

Not a problem, I have to run for a bit, but I'll look into it in the next day or so to better comment this.

This commit may be somewhat controversial. It essentially styles known
css hacks like (* and _) as if they were vendor prefixes (linked to the
Comment group).
@amadeus
Copy link
Contributor Author

amadeus commented Aug 2, 2013

I went ahead and rebased this branch against recent changes to avoid merge conflicts. I also added a far more descriptive comment with a link for more details.

Does this work?

JulesWang added a commit that referenced this pull request Aug 3, 2013
Adding support for css hacks
@JulesWang JulesWang merged commit 8e9e529 into JulesWang:master Aug 3, 2013
@JulesWang
Copy link
Owner

it works well.

@amadeus amadeus deleted the css-hacks branch August 3, 2013 20:18
@BlackIkeEagle
Copy link

This now has hit the vim runtime files

And it breaks syntax higlighting for php, rails, and maybe more

the offending lines are:

" Required for cssHacks
setlocal iskeyword-=_

@amadeus
Copy link
Contributor Author

amadeus commented Sep 23, 2013

@BlackIkeEagle thanks for the report, I've posted on the vim_dev thread regarding this. Awaiting Braam's response on how to proceed.

@BlackIkeEagle
Copy link

is there a way to do this cssHacks thing without "setlocal iskeyword-=_" ?

do you have any css files where the working of the cssHacks is visible ?

i tried some but found no difference when the cssHacks were there or removed
i'm not a css expert at all

@JulesWang
Copy link
Owner

That's terrible, I have sent a copy of css.vim to Bram.
@BlackIkeEagle , would you pls paste the php or rails code with broken syntax highlighting ?

@BlackIkeEagle
Copy link

sample:

<?php

$array = array('one', 'two', 'three');
$flag = in_array('one', $array);

in the above example in_ is no longer detected as part of the in_array function

@JulesWang
Copy link
Owner

The code "setlocal iskeyword-=_ " breaks syntax highlighting of other languages, this change will be reverted with no doubt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants