[TxMt] Bundle to alphabetize CSS rules
Thomas Aylott - subtleGradient
textmate at subtleGradient.com
Wed Mar 12 21:39:39 UTC 2008
On Mar 12, 2008, at 4:15 PM, Florian Gilcher wrote:
> On Mar 12, 2008, at 9:08 PM, Steven Ross wrote:
>
>> Yeah I agree, that would make it very difficult to decipher... I
>> take the same approach in building CSS files that Florian mentions
>> and it makes it very easy to go back and find classes and rules.
>> Also that would have the potential to screw up any browser based
>> hacks that rely on the order of the element definitions in the CSS.
>> That could leave you pulling your hair out after you ran this script.
>>
>> -=Steven
>
> That is a valid point. But actually, that could be circumvented by
> making a command that only sorts the rule that the cursor is
> actually in. So you don't have to mind the whole document. Handling
> the whole document is also a bit more complex. (you have to consider
> comments that should remain where they where etc...)
>
> I have a coding session planned this weekend, maybe i will get back
> to this. :)
>
> Greetings
> Florian Gilcher
Come to think of it, I do the same thing... group my attributes based
on "type" But only when there's a bunch of them.
That would actually be a handy script. Sort rules by type and separate
if there are bunches within a rule.
—Thomas Aylott – subtleGradient—
More information about the textmate
mailing list