-
Notifications
You must be signed in to change notification settings - Fork 1
Classes
This is a list of the classes that might be added to a block.
Note that these classes will almost always be added to an input/block's <g>
element, not the path that represents the background. The one major exception is boolean inputs, which are just a <path>
element.
The block group itself gets the class block
. The background <path>
element for each block has the class block-background
. In horizontal mode, their icons have the class icon
.
operators
looks
sounds
motion
control
event
-
reporter
- all reporters have this class boolean
-
strings
- strings and numbers now both have this shape.
Blocks that aren't reporters (sometimes called "stack blocks") may have one or more of these classes depending on its shape. A block will have the stack
class unless it has the class hat
or c-block
. For example, the forever
block will have the classes c-block
and cap
.
hat
stack
-
end
- a terminal/cap block, likestop this script
orforever
. -
c-block
- any c-block, likeif
orforever
-
else
- a c-block with more than one substack input (specifically, theif else
block)
Inputs all receive the input
class. The background <path>
element for each input has the class input-background
. The input will also receive one of the following classes to reflect their type:
-
input-string
- this applies to both strings an numbers input-dropdown
-
input-boolean
- this will be on the path itself, as opposed to on a<group>
-
replaceable
- While dragging a reporter around, inputs or other reporters might have a "replacement glow" around them. When this happens, they'll have the classreplaceable
. -
insertion-marker
- currently broken. insertion markers are those "ghost blocks" that appear while you're dragging something. They'll have this class instead of a category name.
- The workspace SVG will ether have the class
horizontal
orvertical
depending on if it uses the horizontal or vertical grammar. - In horizontal mode, the icons will have the class
icon
. - Dropdown menus have the class
dropdown-menu
, as well as one of the category classes from above.