styling the flyout button

95 views
Skip to first unread message

Sketch

unread,
Feb 5, 2023, 6:12:41 AM2/5/23
to Blockly
Hi,
I would like to style the flyout button to fit a bit more into my design,I've used css to style it but nothing changes no padding,no margin etc.

css:
.blocklyFlyoutButton {
    fill: var(--OnTertirayTonal);
  margin-left:auto;
  margin-right:auto;
  border-radius:20px;
  padding:8px;
    cursor: default;
}

Thanks

Neil Fraser

unread,
Feb 10, 2023, 2:18:28 PM2/10/23
to Blockly
This is the right track.  But be aware that marign-left/right, border-radius, and padding are CSS attributes for HTML elements.  The flyout and its buttons are SVG elements.  SVG elements have a mostly different set of CSS properties.  So 'fill' will work fine (that's SVG) as will 'cursor' (that's both SVG and HTML).

However, I don't think there's a way to modify radius and location on SVG elements using CSS.

Blake just added a feature to the next release which will allow you to set the radius of these buttons by setting a class variable:
Reply all
Reply to author
Forward
0 new messages