World: r3wp
[!REBOL3 GUI]
older newer | first last |
Cyphre 8-Mar-2011 [6668] | There are multiple ways how to doit....But If you are going to be style author you just need to know the syntax used in stylize command, nothing more ;) |
Pekr 8-Mar-2011 [6669] | ad 2) e.g. my example of having panel style, with borders, without the borders ... |
Ladislav 8-Mar-2011 [6670] | re "I thought that you might find a way of how to do it in terms of just one panel" - it is possible to do it in "just one group". Do not forget, that R3-GUI H/Vgroups are more similar to R2 layouts than R3-GUI (H/V)panels. |
Pekr 8-Mar-2011 [6671x3] | I am trying to come up with usage cases here .... |
I think (and maybe I am wrong), that even with VID we kind of had cascaded styles. If you needed different style configuration, you used stylize, and stored new config under different name, e.g. H1, H2, H3, LAB in above example, etc. While CSS allows you to use just one name, and multiple styling set-ups. The question is here, how you identify it in the layout flow, what set-up should you use, and if it would be obvious. In CSS, you have ID, CLASS helpers ... | |
I mean "if it would be obvious looking into the layout source code" | |
Cyphre 8-Mar-2011 [6674x2] | Pekr, I think you are wrong here...I suggest to study for example this: http://css.maxdesign.com.au/selectutorial/ |
(especially the 'selectors' part) | |
Pekr 8-Mar-2011 [6676] | I have not intention right now to burry deep into CSS, as I think I know enough to understand consequences. Your "you are wrong here" does not work for me :-) Wrong in what aspect? I still think, that I do understand how you style html pages :-) |
Cyphre 8-Mar-2011 [6677x2] | By 'you are wrong' I meant your understanding whe 'cascading styles' really are is a bit blurry...if you check the 'selectors' section you'll see that this topic can be a bit more complex. |
And the question still stands the same: Do we really need this? If so do we really need it all? If not what we really need? :) | |
Pekr 8-Mar-2011 [6679x2] | CSS is clearly much more flexible in setups. You use tree of definitions, which are then applied in particular cases in document hierarchy. If I am not mistaken, right now we don't have no easy way, of how to make e.g. first button in a last row of the panel e.g. red, unless you first define red button, and use it in the source of the layout :-) |
If we need it? Who knows. Maybe not for the business graphics. Maybe so, if we would like to make model closer to CSS, from various reasons ... | |
Cyphre 8-Mar-2011 [6681] | yes, no hi-priority at the moment... |
Pekr 8-Mar-2011 [6682] | Cyphre - I can simply imagine, how we extend stylize to allow such definitions. But - in terms of html, you have IDs, CLASSes, and you have also the document tree, so you might know, where to apply which part of an CSS. What I can't imagine is - we have layout flow ... and no ID, CLASS definitions, we also don't keep tree information of the layout (faces), or do we? So how do you instruct, in your layout, that first button in the panel should use button-red definition? Just curious about what possibilities there are :-) |
Rebolek 8-Mar-2011 [6683] | why ID, when you can call face directly? And of course there's tree of gobs, that's how gobs works. |
Maxim 8-Mar-2011 [6684] | I've done a few quite complex CSS setups working with jquery, and at some point, CSS selectors become very brittle because the priority rules become a bit hard to properly prioritize. To reflect this, in some setups not all browsers actually match the same CSS selection rules. |
Pekr 8-Mar-2011 [6685] | Rebolek - what has an ID in common with the face name? Short answer - nothing :-) |
Henrik 8-Mar-2011 [6686] | In R3 GUI, style names themselves act as classes, where in HTML you have a fixed set of tags that need to have classes. IDs are set-word!s, so there is no need to add any superfluous layer to identify specific faces. |
Maxim 8-Mar-2011 [6687x2] | Henrik, not quite. using CSS you effectively "tag" your gui and then you can apply effects to multiple types of things which match a tag or pattern. |
a tag is a cross-cutting concept, not a family or class/type like concept. | |
Pekr 8-Mar-2011 [6689] | OK, let's say set-words can simulate IDs, then Rebolek is correct, sorry. |
Cyphre 8-Mar-2011 [6690] | yup, Rebolek was right. |
Henrik 8-Mar-2011 [6691] | Maxim, this is necessary in HTML, because of the fixed naming of HTML tags. set-words in the R3 GUI do this. |
Pekr 8-Mar-2011 [6692] | But - it might be a bit different anyway. If you make b1: button, it is a set-word, a name. And now how do you use stylize, to refer to such a name? Stylize creates new style name, e.g. b1, but that is direct name for the style itself |
Henrik 8-Mar-2011 [6693x2] | in combination with style names, that is. |
Pekr, you don't stylize a singel face. you stylize a style and then create an instance of that style as a face. | |
Pekr 8-Mar-2011 [6695] | Henrik - but then ID != set-word |
Maxim 8-Mar-2011 [6696] | no henrik, its a completely different thing. you can use a class name for completely different classes. a button and an paragraph can share the same class name. and you can then affect them both in the same way. |
Pekr 8-Mar-2011 [6697] | stylize [ b1 button [] ] view [b1] differs to view [b1: button] |
Maxim 8-Mar-2011 [6698x2] | so classes are neither types nor serial IDs. |
(in html) | |
Henrik 8-Mar-2011 [6700] | Pekr, you are mixing up two things. The style name is not affected by the face name. |
Cyphre 8-Mar-2011 [6701] | yes, class in html is just an 'group-id' |
Maxim 8-Mar-2011 [6702] | classes in html/css really act as associative tags. in GLASS I am using #issue to simulate html class="label" |
Henrik 8-Mar-2011 [6703] | Maxim, I was talking about IDs, not classes. |
Maxim 8-Mar-2011 [6704x2] | though this is just something I've played with its probably going to stick, and multiple tags will be applicable to any control. |
ok, I guess I mis-interpreted the angle of one of your replies :-) | |
Pekr 8-Mar-2011 [6706] | Henrik - ok, so to be clear - show me possible stylize definition of a button variant, and how you refer to it in the layout code? |
Henrik 8-Mar-2011 [6707] | I suggest that classes in the R3 GUI is not useful for the reason that it interferes with the "intelligence" layer, where we already have: 1. tags to identify state and capability of a face, such as finding the default button in the window or whether the button is disabled. 2. name to identify a specific face 3. style name to identify the style and to create a distinct appearance 4. the ability to group faces by panels 5. have information about the ordering of faces stored in the face tree 6. use specific policies on how to act on a particular face with particular tags |
Robert 8-Mar-2011 [6708] | (good feature list. We should keep this.) |
Henrik 8-Mar-2011 [6709] | Pekr: stylize [my-button: button [facets: [text: "Pekr!"]]] view [my-button] |
Pekr 8-Mar-2011 [6710x4] | Henrik - you see? I just wanted to have a "button" inside of view, and by change of stylize parameter, to change some aspect of the button. But I might be mixing few things together. In your above example, my-button is a class. So your saying that in R3 GUI, classess are not usefull, is an incorrect statement, as we already do have classes? Or what you would call your 'my-button then? |
ad 1. I have a feeling, that we incorrectly mixed two things. TAGs, in my vocabulary or understanding, are "categorisation" elements. As for "state", there should be FLAGs, no? :-) | |
The feature list is not complete, we miss - 5a. ordering of faces for tabbing purpose | |
There is a slight discrepancy in the syntax of stylize and view. Not saying, that they should be identical, just a food for thought: stylize [my-button: button [facets: [text: "Pekr!"]]] view [ b1: my-button b2: button options [text: "Henrik!"] ] 1) 'Stylize could theoretically use the same syntax as 'view? So the code above could just be: stylize [my-button: button options [text: "Pekr!"] That would make it more (almost) compatible with the layout definition 2) Currently set-word inside the stylize defines a new style (class), whereas a set-word inside of 'view, defines a face name = ID. There is no simple way, of how to resolve that, maybe something like: stylize [ my-button: button options [text: "Pekr!"] button options [text: "Henrik!" name: b1] ; no set-word, so probably a problem syntaxwise. We simply can't style particular named face? ] view [ my-button b1: button] ; b1 kind of simulates ID, inherits from stylize definition Of course, it all depends how far do we want to go. We can introduce completly different semantics to the stylize function, even a complete selector behaviour from CSS, if there is a need .... | |
Henrik 8-Mar-2011 [6714x3] | So your saying that in R3 GUI, classess are not usefull, is an incorrect statement, as we already do have classes? Or what you would call your 'my-button then? - A style is not a class in the HTML sense, where you can apply a particular class to any tag. |
I just wanted to have a button" inside of view, and by change of stylize parameter, to change some aspect of the button." - the method I posted is exactly what you need to do in order to allow such a change. | |
There is a slight discrepancy in the syntax of stylize and view. - there should be, since they are not the same at all: stylize: func [ "Create one or more styles (with simple style dialect)." list [block!] "Format: name: [def], name: parent [def]" ... | |
TomBon 8-Mar-2011 [6717] | http://design.canonical.com/2011/03/introducing-overlay-scrollbars-in-unity/ |
older newer | first last |