255 lines
5 KiB
Text
255 lines
5 KiB
Text
================================================================================
|
|
Declare empty classes keyword in the root
|
|
================================================================================
|
|
classes
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(classes (keyword_classes))
|
|
)
|
|
|
|
================================================================================
|
|
Declare classes block with item block
|
|
================================================================================
|
|
classes: {
|
|
foo: {
|
|
style: {
|
|
fill: "#44C7B1"
|
|
}
|
|
}
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(classes
|
|
(keyword_classes)
|
|
(colon)
|
|
(block
|
|
(class_name)
|
|
(colon)
|
|
(class_block
|
|
(attribute
|
|
(keyword_style)
|
|
(colon)
|
|
(block
|
|
(attribute
|
|
(attr_key)
|
|
(colon)
|
|
(attr_value
|
|
(string (string_fragment))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare classes block with item inline
|
|
================================================================================
|
|
classes: {
|
|
foo.style: {
|
|
fill: "#44C7B1"
|
|
}
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(classes
|
|
(keyword_classes)
|
|
(colon)
|
|
(block
|
|
(class_name)
|
|
(dot)
|
|
(attribute
|
|
(keyword_style)
|
|
(colon)
|
|
(block
|
|
(attribute
|
|
(attr_key)
|
|
(colon)
|
|
(attr_value
|
|
(string (string_fragment))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare classes inline with item inline
|
|
================================================================================
|
|
classes.foo.style: {
|
|
fill: "#44C7B1"
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(classes
|
|
(keyword_classes)
|
|
(dot)
|
|
(class_name)
|
|
(dot)
|
|
(attribute
|
|
(keyword_style)
|
|
(colon)
|
|
(block
|
|
(attribute
|
|
(attr_key)
|
|
(colon)
|
|
(attr_value
|
|
(string (string_fragment))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare classes inline with item block
|
|
================================================================================
|
|
classes.foo: {
|
|
style: {
|
|
fill: "#44C7B1"
|
|
}
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(classes
|
|
(keyword_classes)
|
|
(dot)
|
|
(class_name)
|
|
(colon)
|
|
(class_block
|
|
(attribute
|
|
(keyword_style)
|
|
(colon)
|
|
(block
|
|
(attribute
|
|
(attr_key)
|
|
(colon)
|
|
(attr_value
|
|
(string (string_fragment))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare shape with a class
|
|
================================================================================
|
|
foo.class: biz
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(shape
|
|
(shape_key)
|
|
(dot)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_name)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare shape with many classes
|
|
================================================================================
|
|
fee.class: [biz]
|
|
foo.class: [biz; baz]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(shape
|
|
(shape_key)
|
|
(dot)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_list
|
|
(class_name)
|
|
)
|
|
)
|
|
)
|
|
(shape
|
|
(shape_key)
|
|
(dot)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_list
|
|
(class_name)
|
|
(class_name)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
================================================================================
|
|
Declare a class in the container
|
|
================================================================================
|
|
foo: {
|
|
class: biz
|
|
class: [biz]
|
|
class: [biz; baz]
|
|
class: [
|
|
biz
|
|
baz
|
|
]
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(source_file
|
|
(container
|
|
(container_key)
|
|
(colon)
|
|
(block
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_name)
|
|
)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_list
|
|
(class_name)
|
|
)
|
|
)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_list
|
|
(class_name)
|
|
(class_name)
|
|
)
|
|
)
|
|
(attribute
|
|
(keyword_class)
|
|
(colon)
|
|
(class_list
|
|
(class_name)
|
|
(class_name)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|