CSS dinamycally manipulated

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
25 messages Options
12
Reply | Threaded
Open this post in threaded view
|

CSS dinamycally manipulated

Sebastian Sastre-2
Hi there,
 
    I wonder if anybody has done some CSS programatic manipulation.
 
    For cases in wich the look of a component should depend on some instance state it could be interesting. Has anybody do this? found interesting? found limitations?
 
    cheers,
 

Sebastian Sastre

 

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Lukas Renggli
>     For cases in wich the look of a component should depend on some instance
> state it could be interesting. Has anybody do this? found interesting? found
> limitations?

What we usually do is to give different classes for different
(orthogonal) instance states. You can then style your component from
within the style-sheet. I never felt the need to programatically
modify the CSS.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dynamically manipulated

Sebastian Sastre-2

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Lukas Renggli
> Enviado el: Viernes, 25 de Mayo de 2007 10:04
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] CSS dinamycally manipulated
>
> >     For cases in wich the look of a component should depend on some
> > instance state it could be interesting. Has anybody do this? found
> > interesting? found limitations?
>
> What we usually do is to give different classes for different
> (orthogonal) instance states. You can then style your
> component from within the style-sheet. I never felt the need
> to programatically modify the CSS.
>
> Lukas
>
Right, but when visual posibilities has a big combinatorial then you can use
the states and the dinamyc css classes's values as multiplication factors.
This is not so crazy, take 6 font sizes by 6 colors, that's 36 you can still
using static css, but that goes to 216 if you allow the user to choose also
between 6 fonts.

So I wonder for a convenient way to manage dynamic CSS

        cheers,

Sebastian

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dynamically manipulated

Lukas Renggli
> Right, but when visual posibilities has a big combinatorial then you can use
> the states and the dinamyc css classes's values as multiplication factors.
> This is not so crazy, take 6 font sizes by 6 colors, that's 36 you can still
> using static css, but that goes to 216 if you allow the user to choose also
> between 6 fonts.

Ok, I understand. Isn't this what the style attribute is ment for?

For example when you let the users freely customize the background
color of the page you can add a style attribute to the body tag
overriding the default value of the CSS. In a commercial project I do
this for font-sizes, in this particular case even with JavaScript
support to avoid an unnecessary page reload when switching.

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dynamically manipulated

Avi Bryant-2
In reply to this post by Sebastian Sastre-2
On 5/25/07, Sebastian Sastre <[hidden email]> wrote:

> Right, but when visual posibilities has a big combinatorial then you can use
> the states and the dinamyc css classes's values as multiplication factors.
> This is not so crazy, take 6 font sizes by 6 colors, that's 36 you can still
> using static css, but that goes to 216 if you allow the user to choose also
> between 6 fonts.
>
> So I wonder for a convenient way to manage dynamic CSS

But you can use multiple classes on a given element - so have one set
of classes for font sizes, one for colors, one for fonts, and then
change which three classes the element has when you render it.

html div
         class: self fontClass;
         class: self colorClass;
         class: self fontSizeClass;
         with: 'Hello World'
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dynamically manipulated

Sebastian Sastre-2
Yeah, that would do the trick. Also Lukas pointed that attribute style could
be used anytime if override of ccs is required.

        thanks guys,

Sebastian

 

> -----Mensaje original-----
> De: [hidden email]
> [mailto:[hidden email]] En nombre
> de Avi Bryant
> Enviado el: Viernes, 25 de Mayo de 2007 14:13
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] CSS dynamically manipulated
>
> On 5/25/07, Sebastian Sastre <[hidden email]> wrote:
>
> > Right, but when visual posibilities has a big combinatorial
> then you
> > can use the states and the dinamyc css classes's values as
> multiplication factors.
> > This is not so crazy, take 6 font sizes by 6 colors, that's
> 36 you can
> > still using static css, but that goes to 216 if you allow
> the user to
> > choose also between 6 fonts.
> >
> > So I wonder for a convenient way to manage dynamic CSS
>
> But you can use multiple classes on a given element - so have
> one set of classes for font sizes, one for colors, one for
> fonts, and then change which three classes the element has
> when you render it.
>
> html div
>          class: self fontClass;
>          class: self colorClass;
>          class: self fontSizeClass;
>          with: 'Hello World'
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Jason Johnson-3
In reply to this post by Sebastian Sastre-2
Sebastian Sastre wrote:

> Hi there,
>  
>     I wonder if anybody has done some CSS programatic manipulation.
>  
>     For cases in wich the look of a component should depend on some
> instance state it could be interesting. Has anybody do this? found
> interesting? found limitations?
>  
>     cheers,
>  
>
> Sebastian Sastre
>
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>  

I think CSS has to become a first class citizen (like HTML) first, no? :)
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dinamycally manipulated

Boris Popov, DeepCove Labs (SNN)
I would rather leave it to designers to come up with classes that
describe states and I like to externally from the page. That way you can
change the look without changing the code as well as have multiple looks
for the same content. As soon as look becomes part of content, things
get much uglier than they should be. Remember the days when <table> was
the ultimate layout tool? It's that kind of thing and worse... :)

Cheers!

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Jason Johnson
> Sent: Friday, June 08, 2007 12:40 PM
> To: Seaside - general discussion
> Subject: Re: [Seaside] CSS dinamycally manipulated
>
> Sebastian Sastre wrote:
> > Hi there,
> >
> >     I wonder if anybody has done some CSS programatic manipulation.
> >
> >     For cases in wich the look of a component should depend on some
> > instance state it could be interesting. Has anybody do this? found
> > interesting? found limitations?
> >
> >     cheers,
> >
> >
> > Sebastian Sastre
> >
> >
> >
------------------------------------------------------------------------
> >
> > _______________________________________________
> > Seaside mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
>
> I think CSS has to become a first class citizen (like HTML) first, no?
:)
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Jason Johnson-3
Boris Popov wrote:

> I would rather leave it to designers to come up with classes that
> describe states and I like to externally from the page. That way you can
> change the look without changing the code as well as have multiple looks
> for the same content. As soon as look becomes part of content, things
> get much uglier than they should be. Remember the days when <table> was
> the ultimate layout tool? It's that kind of thing and worse... :)
>
> Cheers!
>
> -Boris
>
>  


I know you really really like this. :)  But having CSS first class just
means more options.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dinamycally manipulated

Boris Popov, DeepCove Labs (SNN)
YAGNI? :)

-Boris

--
+1.604.689.0322
DeepCove Labs Ltd.
4th floor 595 Howe Street
Vancouver, Canada V6C 2T5
http://tinyurl.com/r7uw4

[hidden email]

CONFIDENTIALITY NOTICE

This email is intended only for the persons named in the message
header. Unless otherwise indicated, it contains information that is
private and confidential. If you have received it in error, please
notify the sender and delete the entire message including any
attachments.

Thank you.

> -----Original Message-----
> From: [hidden email] [mailto:seaside-
> [hidden email]] On Behalf Of Jason Johnson
> Sent: Friday, June 08, 2007 12:49 PM
> To: Seaside - general discussion
> Subject: Re: [Seaside] CSS dinamycally manipulated
>
> Boris Popov wrote:
> > I would rather leave it to designers to come up with classes that
> > describe states and I like to externally from the page. That way you
can
> > change the look without changing the code as well as have multiple
looks
> > for the same content. As soon as look becomes part of content,
things
> > get much uglier than they should be. Remember the days when <table>
was

> > the ultimate layout tool? It's that kind of thing and worse... :)
> >
> > Cheers!
> >
> > -Boris
> >
> >
>
>
> I know you really really like this. :)  But having CSS first class
just
> means more options.
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dinamycally manipulated

Ramon Leon-5
In reply to this post by Jason Johnson-3

> I think CSS has to become a first class citizen (like HTML)
> first, no? :) _______________________________________________

No.  Designers aren't programmers and programmers aren't designers, and they
never will be.  

Designers don't want dynamic CSS, and programmers have already lived through
having our dynamic markup (HTML) abused for design, why would we to go
through that again?  Making CSS a first class citizen doesn't give designers
more options, it gives programmers more work.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Jason Johnson-3
Ramon Leon wrote:

>> I think CSS has to become a first class citizen (like HTML)
>> first, no? :) _______________________________________________
>>    
>
> No.  Designers aren't programmers and programmers aren't designers, and they
> never will be.  
>
> Designers don't want dynamic CSS, and programmers have already lived through
> having our dynamic markup (HTML) abused for design, why would we to go
> through that again?  Making CSS a first class citizen doesn't give designers
> more options, it gives programmers more work.
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>  

Ah but you're thinking about just one possibility.  If CSS were first
class and easily manipulatable, then it would be possible to make a CSS
builder directly in Seaside.  Then your company doesn't have to buy
expensive software to allow designers to style your pages.


Having more options to do something doesn't give anyone more work unless
they choose to have more work.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Martial Boniou
In reply to this post by Ramon Leon-5
Ramon Leon a écrit :
|
| > I think CSS has to become a first class citizen (like HTML)
| > first, no? :) _______________________________________________
|
| No.  Designers aren't programmers and programmers aren't designers, and they
| never will be.  

Of course but what about the Flash designers (coders or designers).

I believe that having a dynamic css doesn't urge the designers to
program it. I don't like much this old way of thinking: code and coders
at one side, design tools and designers at the other one. Data vs code.
It brings a lot of bad communications. Languages parse and parse again.
Data are statics and full of redundancies.

Coders and designers should do there work orthogonnally
without annoying each other and with their own point of view. But why
not doing this on the same language core. It would even be nice for
designers to have a bit of coding possibilities like macros. This
standard philosophy results to the failure of Lisp. I hope the trendy
solution like XML/XSLT would give us a future way of composing
page/wiki/application in a more DSL fashion.


|
| Designers don't want dynamic CSS, and programmers have already lived through
| having our dynamic markup (HTML) abused for design, why would we to go
| through that again?  Making CSS a first class citizen doesn't give designers
| more options, it gives programmers more work.
|
| _______________________________________________
| Seaside mailing list
| [hidden email]
| http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Philippe Marschall
In reply to this post by Ramon Leon-5
2007/6/8, Ramon Leon <[hidden email]>:
>
> > I think CSS has to become a first class citizen (like HTML)
> > first, no? :) _______________________________________________
>
> No.  Designers aren't programmers and programmers aren't designers, and they
> never will be.

Amen brother.

Philippe

> Designers don't want dynamic CSS, and programmers have already lived through
> having our dynamic markup (HTML) abused for design, why would we to go
> through that again?  Making CSS a first class citizen doesn't give designers
> more options, it gives programmers more work.
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Jason Johnson-3
Philippe Marschall wrote:

> 2007/6/8, Ramon Leon <[hidden email]>:
>>
>> > I think CSS has to become a first class citizen (like HTML)
>> > first, no? :) _______________________________________________
>>
>> No.  Designers aren't programmers and programmers aren't designers,
>> and they
>> never will be.
>
> Amen brother.
>
> Philippe


The point, besides being demonstrably false in plenty of cases, is
completely irrelevant.  Making CSS a first class citizen in Seaside
doesn't automatically slap shackles on the hands of all programmers.  It
just gives people more options to work with.  It gives people a chance
to come up with something creative.  Just because you (man auf Deutsch,
nicht du/Sie) can't think of anything doesn't mean no one else can either.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Philippe Marschall
2007/6/9, Jason Johnson <[hidden email]>:

> Philippe Marschall wrote:
> > 2007/6/8, Ramon Leon <[hidden email]>:
> >>
> >> > I think CSS has to become a first class citizen (like HTML)
> >> > first, no? :) _______________________________________________
> >>
> >> No.  Designers aren't programmers and programmers aren't designers,
> >> and they
> >> never will be.
> >
> > Amen brother.
> >
> > Philippe
>
>
> The point, besides being demonstrably false in plenty of cases, is
> completely irrelevant.  Making CSS a first class citizen in Seaside
> doesn't automatically slap shackles on the hands of all programmers.  It
> just gives people more options to work with.  It gives people a chance
> to come up with something creative.  Just because you (man auf Deutsch,
> nicht du/Sie) can't think of anything doesn't mean no one else can either.

Then show us code and a cool application.


> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dinamycally manipulated

Ramon Leon-5
In reply to this post by Jason Johnson-3
> Ah but you're thinking about just one possibility.  If CSS
> were first class and easily manipulatable, then it would be
> possible to make a CSS builder directly in Seaside.  Then
> your company doesn't have to buy expensive software to allow
> designers to style your pages.
>
>
> Having more options to do something doesn't give anyone more
> work unless they choose to have more work.

Been there, done that, doesn't work, designers don't like code, and
programmers don't like the code generated by ANY fancy graphic front end
program.  Design doesn't belong in code and code doesn't belong in design.
CSS and HTML work quite nicely.

The last thing I want is another dreamweaver/flash thingy that writes
horrible Smalltalk code in Seaside that I have to work with.  CSS doesn't
belong in code.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

RE: CSS dinamycally manipulated

Ramon Leon-5
In reply to this post by Martial Boniou
> I believe that having a dynamic css doesn't urge the
> designers to program it.

Of course not, because designers don't program.

> I don't like much this old way of
> thinking: code and coders at one side, design tools and
> designers at the other one. Data vs code.

It's not old thinking, it's reality!

> Coders and designers should do there work orthogonnally
> without annoying each other and with their own point of view.

Agreed, hence HTML for programmers, and CSS for designers.

> But why not doing this on the same language core.

Because if designers understand the language we work in, they aren't
designers, they're programmers.

> It would even be nice for designers to have a bit of coding
> possibilities like macros. This standard philosophy results

Then they become programmers, not designers.

> to the failure of Lisp. I hope the trendy solution like
> XML/XSLT would give us a future way of composing
> page/wiki/application in a more DSL fashion.

You have a design DSL already, it's called CSS.


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Sebastian Sastre-2
Re: [Seaside] CSS dinamycally manipulated

+1, the whole reason behind css is to separate it from content, why mash them back together? Instead we should remove #style: and go the other way.

Cheers!

-Boris
(Sent from a BlackBerry)

----- Original Message -----
From: [hidden email] <[hidden email]>
To: 'Seaside - general discussion' <[hidden email]>
Sent: Sat Jun 09 15:04:34 2007
Subject: RE: [Seaside] CSS dinamycally manipulated

> I believe that having a dynamic css doesn't urge the
> designers to program it.

Of course not, because designers don't program.

> I don't like much this old way of
> thinking: code and coders at one side, design tools and
> designers at the other one. Data vs code.

It's not old thinking, it's reality!

> Coders and designers should do there work orthogonnally
> without annoying each other and with their own point of view.

Agreed, hence HTML for programmers, and CSS for designers.

> But why not doing this on the same language core.

Because if designers understand the language we work in, they aren't
designers, they're programmers.

> It would even be nice for designers to have a bit of coding
> possibilities like macros. This standard philosophy results

Then they become programmers, not designers.

> to the failure of Lisp. I hope the trendy solution like
> XML/XSLT would give us a future way of composing
> page/wiki/application in a more DSL fashion.

You have a design DSL already, it's called CSS.


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: CSS dinamycally manipulated

Jason Johnson-3
In reply to this post by Ramon Leon-5
Ramon Leon wrote:
> Been there, done that, doesn't work, designers don't like code, and
> programmers don't like the code generated by ANY fancy graphic front end
> program.  Design doesn't belong in code and code doesn't belong in design.
> CSS and HTML work quite nicely.
>
> The last thing I want is another dreamweaver/flash thingy that writes
> horrible Smalltalk code in Seaside that I have to work with.  CSS doesn't
> belong in code.
>  

So you're saying designers shouldn't use "fancy graphic front end's" and
just write everything by hand in CSS?  You can't be serious.

Anyway, it doesn't matter what you, I or we on the list think people
*should* be doing, there are people who *do* want to do such things.  
The reason systems like Joomla are popular is because designers can
design the site from within the site.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
12