W3C home > Mailing lists > Public > www-style@w3.org > April 2015

Re: CSS Classes Custom - by Leonardo Lima

From: Andrea Rendine <master.skywalker.88@gmail.com>
Date: Wed, 8 Apr 2015 19:31:47 +0200
Message-ID: <CAGxST9=z9Jn3x=j7mbqCjU=i6+x_7NQDa0=p-C0nPKPgcQx1mQ@mail.gmail.com>
To: Leonardo Lima <leonardo403@gmail.com>
Cc: www-style list <www-style@w3.org>
Hi everybody.
I hope this proposal can be technically achievable.
Pseudo selectors and attribute selectors are useful in defining
uniformities for elements which go beyond those defined with tag name,
class and descendants, but there are cases when it would be useful to
define properties as if the elements belonged to the same class.... but
they don't. Designers can't always order changes to class definition in
elements (or this can be undesirable for any reason).
Custom classes, or custom property blocks, could easily solve these
scenarios.
I also add that programmable stylesheet languages such as LESS allow
authors to nest entire blocks of properties along with their selectors.
That is undesirable, but I don't think there would be any issue in defining
zero-specificity blocks to be "copied" where needed.
Has there been any similar proposal in the past?
Cheers,
Andrea

2015-04-04 4:50 GMT+02:00 Leonardo Lima <leonardo403@gmail.com>:

>
> Hi,
>
> After that i see css custom properties , think that if creating Class
> custom for CSS can help us. Nowadays we have that install preprocessor CSS
> to and using this preprocessor CSS  can using variables.
> I think using (classes custom) can we have an default of ("mixins") a
> bunch of properties from one rule-set into another rule-set. With this rule
> dont need use more preprocessor CSS.Now lets change how make CSS variables,
> see example below:
> So can we working very fast with changes in projects of way correct,
> without worry with files CSS, that continue pretty good.
>
>
> :root{
> /*create class*/
> --btn-default{
>     width:50px;
>     height:30px;
>     font-size:15px;
>     font-weight:bold;
>     }
> }
> .btn-confirm{
>     class(--btn-default);/*call class*/
>     color:green;
> }
>
> --
> *Leonardo Lima*
> *Web developer*
>
> Fone:  *(051) 8336-5081*
> CurrĂ­culo online: http://leonardo403.github.io/curriculo-leonardo-lima/
> Github: https://github.com/leonardo403
> Google+: https://plus.google.com/u/0/+LeonardoLimawebdev/
> About.me: http://about.me/leonardolima
> Twitter: https://twitter.com/Leonardo403Br
>
>
>
Received on Wednesday, 8 April 2015 17:32:15 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:30 UTC