On Sat, 2016-06-04 at 12:21 +0530, Kamalpreet Grewal wrote:
On Thu, Mar 10, 2016 at 7:14 PM, Tavmjong Bah
<tavmjong@...8...>
wrote:
<snip>
>
> * Clicking on '+' at bottom
>
> Opens up text dialog to add new selector. If the selector is a
> Class
> selector, adds the class attribute to the selected objects with the
> value of the selector name. If the class attribute already exists,
> appends the selector name to the class attribute value (the class
> attribute can include more than one class name).
I have been able to implement the former functionality in this case.
Discussing the latter case, i.e. when class attribute already exists
for an object and say, one selector value has been added to object
previously. Now if the user again wishes to add a different selector,
will that be appended? Can an object have more than one selectors?
Yes, it is possible to have more than one class value:
class="button red"
<snip>
>
> This dialog could replace the "Selection Sets" dialog, using CSS
> class
> attributes to define sets.
>
>
> Please comment on the dialog here or at:
>
>
http://wiki.inkscape.org/wiki/index.php/Style_Editor
In the design, selectors have been represented in different ways. I
believe each has its own significance. Some starting with a '#',
others with a '.' and remaining with alphabets. To me, those
starting
with a # are object ids and those starting with dots look like a
group
of objects have a similar attribute. If something different, please
do
mention it.
# -> Object id's
. -> Class id's
blank Element (Object) type (i.e. <text>)
See:
http://www.w3schools.com/cssref/css_selectors.asp
So does this imply, I will check what type of object is selected,
like
if a single object, I can give the selector name == object id? Also
will the style dialog contain all the objects in the drawing
categorised under some selector? For an instance, selectors with
object ids will be added to the style dialog as any object is added
to
the drawing.
This may take some discussions... but a start would be to show only the
selectors found in the style element. I don't think we want to add in
this view all elements (objects) just because the have an id. (We could
add a view that shows the entire document as a tree.) To add an object
via its id, one would select the object and then click on the '+'
button at the bottom. This could open an entry box (GtkEntry) with the
object's id prefilled in. The user could use this default or could
change the entry to a class or element type.
Tav