Generating CSS

72 views
Skip to first unread message

Scott L. Burson

unread,
Jun 5, 2012, 1:29:15 AM6/5/12
to webl...@googlegroups.com
Hi all,

As we probably all know, CSS as a language has its limitations,
notably the complete absence of any abstraction mechanisms. I've been
meaning to check out some CSS compilers, but haven't yet.

But in the course of fiddling with my site the other day, I
experimented with some layout by just supplying :STYLE attributes
inside WITH-HTML, rather than by assigning classes and adding clauses
to the CSS files.

And then it struck me. Why do we Weblocks users need CSS files at
all? We're generating the HTML anyway -- why don't we generate the
styles at the same time? We would have all the abstraction
capabilities of Common Lisp at our fingertips and we wouldn't need to
earn yet another language.

Basically everything in Weblocks that generates HTML would call a new
method to get the style for each element. I haven't started to work
out all the details, but doesn't this sound like a good idea?

-- Scott

Leslie P. Polzer

unread,
Jun 5, 2012, 2:35:08 AM6/5/12
to webl...@googlegroups.com
I've been planning this for a long time. It's not hard and incredibly
useful, and the current CSS files are a mess. Go ahead and I might
just jump in developing. It's good to have more than one person doing
serious work on Weblocks again. :) Also, sorry for not merging your
accumulated heap of patches yet. It's definitely on my TODO.

Leslie

Nandan Bagchee

unread,
Jun 5, 2012, 4:36:44 AM6/5/12
to webl...@googlegroups.com

Weblocks already has css file concatenation at the widget level. But that means writing css, of course.

I do know that when I wanted something to just work, I put it in the render fn as inline CSS (:style attribute).

So I think your idea is very promising.

Scott L. Burson

unread,
Jun 5, 2012, 2:01:47 PM6/5/12
to webl...@googlegroups.com
On Mon, Jun 4, 2012 at 11:35 PM, Leslie P. Polzer
<s...@viridian-project.de> wrote:
>
> I've been planning this for a long time. It's not hard and incredibly
> useful, and the current CSS files are a mess. Go ahead and I might
> just jump in developing. It's good to have more than one person doing
> serious work on Weblocks again. :)

Okay, maybe I will take a crack at it.

> Also, sorry for not merging your
> accumulated heap of patches yet. It's definitely on my TODO.

Those pull requests are just the things I picked out as the most
likely to be useful and not cause anyone problems. While reviewing
them is never a bad idea, if you don't have time to do that, I think
you should just go ahead and merge them.

If you look in my fork you'll see a whole bunch more stuff I haven't
even made pull requests for yet. It's of varying degrees of
importance. But it's all stuff I'm using for my site.

Speaking of BountyOSS, take a look -- I've made some minor
improvements along the lines you were suggesting.

-- Scott

Leslie P. Polzer

unread,
Jun 7, 2012, 4:14:59 AM6/7/12
to webl...@googlegroups.com
On Tuesday, June 5, 2012 8:01:47 PM UTC+2, Scott L. Burson wrote:

Those pull requests are just the things I picked out as the most
likely to be useful and not cause anyone problems.  While reviewing
them is never a bad idea, if you don't have time to do that, I think
you should just go ahead and merge them.

I gave them a look and merged them all. It's a pity we don't have a proper frontend-based test suite at the moment.

 
Speaking of BountyOSS, take a look -- I've made some minor
improvements along the lines you were suggesting.

Looks much better! You might want to remove the underlining from menu links as well.

  Leslie
Reply all
Reply to author
Forward
0 new messages