Re: Multiple assignment structure (suggestion)

hehe, yep, maybe I should've explained it better!

Well, the point about this, is exactly about that!
Nowadays, for example, the css shrinkers do things like this:

THIS:
selector-1,
selector-2 {
    border-color: #0b0b0b;
    color: #0b0b0b;
    padding: 10px;
    margin: 10px;
    border-top: 10px;
    left: 100px;
    top: 100px;
}

BECOMES THIS:
selector-1,selector-2 {border-color: #0b0b0b;color: #0b0b0b;padding:
10px;margin: 10px;border-top: 10px;left: 100px;top: 100px;}

What I suggest, is that it could become this
selector-1,selector-2{border-color,color:#0b0b0b;padding,margin,border-top:10px;left,top:
100px;}

I am suggesting a new way for these tools to compress the css, for us :)

cheers.








On Thu, Nov 27, 2014 at 1:29 PM, Tab Atkins Jr. <jackalmage@gmail.com>
wrote:

> On Wed, Nov 26, 2014 at 6:04 PM, Felipe Nascimento de Moura
> <felipenmoura@gmail.com> wrote:
> > Yes, but the idea was not to type less!
> > The idea was to save bytes!
>
> You should have said that in your first email. ^_^  I had to guess at
> what you were trying to achieve in the first place, let alone what the
> overall goal was.
>
> This has an even easier answer, then: don't worry about it.
>
> It's not your job to try and find repeated structures in your CSS
> (well, beyond a high-level "don't repeat yourself" sort of thing).
> That's the job of your compression algorithm, who can do it vastly
> better than you, and can do it without you having to contort your
> source file.  Just turn on compression on your server and you'll have
> far greater savings than you'll achieve with tricks like this.
>
> Or remove a single image from your page. That generally saves far more
> than anything else you can do combined.
>
> ~TJ
>



-- 
*Felipe N. Moura*
Senior Web Developer

Website:  http://felipenmoura.org
Twitter:    @felipenmoura <http://twitter.com/felipenmoura>
LinkedIn: http://goo.gl/qGmq

Meet some of my projects:
BrazilJS Conference <http://braziljs.com.br/>  |  BrazilJS Foundation
<http://braziljs.org>  |  Power Polygon
<http://github.com/braziljs/power-polygon>  |  TheWebMind
<http://thewebmind.org/>  |  PHPDevBar
<https://addons.mozilla.org/pt-BR/firefox/addon/php-developer-toolbar/>
---------------------------------
LinuxUser #508332
*Changing  the  world*  is the least I expect from  myself!

Received on Friday, 28 November 2014 01:16:17 UTC