W3C home > Mailing lists > Public > www-style@w3.org > November 2014

Re: Multiple assignment structure (suggestion)

From: Felipe Nascimento de Moura <felipenmoura@gmail.com>
Date: Thu, 27 Nov 2014 23:15:10 -0200
Message-ID: <CAJVBkV=1eKYs8j1m=y0FCJCgM09oQuc7fZv8iLJXDujOkWj3Fg@mail.gmail.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Cameron McCormack <cam@mcc.id.au>, www-style <www-style@w3.org>
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:

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

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

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


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

> 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
LinuxUser #508332
*Changing  the  world*  is the least I expect from  myself!
Received on Friday, 28 November 2014 01:16:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:46 UTC