I have been using sass (and compass) on several mobile web app
projects and have loved it.  Recently I jumped back to a desktop
application using Qt and decided to see if I could use sass to
simplify the management of the stylesheets used in the application.

Qt uses a CSS based styling syntax and most things are working fine.
But I have run into two issues that I don't know how to handle and
would appreciate any pointers or patches people could recommend that I
used.  (I must confess that I don't know ruby, so writing the code
myself would not be easy)

1) Qt's support for rgba() in a color requires a format like:

QWidget {
  color: rgba(255, 50, 0, 50%);
}

instead of the CSS standard

QWidget {
  color: rgba(255, 50, 0, 0.5);
}

I am fine with putting the colors into sass using the CSS formatting
method, but is there any way to override the output from sass so it
writes out the colors in the qt required format?

2) Qt stylesheets have a way to specify gradients that does not parse
as valid CSS.  (see: 
http://doc.trolltech.com/latest/stylesheet-reference.html#gradient)

For example:

/* linear gradient from white to green */
 QTextEdit {
     background: qlineargradient(x1:0, y1:0, x2:1, y2:1,
                 stop:0 white, stop: 0.4 gray, stop:1 green)
 }

When I put this in an scss file and run it through sass, I get an
"Invalid CSS after ..." error.

Is there any way to extend sass to allow this to pass through the
system?

I really want to see if there is a way to bring the power of sass to
Qt.  My stylesheets now are a complete mess with magic color variables
and redundancies all over the place.  After seeing the power of sass/
compass on my web apps it is driving me crazy trying to do things the
old way. :)


Thanks,
Allen


-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to h...@googlegroups.com.
To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.

Reply via email to