Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-03-16 13:56:34

JAC
Xinha Community Member
Registered: 2005-03-16
Posts: 11

Managing styles and stylelist

When working with the stylelist, is there any way to list a style with a "user friendly" name which is defined elsewhere (either earlier in the page or in an extenal style sheet)?

I can use: config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});

but it laborious if I need to define a longer style.

Thanks!

Offline

#2 2005-03-19 01:24:13

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Managing styles and stylelist

JAC wrote:

When working with the stylelist, is there any way to list a style with a "user friendly" name which is defined elsewhere (either earlier in the page or in an extenal style sheet)?

I can use: config.stylistLoadStyles('p.pink_text { color:pink }', {'p.pink_text' : 'Pretty Pink'});

You can use
  config.stylistLoadStyleSheet('/path/to/mystyles.css', {'p.pink_text' : 'Pretty Pink'});

if you can think of a better way, submit a ticket, or better, a patch smile


James Sleeman

Offline

#3 2005-03-30 10:29:37

JAC
Xinha Community Member
Registered: 2005-03-16
Posts: 11

Re: Managing styles and stylelist

gogo wrote:

You can use
  config.stylistLoadStyleSheet('/path/to/mystyles.css', {'p.pink_text' : 'Pretty Pink'});

if you can think of a better way, submit a ticket, or better, a patch smile

I couldn't get the above code to work. I don't know what I was doing wrong, but the following worked for me:

        xinha_config.stylistLoadStylesheet('http://www.path-to-my.com/styles.css');
        xinha_config.stylistLoadStyles('.pink_text', {'p.pink_text' : 'Pretty Pink'});

where p.pink_text is defined in styles.css

cheers,
Gill

Offline

Board footer

Powered by FluxBB