On Tuesday, March 6, 2018 at 6:02:46 AM UTC-6, Edward K. Ream wrote:

> The info item #786 Design principles for style sheets 
<https://github.com/leo-editor/leo-editor/issues/786> [summarizes this 
thread].

It's becoming clearer to me that "indirect css" is just misguided.  An 
example should make this clear.

Here is part of the new, simplified, direct, css node for the status area:

QLineEdit#status1[style_class ~= 'info'],
QLineEdit#status2[style_class ~= 'info'] {
    background: @solarized-blue;
    color: @solarized-white;
}
QLineEdit#status1[style_class ~= 'fail'],
QLineEdit#status2[style_class ~= 'fail'] {
    background: @solarized-red;
    color: @solarized-white;
}

This simple description results from *eliminating* four @color settings.  
The old way was something like this:

QLineEdit#status1[style_class ~= 'info'],
QLineEdit#status2[style_class ~= 'info'] {
    background: @blah_blah_blah1;
    color: @blah_blah_blah2;
}

QLineEdit#status1[style_class ~= 'fail'],
QLineEdit#status2[style_class ~= 'fail'] {
    background: @blah_blah_blah3;
    color: @blah_blah_blah3;
}

:-)

The old way *obscures* these settings! We don't know what colors the 
"blah_blah_blah" settings mean!

Unlike politicians, I have the luxury of admitting my mistakes.  In fact, I 
am thrilled to see that a scheme that I thought was clever was actually 
really stupid :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to