Wess: the Wedge preprocessor for CSS

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: WeCSS: the Wedge CSS parser
« Reply #15 on May 26th, 2011, 10:29 PM »
It never will and it's for the best. Just like jQuery for JS, we need a higher level library for CSS and that what wecss is aiming to be!
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

[Unknown]

  • We-Gen
  • Posts: 77
Re: WeCSS: the Wedge CSS parser
« Reply #16 on June 19th, 2011, 10:42 AM »
I belong to the school of semantics, by far, although I think using inheritance is only sensible.

I know I'm often the first person to write my own version of something, and I love learning from it and see if I can do better.  And here as well, I think writing a PHP version makes a lot of sense.  But, considering Sassy recently moved to using CSS-style syntax, and I personally hate Python style syntax, perhaps it makes sense to gravitate to the rules of another syntax?

That could make the documentation needs lighter.

-[Unknown]

groundup

  • Freshman
  • Posts: 25
Re: WeCSS: the Wedge CSS parser
« Reply #17 on June 19th, 2011, 11:30 PM »
I agree with Unknown - keep it standard. Sounds like something that could be very useful.

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: WeCSS: the Wedge CSS parser
« Reply #18 on June 20th, 2011, 12:28 AM »
Quote from [Unknown
link=msg=262641 date=1308472960]
I belong to the school of semantics, by far, although I think using inheritance is only sensible.
Best of both worlds here :)
Quote
I know I'm often the first person to write my own version of something, and I love learning from it and see if I can do better.  And here as well, I think writing a PHP version makes a lot of sense.
WeCSS is not a PHP version of Sass per se -- it's more like a Sass-inspired original library.
Quote
But, considering Sassy recently moved to using CSS-style syntax,
...And I'm not going down the same route.
Quote
and I personally hate Python style syntax, perhaps it makes sense to gravitate to the rules of another syntax?
By another syntax, you mean the 'regular' CSS syntax?

Well, two things.
First, Sass added support for 'normal' syntax because of users requests. Probably couldn't get the hang of it... Dunno. From what they said on their website, it's quite clear to me they're still going to use the Sass syntax themselves.
Secondly, Wedge *does* support the CSS syntax. Really. It's just that you can't mix css and wecss syntaxes together. Only makes sense to me... Once you see my source code, you'll understand how complex it is already.
And because of multiple stylesheets and the styling system I described elsewhere, you can't use css syntax in any files that are related to the index stylesheet (i.e. index.css, sections.css, and any overrides like index.ie6.css etc.)
However, you may perfectly use wecss syntax in the index file, and css syntax in your plugin's file (my-stupid-addon.css), as long as you don't add it to the main file list. (i.e. your plugin must load it separately through add_css_file(), instead of adding it to the css file list array.)

One thing to note, though, is that I haven't tested the extent of what you can do in the css syntax. While all functions are available (color, etc), pseudo-language constructs like 'extend' may not be available (although you can use the alternative syntax for it, the 'base:' rule.)
Quote
That could make the documentation needs lighter.
I'm foolishly hoping that themers will find enough documentation just by reading through the index.css file ;) It has an introduction comment as well... (About a page's worth of details.)
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

[Unknown]

  • We-Gen
  • Posts: 77
Re: WeCSS: the Wedge CSS parser
« Reply #19 on June 20th, 2011, 02:14 AM »
I think you may be dreaming on the documentation front, but who knows, luck happens.

Well, I'm currently more of a fan of lesscss anyway (in part also because of its js-side implementation in addition to js and php server-side implementations.)  I know compass is uber popular, but it doesn't seem interesting to me.  I can see making the curlies optional, like in PHP with if, but in general I just like curlies.

I definitely want to give it a try.  Are you developing it as just part of Wedge or as a discreet module?  For any parsing system, like TOX-G, less, sassy, or this wecss, I definitely think test-driven development makes sense - do you have tests or just using the Wedge css as that for now?

-[Unknown]

Arantor

  • With a Box
  • I'm a shooting star leaping through the skies, like a tiger defying the laws of gravity...
  • Posts: 14,000
Re: WeCSS: the Wedge CSS parser
« Reply #20 on June 20th, 2011, 02:35 AM »
It's being developed as part of Wedge rather than a standalone module though off the top of my head I think you could probably separate it out without too much fuss.
  When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest.


live627

  • Talking Head
  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,503
Re: WeCSS: the Wedge CSS parser
« Reply #21 on November 14th, 2011, 05:46 AM »
How do we use the unextends keyword?

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: WeCSS: the Wedge CSS parser
« Reply #22 on November 14th, 2011, 06:48 AM »
It isn't implemented. My algorithm was flawed so I postponed it. Instead I implemented a remove keyword for graphic elements. Should be in Warm.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

live627

  • Talking Head
  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,503
Re: WeCSS: the Wedge CSS parser
« Reply #23 on November 14th, 2011, 06:50 AM »
I see both in the code. Although you say 'unextend', the regexes have 'unextends'. Also, what's the difference between this and 'reset'?

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: WeCSS: the Wedge CSS parser
« Reply #24 on November 14th, 2011, 07:42 AM »
'final' means that related inherited classes will disregard this rule, which is only for the 'parent' to deal with.

'@remove' followed by a full line will scan the entire file (or set of files) for that line and remove it, allowing for easy removal of graphic files that might use space for nothing in an inherited skin.
It's not very practical, but it does its job.

'unextends?' (that is, in regex, 'unextend or unextends') means the ability to simply un-inherit a class from another...
i.e. .windowbg2 extends .windowbg, and if later in an inherited skin I say '.windowbg2 unextends .windowbg', it will cancel the previous request...
Although, as I said, I'm not sure it works. And it can probably get too complicated -- can I unextend .windowbg from .windowbg3 if .windowbg3 only extends .windowbg2, without unextending .windowbg from .windowbg2 as well? See, that kind of crap...
Thankfully, an inherited skin will always know what its parent is about, and what code it holds, so it should be easy to simply redefine the rules you don't like. But, ideally, unextends should be cool if it was thoroughly tested. Which it hasn't been.
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

ziycon

  • We-Gen
  • Posts: 121
WESS!?
« Reply #25 on May 2nd, 09:23 AM »
Maybe I missed a post but what s this WESS thats talked about, is it related to style sheets?

live627

  • Talking Head
  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,503
Re: WESS!?
« Reply #26 on May 2nd, 09:30 AM »
WeCSS

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: WESS!?
« Reply #27 on May 2nd, 09:48 AM »
WeCSS is the old name... John being the only one who prefers it, and there are more things to worry about that this... :P

Anyway, if you'd read the feature list, it has its own topic....
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)

ziycon

  • We-Gen
  • Posts: 121
Re: Wess: the Wedge preprocessor for CSS
« Reply #28 on May 2nd, 09:51 AM »
Quote from Nao on May 2nd, 09:48 AM
WeCSS is the old name... John being the only one who prefers it, and there are more things to worry about that this... :P

Anyway, if you'd read the feature list, it has its own topic....
I thought it was related to CSS but was unsure, I've been working my way through all the posts on the site but it takes some time ;)

Nao

  • Madman
  • With a Box
  • If you say so.....
  • Posts: 13,074
Re: Wess: the Wedge preprocessor for CSS
« Reply #29 on May 2nd, 10:09 AM »
Actually, Wess is a behemoth that deals both with CSS and JavaScript, but it does far more work on CSS than JS. The JS jobs consists in minifying the files, as well as transforming $txt strings and doing @if tests (albeit a very limited set of our usual keywords... IIRC, it only supports 'member' and 'guest', at this point, because there's not much need for anything else...?)
...« I say wedge wedge (in the butt) »
 « Everyone knows rock attained perfection in 1974. It's a scientific fact. » (Homer Simpson)